OpenClonk
C4ConsoleGUIPreviewWindow Class Reference
Inheritance diagram for C4ConsoleGUIPreviewWindow:
[legend]
Collaboration diagram for C4ConsoleGUIPreviewWindow:
[legend]

Public Types

enum  WindowKind {
  W_GuiWindow, W_Console, W_Viewport, W_Fullscreen,
  W_Control
}
 

Public Member Functions

 C4ConsoleGUIPreviewWindow (HWND hwndControl)
 
 ~C4ConsoleGUIPreviewWindow () override
 
void Close () override
 
virtual void Clear ()
 
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}
 
C4SurfacepSurface {nullptr}
 
WindowKind eKind
 

Protected Member Functions

virtual C4WindowInit (WindowKind windowKind, C4AbstractApp *pApp, const char *Title, const C4Rect *size)
 

Detailed Description

Definition at line 1132 of file C4ConsoleWin32.cpp.

Member Enumeration Documentation

◆ WindowKind

enum C4Window::WindowKind
inherited
Enumerator
W_GuiWindow 
W_Console 
W_Viewport 
W_Fullscreen 
W_Control 

Definition at line 263 of file C4Window.h.

264  {
265  W_GuiWindow,
266  W_Console,
267  W_Viewport,
268  W_Fullscreen,
269  W_Control // wrapper to a render target control inside a window
270  };

Constructor & Destructor Documentation

◆ C4ConsoleGUIPreviewWindow()

C4ConsoleGUIPreviewWindow::C4ConsoleGUIPreviewWindow ( HWND  hwndControl)
inline

Definition at line 1135 of file C4ConsoleWin32.cpp.

References Application, C4Window::Init(), and C4Window::pSurface.

1136  {
1137  Init(C4Window::WindowKind::W_Control, &Application, nullptr, nullptr);
1138  this->hWindow = this->renderwnd = hwndControl;
1139  pSurface = new C4Surface(&Application, this);
1140  }
C4Surface * pSurface
Definition: C4Window.h:275
virtual C4Window * Init(WindowKind windowKind, C4AbstractApp *pApp, const char *Title, const C4Rect *size)
Definition: C4AppT.cpp:109
C4Application Application
Definition: C4Globals.cpp:44
Here is the call graph for this function:

◆ ~C4ConsoleGUIPreviewWindow()

C4ConsoleGUIPreviewWindow::~C4ConsoleGUIPreviewWindow ( )
inlineoverride

Definition at line 1142 of file C4ConsoleWin32.cpp.

References C4Window::pSurface.

1143  {
1144  delete pSurface;
1145  }
C4Surface * pSurface
Definition: C4Window.h:275

Member Function Documentation

◆ CharIn()

virtual void C4Window::CharIn ( const char *  )
inlinevirtualinherited

Reimplemented in C4FullScreen.

Definition at line 282 of file C4Window.h.

References C4Window::EnumerateMultiSamples(), C4Window::FlashWindow(), C4Window::GetSize(), C4Window::GrabMouse(), C4Window::Init(), C4Window::PerformUpdate(), C4Window::ReInit(), C4Window::RequestUpdate(), C4Window::RestorePosition(), C4Window::SetSize(), C4Window::SetTitle(), and C4Window::StorePosition().

282 { }
Here is the call graph for this function:

◆ Clear()

void C4Window::Clear ( )
virtualinherited

Reimplemented in C4Console, and C4FullScreen.

Definition at line 102 of file C4AppT.cpp.

References C4Window::C4Window(), and C4Window::~C4Window().

Referenced by C4FullScreen::Clear(), C4Console::Clear(), C4Window::~C4Window(), and C4ToolsDlg::State::~State().

102 {}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Close()

void C4ConsoleGUIPreviewWindow::Close ( )
inlineoverridevirtual

Implements C4Window.

Definition at line 1147 of file C4ConsoleWin32.cpp.

