]> git.saurik.com Git - wxWidgets.git/blame - include/wx/palmos/toplevel.h
allows resetting color of text to black, closes #4826
[wxWidgets.git] / include / wx / palmos / toplevel.h
CommitLineData
ffecfa5a
JS
1///////////////////////////////////////////////////////////////////////////////
2// Name: wx/palmos/toplevel.h
3// Purpose: wxTopLevelWindow
e1d63b79 4// Author: William Osborne - minimal working wxPalmOS port
db101bd3 5// Modified by: Wlodzimierz ABX Skiba - more than minimal functionality
ffecfa5a 6// Created: 10/13/04
e1d63b79 7// RCS-ID: $Id$
db101bd3 8// Copyright: (c) William Osborne, Wlodzimierz Skiba
ffecfa5a
JS
9// Licence: wxWindows licence
10///////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_PALMOS_TOPLEVEL_H_
13#define _WX_PALMOS_TOPLEVEL_H_
14
ffecfa5a
JS
15// ----------------------------------------------------------------------------
16// wxTopLevelWindowPalm
17// ----------------------------------------------------------------------------
18
53a2db12 19class WXDLLIMPEXP_CORE wxTopLevelWindowPalm : public wxTopLevelWindowBase
ffecfa5a
JS
20{
21public:
22 // constructors and such
23 wxTopLevelWindowPalm() { Init(); }
24
25 wxTopLevelWindowPalm(wxWindow *parent,
26 wxWindowID id,
27 const wxString& title,
28 const wxPoint& pos = wxDefaultPosition,
29 const wxSize& size = wxDefaultSize,
30 long style = wxDEFAULT_FRAME_STYLE,
31 const wxString& name = wxFrameNameStr)
32 {
33 Init();
34
35 (void)Create(parent, id, title, pos, size, style, name);
36 }
37
38 bool Create(wxWindow *parent,
39 wxWindowID id,
40 const wxString& title,
41 const wxPoint& pos = wxDefaultPosition,
42 const wxSize& size = wxDefaultSize,
43 long style = wxDEFAULT_FRAME_STYLE,
44 const wxString& name = wxFrameNameStr);
4055ed82 45
ffecfa5a
JS
46 virtual ~wxTopLevelWindowPalm();
47
48 // implement base class pure virtuals
0ab48d64
WS
49
50 virtual void SetTitle( const wxString& title);
51 virtual wxString GetTitle() const;
52
4055ed82 53 virtual void Maximize(bool maximize = true);
ffecfa5a 54 virtual bool IsMaximized() const;
4055ed82 55 virtual void Iconize(bool iconize = true);
ffecfa5a 56 virtual bool IsIconized() const;
ea098413 57 virtual void SetIcons(const wxIconBundle& icons);
ffecfa5a
JS
58 virtual void Restore();
59
60#ifndef __WXWINCE__
61 virtual bool SetShape(const wxRegion& region);
62#endif // __WXWINCE__
63
4055ed82 64 virtual bool Show(bool show = true);
ffecfa5a
JS
65
66 virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL);
67 virtual bool IsFullScreen() const { return m_fsIsShowing; }
68
4055ed82 69 // wxPalm only: EnableCloseButton(false) may be used to remove the "Close"
ffecfa5a 70 // button from the title bar
4055ed82 71 bool EnableCloseButton(bool enable = true);
ffecfa5a
JS
72
73 // implementation from now on
74 // --------------------------
75
76 // event handlers
77 void OnActivate(wxActivateEvent& event);
78
79 // called by wxWindow whenever it gets focus
80 void SetLastFocus(wxWindow *win) { m_winLastFocused = win; }
81 wxWindow *GetLastFocus() const { return m_winLastFocused; }
82
bdb54365 83 // interface to native frame structure
20bc5ad8 84 WXFORMPTR GetForm() const;
bdb54365 85
721a9626 86 // handle native events
20bc5ad8
WS
87 bool HandleControlSelect(WXEVENTPTR event);
88 bool HandleControlRepeat(WXEVENTPTR event);
89 bool HandleSize(WXEVENTPTR event);
a152561c 90
324eeecb
WS
91 virtual WXWINHANDLE GetWinHandle() const;
92
ffecfa5a
JS
93protected:
94 // common part of all ctors
95 void Init();
96
808e3bce
WS
97 // getting and setting sizes
98 virtual void DoGetSize( int *width, int *height ) const;
99
ffecfa5a
JS
100 // common part of Iconize(), Maximize() and Restore()
101 void DoShowWindow(int nShowCmd);
102
103 // translate wxWidgets flags to Windows ones
104 virtual WXDWORD PalmGetStyle(long flags, WXDWORD *exstyle) const;
105
ffecfa5a
JS
106 // is the window currently iconized?
107 bool m_iconized;
108
109 // should the frame be maximized when it will be shown? set by Maximize()
110 // when it is called while the frame is hidden
111 bool m_maximizeOnShow;
112
113 // Data to save/restore when calling ShowFullScreen
114 long m_fsStyle; // Passed to ShowFullScreen
115 wxRect m_fsOldSize;
116 long m_fsOldWindowStyle;
117 bool m_fsIsMaximized;
118 bool m_fsIsShowing;
119
120 // the last focused child: we restore focus to it on activation
121 wxWindow *m_winLastFocused;
122
123 DECLARE_EVENT_TABLE()
124 DECLARE_NO_COPY_CLASS(wxTopLevelWindowPalm)
125};
126
ffecfa5a 127#endif // _WX_PALMOS_TOPLEVEL_H_