]> git.saurik.com Git - wxWidgets.git/blame - include/wx/motif/app.h
don't return HTCLIENT for static bitmaps, this breaks mouse (leave) event generation
[wxWidgets.git] / include / wx / motif / app.h
CommitLineData
9b6dbb09
JS
1/////////////////////////////////////////////////////////////////////////////
2// Name: app.h
3// Purpose: wxApp class
4// Author: Julian Smart
5// Modified by:
6// Created: 17/09/98
7// RCS-ID: $Id$
8// Copyright: (c) Julian Smart
65571936 9// Licence: wxWindows licence
9b6dbb09
JS
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_APP_H_
13#define _WX_APP_H_
14
93d660a4 15#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
83df96d6 16#pragma interface "app.h"
9b6dbb09
JS
17#endif
18
ee31c392
VZ
19// ----------------------------------------------------------------------------
20// headers
21// ----------------------------------------------------------------------------
22
9b6dbb09 23#include "wx/event.h"
bdcade0a 24#include "wx/hashmap.h"
9b6dbb09 25
ee31c392
VZ
26// ----------------------------------------------------------------------------
27// forward declarations
28// ----------------------------------------------------------------------------
29
9b6dbb09
JS
30class WXDLLEXPORT wxFrame;
31class WXDLLEXPORT wxWindow;
72cdf4c9 32class WXDLLEXPORT wxApp;
9b6dbb09
JS
33class WXDLLEXPORT wxKeyEvent;
34class WXDLLEXPORT wxLog;
7e1bcfa8 35class WXDLLEXPORT wxEventLoop;
9ce8d6a2 36class WXDLLEXPORT wxXVisualInfo;
bdcade0a 37class WXDLLEXPORT wxPerDisplayData;
9b6dbb09 38
ee31c392
VZ
39// ----------------------------------------------------------------------------
40// the wxApp class for Motif - see wxAppBase for more details
41// ----------------------------------------------------------------------------
9b6dbb09 42
bdcade0a
MB
43WX_DECLARE_VOIDPTR_HASH_MAP( wxPerDisplayData*, wxPerDisplayDataMap );
44
ee31c392 45class WXDLLEXPORT wxApp : public wxAppBase
9b6dbb09 46{
83df96d6
JS
47 DECLARE_DYNAMIC_CLASS(wxApp)
48
ee31c392
VZ
49public:
50 wxApp();
7e1bcfa8 51 virtual ~wxApp();
83df96d6 52
ee31c392
VZ
53 // override base class (pure) virtuals
54 // -----------------------------------
83df96d6 55
ee31c392 56 virtual int MainLoop();
e2478fde
VZ
57
58 virtual void Exit();
59
8461e4c2 60 virtual bool Yield(bool onlyIfNeeded = FALSE);
e2478fde 61 virtual void WakeUpIdle(); // implemented in motif/evtloop.cpp
83df96d6 62
ee31c392 63 virtual bool OnInitGui();
83df96d6 64
ee31c392
VZ
65 // implementation from now on
66 // --------------------------
83df96d6 67
9b6dbb09 68protected:
ee31c392 69 bool m_showOnInit;
83df96d6 70
9b6dbb09 71public:
ee31c392 72 // Implementation
05e2b077 73 virtual bool Initialize(int& argc, wxChar **argv);
94826170 74 virtual void CleanUp();
83df96d6 75
ee31c392
VZ
76 // Motif-specific
77 WXAppContext GetAppContext() const { return m_appContext; }
eb6fa4b4 78 WXWidget GetTopLevelWidget();
5a2e3d8c 79 WXWidget GetTopLevelRealizedWidget();
72cdf4c9 80 WXColormap GetMainColormap(WXDisplay* display);
ee31c392 81 WXDisplay* GetInitialDisplay() const { return m_initialDisplay; }
eb6fa4b4
MB
82
83 void SetTopLevelWidget(WXDisplay* display, WXWidget widget);
5a2e3d8c
MB
84 void SetTopLevelRealizedWidget(WXDisplay* display,
85 WXWidget widget);
eb6fa4b4 86
ee31c392
VZ
87 // This handler is called when a property change event occurs
88 virtual void HandlePropertyChange(WXEvent *event);
9ce8d6a2
MB
89
90 wxXVisualInfo* GetVisualInfo(WXDisplay* display);
91
7e1bcfa8 92private:
ee31c392
VZ
93 // Motif-specific
94 WXAppContext m_appContext;
ee31c392
VZ
95 WXColormap m_mainColormap;
96 WXDisplay* m_initialDisplay;
eb6fa4b4 97 wxPerDisplayDataMap* m_perDisplayData;
9ce8d6a2 98
ee31c392 99 DECLARE_EVENT_TABLE()
9b6dbb09
JS
100};
101
9b6dbb09 102#endif
83df96d6 103// _WX_APP_H_
9b6dbb09 104