]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/apptbase.h
Return old, not new, selection from wxMSW wxNotebook::ChangeSelection().
[wxWidgets.git] / include / wx / msw / apptbase.h
CommitLineData
e2478fde
VZ
1///////////////////////////////////////////////////////////////////////////////
2// Name: wx/msw/apptbase.h
3// Purpose: declaration of wxAppTraits for MSW
4// Author: Vadim Zeitlin
5// Modified by:
6// Created: 22.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_APPTBASE_H_
13#define _WX_MSW_APPTBASE_H_
14
15// ----------------------------------------------------------------------------
16// wxAppTraits: the MSW version adds extra hooks needed by MSW-only code
17// ----------------------------------------------------------------------------
18
bb24c68f 19class WXDLLIMPEXP_BASE wxAppTraits : public wxAppTraitsBase
e2478fde
VZ
20{
21public:
22 // wxExecute() support methods
23 // ---------------------------
24
25 // called before starting to wait for the child termination, may return
26 // some opaque data which will be passed later to AfterChildWaitLoop()
27 virtual void *BeforeChildWaitLoop() = 0;
28
e2478fde
VZ
29 // called after starting to wait for the child termination, the parameter
30 // is the return value of BeforeChildWaitLoop()
31 virtual void AfterChildWaitLoop(void *data) = 0;
32
33
34 // wxThread helpers
35 // ----------------
36
37 // process a message while waiting for a(nother) thread, should return
38 // false if and only if we have to exit the application
39 virtual bool DoMessageFromThreadWait() = 0;
e570a44b 40
535920ff
VZ
41 // wait for the handle to be signaled, return WAIT_OBJECT_0 if it is or, in
42 // the GUI code, WAIT_OBJECT_0 + 1 if a Windows message arrived
e570a44b 43 virtual WXDWORD WaitForThread(WXHANDLE hThread) = 0;
535920ff 44
2804f77d 45
784ee7d5
VZ
46#ifndef __WXWINCE__
47 // console helpers
48 // ---------------
49
50 // this method can be overridden by a derived class to always return true
51 // or false to force [not] using the console for output to stderr
52 //
53 // by default console applications always return true from here while the
54 // GUI ones only return true if they're being run from console and there is
55 // no other activity happening in this console
56 virtual bool CanUseStderr() = 0;
57
58 // write text to the console, return true if ok or false on error
59 virtual bool WriteToStderr(const wxString& text) = 0;
60#endif // !__WXWINCE__
61
535920ff
VZ
62protected:
63 // implementation of WaitForThread() for the console applications which is
64 // also used by the GUI code if it doesn't [yet|already} dispatch events
65 WXDWORD DoSimpleWaitForThread(WXHANDLE hThread);
e2478fde
VZ
66};
67
68#endif // _WX_MSW_APPTBASE_H_
69