]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/apptrait.h
Optionally allow showing tooltips for disabled ribbon buttons.
[wxWidgets.git] / include / wx / msw / apptrait.h
CommitLineData
e2478fde
VZ
1///////////////////////////////////////////////////////////////////////////////
2// Name: wx/msw/apptrait.h
3// Purpose: class implementing wxAppTraits for MSW
4// Author: Vadim Zeitlin
5// Modified by:
6// Created: 21.06.2003
7// RCS-ID: $Id$
77ffb593 8// Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org>
65571936 9// Licence: wxWindows licence
e2478fde
VZ
10///////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_MSW_APPTRAIT_H_
13#define _WX_MSW_APPTRAIT_H_
14
15// ----------------------------------------------------------------------------
16// wxGUI/ConsoleAppTraits: must derive from wxAppTraits, not wxAppTraitsBase
17// ----------------------------------------------------------------------------
18
bb24c68f 19class WXDLLIMPEXP_BASE wxConsoleAppTraits : public wxConsoleAppTraitsBase
e2478fde
VZ
20{
21public:
2ddff00c 22 virtual wxEventLoopBase *CreateEventLoop();
e2478fde 23 virtual void *BeforeChildWaitLoop();
e2478fde 24 virtual void AfterChildWaitLoop(void *data);
c2ca375c
VZ
25#if wxUSE_TIMER
26 virtual wxTimerImpl *CreateTimerImpl(wxTimer *timer);
dd1af40c
VZ
27#endif // wxUSE_TIMER
28#if wxUSE_THREADS
e2478fde 29 virtual bool DoMessageFromThreadWait();
b95a7c31 30 virtual WXDWORD WaitForThread(WXHANDLE hThread, int flags);
dd1af40c 31#endif // wxUSE_THREADS
784ee7d5
VZ
32#ifndef __WXWINCE__
33 virtual bool CanUseStderr() { return true; }
34 virtual bool WriteToStderr(const wxString& text);
35#endif // !__WXWINCE__
e2478fde
VZ
36};
37
38#if wxUSE_GUI
39
7d17efb1
VZ
40#if defined(__WXMSW__)
41
bb24c68f 42class WXDLLIMPEXP_CORE wxGUIAppTraits : public wxGUIAppTraitsBase
e2478fde
VZ
43{
44public:
2ddff00c 45 virtual wxEventLoopBase *CreateEventLoop();
e2478fde 46 virtual void *BeforeChildWaitLoop();
e2478fde 47 virtual void AfterChildWaitLoop(void *data);
c2ca375c
VZ
48#if wxUSE_TIMER
49 virtual wxTimerImpl *CreateTimerImpl(wxTimer *timer);
dd1af40c
VZ
50#endif // wxUSE_TIMER
51#if wxUSE_THREADS
e2478fde 52 virtual bool DoMessageFromThreadWait();
b95a7c31 53 virtual WXDWORD WaitForThread(WXHANDLE hThread, int flags);
dd1af40c
VZ
54#endif // wxUSE_THREADS
55 virtual wxPortId GetToolkitVersion(int *majVer = NULL, int *minVer = NULL) const;
784ee7d5
VZ
56
57#ifndef __WXWINCE__
58 virtual bool CanUseStderr();
59 virtual bool WriteToStderr(const wxString& text);
60#endif // !__WXWINCE__
e2478fde
VZ
61};
62
7d17efb1
VZ
63#elif defined(__WXGTK__)
64
65class WXDLLIMPEXP_CORE wxGUIAppTraits : public wxGUIAppTraitsBase
66{
67public:
68 virtual wxEventLoopBase *CreateEventLoop();
69 virtual void *BeforeChildWaitLoop() { return NULL; }
70 virtual void AfterChildWaitLoop(void *WXUNUSED(data)) { }
71#if wxUSE_TIMER
72 virtual wxTimerImpl *CreateTimerImpl(wxTimer *timer);
73#endif
74
75#if wxUSE_THREADS && defined(__WXGTK20__)
76 virtual void MutexGuiEnter();
77 virtual void MutexGuiLeave();
78#endif
79
80#if wxUSE_THREADS
81 virtual bool DoMessageFromThreadWait() { return true; }
82 virtual WXDWORD WaitForThread(WXHANDLE hThread, int WXUNUSED(flags))
83 { return DoSimpleWaitForThread(hThread); }
84#endif // wxUSE_THREADS
85 virtual wxPortId GetToolkitVersion(int *majVer = NULL, int *minVer = NULL) const;
86
87#ifndef __WXWINCE__
88 virtual bool CanUseStderr() { return false; }
89 virtual bool WriteToStderr(const wxString& WXUNUSED(text)) { return false; }
90#endif // !__WXWINCE__
91};
92
93#endif
94
e2478fde
VZ
95#endif // wxUSE_GUI
96
97#endif // _WX_MSW_APPTRAIT_H_