1 #-----------------------------------------------------------------------------
2 # Python source generated by wxDesigner from file: mimetypes.wdr
3 # Do not modify this file, all changes will be lost!
4 #-----------------------------------------------------------------------------
6 # Include wxWindows' modules
7 from wxPython
.wx
import *
12 ID_EXTENSION_Btn
= 10001
18 ID_ICON_FILE_TXT
= 10007
19 ID_ICON_INDEX_TXT
= 10008
20 ID_MIME_TYPE_TXT
= 10009
21 ID_MIME_TYPES_TXT
= 10010
22 ID_EXTENSIONS_TXT
= 10011
23 ID_DESCRIPTION_TXT
= 10012
24 ID_OPEN_CMD_TXT
= 10013
25 ID_PRINT_CMD_TXT
= 10014
26 ID_ALL_CMDS_TXT
= 10015
29 def MakeMimeTypesTestPanel( parent
, call_fit
= true
, set_sizer
= true
):
30 item0
= wxBoxSizer( wxVERTICAL
)
32 item1
= wxBoxSizer( wxHORIZONTAL
)
34 item2
= wxTextCtrl( parent
, ID_INPUT_TEXT
, "", wxDefaultPosition
, wxSize(100,-1), 0 )
35 item1
.AddWindow( item2
, 0, wxALIGN_CENTRE|wxALL
, 5 )
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 )
41 item4
= wxRadioButton( parent
, ID_MIME_BTN
, "By mime type", wxDefaultPosition
, wxDefaultSize
, 0 )
42 item1
.AddWindow( item4
, 0, wxALIGN_CENTRE|wxALL
, 5 )
44 item5
= wxButton( parent
, ID_LOOKUP_BTN
, "Lookup", wxDefaultPosition
, wxDefaultSize
, 0 )
46 item1
.AddWindow( item5
, 0, wxALIGN_CENTRE|wxALL
, 5 )
48 item0
.AddSizer( item1
, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL
, 5 )
50 item6
= wxStaticLine( parent
, ID_LINE
, wxDefaultPosition
, wxSize(20,-1), wxLI_HORIZONTAL
)
51 item0
.AddWindow( item6
, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL
, 5 )
53 item7
= wxBoxSizer( wxHORIZONTAL
)
55 item8
= wxFlexGridSizer( 0, 2, 0, 0 )
56 item8
.AddGrowableCol( 1 )
57 item8
.AddGrowableRow( 8 )
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 )
63 item8
.AddSpacer( 20, 20, 0, wxALIGN_CENTRE|wxALL
, 5 )
65 item10
= wxStaticText( parent
, ID_TEXT
, "GetIconInfo:", wxDefaultPosition
, wxDefaultSize
, 0 )
66 item8
.AddWindow( item10
, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL
, 5 )
68 item11
= wxBoxSizer( wxHORIZONTAL
)
70 item12
= wxStaticBitmap( parent
, ID_ICON_BMP
, MyBitmapsFunc( 0 ), wxDefaultPosition
, wxDefaultSize
)
71 item11
.AddWindow( item12
, 0, wxALIGN_CENTER_VERTICAL|wxALL
, 5 )
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 )
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 )
79 item8
.AddSizer( item11
, 0, wxGROW|wxALIGN_CENTER_VERTICAL
, 5 )
81 item15
= wxStaticText( parent
, ID_TEXT
, "GetMimeType:", wxDefaultPosition
, wxDefaultSize
, 0 )
82 item8
.AddWindow( item15
, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxBOTTOM
, 5 )
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 )
87 item17
= wxStaticText( parent
, ID_TEXT
, "GetMimeTypes:", wxDefaultPosition
, wxDefaultSize
, 0 )
88 item8
.AddWindow( item17
, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxBOTTOM
, 5 )
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 )
93 item19
= wxStaticText( parent
, ID_TEXT
, "GetExtensions:", wxDefaultPosition
, wxDefaultSize
, 0 )
94 item8
.AddWindow( item19
, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxBOTTOM
, 5 )
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 )
99 item21
= wxStaticText( parent
, ID_TEXT
, "GetDescription:", wxDefaultPosition
, wxDefaultSize
, 0 )
100 item8
.AddWindow( item21
, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxBOTTOM
, 5 )
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 )
105 item23
= wxStaticText( parent
, ID_TEXT
, "GetOpenCommand:", wxDefaultPosition
, wxDefaultSize
, 0 )
106 item8
.AddWindow( item23
, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxBOTTOM
, 5 )
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 )
111 item25
= wxStaticText( parent
, ID_TEXT
, "GetPrintCommand:", wxDefaultPosition
, wxDefaultSize
, 0 )
112 item8
.AddWindow( item25
, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxBOTTOM
, 5 )
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 )
117 item27
= wxStaticText( parent
, ID_TEXT
, "GetAllCommands:", wxDefaultPosition
, wxDefaultSize
, 0 )
118 item8
.AddWindow( item27
, 0, wxALIGN_RIGHT|wxLEFT|wxRIGHT|wxBOTTOM
, 5 )
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 )
123 item7
.AddSizer( item8
, 1, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL
, 5 )
125 item29
= wxBoxSizer( wxVERTICAL
)
127 item30
= wxStaticText( parent
, ID_TEXT
, "Known mime types:", wxDefaultPosition
, wxDefaultSize
, 0 )
128 item29
.AddWindow( item30
, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxTOP|wxBOTTOM
, 5 )
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 )
133 item7
.AddSizer( item29
, 0, wxGROW|wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxTOP|wxBOTTOM
, 5 )
135 item0
.AddSizer( item7
, 1, wxGROW|wxALIGN_CENTER_VERTICAL
, 5 )
137 if set_sizer
== true
:
138 parent
.SetAutoLayout( true
)
139 parent
.SetSizer( item0
)
142 item0
.SetSizeHints( parent
)
150 def MyBitmapsFunc( index
):
152 return wxImage( "mimetypes_wdr/MyBitmapsFunc_0.png", wxBITMAP_TYPE_PNG
).ConvertToBitmap()
155 # End of generated file