]> git.saurik.com Git - wxWidgets.git/blame_incremental - wxPython/src/_mdi.i
fixed deadlock when calling wxPostEvent() from worker thread
[wxWidgets.git] / wxPython / src / _mdi.i
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: _mdi.i
3// Purpose: SWIG interface for MDI related class definitions
4//
5// Author: Robin Dunn
6//
7// Created: 26-May-1998
8// RCS-ID: $Id$
9// Copyright: (c) 2003 by Total Control Software
10// Licence: wxWindows license
11/////////////////////////////////////////////////////////////////////////////
12
13// Not a %module
14
15
16//---------------------------------------------------------------------------
17%newgroup
18
19%{
20#include <wx/mdi.h>
21%}
22
23//---------------------------------------------------------------------------
24
25#define IDM_WINDOWTILE 4001
26#define IDM_WINDOWTILEHOR 4001
27#define IDM_WINDOWCASCADE 4002
28#define IDM_WINDOWICONS 4003
29#define IDM_WINDOWNEXT 4004
30#define IDM_WINDOWTILEVERT 4005
31#define IDM_WINDOWPREV 4006
32#define wxFIRST_MDI_CHILD 4100
33#define wxLAST_MDI_CHILD 4600
34
35
36
37MustHaveApp(wxMDIParentFrame);
38
39class wxMDIParentFrame : public wxFrame {
40public:
41 %pythonAppend wxMDIParentFrame "self._setOORInfo(self)"
42 %pythonAppend wxMDIParentFrame() ""
43
44 wxMDIParentFrame(wxWindow *parent,
45 const wxWindowID id=-1,
46 const wxString& title = wxPyEmptyString,
47 const wxPoint& pos = wxDefaultPosition,
48 const wxSize& size = wxDefaultSize,
49 long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
50 const wxString& name = wxPyFrameNameStr);
51 %RenameCtor(PreMDIParentFrame, wxMDIParentFrame());
52
53 bool Create(wxWindow *parent,
54 const wxWindowID id=-1,
55 const wxString& title = wxPyEmptyString,
56 const wxPoint& pos = wxDefaultPosition,
57 const wxSize& size = wxDefaultSize,
58 long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
59 const wxString& name = wxPyFrameNameStr);
60
61
62 void ActivateNext();
63 void ActivatePrevious();
64 void ArrangeIcons();
65 void Cascade();
66 wxMDIChildFrame* GetActiveChild();
67 wxMDIClientWindow* GetClientWindow();
68// wxWindow* GetToolBar();
69
70 // TODO: This isn't handled by the standard event-table system...
71 //wxMDIClientWindow* OnCreateClient();
72
73
74#ifdef __WXMSW__
75 wxMenu* GetWindowMenu();
76 void SetWindowMenu(wxMenu* menu);
77 void SetToolBar(wxToolBar* toolbar);
78#endif
79 void Tile(wxOrientation orient = wxHORIZONTAL);
80
81 %property(ActiveChild, GetActiveChild, doc="See `GetActiveChild`");
82 %property(ClientWindow, GetClientWindow, doc="See `GetClientWindow`");
83// %property(ToolBar, GetToolBar, doc="See `GetToolBar`");
84
85};
86
87//---------------------------------------------------------------------------
88
89MustHaveApp(wxMDIChildFrame);
90
91class wxMDIChildFrame : public wxFrame {
92public:
93 %pythonAppend wxMDIChildFrame "self._setOORInfo(self)"
94 %pythonAppend wxMDIChildFrame() ""
95 %typemap(out) wxMDIChildFrame*; // turn off this typemap
96
97 wxMDIChildFrame(wxMDIParentFrame* parent,
98 const wxWindowID id=-1,
99 const wxString& title = wxPyEmptyString,
100 const wxPoint& pos = wxDefaultPosition,
101 const wxSize& size = wxDefaultSize,
102 long style = wxDEFAULT_FRAME_STYLE,
103 const wxString& name = wxPyFrameNameStr);
104 %RenameCtor(PreMDIChildFrame, wxMDIChildFrame());
105
106 // Turn it back on again
107 %typemap(out) wxMDIChildFrame* { $result = wxPyMake_wxObject($1, $owner); }
108
109 bool Create(wxMDIParentFrame* parent,
110 const wxWindowID id=-1,
111 const wxString& title = wxPyEmptyString,
112 const wxPoint& pos = wxDefaultPosition,
113 const wxSize& size = wxDefaultSize,
114 long style = wxDEFAULT_FRAME_STYLE,
115 const wxString& name = wxPyFrameNameStr);
116
117 void Activate();
118 void Maximize(bool maximize=true);
119 void Restore();
120
121};
122
123
124//---------------------------------------------------------------------------
125
126MustHaveApp(wxMDIClientWindow);
127
128class wxMDIClientWindow : public wxWindow {
129public:
130 %pythonAppend wxMDIClientWindow "self._setOORInfo(self)"
131 %pythonAppend wxMDIClientWindow() ""
132 %typemap(out) wxMDIClientWindow*; // turn off this typemap
133
134 wxMDIClientWindow(wxMDIParentFrame* parent, long style = 0);
135 %RenameCtor(PreMDIClientWindow, wxMDIClientWindow());
136
137 // Turn it back on again
138 %typemap(out) wxMDIClientWindow* { $result = wxPyMake_wxObject($1, $owner); }
139
140 bool Create(wxMDIParentFrame* parent, long style = 0);
141};
142
143
144//---------------------------------------------------------------------------