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