Public Methods |
| csWindow (csComponent *iParent, const char *iTitle, int iWindowStyle=CSWS_DEFAULTVALUE, csWindowFrameStyle iFrameStyle=cswfs3D) |
| Create a window object.
|
virtual bool | SetRect (int xmin, int ymin, int xmax, int ymax) |
| Rescale titlebar, menu etc before passing to original SetRect.
|
virtual bool | HandleEvent (iEvent &Event) |
| Handle input events.
|
virtual void | FixSize (int &newW, int &newH) |
| Don't allow too small windows.
|
virtual bool | Maximize () |
| Maximize window if it is not already and if DragStyle has CS_DRAG_SIZEABLE.
|
virtual bool | Restore () |
| Restore window if it is maximized and if DragStyle has CS_DRAG_SIZEABLE.
|
virtual void | SetText (const char *iText) |
| Change titlebar text.
|
virtual void | GetText (char *oText, int iTextSize) const |
| Query window title text.
|
virtual const char* | GetText () const |
| Same, but returns a readonly value.
|
virtual void | SetState (int mask, bool enable) |
| Override SetState method to change titlebar when window focused flag changes.
|
void | SetBorderSize (int w, int h) |
| Set window border width and height.
|
void | GetBorderSize (int &bw, int &bh) |
| Get window border width and height.
|
void | SetTitlebarHeight (int iHeight) |
| Set title bar height and redraws the window.
|
int | GetTitlebarHeight () |
| Get window titlebar height.
|
void | SetMenuBarHeight (int iHeight) |
| Set menu bar height and redraws the window.
|
int | GetMenuHeight () |
| Get window menu height.
|
void | ClientToWindow (int &ClientW, int &ClientH) |
| Transform client window size into window size.
|
void | WindowToClient (int &ClientW, int &ClientH) |
| Transform window size into client window size.
|
int | GetWindowStyle () |
| Query window style bits.
|
void | SetFrameStyle (csWindowFrameStyle iFrameStyle) |
| Change window frame style.
|
csWindowFrameStyle | GetFrameStyle () |
| Query window frame style.
|
virtual char* | GetSkinName () |
| Get the name of the skip slice for this component.
|
void | SetAlpha (uint8 iAlpha) |
| Set window transparency level (0 - opaque, 255 - fully transparent).
|
uint8 | GetAlpha () |
| Query window transparency level.
|
Protected Attributes |
int | WindowStyle |
| Window style.
|
csWindowFrameStyle | FrameStyle |
| Window frame style.
|
int | BorderWidth |
| Window border width/height.
|
int | BorderHeight |
| Window border width/height.
|
int | TitlebarHeight |
| Titlebar height (this also defines min/max buttons width and height).
|
int | MenuHeight |
| Menu height.
|
uint8 | Alpha |
| Window transparency (if CSS_TRANSPARENT is set).
|
The client window is the rectangle where the actual window contents (a dialog, a picture etc) are drawn.