#include <Dialog.h>
Inheritance diagram for wkgl::Dialog:

Public Methods | |
| Dialog (Window *parent, String *title=NULL, BOOL modal=TRUE) | |
| Creates a new dialog box. | |
| ~Dialog () | |
| virtual BOOL | create (Control *parent) |
| Specifies the manner in which a particular control is to be created. | |
| virtual BOOL | isModal () |
| Returns whether this dialog is modal or not. | |
| virtual BOOL | show () |
| Shows the dialog box. | |
| virtual BOOL | hide () |
| Hides the dialog box. | |
| virtual void | setDefaultCloseOperation (SFLAG operation) |
| Specifies what the window should do when it recieves the WM_CLOSE event. | |
| virtual BOOL | callBack (Component *com, UINT message, WPARAM wParam, LPARAM lParam) |
| This handles the default close event. | |
| virtual LRESULT | fireChildEvents (UINT message, WPARAM wParam, LPARAM lParam) |
| Propagates the events to the appropriate child/children. | |
| virtual LRESULT | fireEvents (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) |
| Propagates events to all the callback functions. | |
| WPARAM | beginMessageLoop () |
| Begins the message loop. | |
| virtual void | setSmallIcon (Icon *ico) |
| Set the 16x16 icon that appears in the upper left hand corner. | |
| virtual void | setWindowIcon (Icon *ico) |
| Set the 32x32 icon that appears in the alt-tab box. | |
| virtual Icon * | getSmallIcon () |
| Get the 16x16 icon that appears in the upper left hand corner. | |
| virtual Icon * | getWindowIcon () |
| Get the 32x32 icon that appears in the alt-tab box. | |
| virtual char * | getTitle () |
| Gets the window's title. | |
| virtual void | setTitle (const char *s) |
| Sets the window's title. | |
| virtual short | getDefaultCloseOperation () |
| Returns the default close operation. | |
| virtual BOOL | isHiding () |
| Returns whether the window is not hiding. | |
| virtual BOOL | toFront () |
| Places the window in front of all other windows. | |
| virtual BOOL | toBack () |
| Places the window behind all other windows. | |
| virtual BOOL | activate () |
| Activates the window. | |
| virtual void | add (Control *con) |
| Adds the control to the window. | |
| virtual void | setMenuBar (Menu *menu) |
| Makes the given menu the window's menu bar. | |
| virtual BOOL | destroyWindow () |
| Destroys the window. | |
| virtual void | setStyle (LFLAG style, bool extended=false) |
| Alters a control's style. | |
| virtual LFLAG | getStyle (bool extended=false) |
| Gets a control's style. | |
| virtual LRESULT | sendEventToParent (UINT message, WPARAM wParam, LPARAM lParam) |
| Transmits the given event to the parent. | |
| virtual LRESULT | sendEventToChild (HWND child, UINT message, WPARAM wParam, LPARAM lParam) |
| Transmits the given event to the child. | |
| virtual LRESULT | sendEventToChild (Component *child, UINT message, WPARAM wParam, LPARAM lParam) |
| Transmits the given event to the child. | |
| LRESULT | sendMessage (UINT msg, WPARAM wParam, LPARAM lParam) |
| Sends a message to the underlying control. | |
| virtual void | setSize (int width, int height) |
| Sets the size of the component. | |
| virtual void | setWidth (int width) |
| Sets the width of the component. | |
| virtual void | setHeight (int height) |
| Sets the height of the component. | |
| virtual int | getWidth () |
| Gets the width of the component. | |
| virtual int | getHeight () |
| Gets the height of the component. | |
| virtual void | setText (const char *label) |
| Set the components text. | |
| virtual void | setText (String label) |
| Set the components text. | |
| virtual void | getText (char *buf, int buf_len=30) |
| Returns the component's text. | |
| virtual void | getText (String &buf, int buf_len=30) |
| Returns the component's text. | |
| virtual int | getX () |
| Returns the component's horizontal position. | |
| virtual int | getY () |
| Returns the component's vertical position. | |
| virtual void | setX (int x) |
| Sets the component's horizontal position. | |
| virtual void | setY (int y) |
| Sets the component's vertical position. | |
| virtual BOOL | autoPositionX () |
| Tells whether x coordinate should be auto positioned by layout manager. | |
| virtual BOOL | autoPositionY () |
| Tells whether y coordinate should be auto positioned by layout manager. | |
| virtual void | setautoPositionX (BOOL a) |
| Sets whether x coordinate should be auto positioned by layout manager. | |
| virtual void | setautoPositionY (BOOL a) |
| Sets whether y coordinate should be auto positioned by layout manager. | |
| virtual void | setPosition (int x, int y) |
| Sets the component's position. | |
| virtual void | setCursor (Cursor *cur) |
| Set the cursor that will be used by this window. | |
| virtual Cursor * | getCursor () |
| Get the cursor that is be used by this window. | |
| virtual WNDCLASSEX | getWndClass () |
| Returns the window class structure that represents this window. | |
| virtual String * | getClassName () |
| Returns the window class name of this control. | |
| virtual void | paint () |
| Paints the control to the display. | |
| virtual void | registerComponent (HWND *hwnd, Component *com) |
| Allows this component to recieve top level events. | |
| virtual void | registerChild (HWND *hwnd, Component *com) |
| Allows this component to propagate an event to the given child. | |
| virtual Component * | getParent () |
| Returns a pointer to the parent component. | |
| virtual void | setParent (Component *p) |
| Sets the components parent. | |
| virtual HINSTANCE | getInstance () |
| Returns the instance of the application. | |
| virtual HWND | getHwnd () |
| Returns the window handle. | |
| virtual void | setHwnd (HWND h) |
| Sets the window handle. | |
| virtual void | addCallBack (COMCALLBACK callback) |
| Adds a callback function. | |
| virtual void | addCallBack (CallBack *callback) |
| Adds a callback method. | |
Static Public Methods | |
| void | quitApp (int exitcode=0) |
| Attempts to exit the application. | |
| UINT | getWndProc () |
| Returns the the address of GlobalProc(). | |
Protected Methods | |
| WORD * | align (WORD *in) |
| Helps align template allong word boundries. | |
| void | createControl (Component *parent, String *classname, String *label, int width, int height, int x, int y, int style, int exstyle) |
| Method that does the actual control creation. | |
| void | getCharSize () |
| Gets the average width of a character and the height of a character. | |
Protected Attributes | |
| BOOL | modal |
| Flag specifing if the dialog is modal (TRUE) or not. | |
| String | title |
| The title of the dialog. | |
| BOOL | isMade |
| Flag specifing if init has been called or not. | |
| BYTE | cid |
| The control identifier accumulator (used in create). | |
| AbstractButton * | defbut |
| The default button for the dialog. | |
| BOOL | looping |
| Used to tell if the event loop is running. | |
| HBRUSH | bgbrush |
| The brush used to paint the background. | |
| Icon * | wicon |
| The large icon. | |
| Icon * | sicon |
| The small icon. | |
| UINT | style |
| The style of this window. | |
| UINT | exstyle |
| The extended style of the window. | |
| Menu * | menu_bar |
| The menu being used as the menu bar. | |
| std::vector< Control * > | controls |
| The list of child controls. | |
| HWND | curfocus |
| This is the control that has the current keyboard focus. | |
| SFLAG | close_operation |
| Flag specifing what the window should do when it recieves WM_CLOSE. | |
| Control * | parent |
| The parent of the component. | |
| int | showstate |
| The state of the window when hidden. | |
| int | width |
| The width of the component in pixels. | |
| int | height |
| The height of the component in pixels. | |
| int | x |
| The horizontal position of the panel. | |
| int | y |
| The vertical position of the panel. | |
| BOOL | ax |
| Flag saying whether the x is auto positioned. | |
| BOOL | ay |
| Flag saying whether the y is auto positioned. | |
| Cursor * | cursor |
| The cursor. | |
| String | className |
| The name of this class. | |
| String * | label |
| The controls label. | |
| WNDCLASSEX | wndclass |
| The window class. | |
| HINSTANCE | hInstance |
| The instance of this application. | |
| HWND | hwnd |
| The handle to the component. | |
| std::vector< CHILDCOMPONENT > | clisteners |
| A list of the child components that events are to be passed to. | |
| std::vector< COMCALLBACK > | comlisteners |
| Stores the callbacks for this component that use functions. Stores the functions given to AddCallBack(). It is used by FireEvents() to notify the callbacks. | |
| std::vector< CallBack * > | classlisteners |
| Stores the callbacks for this component that come from classes. Stores the functions given to AddCallBack(). It is used by FireEvents() to notify the callbacks. | |
Static Protected Attributes | |
| TEXTMETRIC | finfo |
| Information about the font used by the system. | |
Friends | |
| INT _stdcall | dialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) |
| The default callback used to process dialog events. | |
| LRESULT CALLBACK | globalProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) |
| Is used to process all the callback functions. | |
|
||||||||||||||||
|
Creates a new dialog box.
|
|
|
|
|
|
Activates the window.
|
|
|
Adds the control to the window.
|
|
|
Adds a callback method. The callback must be a method from a class that inheirits from CallBack.
|
|
|
Adds a callback function.
|
|
|
Helps align template allong word boundries.
|
|
|
Tells whether x coordinate should be auto positioned by layout manager.
|
|
|
Tells whether y coordinate should be auto positioned by layout manager.
|
|
|
Begins the message loop.
It does not return until the window is closed. This should be the last line of the WinMain function. int WINAPI WinMain( ... ) { Window win( ... ); //More initialization code WPARAM ret = win.BeginMessageLoop(); //Clean up code here (i.e. delete pointers) return ret; }
|
|
||||||||||||||||||||
|
This handles the default close event.
Reimplemented from wkgl::Window. |
|
|
Specifies the manner in which a particular control is to be created.
Reimplemented from wkgl::Window. |
|
||||||||||||||||||||||||||||||||||||||||
|
Method that does the actual control creation.
|
|
|
Destroys the window.
|
|
||||||||||||||||
|
Propagates the events to the appropriate child/children.
Reimplemented from wkgl::Component. |
|
||||||||||||||||||||
|
Propagates events to all the callback functions.
Reimplemented from wkgl::Component. |
|
|
Gets the average width of a character and the height of a character.
|
|
|
Returns the window class name of this control.
|
|
|
Get the cursor that is be used by this window.
|
|
|
Returns the default close operation.
|
|
|
Gets the height of the component.
Reimplemented in wkgl::LayoutManager. |
|
|
Returns the window handle.
|
|
|
Returns the instance of the application.
|
|
|
Returns a pointer to the parent component.
|
|
|
Get the 16x16 icon that appears in the upper left hand corner.
|
|
|
Gets a control's style.
|
|
||||||||||||
|
Returns the component's text.
|
|
||||||||||||
|
Returns the component's text.
|
|
|
Gets the window's title.
|
|
|
Gets the width of the component.
Reimplemented in wkgl::LayoutManager. |
|
|
Get the 32x32 icon that appears in the alt-tab box.
|
|
|
Returns the window class structure that represents this window.
|
|
|
Returns the the address of GlobalProc().
|
|
|
Returns the component's horizontal position.
|
|
|
Returns the component's vertical position.
|
|
|
Hides the dialog box. Modal dialogs cannot be hidden, if the dialog is modal this method will always return false. Modelless dialogs still may or may not be hidden if some callback negates this methods effect.
Reimplemented from wkgl::Window. |
|
|
Returns whether the window is not hiding.
|
|
|
Returns whether this dialog is modal or not.
|
|
|
Paints the control to the display.
|
|
|
Attempts to exit the application.
|
|
||||||||||||
|
Allows this component to propagate an event to the given child.
|
|
||||||||||||
|
Allows this component to recieve top level events.
|
|
||||||||||||||||||||
|
Transmits the given event to the child.
|
|
||||||||||||||||||||
|
Transmits the given event to the child.
|
|
||||||||||||||||
|
Transmits the given event to the parent.
|
|
||||||||||||||||
|
Sends a message to the underlying control. See the components docs. |
|
|
Sets whether x coordinate should be auto positioned by layout manager.
|
|
|
Sets whether y coordinate should be auto positioned by layout manager.
|
|
|
Set the cursor that will be used by this window.
|
|
|
Specifies what the window should do when it recieves the WM_CLOSE event. So if you pass HIDE_ON_CLOSE, and this is a modal dialog box the method will do nothing.
Reimplemented from wkgl::Window. |
|
|
Sets the height of the component.
|
|
|
Sets the window handle.
|
|
|
Makes the given menu the window's menu bar.
|
|
|
Sets the components parent.
|
|
||||||||||||
|
Sets the component's position. This method is most often used by layout managers to set a control's position without affecting wether x or y's value is AUTOPOS.
Reimplemented in wkgl::LayoutManager. |
|
||||||||||||
|
Sets the size of the component.
|
|
|
Set the 16x16 icon that appears in the upper left hand corner.
|
|
||||||||||||
|
Alters a control's style.
|
|
|
Set the components text.
|
|
|
Set the components text.
Reimplemented in wkgl::AbstractButton. |
|
|
Sets the window's title.
|
|
|
Sets the width of the component.
|
|
|
Set the 32x32 icon that appears in the alt-tab box.
|
|
|
Sets the component's horizontal position.
|
|
|
Sets the component's vertical position.
|
|
|
Shows the dialog box. It still may or may not be shown if Window::BeginMessageLoop() has not been called yet, or some callback negates this methods effect.
Reimplemented from wkgl::Window. |
|
|
Places the window behind all other windows.
|
|
|
Places the window in front of all other windows.
|
|
||||||||||||||||||||
|
The default callback used to process dialog events.
|
|
||||||||||||||||||||
|
Is used to process all the callback functions.
|
|
|
Flag saying whether the x is auto positioned.
|
|
|
Flag saying whether the y is auto positioned.
|
|
|
The brush used to paint the background.
|
|
|
The control identifier accumulator (used in create).
|
|
|
Stores the callbacks for this component that come from classes. Stores the functions given to AddCallBack(). It is used by FireEvents() to notify the callbacks.
|
|
|
The name of this class.
|
|
|
A list of the child components that events are to be passed to. Stores the children who wish to recieve events.
|
|
|
Flag specifing what the window should do when it recieves WM_CLOSE.
|
|
|
Stores the callbacks for this component that use functions. Stores the functions given to AddCallBack(). It is used by FireEvents() to notify the callbacks.
|
|
|
The list of child controls.
|
|
|
This is the control that has the current keyboard focus.
|
|
|
The cursor.
|
|
|
The default button for the dialog.
|
|
|
The extended style of the window.
Reimplemented from wkgl::Control. |
|
|
Information about the font used by the system.
|
|
|
The height of the component in pixels.
|
|
|
The instance of this application.
|
|
|
The handle to the component.
|
|
|
Flag specifing if init has been called or not.
|
|
|
The controls label.
|
|
|
Used to tell if the event loop is running.
|
|
|
The menu being used as the menu bar.
|
|
|
Flag specifing if the dialog is modal (TRUE) or not.
|
|
|
The parent of the component.
Reimplemented from wkgl::Component. |
|
|
The state of the window when hidden.
|
|
|
The small icon.
|
|
|
The style of this window.
Reimplemented from wkgl::Control. |
|
|
The title of the dialog.
Reimplemented from wkgl::Window. |
|
|
The large icon.
|
|
|
The width of the component in pixels.
|
|
|
The window class.
|
|
|
The horizontal position of the panel.
|
|
|
The vertical position of the panel.
|
1.2.18