app.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/gtk1/app.h
  3. // Purpose:
  4. // Author: Robert Roebling
  5. // Copyright: (c) 1998 Robert Roebling, Julian Smart
  6. // Licence: wxWindows licence
  7. /////////////////////////////////////////////////////////////////////////////
  8. #ifndef __GTKAPPH__
  9. #define __GTKAPPH__
  10. #include "wx/frame.h"
  11. #include "wx/icon.h"
  12. #include "wx/strconv.h"
  13. typedef struct _GdkVisual GdkVisual;
  14. //-----------------------------------------------------------------------------
  15. // classes
  16. //-----------------------------------------------------------------------------
  17. class WXDLLIMPEXP_FWD_CORE wxApp;
  18. class WXDLLIMPEXP_FWD_BASE wxLog;
  19. //-----------------------------------------------------------------------------
  20. // wxApp
  21. //-----------------------------------------------------------------------------
  22. class WXDLLIMPEXP_CORE wxApp: public wxAppBase
  23. {
  24. public:
  25. wxApp();
  26. virtual ~wxApp();
  27. /* override for altering the way wxGTK intializes the GUI
  28. * (palette/visual/colorcube). under wxMSW, OnInitGui() does nothing by
  29. * default. when overriding this method, the code in it is likely to be
  30. * platform dependent, otherwise use OnInit(). */
  31. virtual bool OnInitGui();
  32. // override base class (pure) virtuals
  33. virtual void WakeUpIdle();
  34. virtual bool Initialize(int& argc, wxChar **argv);
  35. virtual void CleanUp();
  36. static bool InitialzeVisual();
  37. virtual void OnAssertFailure(const wxChar *file,
  38. int line,
  39. const wxChar *func,
  40. const wxChar *cond,
  41. const wxChar *msg);
  42. bool IsInAssert() const { return m_isInAssert; }
  43. int m_idleTag;
  44. void RemoveIdleTag();
  45. unsigned char *m_colorCube;
  46. // Used by the wxGLApp and wxGLCanvas class for GL-based X visual
  47. // selection.
  48. void *m_glVisualInfo; // this is actually an XVisualInfo*
  49. void *m_glFBCInfo; // this is actually an GLXFBConfig*
  50. // This returns the current visual: either that used by wxRootWindow
  51. // or the XVisualInfo* for SGI.
  52. GdkVisual *GetGdkVisual();
  53. private:
  54. // true if we're inside an assert modal dialog
  55. bool m_isInAssert;
  56. DECLARE_DYNAMIC_CLASS(wxApp)
  57. };
  58. #endif // __GTKAPPH__