Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

CascadeMessageBox.h

Go to the documentation of this file.
00001 //
00002 // CascadeMessageBox.h - header file for class CascadeMessageBox
00003 //
00004 // Copyright (c) 2003, Roku, LLC.  All rights reserved.
00005 //
00008 
00037 
00038 #ifndef _ROKU_INCLUDE_CASCADE_APP_CASCADEMESSAGEBOX_H
00039 #define _ROKU_INCLUDE_CASCADE_APP_CASCADEMESSAGEBOX_H
00040 
00041 #include <cascade/app/CascadeWindow.h>
00042 #include <cascade/widgets/CascadeButtonWidget.h>
00043 
00071 class CascadeMessageBox : protected CascadeWindow
00072 {
00073 public:
00074     CascadeMessageBox();
00078     virtual ~CascadeMessageBox();
00082 
00083 public:
00084     enum Type
00085     {
00086         Ok          = 0,
00087         OkCancel    = 1,
00088         YesNo       = 2
00089     };
00090 
00091 public:
00092     bool MessageBox(CascadeString & text, const CascadeString & title, Type type = Ok, bool bDefault = true);
00111     void Dismiss(bool bResult);
00122     void Dismiss();
00129         
00130 protected:
00131     virtual void OnPaint(CascadeBitmap & bitmap);
00132     virtual bool OnKeyDown(u32 nKey);
00133     virtual bool OnKeyUp(u32 nKey);
00134     static void StaticButtonCallback(const CascadeButtonWidget * pButton, const CascadeButtonWidget::State & newState, void * pClientData);
00135 
00136 protected:
00137     void LayoutBox();
00138 
00139 protected:
00140     CascadeString m_text;
00141     CascadeString m_title;
00142     CascadeRect m_rectText;
00143     CascadeRect m_rectTitle;
00144     Type m_type;
00145     CascadeButtonWidget m_buttonOkYes;
00146     CascadeButtonWidget m_buttonCancelNo;
00147     bool m_bResult;
00148 };
00149 
00150 #endif // #ifndef _ROKU_INCLUDE_CASCADE_APP_CASCADEMESSAGEBOX_H
00151 
00153 //  LOG
00155 //  03-Jun-03   dwoodward   created

Generated on Sun Jul 24 14:27:17 2005 for Cascade Library by  doxygen 1.4.1