File: containers.phpcode

package info (click to toggle)
wxformbuilder 4.2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 8,908 kB
  • sloc: cpp: 37,318; xml: 6,611; javascript: 1,353; python: 94; sh: 62; makefile: 62
file content (228 lines) | stat: -rw-r--r-- 12,201 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!--
wxFormBuilder - A Visual Dialog Editor for wxWidgets.
Copyright (C) 2005 José Antonio Hurtado

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

Written by
  José Antonio Hurtado - joseantonio.hurtado@gmail.com
  Juan Antonio Ortega  - jortegalalmolda@gmail.com

PHP code generation written by
  Jefferson González - jgmdev@gmail.com
-->
<codegen language="PHP">

  <templates class="wxPanel">
    <template name="construction">@$this->$name = new #class( #wxparent $name, $id, $pos, $size, $window_style #ifnotnull $window_name @{, $window_name @} );</template>
  </templates>

  <templates class="wxCollapsiblePane">
    <template name="construction">@$this->$name = new #class( #wxparent $name, $id, $label, $pos, $size, $style #ifnotnull $window_style @{ |$window_style @} #ifnotnull $window_name @{, wxDefaultValidator, $window_name @} );</template>
    <template name="settings">#ifnotnull $collapsed @{ @$this->$name->Collapse( $collapsed ); #nl @}</template>
    <template name="evt_connect_OnCollapsiblePaneChanged">@$this->$name->Connect( wxEVT_COLLAPSIBLEPANE_CHANGED, #handler );</template>
  </templates>

  <templates class="wxSplitterWindow">
    <template name="construction">@$this->$name = new #class( #wxparent $name, $id, $pos, $size, $style #ifnotnull $window_style @{ |$window_style @} #ifnotnull $window_name @{, $window_name @} );</template>
    <!--<template name="settings">
      #ifnotnull $sashgravity
      @{
        #ifnotequal $sashgravity "0.0"
        @{ @$this->$name->SetSashGravity( $sashgravity ); #nl @}
      @}
      #ifnotnull $sashsize
      @{
        #ifnotequal $sashsize "-1"
        @{ @$this->$name->SetSashSize( $sashsize ); #nl @}
      @}
      #ifnotnull $min_pane_size
      @{
        #ifnotequal $min_pane_size "0"
        @{ @$this->$name->SetMinimumPaneSize( $min_pane_size ); #nl @}
      @}
      #ifnotnull $sashpos
      @{
      @$this->$name->SetSashPosition( $sashpos ); #nl
      @}
    </template>-->
    <template name="settings">
      #ifnotnull $sashgravity
      @{
        #ifnotequal $sashgravity "0.0"
        @{ @$this->$name->SetSashGravity( $sashgravity ); #nl @}
      @}
      #ifnotnull $sashsize
      @{
        #ifnotequal $sashsize "-1"
        @{ @$this->$name->SetSashSize( $sashsize ); #nl @}
      @}
      #ifnotnull $sashpos
      @{
        #ifnotequal $sashpos "-1"
        @{ @$this->$name->Connect( wxEVT_IDLE, array(@$this, "$name #append OnIdle") ); #nl @}
      @}
      #ifnotnull $min_pane_size
      @{
        #ifnotequal $min_pane_size "0"
        @{ @$this->$name->SetMinimumPaneSize( $min_pane_size ); #nl @}
      @}
    </template>
    <template name="generated_event_handlers">
      #ifnotnull $sashpos
      @{
        #ifnotequal $sashpos "-1"
        @{
          function $name #append OnIdle( @$event ){ #indent #nl
            @$this->$name->SetSashPosition( $sashpos ); #nl
            @$this->$name->Disconnect( wxEVT_IDLE ); #unindent #nl
          }
        @}
      @}
    </template>
    <template name="evt_connect_OnSplitterSashPosChanging">@$this->$name->Connect( wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING, #handler );</template>
    <template name="evt_connect_OnSplitterSashPosChanged">@$this->$name->Connect( wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED, #handler );</template>
    <template name="evt_connect_OnSplitterUnsplit">@$this->$name->Connect( wxEVT_COMMAND_SPLITTER_UNSPLIT, #handler );</template>
    <template name="evt_connect_OnSplitterDClick">@$this->$name->Connect( wxEVT_COMMAND_SPLITTER_DOUBLECLICKED, #handler );</template>
  </templates>

  <templates class="wxNotebook">
    <template name="construction">@$this->$name = new #class( #wxparent $name, $id, $pos, $size, $style #ifnotnull $window_style @{ |$window_style @} #ifnotnull $window_name @{, $window_name @} );</template>
    <template name="settings">
      #ifnotnull $bitmapsize
      @{
        $name #append ImageSize = $bitmapsize; #nl
        $name #append Index = 0; #nl
        $name #append Images = new wxImageList( $name #append ImageSize->GetWidth(), $name #append ImageSize->GetHeight() ); #nl
        @$this->$name->AssignImageList( $name #append Images );
      @}
    </template>
    <template name="evt_connect_OnNotebookPageChanged">@$this->$name->Connect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, #handler );</template>
    <template name="evt_connect_OnNotebookPageChanging">@$this->$name->Connect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, #handler );</template>
  </templates>

  <templates class="notebookpage">
    <template name="page_add">@$this->#parent $name->AddPage( @$this->#child $name, $label, $select );</template>
    <template name="settings">
      #ifnotnull #parent $bitmapsize
      @{
        #ifnotnull $bitmap
        @{
          #parent $name #append Bitmap = $bitmap #nl
          if ( #parent $name #append Bitmap->Ok() ){ #indent #nl
            #parent $name #append Images->Add( #parent $name #append Bitmap ); #nl
            @$this->#parent $name->SetPageImage( #parent $name #append Index, #parent $name #append Index ); #nl
            #parent $name #append Index += 1; #unindent #nl
          }#nl
        @}
      @}
    </template>
  </templates>

  <templates class="wxListbook">
    <template name="construction">@$this->$name = new #class( #wxparent $name, $id, $pos, $size, $style #ifnotnull $window_style @{ |$window_style @} #ifnotnull $window_name @{, $window_name @} );</template>
    <template name="settings">
      #ifnotnull $bitmapsize
      @{
        $name #append ImageSize = $bitmapsize; #nl
        $name #append Index = 0; #nl
        $name #append Images = new wxImageList( $name #append ImageSize->GetWidth(), $name #append ImageSize->GetHeight() ); #nl
        @$this->$name->AssignImageList( $name #append Images );
      @}
    </template>
    <!-- <template name="after_addchild">
      #ifnull $bitmapsize
      @{
        $name #append ListView = @$this->$name->GetListView(); #nl
        $name #append Flags = $name #append ListView.GetWindowStyleFlag(); #nl
        $name #append Flags = ( $name #append Flags &amp; ~wxLC_ICON ) | wxLC_SMALL_ICON #nl
        $name #append ListView.SetWindowStyleFlag( $name #append Flags ); #nl
      @}
    </template> -->
    <template name="evt_connect_OnListbookPageChanged">@$this->$name->Connect( wxEVT_COMMAND_LISTBOOK_PAGE_CHANGED, #handler );</template>
    <template name="evt_connect_OnListbookPageChanging">@$this->$name->Connect( wxEVT_COMMAND_LISTBOOK_PAGE_CHANGING, #handler );</template>
  </templates>

  <templates class="listbookpage">
    <template name="page_add">@$this->#parent $name->AddPage( @$this->#child $name, $label, $select );</template>
    <template name="settings">
      #ifnotnull #parent $bitmapsize
      @{
        #ifnotnull $bitmap
        @{
          #parent $name #append Bitmap = $bitmap; #nl
          if ( #parent $name #append Bitmap.Ok() ){ #indent #nl
            #parent $name #append Images->Add( #parent $name #append Bitmap ); #nl
            @$this->#parent $name->SetPageImage( #parent $name #append Index, #parent $name #append Index ); #nl
            #parent $name #append Index += 1; #unindent #nl
          }#nl
        @}
      @}
    </template>
  </templates>

  <templates class="wxChoicebook">
    <template name="construction">@$this->$name = new #class( #wxparent $name, $id, $pos, $size, $style #ifnotnull $window_style @{ |$window_style @} #ifnotnull $window_name @{, $window_name @} );</template>
    <template name="evt_connect_OnChoicebookPageChanged">@$this->$name->Connect( wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED, #handler );</template>
    <template name="evt_connect_OnChoicebookPageChanging">@$this->$name->Connect( wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING, #handler );</template>
  </templates>

  <templates class="choicebookpage">
    <template name="page_add">@$this->#parent $name->AddPage( @$this->#child $name, $label, $select );</template>
  </templates>

  <templates class="wxSimplebook">
    <template name="construction">@$this->$name = new #class( #wxparent $name, $id, $pos, $size, $window_style #ifnotnull $window_name @{, $window_name @} );</template>
    <template name="evt_connect_OnSimplebookPageChanged">@$this->$name->Connect( wxEVT_COMMAND_BOOKCTRL_PAGE_CHANGED, #handler );</template>
    <template name="evt_connect_OnSimplebookPageChanging">@$this->$name->Connect( wxEVT_COMMAND_BOOKCTRL_PAGE_CHANGING, #handler );</template>
  </templates>

  <templates class="simplebookpage">
    <template name="page_add">@$this->#parent $name->AddPage( @$this->#child $name, $label, $select );</template>
  </templates>

  <templates class="wxAuiNotebook">
    <template name="construction">@$this->$name = new #class( #wxparent $name, $id, $pos, $size, $style #ifnotnull $window_style @{ |$window_style @} );</template>
    <template name="include" />
    <template name="evt_connect_OnAuiNotebookPageClose">@$this->$name->Connect( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, #handler );</template>
    <template name="evt_connect_OnAuiNotebookPageClosed">@$this->$name->Connect( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED, #handler );</template>
    <template name="evt_connect_OnAuiNotebookPageChanged">@$this->$name->Connect( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, #handler );</template>
    <template name="evt_connect_OnAuiNotebookPageChanging">@$this->$name->Connect( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING, #handler );</template>
    <template name="evt_connect_OnAuiNotebookButton">@$this->$name->Connect( wxEVT_COMMAND_AUINOTEBOOK_BUTTON, #handler );</template>
    <template name="evt_connect_OnAuiNotebookBeginDrag">@$this->$name->Connect( wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG, #handler );</template>
    <template name="evt_connect_OnAuiNotebookEndDrag">@$this->$name->Connect( wxEVT_COMMAND_AUINOTEBOOK_END_DRAG, #handler );</template>
    <template name="evt_connect_OnAuiNotebookDragMotion">@$this->$name->Connect( wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION, #handler );</template>
    <template name="evt_connect_OnAuiNotebookAllowDND">@$this->$name->Connect( wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND, #handler );</template>
    <template name="evt_connect_OnAuiNotebookDragDone">@$this->$name->Connect( wxEVT_COMMAND_AUINOTEBOOK_DRAG_DONE, #handler );</template>
    <template name="evt_connect_OnAuiNotebookTabMiddleDown">@$this->$name->Connect( wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN, #handler );</template>
    <template name="evt_connect_OnAuiNotebookTabMiddleUp">@$this->$name->Connect( wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP, #handler );</template>
    <template name="evt_connect_OnAuiNotebookTabRightDown">@$this->$name->Connect( wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN, #handler );</template>
    <template name="evt_connect_OnAuiNotebookTabRightUp">@$this->$name->Connect( wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP, #handler );</template>
    <template name="evt_connect_OnAuiNotebookBGDClick">@$this->$name->Connect( wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK, #handler );</template>
  </templates>

  <templates class="auinotebookpage">
    <template name="page_add">@$this->#parent $name->AddPage( @$this->#child $name, $label, $select, $bitmap );</template>
  </templates>

  <templates class="wxScrolledWindow">
    <template name="construction">
      @$this->$name = new #class( #wxparent $name, $id, $pos, $size, $window_style #ifnotnull $window_name @{, $window_name @} ); #nl
      @$this->$name->SetScrollRate( $scroll_rate_x, $scroll_rate_y );
    </template>
  </templates>

</codegen>