1998-09-18 06:19:10 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2006-07-25 10:31:55 -04:00
|
|
|
// Name: wx/motif/app.h
|
1998-09-18 06:19:10 -04:00
|
|
|
// Purpose: wxApp class
|
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 17/09/98
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) Julian Smart
|
2004-05-23 16:53:33 -04:00
|
|
|
// Licence: wxWindows licence
|
1998-09-18 06:19:10 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_APP_H_
|
|
|
|
#define _WX_APP_H_
|
|
|
|
|
1999-07-21 12:10:18 -04:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// headers
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
1998-09-18 06:19:10 -04:00
|
|
|
#include "wx/event.h"
|
2004-05-08 16:20:24 -04:00
|
|
|
#include "wx/hashmap.h"
|
1998-09-18 06:19:10 -04:00
|
|
|
|
1999-07-21 12:10:18 -04:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// forward declarations
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
2007-07-09 06:09:52 -04:00
|
|
|
class WXDLLIMPEXP_FWD_CORE wxFrame;
|
|
|
|
class WXDLLIMPEXP_FWD_CORE wxWindow;
|
|
|
|
class WXDLLIMPEXP_FWD_CORE wxApp;
|
|
|
|
class WXDLLIMPEXP_FWD_CORE wxKeyEvent;
|
2007-11-23 09:13:50 -05:00
|
|
|
class WXDLLIMPEXP_FWD_BASE wxLog;
|
2007-07-09 06:09:52 -04:00
|
|
|
class WXDLLIMPEXP_FWD_CORE wxEventLoop;
|
|
|
|
class WXDLLIMPEXP_FWD_CORE wxXVisualInfo;
|
|
|
|
class WXDLLIMPEXP_FWD_CORE wxPerDisplayData;
|
1998-09-18 06:19:10 -04:00
|
|
|
|
1999-07-21 12:10:18 -04:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// the wxApp class for Motif - see wxAppBase for more details
|
|
|
|
// ----------------------------------------------------------------------------
|
1998-09-18 06:19:10 -04:00
|
|
|
|
2004-05-08 16:20:24 -04:00
|
|
|
WX_DECLARE_VOIDPTR_HASH_MAP( wxPerDisplayData*, wxPerDisplayDataMap );
|
|
|
|
|
2008-03-26 11:06:00 -04:00
|
|
|
class WXDLLIMPEXP_CORE wxApp : public wxAppBase
|
1998-09-18 06:19:10 -04:00
|
|
|
{
|
2002-02-05 11:34:33 -05:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxApp)
|
2006-07-25 10:31:55 -04:00
|
|
|
|
1999-07-21 12:10:18 -04:00
|
|
|
public:
|
|
|
|
wxApp();
|
2003-02-02 10:48:50 -05:00
|
|
|
virtual ~wxApp();
|
2006-07-25 10:31:55 -04:00
|
|
|
|
1999-07-21 12:10:18 -04:00
|
|
|
// override base class (pure) virtuals
|
|
|
|
// -----------------------------------
|
2006-07-25 10:31:55 -04:00
|
|
|
|
1999-07-21 12:10:18 -04:00
|
|
|
virtual int MainLoop();
|
2003-06-23 20:56:19 -04:00
|
|
|
|
|
|
|
virtual void Exit();
|
|
|
|
|
|
|
|
virtual void WakeUpIdle(); // implemented in motif/evtloop.cpp
|
2006-07-25 10:31:55 -04:00
|
|
|
|
1999-07-21 12:10:18 -04:00
|
|
|
// implementation from now on
|
|
|
|
// --------------------------
|
2006-07-25 10:31:55 -04:00
|
|
|
|
1998-09-18 06:19:10 -04:00
|
|
|
protected:
|
1999-07-21 12:10:18 -04:00
|
|
|
bool m_showOnInit;
|
2006-07-25 10:31:55 -04:00
|
|
|
|
1998-09-18 06:19:10 -04:00
|
|
|
public:
|
1999-07-21 12:10:18 -04:00
|
|
|
// Implementation
|
2003-06-30 16:02:05 -04:00
|
|
|
virtual bool Initialize(int& argc, wxChar **argv);
|
2003-06-30 14:43:09 -04:00
|
|
|
virtual void CleanUp();
|
2006-07-25 10:31:55 -04:00
|
|
|
|
1999-07-21 12:10:18 -04:00
|
|
|
// Motif-specific
|
|
|
|
WXAppContext GetAppContext() const { return m_appContext; }
|
2003-05-04 13:40:46 -04:00
|
|
|
WXWidget GetTopLevelWidget();
|
2004-05-22 14:01:33 -04:00
|
|
|
WXWidget GetTopLevelRealizedWidget();
|
1999-10-18 11:14:52 -04:00
|
|
|
WXColormap GetMainColormap(WXDisplay* display);
|
1999-07-21 12:10:18 -04:00
|
|
|
WXDisplay* GetInitialDisplay() const { return m_initialDisplay; }
|
2003-05-04 13:40:46 -04:00
|
|
|
|
|
|
|
void SetTopLevelWidget(WXDisplay* display, WXWidget widget);
|
2004-05-22 14:01:33 -04:00
|
|
|
void SetTopLevelRealizedWidget(WXDisplay* display,
|
|
|
|
WXWidget widget);
|
2003-05-04 13:40:46 -04:00
|
|
|
|
1999-07-21 12:10:18 -04:00
|
|
|
// This handler is called when a property change event occurs
|
|
|
|
virtual void HandlePropertyChange(WXEvent *event);
|
2003-04-07 13:15:11 -04:00
|
|
|
|
|
|
|
wxXVisualInfo* GetVisualInfo(WXDisplay* display);
|
|
|
|
|
2003-02-02 10:48:50 -05:00
|
|
|
private:
|
1999-07-21 12:10:18 -04:00
|
|
|
// Motif-specific
|
|
|
|
WXAppContext m_appContext;
|
|
|
|
WXColormap m_mainColormap;
|
|
|
|
WXDisplay* m_initialDisplay;
|
2003-05-04 13:40:46 -04:00
|
|
|
wxPerDisplayDataMap* m_perDisplayData;
|
1998-09-18 06:19:10 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
2002-02-05 11:34:33 -05:00
|
|
|
// _WX_APP_H_
|