References Application, C4ToolsDlg::BackMaterial, C4M_Background, C4RGB, C4TLS_Brush, C4TLS_Fill, C4TLS_GradeMax, C4TLS_GradeMin, C4TLS_Line, C4TLS_MatSky, C4TLS_Picker, C4TLS_Rect, Config, Console, C4MaterialCore::Density, C4Draw::DrawBoxDw(), C4Draw::DrawPatternedCircle(), Dynamic, C4ToolsDlg::EnableControls(), Exact, C4MaterialMap::Get(), C4TextureMap::GetEntry(), C4TextureMap::GetIndex(), C4Landscape::GetMode(), C4Landscape::GetPal(), C4TexMapEntry::GetPattern(), C4Landscape::GetSky(), C4Config::GetSubkeyPath(), C4TextureMap::GetTexture(), GetWideLPARAM, C4Landscape::HasMap(), C4ToolsDlg::State::hDialog, IDC_BUTTONBRUSH, IDC_BUTTONFILL, IDC_BUTTONLINE, IDC_BUTTONMODEDYNAMIC, IDC_BUTTONMODEEXACT, IDC_BUTTONMODESTATIC, IDC_BUTTONPICKER, IDC_BUTTONRECT, IDC_COMBOBGMATERIAL, IDC_COMBOBGTEXTURE, IDC_COMBOFGMATERIAL, IDC_COMBOFGTEXTURE, IDC_PREVIEW, IDC_SLIDERGRADE, IDC_STATICBACKGROUND, IDC_STATICFOREGROUND, IDC_STATICMATERIAL, IDC_STATICTEXTURE, IDD_TOOLS, C4ToolsDlg::InitGradeCtrl(), Landscape, C4ToolsDlg::State::LoadBitmaps(), LoadResStrW(), C4MaterialMap::Map, Mat2PixColDefault(), C4ToolsDlg::Material, MaterialMap, C4MaterialCore::Name, C4ToolsDlg::NeedPreviewUpdate(), C4Surface::NoClip(), C4MaterialMap::Num, C4Surface::PageFlip(), pDraw, C4ToolsDlg::PopMaterial(), C4ToolsDlg::PopTextures(), C4ToolsDlg::State::pPreviewWindow, C4Draw::PrepareRendering(), SEqual(), C4Pattern::Set(), Static, C4Sky::Surface, TextureMap, C4ConsoleGUI::ToolsDlgInitMaterialCtrls(), C4ConsoleGUI::ToolsDlgOpen(), ToolsDlgProc(), C4ConsoleGUI::ToolsDlgSelectBackMaterial(), C4ConsoleGUI::ToolsDlgSelectBackTexture(), C4ConsoleGUI::ToolsDlgSelectMaterial(), C4ConsoleGUI::ToolsDlgSelectTexture(), C4ToolsDlg::UpdateIFTControls(), C4ToolsDlg::UpdateLandscapeModeCtrls(), C4Surface::UpdateSize(), C4ToolsDlg::UpdateTextures(), C4ToolsDlg::UpdateToolCtrls(), and WildcardMatch().

1147 {}
Here is the call graph for this function:

◆ EnumerateMultiSamples()

void C4Window::EnumerateMultiSamples ( std::vector< int > &  samples) const
virtualinherited

Definition at line 105 of file C4AppT.cpp.

References C4Window::FlashWindow().

Referenced by C4StartupOptionsDlg::C4StartupOptionsDlg(), C4Window::CharIn(), and C4StartupOptionsDlg::OnClosed().

105 {}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ FlashWindow()

void C4Window::FlashWindow ( )
inherited

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(), C4Window::SetSize(), C4AbstractApp::SetVideoMode(), and C4AbstractApp::~C4AbstractApp().

Referenced by C4Window::CharIn(), C4Window::EnumerateMultiSamples(), and C4AbstractApp::NotifyUserIfInactive().

