SkyGI::Dialog Class Reference

Inheritance diagram for SkyGI::Dialog:
[legend]
Collaboration diagram for SkyGI::Dialog:
[legend]
List of all members.

Public Member Functions

 Dialog (const Rect &rFrame, const String &szTitle, unsigned int nWindowLayoutFlags, unsigned int uiApplicationWindowFlags=0, unsigned int uiWindowFlags=0)
 ~Dialog ()
virtual bool IsModal ()
virtual void Instance ()
virtual int Run (bool bModal=true)
virtual int Run (Window *pOwningWindow, bool bModal=true)
virtual void Done (int iExitCode=0)
MessageQueueGetMessageQueue ()
void Cancel ()
virtual bool CloseRequest ()
virtual void SetShowDelay (int iShowDelayInMsecs)
virtual void OnTimer (int iTimerID, void *vpCookie)
virtual bool Free (int iExitCode)

Public Attributes

signal0 Destroy
signal2< Dialog *, int > Action

Classes

class  Private

Detailed Description

Dialog

Description:
A Dialog is an ApplicationWindow which can run either modal or non-modal. Many SkyGI windows like MessageBox, CopyDialog, etc. are derived from this Dialog class.
Modal Dialogs:
To create a modal dialog, in this example, a modal messagebox, use:
                MessageBox pMessageBox("Modal MessageBox", "This is a Modal MessageBox", MESSAGEBOX_FLAG_OK);
                int ret = pMessageBox.Run();

Non-Modal Dialogs:
To create a non-modal MessageBox:
                MessageBox *pMessageBox = new MessageBox("NonModal MessageBox", "This is a NonModal MessageBox", MESSAGEBOX_FLAG_OK);
                pMessageBox->Run(false);
You should also specify a target window to receive button command messages from non modal dialogs.


Constructor & Destructor Documentation

Dialog::Dialog ( const Rect rFrame,
const String szTitle,
unsigned int  nWindowLayoutFlags,
unsigned int  uiApplicationWindowFlags = 0,
unsigned int  uiWindowFlags = 0 
)

Dialog::~Dialog (  ) 


Member Function Documentation

bool Dialog::IsModal (  )  [virtual]

void Dialog::Instance (  )  [virtual]

Reimplemented in SkyGI::CopyDialog, SkyGI::DeleteDialog, SkyGI::FilePropertiesDialog, and SkyGI::MessageBox.

int Dialog::Run ( bool  bModal = true  )  [virtual]

Run a dialog

Description:
If bModal is true a MessageQueue will created making the dialog modal until it got closed.
Examples:
messagebox.cpp.

int Dialog::Run ( Window pOwningWindow,
bool  bModal = true 
) [virtual]

void Dialog::Done ( int  iExitCode = 0  )  [virtual]

Called right before the dialog gets closed

Description:
Will emit the Action signal using the buttons ID code or ID_CANCEL when dialog was closed with ALT+F4 or window close button.

MessageQueue * Dialog::GetMessageQueue (  ) 

void Dialog::Cancel (  ) 

Close a Dialog

Description:
Can be called from derived classes to close the dialog with ID_CANCEL

bool Dialog::CloseRequest (  )  [virtual]

Request for Close

Description:
Overload this member to react on close events. If window is ready to close return the return value from Window::CloseRequest. Else return false

Reimplemented from SkyGI::Window.

void Dialog::SetShowDelay ( int  iShowDelayInMsecs  )  [virtual]

void Dialog::OnTimer ( int  iTimerID,
void *  vpCookie 
) [virtual]

Reimplemented from SkyGI::Window.

bool Dialog::Free ( int  iExitCode  )  [virtual]


Member Data Documentation

signal0 SkyGI::Dialog::Destroy

Emitted when dialog gets deleted

Description:
Dialog destructor will emit this signal. Useful to update references to this dialog when running as non-modal

signal2<Dialog*, int> SkyGI::Dialog::Action

Emitted right before the dialog gets closed

Description:
Emitted when the dialog gets closed using Dialog* as first and ID of button pressed or ID_CANCEL when dialog was closed with windows close button


Generated on Thu Dec 13 18:14:19 2007 for SkyGI by  doxygen 1.5.1-p1