In file include/csws/cswindow.h:

class csWindow : public csComponent

A csWindow object is a rectangular area of screen with border which optionally contains a titlebar, a menubar and a client component

Inheritance:


Public Methods

void ClientToWindow(int &ClientW, int &ClientH)
Transform client window size into window size
csWindow(csComponent *iParent, char *iTitle, int iWindowStyle = CSWS_DEFAULTVALUE, csWindowFrameStyle iFrameStyle = cswfs3D)
Create a window object
virtual void Draw()
Draw the window
virtual void FixSize(int &newW, int &newH)
Don't allow too small windows
void GetBorderSize(int &bw, int &bh)
Get window border width and height
int GetMenuHeight()
Get window menu height
virtual char* GetText()
Same, but returns a readonly value
virtual void GetText(char *oText, int iTextSize)
Query window title text
int GetTitlebarHeight()
Get window titlebar height
virtual bool HandleEvent(csEvent &Event)
Handle input events
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
void SetBorderSize(int w, int h)
Set window border width and height
void SetMenuBarHeight(int iHeight)
Set menu bar height and redraws the window
virtual bool SetRect(int xmin, int ymin, int xmax, int ymax)
Rescale titlebar, menu etc before passing to original SetRect
virtual void SetText(char *iText)
Change titlebar text
void SetTitleHeight(int iHeight)
Set title bar height and redraws the window

Protected Fields

int BorderWidth
Window border width/height
csWindowFrameStyle FrameStyle
Window frame style
int MenuHeight
Menu height
int TitlebarHeight
Titlebar height (this also defines min/max buttons width and height)
int WindowStyle
Window style

Protected Methods

void SetButtBitmap(csButton *button, char *id_n, char *id_p)
Set button bitmaps to one of those read from csws.cfg
virtual void SetState(int mask, bool enable)
Override SetState method to change titlebar when window focused flag changes

Inherited from csComponent:

Public Fields

csApp* app
csRect bound
csVector clipchildren
csComponent* focused
unsigned int id
csComponent* next
csComponent* parent
csComponent* top

Public Methods

void Box(int xmin, int ymin, int xmax, int ymax, int colindx)
void Center(bool iHoriz = true, bool iVert = true)
virtual void Close()
virtual void Delete(csComponent *comp)
void DeleteAll()
void DeleteClipChild(csComponent *clipchild)
void Drag(int x, int y, int DragMode)
void FindMaxFreeRect(csRect &area)
virtual void FixPosition(int &newX, int &newY)
csComponent* ForEach(bool (*func) (csComponent *child, void *param), void *param = NULL, bool Zorder = false)
csComponent* GetChild(int find_id)
csComponent* GetClipParent()
int GetColor(int Index)
csComponent* GetDefault()
int GetDragStyle()
csComponent* GetFocused()
int GetFont()
int GetState(int mask)
csComponent* GetTop()
void GlobalToLocal(int &x, int &y)
bool HandleDragEvent(csEvent &Event, int BorderW, int BorderH)
virtual void Hide()
virtual void Insert(csComponent *comp)
void InsertClipChild(csComponent *clipchild)
void Invalidate(bool IncludeChildren = false)
void Invalidate(csRect &area, bool IncludeChildren = false)
void Invalidate(int xmin, int ymin, int xmax, int ymax, bool IncludeChildren = false)
void Line(float x1, float y1, float x2, float y2, int colindx)
void LocalToGlobal(int &x, int &y)
virtual csComponent* NextChild(csComponent *start = NULL, bool disabled = false)
virtual csComponent* NextControl(csComponent *start = NULL)
virtual csComponent* NextGroup(csComponent *start = NULL)
void ObliqueRect3D(int xmin, int ymin, int xmax, int ymax, int cornersize, int darkindx, int lightindx)
void Pixel(int x, int y, int colindx)
virtual bool PostHandleEvent(csEvent &Event)
virtual bool PreHandleEvent(csEvent &Event)
virtual csComponent* PrevChild(csComponent *start = NULL, bool disabled = false)
virtual csComponent* PrevControl(csComponent *start = NULL)
virtual csComponent* PrevGroup(csComponent *start = NULL)
void Rect3D(int xmin, int ymin, int xmax, int ymax, int darkindx, int lightindx)
void Redraw()
bool Select()
void* SendCommand(int CommandCode, void *Info = NULL)
void SetApp(csApp *newapp)
void SetClipRect()
void SetClipRect(int xmin, int ymin, int xmax, int ymax)
void SetColor(int Index, int Color)
bool SetDragRect(int xmin, int ymin, int xmax, int ymax)
void SetDragStyle(int iDragStyle)
bool SetFocused(csComponent *comp)
void SetFont(int iFont, bool IncludeChildren = false)
void SetMouse(csMouseCursorID Cursor)
void SetPalette(int *iPalette, int iPaletteSize)
void SetPalette(int iPaletteID)
void SetPos(int x, int y)
void SetSize(int w, int h)
void SetSizingCursor(int dragtype)
virtual void SetSuggestedSize(int dw, int dh)
bool SetZorder(csComponent *comp, csComponent *below)
virtual void Show(bool focused = false)
void Sprite2D(csSprite2D *s2d, int x, int y)
void Sprite2D(csSprite2D *s2d, int x, int y, int w, int h)
virtual void SuggestSize(int &w, int &h)
void Text(int x, int y, int fgindx, int bgindx, char *s)
int TextHeight()
int TextWidth(char *text)

Public

Protected Fields

csRect clip
csComponent* clipparent
csRect dirty
static csRect dragBound
int DragStyle
static int dragX
int Font
bool Maximized
csRect OrgBound
bool originalpalette
int* palette
int state
char* text

Protected Methods

void Clip(csObjVector &rect, csComponent *last)
void ClipAlienChildren(csObjVector &rect, csComponent *child)
void DrawUnderline(int iX, int iY, char *iText, int iUnderlinePos, int iColor)
static void PrepareLabel(char *iLabel, char * &oLabel, int &oUnderlinePos)
static int WordLeft(char *iText, int StartPos)
static int WordRight(char *iText, int StartPos)

Inherited from csBase:


Documentation

A csWindow object is a rectangular area of screen with border which optionally contains a titlebar, a menubar and a client component. The client window is the rectangle where the actual window contents (a dialog, a picture etc) are drawn.
int WindowStyle
Window style

csWindowFrameStyle FrameStyle
Window frame style

int BorderWidth
Window border width/height

int TitlebarHeight
Titlebar height (this also defines min/max buttons width and height)

int MenuHeight
Menu height

csWindow(csComponent *iParent, 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 void Draw()
Draw the window

virtual bool HandleEvent(csEvent &Event)
Handle input events

void SetBorderSize(int w, int h)
Set window border width and height

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

void SetTitleHeight(int iHeight)
Set title bar height and redraws the window

void SetMenuBarHeight(int iHeight)
Set menu bar height and redraws the window

virtual void SetText(char *iText)
Change titlebar text

virtual void GetText(char *oText, int iTextSize)
Query window title text

virtual char* GetText()
Same, but returns a readonly value

void GetBorderSize(int &bw, int &bh)
Get window border width and height

int GetTitlebarHeight()
Get window titlebar height

int GetMenuHeight()
Get window menu height

void ClientToWindow(int &ClientW, int &ClientH)
Transform client window size into window size

void SetButtBitmap(csButton *button, char *id_n, char *id_p)
Set button bitmaps to one of those read from csws.cfg

virtual void SetState(int mask, bool enable)
Override SetState method to change titlebar when window focused flag changes


Direct child classes:
mzDraftWindow
mz3DWindow
csWindowList

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de