agriggio / wxglade (http://wxglade.sourceforge.net/)
wxGlade is a GUI designer written in Python with the popular GUI toolkit wxPython, that helps you create wxWidgets/wxPython user interfaces.
| commit 915: | 283762d13eff |
| parent 914: | ba92601b5172 |
| branch: | default |
Changed (Δ869 bytes):
about.py (1 lines added, 4 lines removed)
application.py (1 lines added, 3 lines removed)
clipboard.py (0 lines added, 1 lines removed)
color_dialog.py (0 lines added, 3 lines removed)
common.py (1 lines added, 2 lines removed)
edit_sizers/edit_sizers.py (1 lines added, 4 lines removed)
edit_widget.py (1 lines added, 1 lines removed)
edit_windows.py (2 lines added, 4 lines removed)
events_mixin.py (0 lines added, 2 lines removed)
font_dialog.py (0 lines added, 1 lines removed)
layout_option_property.py (0 lines added, 1 lines removed)
main.py (1 lines added, 5 lines removed)
tree.py (0 lines added, 1 lines removed)
widget_properties.py (0 lines added, 3 lines removed)
xml_parse.py (0 lines added, 1 lines removed)
5 |
5 |
# License: MIT (see license.txt) |
6 |
6 |
# THIS PROGRAM COMES WITH NO WARRANTY |
7 |
7 |
|
8 |
#from wxPython.wx import * |
|
9 |
8 |
import wx |
10 |
#from wxPython.html import * |
|
11 |
9 |
import wx.html |
12 |
#import wxPython.lib.wxpTag |
|
13 |
10 |
import wx.lib.wxpTag |
14 |
import common, misc, os.path, sys |
|
11 |
import common, misc, os.path, sys |
|
15 |
12 |
|
16 |
13 |
class wxGladeAboutBox(wx.Dialog): |
17 |
14 |
text = ''' |
Up to file-list application.py:
8 |
8 |
|
9 |
9 |
import wx |
10 |
10 |
from widget_properties import * |
11 |
from tree import Tree, WidgetTree |
|
12 |
11 |
import common, math, misc, os, config |
13 |
12 |
import traceback, re |
14 |
13 |
|
| … | … | @@ -218,7 +217,6 @@ class Application(object): |
218 |
217 |
|
219 |
218 |
sizer.Add(btn, 0, wx.ALL|wx.EXPAND, 5) |
220 |
219 |
|
221 |
import math |
|
222 |
220 |
def do_add(l, p, s): |
223 |
221 |
p.SetAutoLayout(True) |
224 |
222 |
p.SetSizer(s) |
| … | … | @@ -454,7 +452,7 @@ class Application(object): |
454 |
452 |
wx.MessageBox(_("Error generating code:\n%s") % msg, _("Error"), |
455 |
453 |
wx.OK|wx.CENTRE|wx.ICON_ERROR) |
456 |
454 |
except Exception, msg: |
457 |
|
|
455 |
traceback.print_exc() |
|
458 |
456 |
wx.MessageBox(_("An exception occurred while generating the code " |
459 |
457 |
"for the application.\n" |
460 |
458 |
"This is the error message associated with it:\n" |
5 |
5 |
# License: MIT (see license.txt) |
6 |
6 |
# THIS PROGRAM COMES WITH NO WARRANTY |
7 |
7 |
|
8 |
#from wxPython.wx import * |
|
9 |
8 |
import wx |
10 |
9 |
|
11 |
10 |
# Format used by wxGlade for the clipboard. |
Up to file-list color_dialog.py:
1 |
1 |
# generated by wxGlade 0.2 on Sat Dec 7 14:30:59 2002 |
2 |
2 |
# $Id: color_dialog.py,v 1.11 2007/01/27 19:59:29 dinogen Exp $ |
3 |
3 |
|
4 |
#from wxPython.wx import * |
|
5 |
#from wxPyColourChooser import wxPyColourChooser |
|
6 |
#from wxPython.lib.colourchooser import wxPyColourChooser |
|
7 |
4 |
import wx |
8 |
5 |
from wx.lib.colourchooser import PyColourChooser |
9 |
6 |
import misc |
| … | … | @@ -194,7 +194,6 @@ def make_object_button(widget, icon_path |
194 |
194 |
Returns: |
195 |
195 |
the newly created wxBitmapButton |
196 |
196 |
""" |
197 |
#from wxPython import wx |
|
198 |
197 |
import wx |
199 |
198 |
from tree import WidgetTree |
200 |
199 |
id = wx.NewId() |
| … | … | @@ -266,7 +265,7 @@ def save_file(filename, content, which=' |
266 |
265 |
'content' is the string to store into 'filename' |
267 |
266 |
'which' is the kind of backup: 'wxg' or 'codegen' |
268 |
267 |
""" |
269 |
import |
|
268 |
import config |
|
270 |
269 |
if which == 'wxg': ok = config.preferences.wxg_backup |
271 |
270 |
else: ok = config.preferences.codegen_backup |
272 |
271 |
try: |
Up to file-list edit_sizers/edit_sizers.py:
| … | … | @@ -9,7 +9,7 @@ import wx |
9 |
9 |
from widget_properties import * |
10 |
10 |
from tree import Tree, WidgetTree |
11 |
11 |
import common, config, misc |
12 |
import math, |
|
12 |
import math, re |
|
13 |
13 |
|
14 |
14 |
class SizerSlot: |
15 |
15 |
"a window to represent a slot in a sizer" |
| … | … | @@ -423,7 +423,6 @@ def change_sizer(old, new, which_page=0, |
423 |
423 |
if szr.sizer.widget: |
424 |
424 |
elem = szr.sizer.widget.GetChildren()[szr.pos] |
425 |
425 |
elem.SetSizer(szr.widget) |
426 |
import common |
|
427 |
426 |
common.app_tree.change_node(szr.node, szr) |
428 |
427 |
old.toplevel = False |
429 |
428 |
szr.show_properties() |
| … | … | @@ -1256,7 +1255,6 @@ class SizerBase(Sizer): |
1256 |
1255 |
if not self.toplevel: return |
1257 |
1256 |
if not self.window.properties['size'].is_active(): |
1258 |
1257 |
self.fit_parent() |
1259 |
import config |
|
1260 |
1258 |
w, h = self.widget.GetSize() |
1261 |
1259 |
prefix = '' |
1262 |
1260 |
if config.preferences.use_dialog_units: |
| … | … | @@ -2277,7 +2275,6 @@ def init_all(): |
2277 |
2275 |
cwx['EditGridSizer'] = grid_xml_builder |
2278 |
2276 |
cwx['EditFlexGridSizer'] = grid_xml_builder |
2279 |
2277 |
|
2280 |
from tree import WidgetTree |
|
2281 |
2278 |
import os.path |
2282 |
2279 |
WidgetTree.images['EditStaticBoxSizer'] = os.path.join(common.wxglade_path, |
2283 |
2280 |
'icons/sizer.xpm') |
Up to file-list edit_widget.py:
5 |
5 |
# THIS PROGRAM COMES WITH NO WARRANTY |
6 |
6 |
|
7 |
7 |
import wx |
8 |
import common, |
|
8 |
import common, config |
|
9 |
9 |
from edit_windows import ManagedBase |
10 |
10 |
from tree import Tree |
11 |
11 |
from widget_properties import * |
Up to file-list edit_windows.py:
7 |
7 |
|
8 |
8 |
import wx |
9 |
9 |
from widget_properties import * |
10 |
from tree import Tree, WidgetTree |
|
11 |
import math, misc, common, sys, config |
|
12 |
import |
|
10 |
import math, misc, common, config |
|
11 |
import re |
|
13 |
12 |
|
14 |
13 |
# ALB 2004-12-05: event handling support |
15 |
14 |
from events_mixin import EventsMixin |
| … | … | @@ -1022,7 +1021,6 @@ class PreviewMixin: |
1022 |
1021 |
sizer_tmp.Fit(panel) |
1023 |
1022 |
w, h = panel.GetClientSize() |
1024 |
1023 |
self.property_window.Layout() |
1025 |
import math |
|
1026 |
1024 |
panel.SetScrollbars(1, 5, 1, int(math.ceil(h/5.0))) |
1027 |
1025 |
|
1028 |
1026 |
def preview(self, event): |
Up to file-list events_mixin.py:
5 |
5 |
# License: MIT (see license.txt) |
6 |
6 |
# THIS PROGRAM COMES WITH NO WARRANTY |
7 |
7 |
|
8 |
#from wxPython.wx import * |
|
9 |
#from wxPython.grid import * |
|
10 |
8 |
import wx |
11 |
9 |
import wx.grid |
12 |
10 |
Up to file-list font_dialog.py:
| … | … | @@ -18,7 +18,6 @@ class wxGladeFontDialog(wx.Dialog): |
18 |
18 |
font_weights_to = {'normal': wx.NORMAL, 'light': wx.LIGHT, 'bold': wx.BOLD } |
19 |
19 |
font_weights_from = _reverse_dict(font_weights_to) |
20 |
20 |
|
21 |
import misc |
|
22 |
21 |
if misc.check_wx_version(2, 3, 3): |
23 |
22 |
font_families_to['teletype'] = wx.TELETYPE |
24 |
23 |
font_families_from[wx.TELETYPE] = 'teletype' |
Up to file-list layout_option_property.py:
6 |
6 |
# License: MIT (see license.txt) |
7 |
7 |
# THIS PROGRAM COMES WITH NO WARRANTY |
8 |
8 |
|
9 |
#from wxPython.wx import * |
|
10 |
9 |
import wx |
11 |
10 |
|
12 |
11 |
import widget_properties |
9 |
9 |
import wxversion |
10 |
10 |
wxversion.ensureMinimal("2.6") |
11 |
11 |
|
12 |
#from wxPython.wx import * |
|
13 |
12 |
import wx |
14 |
13 |
from widget_properties import * |
15 |
from tree import Tree, WidgetTree |
|
16 |
import edit_sizers |
|
14 |
from tree import WidgetTree |
|
17 |
15 |
import common, os, os.path, misc, config |
18 |
16 |
import clipboard |
19 |
17 |
|
20 |
import xml_parse |
|
21 |
18 |
import template |
22 |
19 |
|
23 |
20 |
|
| … | … | @@ -948,7 +945,6 @@ def main(filename=None): |
948 |
945 |
if filename is not None, loads it |
949 |
946 |
""" |
950 |
947 |
# first thing to do, patch wxSizerPtr's Insert if needed... |
951 |
## from wxPython import wx |
|
952 |
948 |
## if wx.__version__ == '2.4.0.2': |
953 |
949 |
## wxSizerPtr.Insert = misc.sizer_fixed_Insert |
954 |
950 |
5 |
5 |
# License: MIT (see license.txt) |
6 |
6 |
# THIS PROGRAM COMES WITH NO WARRANTY |
7 |
7 |
|
8 |
#from wxPython.wx import * |
|
9 |
8 |
import wx |
10 |
9 |
from xml.sax.saxutils import quoteattr |
11 |
10 |
import misc, common, os.path |
Up to file-list widget_properties.py:
11 |
11 |
# property, otherwise on the properties tabs horizontal scrollbars are shown |
12 |
12 |
_label_initial_width = 5 |
13 |
13 |
|
14 |
#from wxPython.wx import * |
|
15 |
#from wxPython.grid import * |
|
16 |
14 |
import wx |
17 |
15 |
import wx.grid |
18 |
16 |
from xml.sax.saxutils import escape |
19 |
17 |
import common, misc |
20 |
18 |
try: |
21 |
#from wxPython.lib.stattext import * |
|
22 |
19 |
import wx.lib.stattext |
23 |
20 |
wxGenStaticText = wx.lib.stattext.GenStaticText |
24 |
21 |
except ImportError: |
