]> git.saurik.com Git - wxWidgets.git/blame - wxPython/demo/mimetypes_wdr.py
compilation error fix (trailing comma in an enum)
[wxWidgets.git] / wxPython / demo / mimetypes_wdr.py
CommitLineData
b37c7e1d
RD
1#-----------------------------------------------------------------------------
2# Python source generated by wxDesigner from file: mimetypes.wdr
3# Do not modify this file, all changes will be lost!
4#-----------------------------------------------------------------------------
5
6# Include wxWindows' modules
7from wxPython.wx import *
8
9# Window functions
10
11ID_INPUT_TEXT = 10000
12ID_EXTENSION_Btn = 10001
13ID_MIME_BTN = 10002
14ID_LOOKUP_BTN = 10003
15ID_LINE = 10004
16ID_TEXT = 10005
17ID_ICON_BMP = 10006
18ID_ICON_FILE_TXT = 10007
19ID_ICON_INDEX_TXT = 10008
20ID_MIME_TYPE_TXT = 10009
21ID_MIME_TYPES_TXT = 10010
22ID_EXTENSIONS_TXT = 10011
23ID_DESCRIPTION_TXT = 10012
24ID_OPEN_CMD_TXT = 10013
25ID_PRINT_CMD_TXT = 10014
26ID_ALL_CMDS_TXT = 10015
27ID_LISTBOX = 10016
28
29def MakeMimeTypesTestPanel( parent, call_fit = true, set_sizer = true ):
30 item0 = wxBoxSizer( wxVERTICAL )
a705ee47 31
b37c7e1d 32 item1 = wxBoxSizer( wxHORIZONTAL )
a705ee47 33
b37c7e1d
RD
34 item2 = wxTextCtrl( parent, ID_INPUT_TEXT, "", wxDefaultPosition, wxSize(100,-1), 0 )
35 item1.AddWindow( item2, 0, wxALIGN_CENTRE|wxALL, 5 )
36
37 item3 = wxRadioButton( parent, ID_EXTENSION_Btn, "By extension", wxDefaultPosition, wxDefaultSize, wxRB_GROUP )
38 item3.SetValue( true )
39 item1.AddWindow( item3, 0, wxALIGN_CENTRE|wxALL, 5 )
40
41 item4 = wxRadioButton( parent, ID_MIME_BTN, "By mime type", wxDefaultPosition, wxDefaultSize, 0 )
42 item1.AddWindow( item4, 0, wxALIGN_CENTRE|wxALL, 5 )
43
44 item5 = wxButton( parent, ID_LOOKUP_BTN, "Lookup", wxDefaultPosition, wxDefaultSize, 0 )
45 item5.SetDefault()
46 item1.AddWindow( item5, 0, wxALIGN_CENTRE|wxALL, 5 )
47
48 item0.AddSizer( item1, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 )
49
50 item6 = wxStaticLine( parent, ID_LINE, wxDefaultPosition, wxSize(20,-1), wxLI_HORIZONTAL )
51 item0.AddWindow( item6, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 )
52
53 item7 = wxBoxSizer( wxHORIZONTAL )
a705ee47 54
b37c7e1d
RD
55 item8 = wxFlexGridSizer( 0, 2, 0, 0 )
56 item8.AddGrowableCol( 1 )
57 item8.AddGrowableRow( 8 )
a705ee47 58
b37c7e1d
RD
59 item9 = wxStaticText( parent, ID_TEXT, "wxFileType:", wxDefaultPosition, wxDefaultSize, 0 )
60 item9.SetFont( wxFont( 14, wxSWISS, wxNORMAL, wxBOLD ) )
61 item8.AddWindow( item9, 0, wxALL, 5 )
62
63 item8.AddSpacer( 20, 20, 0, wxALIGN_CENTRE|wxALL, 5 )
64
65 item10 = wxStaticText( parent, ID_TEXT, "GetIconInfo:", wxDefaultPosition, wxDefaultSize, 0 )
66 item8.AddWindow( item10, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5 )
67
68 item11 = wxBoxSizer( wxHORIZONTAL )
a705ee47 69
b37c7e1d
RD
70 item12 = wxStaticBitmap( parent, ID_ICON_BMP, MyBitmapsFunc( 0 ), wxDefaultPosition, wxDefaultSize )
71 item11.AddWindow( item12, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 )
72
73 item13 = wxTextCtrl( parent, ID_ICON_FILE_TXT, "", wxDefaultPosition, wxSize(120,-1), wxTE_READONLY )
74 item11.AddWindow( item13, 1, wxALIGN_CENTRE|wxRIGHT|wxTOP|wxBOTTOM, 5 )
75
76 item14 = wxTextCtrl( parent, ID_ICON_INDEX_TXT, "", wxDefaultPosition, wxSize(30,-1), wxTE_READONLY )
77 item11.AddWindow( item14, 0, wxALIGN_CENTRE|wxRIGHT|wxTOP|wxBOTTOM, 5 )
78
79 item8.AddSizer( item11, 0, wxGROW|wxALIGN_CENTER_VERTICAL, 5 )
80
81 item15 = wxStaticText( parent, ID_TEXT, "GetMimeType:", wxDefaultPosition, wxDefaultSize, 0 )
82 item8.AddWindow( item15, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxBOTTOM, 5 )
83
84 item16 = wxTextCtrl( parent, ID_MIME_TYPE_TXT, "", wxDefaultPosition, wxSize(310,-1), wxTE_READONLY )
85 item8.AddWindow( item16, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxBOTTOM, 5 )
86
87 item17 = wxStaticText( parent, ID_TEXT, "GetMimeTypes:", wxDefaultPosition, wxDefaultSize, 0 )
88 item8.AddWindow( item17, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxBOTTOM, 5 )
89
90 item18 = wxTextCtrl( parent, ID_MIME_TYPES_TXT, "", wxDefaultPosition, wxSize(80,-1), wxTE_READONLY )
91 item8.AddWindow( item18, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxBOTTOM, 5 )
92
93 item19 = wxStaticText( parent, ID_TEXT, "GetExtensions:", wxDefaultPosition, wxDefaultSize, 0 )
94 item8.AddWindow( item19, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxBOTTOM, 5 )
95
96 item20 = wxTextCtrl( parent, ID_EXTENSIONS_TXT, "", wxDefaultPosition, wxSize(80,-1), wxTE_READONLY )
97 item8.AddWindow( item20, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxBOTTOM, 5 )
98
99 item21 = wxStaticText( parent, ID_TEXT, "GetDescription:", wxDefaultPosition, wxDefaultSize, 0 )
100 item8.AddWindow( item21, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxBOTTOM, 5 )
101
102 item22 = wxTextCtrl( parent, ID_DESCRIPTION_TXT, "", wxDefaultPosition, wxSize(80,-1), wxTE_READONLY )
103 item8.AddWindow( item22, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxBOTTOM, 5 )
104
105 item23 = wxStaticText( parent, ID_TEXT, "GetOpenCommand:", wxDefaultPosition, wxDefaultSize, 0 )
106 item8.AddWindow( item23, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxBOTTOM, 5 )
107
108 item24 = wxTextCtrl( parent, ID_OPEN_CMD_TXT, "", wxDefaultPosition, wxSize(80,-1), wxTE_READONLY )
109 item8.AddWindow( item24, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxBOTTOM, 5 )
110
111 item25 = wxStaticText( parent, ID_TEXT, "GetPrintCommand:", wxDefaultPosition, wxDefaultSize, 0 )
112 item8.AddWindow( item25, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxBOTTOM, 5 )
113
114 item26 = wxTextCtrl( parent, ID_PRINT_CMD_TXT, "", wxDefaultPosition, wxSize(80,-1), wxTE_READONLY )
115 item8.AddWindow( item26, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxBOTTOM, 5 )
116
117 item27 = wxStaticText( parent, ID_TEXT, "GetAllCommands:", wxDefaultPosition, wxDefaultSize, 0 )
118 item8.AddWindow( item27, 0, wxALIGN_RIGHT|wxLEFT|wxRIGHT|wxBOTTOM, 5 )
119
120 item28 = wxTextCtrl( parent, ID_ALL_CMDS_TXT, "", wxDefaultPosition, wxSize(80,100), wxTE_MULTILINE|wxTE_READONLY|wxHSCROLL )
121 item8.AddWindow( item28, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxBOTTOM, 5 )
122
123 item7.AddSizer( item8, 1, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 )
124
125 item29 = wxBoxSizer( wxVERTICAL )
a705ee47 126
b37c7e1d
RD
127 item30 = wxStaticText( parent, ID_TEXT, "Known mime types:", wxDefaultPosition, wxDefaultSize, 0 )
128 item29.AddWindow( item30, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxTOP|wxBOTTOM, 5 )
129
130 item31 = wxListBox( parent, ID_LISTBOX, wxDefaultPosition, wxSize(150,100), [], wxLB_SINGLE|wxLB_SORT|wxLB_HSCROLL )
131 item29.AddWindow( item31, 1, wxALIGN_CENTRE|wxRIGHT|wxBOTTOM, 5 )
132
133 item7.AddSizer( item29, 0, wxGROW|wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxTOP|wxBOTTOM, 5 )
134
135 item0.AddSizer( item7, 1, wxGROW|wxALIGN_CENTER_VERTICAL, 5 )
136
137 if set_sizer == true:
138 parent.SetAutoLayout( true )
139 parent.SetSizer( item0 )
140 if call_fit == true:
141 item0.Fit( parent )
142 item0.SetSizeHints( parent )
a705ee47 143
b37c7e1d
RD
144 return item0
145
146# Menu bar functions
147
148# Bitmap functions
149
150def MyBitmapsFunc( index ):
151 if index == 0:
152 return wxImage( "mimetypes_wdr/MyBitmapsFunc_0.png", wxBITMAP_TYPE_PNG ).ConvertToBitmap()
153 return wxNullBitmap
154
155# End of generated file