1 ///////////////////////////////////////////////////////////////////////////// 
   3 // Purpose:     wxApp class 
   4 // Author:      Julian Smart 
   8 // Copyright:   (c) Julian Smart 
   9 // Licence:     wxWindows licence 
  10 ///////////////////////////////////////////////////////////////////////////// 
  15 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) 
  16 #pragma interface "app.h" 
  19 // ---------------------------------------------------------------------------- 
  21 // ---------------------------------------------------------------------------- 
  23 #include "wx/gdicmn.h" 
  26 // ---------------------------------------------------------------------------- 
  27 // forward declarations 
  28 // ---------------------------------------------------------------------------- 
  30 class WXDLLEXPORT wxFrame
; 
  31 class WXDLLEXPORT wxWindow
; 
  32 class WXDLLEXPORT wxApp
; 
  33 class WXDLLEXPORT wxKeyEvent
; 
  34 class WXDLLEXPORT wxLog
; 
  35 class WXDLLEXPORT wxXVisualInfo
; 
  37 // ---------------------------------------------------------------------------- 
  38 // the wxApp class for wxX11 - see wxAppBase for more details 
  39 // ---------------------------------------------------------------------------- 
  41 class WXDLLEXPORT wxApp 
: public wxAppBase
 
  43     DECLARE_DYNAMIC_CLASS(wxApp
) 
  49     // override base class (pure) virtuals 
  50     // ----------------------------------- 
  54     virtual bool Yield(bool onlyIfNeeded 
= FALSE
); 
  55     virtual void WakeUpIdle(); 
  57     virtual bool OnInitGui(); 
  59     // implementation from now on 
  60     // -------------------------- 
  62     // Processes an X event. 
  63     virtual bool ProcessXEvent(WXEvent
* event
); 
  66     virtual void OnAssert(const wxChar 
*file
, int line
, const wxChar
* cond
, const wxChar 
*msg
); 
  74     virtual bool Initialize(int& argc
, wxChar 
**argv
); 
  75     virtual void CleanUp(); 
  77     WXWindow       
GetTopLevelWidget() const { return m_topLevelWidget
; } 
  78     WXColormap     
GetMainColormap(WXDisplay
* display
); 
  79     long           GetMaxRequestSize() const { return m_maxRequestSize
; } 
  81     // This handler is called when a property change event occurs 
  82     virtual bool HandlePropertyChange(WXEvent 
*event
); 
  84     // Values that can be passed on the command line. 
  85     // Returns -1, -1 if none specified. 
  86     const wxSize
& GetInitialSize() const { return m_initialSize
; } 
  87     bool GetShowIconic() const { return m_showIconic
; } 
  90     // Global context for Pango layout. Either use X11 
  91     // or use Xft rendering according to GDK_USE_XFT 
  92     // environment variable 
  93     PangoContext
* GetPangoContext(); 
  96     wxXVisualInfo
* GetVisualInfo(WXDisplay
* display
) 
  98         // this should be implemented correctly for wxBitmap to work 
  99         // with multiple display 
 103     // We need this before creating the app 
 104     static   WXDisplay
* GetDisplay() { return ms_display
; } 
 105     static   WXDisplay
* ms_display
; 
 108     static long           sm_lastMessageTime
; 
 110     wxSize                m_initialSize
; 
 113     wxXVisualInfo
*        m_visualInfo
; 
 119     WXWindow              m_topLevelWidget
; 
 120     WXColormap            m_mainColormap
; 
 121     long                  m_maxRequestSize
; 
 123     DECLARE_EVENT_TABLE()