#include <C4Window.h>
Public Types | |
enum | WindowKind { W_GuiWindow, W_Console, W_Viewport, W_Fullscreen, W_Control } |
Public Member Functions | |
C4Window () | |
virtual | ~C4Window () |
virtual void | Clear () |
virtual void | Close ()=0 |
virtual void | CharIn (const char *) |
virtual bool | ReInit (C4AbstractApp *pApp) |
virtual void | EnumerateMultiSamples (std::vector< int > &samples) const |
bool | StorePosition (const char *szWindowName, const char *szSubKey, bool fStoreSize=true) |
bool | RestorePosition (const char *szWindowName, const char *szSubKey, bool fHidden=false) |
bool | GetSize (C4Rect *pRect) |
void | SetSize (unsigned int cx, unsigned int cy) |
void | SetTitle (const char *Title) |
void | FlashWindow () |
void | GrabMouse (bool grab) |
virtual void | RequestUpdate () |
virtual void | PerformUpdate () |
Public Attributes | |
bool | Active {false} |
C4Surface * | pSurface {nullptr} |
WindowKind | eKind |
Protected Member Functions | |
virtual C4Window * | Init (WindowKind windowKind, C4AbstractApp *pApp, const char *Title, const C4Rect *size) |
Friends | |
class | C4Draw |
class | CStdGL |
class | CStdGLCtx |
class | C4AbstractApp |
Definition at line 257 of file C4Window.h.
enum C4Window::WindowKind |
Enumerator | |
---|---|
W_GuiWindow | |
W_Console | |
W_Viewport | |
W_Fullscreen | |
W_Control |
Definition at line 263 of file C4Window.h.
|
default |
Definition at line 38 of file C4WindowSDL.cpp.
Referenced by Clear().
|
virtualdefault |
Definition at line 46 of file C4WindowSDL.cpp.
References Clear().
Referenced by Clear().
|
inlinevirtual |
Reimplemented in C4FullScreen.
Definition at line 282 of file C4Window.h.
References EnumerateMultiSamples(), FlashWindow(), GetSize(), GrabMouse(), Init(), PerformUpdate(), ReInit(), RequestUpdate(), RestorePosition(), SetSize(), SetTitle(), and StorePosition().
|
virtual |
Reimplemented in C4Console, and C4FullScreen.
Definition at line 102 of file C4AppT.cpp.
References C4Window(), and ~C4Window().
Referenced by C4FullScreen::Clear(), C4Console::Clear(), ~C4Window(), and C4ToolsDlg::State::~State().
|
pure virtual |
Implemented in C4GUI::DialogWindow, C4ConsoleGUIPreviewWindow, C4Console, C4FullScreen, and C4ViewportWindow.
|
virtual |
Definition at line 105 of file C4AppT.cpp.
References FlashWindow().
Referenced by C4StartupOptionsDlg::C4StartupOptionsDlg(), CharIn(), and C4StartupOptionsDlg::OnClosed().
void C4Window::FlashWindow | ( | ) |
Definition at line 74 of file C4AppMac.mm.
References C4AbstractApp::Active, C4AbstractApp::C4AbstractApp(), C4AbstractApp::Clear(), C4AbstractApp::DoInit(), C4AbstractApp::fDspModeSet, C4AbstractApp::FlushMessages(), C4AbstractApp::fQuitMsgReceived, C4AbstractApp::GetIndexedDisplayMode(), C4AbstractApp::Init(), lionAndBeyond(), C4AbstractApp::MainThread, C4AbstractApp::OnResolutionChanged(), C4AbstractApp::pWindow, C4AbstractApp::Quit(), C4AbstractApp::RestoreVideoMode(), SetSize(), C4AbstractApp::SetVideoMode(), and C4AbstractApp::~C4AbstractApp().
Referenced by CharIn(), EnumerateMultiSamples(), and C4AbstractApp::NotifyUserIfInactive().
bool C4Window::GetSize | ( | C4Rect * | pRect | ) |
Definition at line 108 of file C4AppT.cpp.
Referenced by CharIn(), C4Application::OnResolutionChanged(), C4Game::PreInit(), and StorePosition().
void C4Window::GrabMouse | ( | bool | grab | ) |
Definition at line 107 of file C4AppT.cpp.
Referenced by CharIn(), and C4Application::GameTick().
|
protectedvirtual |
Definition at line 109 of file C4AppT.cpp.
Referenced by C4ConsoleGUIPreviewWindow::C4ConsoleGUIPreviewWindow(), C4ViewportWindow::C4ViewportWindow(), CharIn(), C4ConsoleGUI::CreateConsoleWindow(), C4GUI::DialogWindow::DialogWindow(), C4GUI::FrameDecoration::Draw(), C4ViewportWindow::Init(), and C4GUI::DialogWindow::Init().
|
virtual |
Reimplemented in C4GUI::DialogWindow, C4FullScreen, and C4ViewportWindow.
Definition at line 85 of file C4App.cpp.
Referenced by CharIn(), and StorePosition().
|
virtual |
Definition at line 110 of file C4AppT.cpp.
Referenced by CharIn(), and C4StartupOptionsDlg::OnClosed().
|
virtual |
Definition at line 112 of file C4AppT.cpp.
Referenced by CharIn(), C4FullScreen::Execute(), and StorePosition().
bool C4Window::RestorePosition | ( | const char * | szWindowName, |
const char * | szSubKey, | ||
bool | fHidden = false |
||
) |
Definition at line 111 of file C4AppT.cpp.
Referenced by CharIn(), and StorePosition().
void C4Window::SetSize | ( | unsigned int | cx, |
unsigned int | cy | ||
) |
Definition at line 113 of file C4AppT.cpp.
Referenced by CharIn(), C4Application::DoInit(), FlashWindow(), C4AbstractApp::SetVideoMode(), StorePosition(), and C4GUI::Dialog::UpdateSize().
void C4Window::SetTitle | ( | const char * | Title | ) |
Definition at line 114 of file C4AppT.cpp.
Referenced by CharIn(), C4Console::CloseGame(), PropertyDlgProc(), C4Console::SetCaptionToFilename(), C4GUI::Dialog::SetTitle(), and StorePosition().
bool C4Window::StorePosition | ( | const char * | szWindowName, |
const char * | szSubKey, | ||
bool | fStoreSize = true |
||
) |
Definition at line 139 of file C4WindowSDL.cpp.
References GetSize(), C4Rect::Hgt, PerformUpdate(), RequestUpdate(), RestorePosition(), SetSize(), SetTitle(), C4Rect::Wdt, C4Rect::x, X, and C4Rect::y.
Referenced by CharIn().
|
friend |
Definition at line 325 of file C4Window.h.
|
friend |
Definition at line 322 of file C4Window.h.
|
friend |
Definition at line 323 of file C4Window.h.
|
friend |
Definition at line 324 of file C4Window.h.
bool C4Window::Active {false} |
Definition at line 274 of file C4Window.h.
Referenced by AddMenuItem(), C4Console::C4Console(), C4ToolsDlg::State::Clear(), C4ToolsDlg::Clear(), C4Console::ClearNetMenu(), C4Console::ClearViewportMenu(), C4Console::CloseGame(), C4Control::CompileFunc(), ConsoleDlgProc(), C4ToolsDlg::Default(), C4Game::DoKeyboardInput(), C4Network2::DoLobby(), C4Playback::ExecuteControl(), C4ControlSyncCheck::GetAllCrewPosX(), C4Console::In(), C4Console::InitGame(), C4Game::InitPlayers(), C4Console::Message(), C4Game::OnResolutionChanged(), PropertyDlgProc(), C4PlayerInfoList::RestoreSavegameInfos(), C4Network2::RetrieveRes(), C4Console::SaveScenario(), C4GraphicsSystem::ToggleShow8BitSurface(), C4GraphicsSystem::ToggleShowAction(), C4GraphicsSystem::ToggleShowVertices(), C4Console::UpdateMenus(), C4ConsoleGUI::State::UpdateMenuText(), C4Console::UpdateNetMenu(), C4Console::UpdatePlayerMenu(), C4Console::UpdateStatusBars(), C4Console::UpdateViewportMenu(), and C4FullScreen::ViewportCheck().
WindowKind C4Window::eKind |
Definition at line 276 of file C4Window.h.
C4Surface* C4Window::pSurface {nullptr} |
Definition at line 275 of file C4Window.h.
Referenced by C4ConsoleGUIPreviewWindow::C4ConsoleGUIPreviewWindow(), C4FullScreen::Clear(), C4Console::Clear(), C4GraphicsSystem::DeactivateDebugOutput(), C4GraphicsSystem::DoSaveScreenshot(), C4GUI::Dialog::Draw(), C4ViewportList::DrawFullscreenBackground(), C4Viewport::Execute(), C4GraphicsSystem::FinishDrawing(), C4GraphicsSystem::FlashMessageOnOff(), C4Draw::Init(), C4Game::InitFullscreenComponents(), C4MessageBoard::LogNotify(), C4Application::OnResolutionChanged(), C4Application::PreInit(), C4ViewportList::RecalculateViewports(), C4GUI::Screen::Render(), CStdGL::RestoreDeviceObjects(), C4Game::SaveGameTitle(), C4ConsoleGUIPreviewWindow::~C4ConsoleGUIPreviewWindow(), and C4FullScreen::~C4FullScreen().