1998-05-20 14:01:55 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2006-01-23 02:28:01 +00:00
|
|
|
// Name: wx/gtk1/app.h
|
1998-05-20 14:01:55 +00:00
|
|
|
// Purpose:
|
|
|
|
// Author: Robert Roebling
|
1998-10-26 10:56:58 +00:00
|
|
|
// Id: $Id$
|
1998-10-24 17:12:05 +00:00
|
|
|
// Copyright: (c) 1998 Robert Roebling, Julian Smart
|
2004-05-23 20:53:33 +00:00
|
|
|
// Licence: wxWindows licence
|
1998-05-20 14:01:55 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef __GTKAPPH__
|
|
|
|
#define __GTKAPPH__
|
|
|
|
|
|
|
|
#include "wx/frame.h"
|
1999-07-05 11:22:45 +00:00
|
|
|
#include "wx/icon.h"
|
2005-03-29 23:15:54 +00:00
|
|
|
#include "wx/strconv.h"
|
1998-05-20 14:01:55 +00:00
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// classes
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2005-08-02 22:58:06 +00:00
|
|
|
class WXDLLIMPEXP_CORE wxApp;
|
|
|
|
class WXDLLIMPEXP_BASE wxLog;
|
1998-05-20 14:01:55 +00:00
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// wxApp
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2005-08-02 22:58:06 +00:00
|
|
|
class WXDLLIMPEXP_CORE wxApp: public wxAppBase
|
1998-05-20 14:01:55 +00:00
|
|
|
{
|
1999-07-06 00:44:26 +00:00
|
|
|
public:
|
1999-01-08 20:33:18 +00:00
|
|
|
wxApp();
|
2001-09-28 13:53:55 +00:00
|
|
|
virtual ~wxApp();
|
1998-08-07 15:09:04 +00:00
|
|
|
|
1999-07-06 00:44:26 +00:00
|
|
|
/* override for altering the way wxGTK intializes the GUI
|
|
|
|
* (palette/visual/colorcube). under wxMSW, OnInitGui() does nothing by
|
|
|
|
* default. when overriding this method, the code in it is likely to be
|
|
|
|
* platform dependent, otherwise use OnInit(). */
|
1999-01-08 20:33:18 +00:00
|
|
|
virtual bool OnInitGui();
|
1999-07-06 00:44:26 +00:00
|
|
|
|
|
|
|
// override base class (pure) virtuals
|
2001-10-19 18:29:32 +00:00
|
|
|
virtual bool Yield(bool onlyIfNeeded = FALSE);
|
2003-06-24 00:56:19 +00:00
|
|
|
virtual void WakeUpIdle();
|
1998-06-03 19:06:13 +00:00
|
|
|
|
2003-06-30 20:02:05 +00:00
|
|
|
virtual bool Initialize(int& argc, wxChar **argv);
|
2003-06-30 18:43:09 +00:00
|
|
|
virtual void CleanUp();
|
1998-08-07 15:09:04 +00:00
|
|
|
|
2003-06-30 18:43:09 +00:00
|
|
|
static bool InitialzeVisual();
|
1998-08-07 15:09:04 +00:00
|
|
|
|
2001-07-11 15:19:32 +00:00
|
|
|
#ifdef __WXDEBUG__
|
2002-06-15 01:43:03 +00:00
|
|
|
virtual void OnAssert(const wxChar *file, int line, const wxChar *cond, const wxChar *msg);
|
2001-07-11 15:19:32 +00:00
|
|
|
|
|
|
|
bool IsInAssert() const { return m_isInAssert; }
|
|
|
|
#endif // __WXDEBUG__
|
1999-07-06 00:44:26 +00:00
|
|
|
|
1999-01-12 17:53:45 +00:00
|
|
|
gint m_idleTag;
|
2004-11-04 20:04:59 +00:00
|
|
|
void RemoveIdleTag();
|
2006-01-23 02:28:01 +00:00
|
|
|
|
1999-01-12 17:53:45 +00:00
|
|
|
unsigned char *m_colorCube;
|
1998-08-07 15:09:04 +00:00
|
|
|
|
2002-01-12 12:21:57 +00:00
|
|
|
// Used by the the wxGLApp and wxGLCanvas class for GL-based X visual
|
2005-03-27 18:06:43 +00:00
|
|
|
// selection.
|
|
|
|
void *m_glVisualInfo; // this is actually an XVisualInfo*
|
|
|
|
void *m_glFBCInfo; // this is actually an GLXFBConfig*
|
2002-01-12 12:21:57 +00:00
|
|
|
// This returns the current visual: either that used by wxRootWindow
|
|
|
|
// or the XVisualInfo* for SGI.
|
|
|
|
GdkVisual *GetGdkVisual();
|
2006-01-23 02:28:01 +00:00
|
|
|
|
1999-07-06 00:44:26 +00:00
|
|
|
private:
|
2001-07-11 15:19:32 +00:00
|
|
|
// true if we're inside an assert modal dialog
|
|
|
|
#ifdef __WXDEBUG__
|
|
|
|
bool m_isInAssert;
|
|
|
|
#endif // __WXDEBUG__
|
1999-07-06 00:44:26 +00:00
|
|
|
|
1999-08-24 20:26:06 +00:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxApp)
|
1999-07-06 00:44:26 +00:00
|
|
|
DECLARE_EVENT_TABLE()
|
1998-05-20 14:01:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // __GTKAPPH__
|