75 {
76  [NSApp requestUserAttention:NSCriticalRequest];
77 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetSize()

bool C4Window::GetSize ( C4Rect pRect)
inherited

Definition at line 108 of file C4AppT.cpp.

Referenced by C4Window::CharIn(), C4Application::OnResolutionChanged(), C4Game::PreInit(), and C4Window::StorePosition().

108 {return false;}
Here is the caller graph for this function:

◆ GrabMouse()

void C4Window::GrabMouse ( bool  grab)
inherited

Definition at line 107 of file C4AppT.cpp.

Referenced by C4Window::CharIn(), and C4Application::GameTick().

107 {}
Here is the caller graph for this function:

◆ Init()

C4Window * C4Window::Init ( C4Window::WindowKind  windowKind,
C4AbstractApp pApp,
const char *  Title,
const C4Rect size 
)
protectedvirtualinherited

Definition at line 109 of file C4AppT.cpp.

Referenced by C4ConsoleGUIPreviewWindow(), C4ViewportWindow::C4ViewportWindow(), C4Window::CharIn(), C4ConsoleGUI::CreateConsoleWindow(), C4GUI::DialogWindow::DialogWindow(), C4GUI::FrameDecoration::Draw(), C4ViewportWindow::Init(), and C4GUI::DialogWindow::Init().

109 {return this;}
Here is the caller graph for this function:

◆ PerformUpdate()

void C4Window::PerformUpdate ( )
virtualinherited

Reimplemented in C4GUI::DialogWindow, C4FullScreen, and C4ViewportWindow.

Definition at line 85 of file C4App.cpp.

Referenced by C4Window::CharIn(), and C4Window::StorePosition().

86 {
87 }
Here is the caller graph for this function:

◆ ReInit()

bool C4Window::ReInit ( C4AbstractApp pApp)
virtualinherited

Definition at line 110 of file C4AppT.cpp.

Referenced by C4Window::CharIn(), and C4StartupOptionsDlg::OnClosed().

110 {return false;}
Here is the caller graph for this function:

◆ RequestUpdate()

void C4Window::RequestUpdate ( )
virtualinherited

Definition at line 112 of file C4AppT.cpp.

Referenced by C4Window::CharIn(), C4FullScreen::Execute(), and C4Window::StorePosition().

112 {}
Here is the caller graph for this function:

◆ RestorePosition()

bool C4Window::RestorePosition ( const char *  szWindowName,
const char *  szSubKey,
bool  fHidden = false 
)
inherited

Definition at line 111 of file C4AppT.cpp.

Referenced by C4Window::CharIn(), and C4Window::StorePosition().

111 {return false;}
Here is the caller graph for this function:

◆ SetSize()

void C4Window::SetSize ( unsigned int  cx,
unsigned int  cy 
)
inherited

Definition at line 113 of file C4AppT.cpp.

Referenced by C4Window::CharIn(), C4Application::DoInit(), C4Window::FlashWindow(), C4AbstractApp::SetVideoMode(), C4Window::StorePosition(), and C4GUI::Dialog::UpdateSize().

113 {}
Here is the caller graph for this function:

◆ SetTitle()

void C4Window::SetTitle ( const char *  Title)
inherited

Definition at line 114 of file C4AppT.cpp.

Referenced by C4Window::CharIn(), C4Console::CloseGame(), PropertyDlgProc(), C4Console::SetCaptionToFilename(), C4GUI::Dialog::SetTitle(), and C4Window::StorePosition().

114 {}
Here is the caller graph for this function:

◆ StorePosition()

bool C4Window::StorePosition ( const char *  szWindowName,
const char *  szSubKey,
bool  fStoreSize = true 
)
inherited

Definition at line 139 of file C4WindowSDL.cpp.

References C4Window::GetSize(), C4Rect::Hgt, C4Window::PerformUpdate(), C4Window::RequestUpdate(), C4Window::RestorePosition(), C4Window::SetSize(), C4Window::SetTitle(), C4Rect::Wdt, C4Rect::x, X, and C4Rect::y.

Referenced by C4Window::CharIn().

139 { return true; }
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ Active

◆ eKind

WindowKind C4Window::eKind
inherited

Definition at line 276 of file C4Window.h.

◆ pSurface


The documentation for this class was generated from the following file: