Main Page   Packages   Class Hierarchy   Alphabetical List   Data Structures   File List   Namespace Members   Data Fields   Globals  

clawsoft.Dialog Class Reference

#include <Dialog.h>

Inheritance diagram for clawsoft.Dialog:

Inheritance graph
[legend]
Collaboration diagram for clawsoft.Dialog:

Collaboration graph
[legend]

Public Methods

 Dialog ()
 Dialog (Rect &r, DialogType t=DLG_OK_CANCEL)
 Dialog (Rect &r, const char *ccaption, DialogType t=DLG_OK_CANCEL)
 Dialog (Rect &r, String ccaption, DialogType t=DLG_OK_CANCEL)
 ~Dialog ()
void map ()
 Call this method when you need to recalculate the dimension of the window, is allways a good idea to do it before the main loop.

virtual void okAction (int xx, int yy, int bb)
virtual void cancelAction (int xx, int yy, int bb)
virtual void helpAction (int xx, int yy, int bb)
bool checkMouseEvents ()
void action ()
void draw ()
void move (int x, int y)
void maximize ()
bool checkKeyEvents ()
bool checkMouseMotionEvents ()
bool checkEvents ()
char * getClassName ()
 Returns the name of the current class.

void X (int)
const int X ()
void Y (int)
const int Y ()
void W (int)
const int W ()
void H (int)
const int H ()
void setTop (int)
const int getTop ()
void setLeft (int)
const int getLeft ()
void setRight (int)
const int getRight ()
void setBottom (int)
const int getBottom ()

Protected Methods

virtual void drawContents ()
void drawComponents ()
void setClassName (char *n)
 Call this method when you need to set the name of the class you're creating, typically int it's constructor, remeber that you must set the classname for every clas you create, that way you can have more information while being in a debuging process.


Protected Attributes

OKButton okBtn
CancelButton cancelBtn
HelpButton helpBtn
DialogType dType
String caption
Rect rect
Rect captionRect
Rect toolbarRect
Rect lborderRect
Rect rborderRect
MouseEvent mouse
KeyboardEvent keyboard
bool drawn
int x
int y
int w
int h
int _b
int _r

Constructor & Destructor Documentation

clawsoft.Dialog::Dialog  
 

Definition at line 16 of file Dialog.cpp.

References clawsoft.DLG_OK_CANCEL, clawsoft.Dialog.dType, and clawsoft.Object.setClassName().

clawsoft.Dialog::Dialog Rect   r,
DialogType    t = DLG_OK_CANCEL
 

Definition at line 27 of file Dialog.cpp.

References clawsoft.DialogType, clawsoft.Dialog.dType, and clawsoft.Object.setClassName().

clawsoft.Dialog::Dialog Rect   r,
const char *    ccaption,
DialogType    t = DLG_OK_CANCEL
 

Definition at line 38 of file Dialog.cpp.

References clawsoft.DialogType, clawsoft.Dialog.dType, and clawsoft.Object.setClassName().

clawsoft.Dialog::Dialog Rect   r,
String    ccaption,
DialogType    t = DLG_OK_CANCEL
 

Definition at line 49 of file Dialog.cpp.

References clawsoft.DialogType, clawsoft.Dialog.dType, and clawsoft.Object.setClassName().

clawsoft.Dialog::~Dialog  
 

Definition at line 10 of file Dialog.cpp.


Member Function Documentation

void clawsoft.Window::action   [virtual, inherited]
 

Implements clawsoft.Widget.

Definition at line 163 of file Window.cpp.

virtual void clawsoft.Dialog.cancelAction int    xx,
int    yy,
int    bb
[inline, virtual]
 

Reimplemented in clawsoft.GameSelector, and clawsoft.LoginDialog.

Definition at line 57 of file Dialog.h.

Referenced by clawsoft.Dialog.checkMouseEvents().

bool clawsoft.Window::checkEvents   [virtual, inherited]
 

Implements clawsoft.Widget.

Definition at line 198 of file Window.cpp.

bool clawsoft.Window::checkKeyEvents   [virtual, inherited]
 

Implements clawsoft.Widget.

Definition at line 167 of file Window.cpp.

bool clawsoft.Dialog::checkMouseEvents   [virtual]
 

Reimplemented from clawsoft.Window.

Definition at line 129 of file Dialog.cpp.

References clawsoft.Dialog.cancelAction(), clawsoft.Dialog.cancelBtn, clawsoft.TextButton.checkMouseEvents(), clawsoft.DLG_CANCEL, clawsoft.DLG_OK, clawsoft.DLG_OK_CANCEL, clawsoft.DLG_OK_CANCEL_HELP, globalEvent, clawsoft.Dialog.helpAction(), clawsoft.Dialog.helpBtn, clawsoft.Dialog.okAction(), and clawsoft.Dialog.okBtn.

Referenced by clawsoft.LoginDialog.run(), and clawsoft.GameSelector.run().

bool clawsoft.Window::checkMouseMotionEvents   [virtual, inherited]
 

Implements clawsoft.Widget.

Definition at line 178 of file Window.cpp.

References globalEvent, clawsoft.Rect.H(), clawsoft.MouseEvent.inFocus(), clawsoft.Window.lborderRect, clawsoft.MouseEvent.leftPressed(), clawsoft.Widget.mouse, clawsoft.Window.move(), clawsoft.Window.rborderRect, clawsoft.Window.rect, clawsoft.Rect.W(), WINDOW_BOTTOM_MIDDLE, WINDOW_TOP_CAPTION, clawsoft.Rect.X(), and clawsoft.Rect.Y().

Referenced by clawsoft.LoginDialog.run(), and clawsoft.GameSelector.run().

void clawsoft.Window::draw   [virtual, inherited]
 

Implements clawsoft.Widget.

Definition at line 62 of file Window.cpp.

References clawsoft.Window.caption, clawsoft.Window.captionRect, DEFAULT_FONT, clawsoft.Window.drawComponents(), clawsoft.Rect.getBottom(), clawsoft.Rect.getRight(), clawsoft.Rect.H(), clawsoft.Window.lborderRect, clawsoft.Window.rborderRect, clawsoft.Window.toolbarRect, clawsoft.Rect.W(), WINDOW_BOTTOM_LEFT, WINDOW_BOTTOM_MIDDLE, WINDOW_BOTTOM_RIGHT, WINDOW_LEFT_TOP, WINDOW_MIDDLE_LEFT, WINDOW_MIDDLE_LEFT_BOTTOM, WINDOW_MIDDLE_LEFT_TOP, WINDOW_MIDDLE_RIGHT, WINDOW_MIDDLE_RIGHT_BOTTOM, WINDOW_MIDDLE_RIGHT_TOP, WINDOW_RIGHT_TOP, WINDOW_TOP_CAPTION, clawsoft.Rect.X(), and clawsoft.Rect.Y().

Referenced by clawsoft.LoginDialog.run(), and clawsoft.GameSelector.run().

void clawsoft.Dialog::drawComponents   [protected, virtual]
 

Reimplemented from clawsoft.Window.

Definition at line 87 of file Dialog.cpp.

References clawsoft.Dialog.cancelBtn, clawsoft.DLG_CANCEL, clawsoft.DLG_OK, clawsoft.DLG_OK_CANCEL, clawsoft.DLG_OK_CANCEL_HELP, clawsoft.TextButton.draw(), clawsoft.Dialog.drawContents(), clawsoft.Dialog.helpBtn, and clawsoft.Dialog.okBtn.

virtual void clawsoft.Dialog.drawContents   [inline, protected, virtual]
 

Reimplemented in clawsoft.GameSelector, and clawsoft.LoginDialog.

Definition at line 43 of file Dialog.h.

Referenced by clawsoft.Dialog.drawComponents().

const int clawsoft.Rect::getBottom   [inherited]
 

Definition at line 101 of file Rect.cpp.

References clawsoft.Rect._b.

Referenced by clawsoft.Window.draw(), clawsoft.TextBox.drawBorder(), clawsoft.MouseEvent.inFocus(), and clawsoft.Dialog.map().

char * clawsoft.Object::getClassName   [inherited]
 

Returns the name of the current class.

Definition at line 18 of file Object.cpp.

References clawsoft.Object.__cls_name.

const int clawsoft.Rect::getLeft   [inherited]
 

Definition at line 93 of file Rect.cpp.

References clawsoft.Rect.x.

Referenced by clawsoft.MouseEvent.inFocus().

const int clawsoft.Rect::getRight   [inherited]
 

Definition at line 97 of file Rect.cpp.

References clawsoft.Rect._r.

Referenced by clawsoft.Window.draw(), clawsoft.TextButton.draw(), clawsoft.TextBox.drawBorder(), clawsoft.MouseEvent.inFocus(), clawsoft.Window.map(), and clawsoft.Dialog.map().

const int clawsoft.Rect::getTop   [inherited]
 

Definition at line 89 of file Rect.cpp.

References clawsoft.Rect.y.

Referenced by clawsoft.MouseEvent.inFocus().

const int clawsoft.Rect::H   [inherited]
 

Definition at line 65 of file Rect.cpp.

References clawsoft.Rect.h.

Referenced by clawsoft.Window.checkMouseMotionEvents(), clawsoft.TextButton.draw(), clawsoft.TextBox.draw(), clawsoft.BaseButton.draw(), clawsoft.TextField.drawBorder(), clawsoft.GameSelector.GameSelector(), clawsoft.LoginDialog.LoginDialog(), clawsoft.Window.map(), clawsoft.TextField.map(), clawsoft.TextButton.map(), clawsoft.GameSelector.map(), clawsoft.Rect.Rect(), and clawsoft.TextButton.TextButton().

void clawsoft.Rect::H int    [inherited]
 

Definition at line 48 of file Rect.cpp.

References clawsoft.Rect._b, clawsoft.Rect.h, and clawsoft.Rect.y.

Referenced by clawsoft.Window.draw(), clawsoft.TextButton.draw(), clawsoft.Window.map(), and clawsoft.GameSelector.map().

virtual void clawsoft.Dialog.helpAction int    xx,
int    yy,
int    bb
[inline, virtual]
 

Definition at line 58 of file Dialog.h.

Referenced by clawsoft.Dialog.checkMouseEvents().

void clawsoft.Dialog::map   [virtual]
 

Call this method when you need to recalculate the dimension of the window, is allways a good idea to do it before the main loop.

Reimplemented from clawsoft.Window.

Reimplemented in clawsoft.GameSelector, and clawsoft.LoginDialog.

Definition at line 102 of file Dialog.cpp.

References clawsoft.Dialog.cancelBtn, clawsoft.DLG_CANCEL, clawsoft.DLG_OK, clawsoft.DLG_OK_CANCEL, clawsoft.DLG_OK_CANCEL_HELP, clawsoft.Rect.getBottom(), clawsoft.Rect.getRight(), clawsoft.Dialog.helpBtn, clawsoft.TextButton.map(), clawsoft.Dialog.okBtn, clawsoft.Rect.W(), clawsoft.Rect.X(), and clawsoft.Rect.Y().

void clawsoft.Window.maximize   [inherited]
 

void clawsoft.Window::move int    x,
int    y
[inherited]
 

Definition at line 204 of file Window.cpp.

References clawsoft.Window.map(), clawsoft.Rect.x, clawsoft.Rect.X(), clawsoft.Rect.y, and clawsoft.Rect.Y().

Referenced by clawsoft.Window.checkMouseMotionEvents().

virtual void clawsoft.Dialog.okAction int    xx,
int    yy,
int    bb
[inline, virtual]
 

Reimplemented in clawsoft.LoginDialog.

Definition at line 56 of file Dialog.h.

Referenced by clawsoft.Dialog.checkMouseEvents().

void clawsoft.Rect::setBottom int    [inherited]
 

Definition at line 84 of file Rect.cpp.

References clawsoft.Rect._b, clawsoft.Rect.h, and clawsoft.Rect.y.

void clawsoft.Object::setClassName char *    n [protected, inherited]
 

Call this method when you need to set the name of the class you're creating, typically int it's constructor, remeber that you must set the classname for every clas you create, that way you can have more information while being in a debuging process.

Definition at line 14 of file Object.cpp.

References clawsoft.Object.__cls_name.

Referenced by clawsoft.ArrayOutOfBoundsException.ArrayOutOfBoundsException(), clawsoft.BrokenPipeException.BrokenPipeException(), clawsoft.Dialog.CancelButton.CancelButton(), clawsoft.CantLoadDSOException.CantLoadDSOException(), clawsoft.CantUnloadDSOException.CantUnloadDSOException(), clawsoft.ConnectionRefusedException.ConnectionRefusedException(), clawsoft.ConnectionTimeoutException.ConnectionTimeoutException(), clawsoft.Dialog.Dialog(), clawsoft.DSOException.DSOException(), clawsoft.DSOSymbolException.DSOSymbolException(), clawsoft.ElementNotFoundException.ElementNotFoundException(), clawsoft.Font.Font(), clawsoft.GameSelector.GameSelector(), clawsoft.Dialog.HelpButton.HelpButton(), clawsoft.IOException.IOException(), clawsoft.KeyboardEvent.KeyboardEvent(), clawsoft.LoginDialog.LoginDialog(), clawsoft.Mutex.Mutex(), clawsoft.MutexException.MutexException(), clawsoft.NetworkException.NetworkException(), clawsoft.NetworkUnreachableException.NetworkUnreachableException(), clawsoft.NoMoreTokensException.NoMoreTokensException(), clawsoft.NullPointerException.NullPointerException(), clawsoft.NumberException.NumberException(), clawsoft.Object.Object(), clawsoft.Dialog.OKButton.OKButton(), clawsoft.Plugin.Plugin(), clawsoft.ProcOutOfFileDescriptorsException.ProcOutOfFileDescriptorsException(), Random.Random(), clawsoft.ServerSocket.ServerSocket(), clawsoft.Socket.Socket(), clawsoft.SocketAlreadyBoundedException.SocketAlreadyBoundedException(), clawsoft.SocketAlreadyUsedException.SocketAlreadyUsedException(), clawsoft.SocketUnableToReadException.SocketUnableToReadException(), clawsoft.SocketUnableToWriteException.SocketUnableToWriteException(), clawsoft.SysOutOfFileDescriptorsException.SysOutOfFileDescriptorsException(), clawsoft.TextBox.TextBox(), clawsoft.TextButton.TextButton(), clawsoft.TextField.TextField(), clawsoft.Thread.Thread(), clawsoft.UnableToLockMutexException.UnableToLockMutexException(), clawsoft.UnableToUnlockMutexException.UnableToUnlockMutexException(), and clawsoft.Window.Window().

void clawsoft.Rect::setLeft int    [inherited]
 

Definition at line 74 of file Rect.cpp.

References clawsoft.Rect._r, clawsoft.Rect.w, and clawsoft.Rect.x.

void clawsoft.Rect::setRight int    [inherited]
 

Definition at line 79 of file Rect.cpp.

References clawsoft.Rect._r, clawsoft.Rect.w, and clawsoft.Rect.x.

void clawsoft.Rect::setTop int    [inherited]
 

Definition at line 69 of file Rect.cpp.

References clawsoft.Rect._b, clawsoft.Rect.h, and clawsoft.Rect.y.

const int clawsoft.Rect::W   [inherited]
 

Definition at line 61 of file Rect.cpp.

References clawsoft.Rect.w.

Referenced by clawsoft.Window.checkMouseMotionEvents(), clawsoft.TextButton.draw(), clawsoft.TextBox.draw(), clawsoft.BaseButton.draw(), clawsoft.TextField.drawBorder(), clawsoft.GameSelector.GameSelector(), clawsoft.LoginDialog.LoginDialog(), clawsoft.Window.map(), clawsoft.TextButton.map(), clawsoft.GameSelector.map(), clawsoft.Rect.Rect(), and clawsoft.TextButton.TextButton().

void clawsoft.Rect::W int    [inherited]
 

Definition at line 43 of file Rect.cpp.

References clawsoft.Rect._r, clawsoft.Rect.w, and clawsoft.Rect.x.

Referenced by clawsoft._center(), clawsoft.Window.checkMouseMotionEvents(), clawsoft.Window.draw(), clawsoft.TextButton.draw(), clawsoft.Window.map(), clawsoft.GameSelector.map(), and clawsoft.Dialog.map().

const int clawsoft.Rect::X   [inherited]
 

Definition at line 53 of file Rect.cpp.

References clawsoft.Rect.x.

Referenced by clawsoft.Window.checkMouseMotionEvents(), clawsoft.Window.draw(), clawsoft.TextButton.draw(), clawsoft.TextBox.draw(), clawsoft.BaseButton.draw(), clawsoft.TextField.drawBorder(), clawsoft.TextBox.drawBorder(), clawsoft.LoginDialog.drawContents(), clawsoft.GameSelector.GameSelector(), clawsoft.LoginDialog.LoginDialog(), clawsoft.Window.map(), clawsoft.LoginDialog.map(), clawsoft.GameSelector.map(), and clawsoft.Window.move().

void clawsoft.Rect::X int    [inherited]
 

Definition at line 33 of file Rect.cpp.

References clawsoft.Rect._r, clawsoft.Rect.w, and clawsoft.Rect.x.

Referenced by clawsoft._center(), clawsoft.Window.draw(), clawsoft.TextButton.draw(), clawsoft.Window.map(), clawsoft.LoginDialog.map(), and clawsoft.Dialog.map().

const int clawsoft.Rect::Y   [inherited]
 

Definition at line 57 of file Rect.cpp.

References clawsoft.Rect.y.

Referenced by clawsoft.Window.checkMouseMotionEvents(), clawsoft.Window.draw(), clawsoft.TextButton.draw(), clawsoft.TextBox.draw(), clawsoft.BaseButton.draw(), clawsoft.TextField.drawBorder(), clawsoft.TextBox.drawBorder(), clawsoft.LoginDialog.drawContents(), clawsoft.GameSelector.GameSelector(), clawsoft.LoginDialog.LoginDialog(), clawsoft.Window.map(), clawsoft.LoginDialog.map(), and clawsoft.Window.move().

void clawsoft.Rect::Y int    [inherited]
 

Definition at line 38 of file Rect.cpp.

References clawsoft.Rect._b, clawsoft.Rect.h, and clawsoft.Rect.y.

Referenced by clawsoft.Window.draw(), clawsoft.TextButton.draw(), clawsoft.Window.map(), clawsoft.LoginDialog.map(), clawsoft.GameSelector.map(), and clawsoft.Dialog.map().


Field Documentation

int clawsoft.Rect._b [protected, inherited]
 

Definition at line 18 of file Rect.h.

Referenced by clawsoft.Rect.getBottom(), clawsoft.Rect.H(), clawsoft.Rect.Rect(), clawsoft.Rect.setBottom(), clawsoft.Rect.setTop(), and clawsoft.Rect.Y().

int clawsoft.Rect._r [protected, inherited]
 

Definition at line 19 of file Rect.h.

Referenced by clawsoft.Rect.getRight(), clawsoft.Rect.Rect(), clawsoft.Rect.setLeft(), clawsoft.Rect.setRight(), clawsoft.Rect.W(), and clawsoft.Rect.X().

CancelButton clawsoft.Dialog.cancelBtn [protected]
 

Definition at line 46 of file Dialog.h.

Referenced by clawsoft.Dialog.checkMouseEvents(), clawsoft.Dialog.drawComponents(), and clawsoft.Dialog.map().

String clawsoft.Window.caption [protected, inherited]
 

Definition at line 15 of file Window.h.

Referenced by clawsoft.Window.draw(), clawsoft.GameSelector.GameSelector(), clawsoft.LoginDialog.LoginDialog(), clawsoft.Window.map(), and clawsoft.Window.Window().

Rect clawsoft.Window.captionRect [protected, inherited]
 

Definition at line 17 of file Window.h.

Referenced by clawsoft.Window.checkMouseEvents(), clawsoft.Window.draw(), and clawsoft.Window.map().

bool clawsoft.GUIObject.drawn [protected, inherited]
 

Definition at line 16 of file gui.h.

Referenced by clawsoft.BaseButton.BaseButton(), clawsoft.TextButton.checkMouseMotionEvents(), clawsoft.BaseButton.checkMouseMotionEvents(), clawsoft.TextButton.draw(), clawsoft.BaseButton.draw(), and clawsoft.GUIObject.GUIObject().

DialogType clawsoft.Dialog.dType [protected]
 

Definition at line 48 of file Dialog.h.

Referenced by clawsoft.Dialog.Dialog(), and clawsoft.GameSelector.GameSelector().

int clawsoft.Rect.h [protected, inherited]
 

Definition at line 17 of file Rect.h.

Referenced by clawsoft.Rect.H(), clawsoft.Window.map(), clawsoft.Rect.Rect(), clawsoft.Rect.setBottom(), clawsoft.Rect.setTop(), and clawsoft.Rect.Y().

HelpButton clawsoft.Dialog.helpBtn [protected]
 

Definition at line 47 of file Dialog.h.

Referenced by clawsoft.Dialog.checkMouseEvents(), clawsoft.Dialog.drawComponents(), and clawsoft.Dialog.map().

KeyboardEvent clawsoft.Widget.keyboard [protected, inherited]
 

Definition at line 17 of file Widget.h.

Referenced by clawsoft.TextButton.checkKeyEvents(), and clawsoft.BaseButton.checkKeyEvents().

Rect clawsoft.Window.lborderRect [protected, inherited]
 

Definition at line 19 of file Window.h.

Referenced by clawsoft.Window.checkMouseMotionEvents(), clawsoft.Window.draw(), and clawsoft.Window.map().

MouseEvent clawsoft.Widget.mouse [protected, inherited]
 

Definition at line 16 of file Widget.h.

Referenced by clawsoft.TextButton.checkKeyEvents(), clawsoft.TextBox.checkKeyEvents(), clawsoft.BaseButton.checkKeyEvents(), clawsoft.Window.checkMouseEvents(), clawsoft.TextButton.checkMouseEvents(), clawsoft.TextBox.checkMouseEvents(), clawsoft.BaseButton.checkMouseEvents(), clawsoft.Window.checkMouseMotionEvents(), clawsoft.TextButton.checkMouseMotionEvents(), clawsoft.BaseButton.checkMouseMotionEvents(), clawsoft.TextButton.draw(), clawsoft.TextBox.draw(), clawsoft.BaseButton.draw(), clawsoft.TextField.drawBorder(), clawsoft.TextBox.drawBorder(), and clawsoft.BaseButton.pressed().

OKButton clawsoft.Dialog.okBtn [protected]
 

Definition at line 45 of file Dialog.h.

Referenced by clawsoft.Dialog.checkMouseEvents(), clawsoft.Dialog.drawComponents(), and clawsoft.Dialog.map().

Rect clawsoft.Window.rborderRect [protected, inherited]
 

Definition at line 20 of file Window.h.

Referenced by clawsoft.Window.checkMouseMotionEvents(), clawsoft.Window.draw(), and clawsoft.Window.map().

Rect clawsoft.Window.rect [protected, inherited]
 

Definition at line 16 of file Window.h.

Referenced by clawsoft.Window.checkMouseMotionEvents(), and clawsoft.Window.map().

Rect clawsoft.Window.toolbarRect [protected, inherited]
 

Definition at line 18 of file Window.h.

Referenced by clawsoft.Window.draw(), and clawsoft.Window.map().

int clawsoft.Rect.w [protected, inherited]
 

Definition at line 16 of file Rect.h.

Referenced by clawsoft.Window.map(), clawsoft.GameSelector.map(), clawsoft.Rect.Rect(), clawsoft.Rect.setLeft(), clawsoft.Rect.setRight(), clawsoft.Rect.W(), and clawsoft.Rect.X().

int clawsoft.Rect.x [protected, inherited]
 

Definition at line 14 of file Rect.h.

Referenced by clawsoft.Rect.getLeft(), clawsoft.Window.move(), clawsoft.Rect.Rect(), clawsoft.Rect.setLeft(), clawsoft.Rect.setRight(), clawsoft.Rect.W(), and clawsoft.Rect.X().

int clawsoft.Rect.y [protected, inherited]
 

Definition at line 15 of file Rect.h.

Referenced by clawsoft.Rect.getTop(), clawsoft.Rect.H(), clawsoft.Window.move(), clawsoft.Rect.Rect(), clawsoft.Rect.setBottom(), clawsoft.Rect.setTop(), and clawsoft.Rect.Y().


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

Powered by:

SourceForge Logo