Defines a window. Window type (modal, document) is determined by CKWindowInitParams and CKWindowType.
More...
#include <ckWindow.h>
Defines a window. Window type (modal, document) is determined by CKWindowInitParams and CKWindowType.
◆ CKWindow()
Create a new window with the parameters passed. Check the CKWindowInitParams object for required/optional parameters.
◆ ~CKWindow()
◆ __ReflectToOS()
void CKWindow::__ReflectToOS |
( |
| ) |
|
|
protected |
◆ AddControl()
bool CKWindow::AddControl |
( |
CKControl * |
control | ) |
|
Add control to the window. Control must NOT be already in another window, or this fails. Returns false if fails (i.e. control already exists)
◆ Center()
void CKWindow::Center |
( |
| ) |
|
Center the window on screen.
◆ Close()
Override to stop closage.
◆ ContainsControl()
bool CKWindow::ContainsControl |
( |
CKControl * |
control | ) |
|
True if we have the control here.
◆ DirtyArea()
void CKWindow::DirtyArea |
( |
const CKRect |
r | ) |
|
◆ FindControl()
Try to find a control at the point. Returns nil if nothing is at that point. Due to the way it works, undefined behavior when two controls overlap (so don't do that, perhaps.)
CKPoint passed here MUST be local to the window.
◆ Focus()
Make the window foremost window. Make visible if invisible.
◆ GetActiveControl()
Called by ckApp to determine UI Changes needed, like enabling/disabling menu items.
- Returns
◆ GetControls()
const std::vector< CKControl * > & CKWindow::GetControls |
( |
| ) |
const |
Get the list of controls in this window.
- Returns
◆ GetControlsOfType()
template<typename T >
std::vector< T * > CKWindow::GetControlsOfType |
( |
| ) |
const |
|
inline |
Get the list of controls of type T in this window.
auto buttons = myWindow->GetControlsOfType<
CKButton>();
- Returns
◆ GetIsActive()
bool CKWindow::GetIsActive |
( |
| ) |
|
◆ GetLastControl()
CKControl * CKWindow::GetLastControl |
( |
| ) |
const |
◆ GetOwner()
CKApp * CKWindow::GetOwner |
( |
| ) |
|
Return the app this window is a part of.
◆ GetTitle()
char * CKWindow::GetTitle |
( |
| ) |
|
◆ GetWindowPtr()
◆ HandleEvent()
bool CKWindow::HandleEvent |
( |
const CKEvent & |
evt | ) |
|
|
virtual |
Called by CKApp when the user interacts with our control. Override for custom controls.
Returns true if handled.
Reimplemented from CKObject.
◆ Hide()
Hide the window, but keep in memory.
◆ Loop()
Called from CKApp to do stuff like blinking the caret, etc.
◆ RaisePropertyChange()
void CKWindow::RaisePropertyChange |
( |
const char * |
propertyName | ) |
|
|
protectedvirtual |
◆ Redraw()
void CKWindow::Redraw |
( |
CKRect |
rectToRedraw | ) |
|
Redraw part(s) of the window.
◆ RemoveControl()
void CKWindow::RemoveControl |
( |
CKControl * |
control, |
|
|
bool |
free |
|
) |
| |
Remove control from the window. Does nothing if the control is already not there.
◆ SetActiveControl()
void CKWindow::SetActiveControl |
( |
CKControl * |
control | ) |
|
Called by ckApp on a click event - to set the active control (like a textfield.)
- Parameters
-
◆ SetIsActive()
void CKWindow::SetIsActive |
( |
bool |
active | ) |
|
|
protected |
Called when the window becomes active/inactive.
◆ SetLastControl()
void CKWindow::SetLastControl |
( |
CKControl * |
control | ) |
|
◆ SetOwner()
void CKWindow::SetOwner |
( |
CKApp * |
owner | ) |
|
Set the owner – if this is set to nil, we won't be able to do much.
◆ SetTitle()
void CKWindow::SetTitle |
( |
const char * |
title | ) |
|
Change the window's title.
◆ Show()
◆ CKApp
◆ backgroundColor
◆ closable
◆ hasCustomBackgroundColor
CKProperty<bool> CKWindow::hasCustomBackgroundColor |
◆ maximumHeight
int CKWindow::maximumHeight = 1000 |
◆ maximumWidth
int CKWindow::maximumWidth = 1000 |
◆ minimumHeight
int CKWindow::minimumHeight = 0 |
◆ minimumWidth
int CKWindow::minimumWidth = 0 |
◆ rect
◆ shouldReceiveMouseMoveEvents
bool CKWindow::shouldReceiveMouseMoveEvents |
True if we should receive mouseMove events. We are storing this as a hack to speed things up as HasHandler is pretty slow.
◆ visible
The documentation for this class was generated from the following files: