def __init__(self, name, parent, id, property_window, klass='wxPanel', show=True, style=wx.TAB_TRAVERSAL): TopLevelBase.__init__(self, name, klass, parent, id, property_window, show=show, has_title=False) PanelBase.__init__(self, style) self.base = 'wxPanel' self.skip_on_size = False
def __init__(self, name, parent, id, klass='wxPanel', style='wxTAB_TRAVERSAL'): TopLevelBase.__init__(self, name, klass, parent, id) PanelBase.__init__(self, style) self.skip_on_size = False
def __init__(self, name, parent, id, title, style=wx.DEFAULT_DIALOG_STYLE, klass='wxDialog'): TopLevelBase.__init__(self, name, klass, parent, id, title=title) self.properties["base"].set('wxDialog') EditStylesMixin.__init__(self) # initialise instance properties self.icon = np.FileNamePropertyD("", default_value="") self.centered = np.CheckBoxProperty(False) self.sizehints = np.CheckBoxProperty(False)
def __init__(self, name, parent, klass, title, style=wx.DEFAULT_FRAME_STYLE): #XXX style is not used TopLevelBase.__init__(self, name, parent, klass, title) EditStylesMixin.__init__(self) self.properties["style"].set(style) # initialise instance properties self.icon = np.BitmapPropertyD("") self.centered = np.CheckBoxProperty(False, default_value=False) self.sizehints = np.CheckBoxProperty(False, default_value=False) self.menubar = BarProperty("MenuBar") self.toolbar = BarProperty("ToolBar") if "statusbar" in self.PROPERTIES: # not for MDIChildFrame self.statusbar = BarProperty("StatusBar")
def __init__(self, name, parent, klass, title, style=wx.DEFAULT_DIALOG_STYLE): TopLevelBase.__init__(self, name, parent, klass, title) EditStylesMixin.__init__(self) self.properties["style"].set(style) # initialise instance properties self.icon = np.BitmapPropertyD("") self.affirmative = AffirmativePropertyD("", default_value="OK") self.escape = AffirmativePropertyD("", default_value="CANCEL") self.centered = np.CheckBoxProperty(False, default_value=False) self.sizehints = np.CheckBoxProperty(False, default_value=False)
def __init__(self, name, parent, id, title, style=wx.DEFAULT_FRAME_STYLE, klass='wxFrame'): #XXX style is not used TopLevelBase.__init__(self, name, klass, parent, id, title=title) self.base = 'wxFrame' EditStylesMixin.__init__(self) self.properties["style"].set(style) # initialise instance properties self.icon = np.BitmapPropertyD("") self.centered = np.CheckBoxProperty(False, default_value=False) self.sizehints = np.CheckBoxProperty(False, default_value=False) self.menubar = np.CheckBoxProperty(False, default_value=False) self.toolbar = np.CheckBoxProperty(False, default_value=False) if "statusbar" in self.PROPERTIES: self.statusbar = np.CheckBoxProperty(False, default_value=False) self._statusbar = None else: self.statusbar = None self._menubar = self._toolbar = None # these properties will hold the EditMenubar instances etc.
def __init__(self, name, parent, id, title, property_window, style=wx.DEFAULT_DIALOG_STYLE, show=True, klass='wxDialog'): TopLevelBase.__init__(self, name, klass, parent, id, property_window, show=show, title=title) self.base = 'wxDialog' self.style = style prop = self.properties # style property self.access_functions['style'] = (self.get_style, self.set_style) style_labels = ('#section#' + _('Style'), 'wxDEFAULT_DIALOG_STYLE', 'wxDIALOG_MODAL', 'wxCAPTION', 'wxRESIZE_BORDER', 'wxSYSTEM_MENU') style_labels += ('wxCLOSE_BOX', 'wxMAXIMIZE_BOX', 'wxMINIMIZE_BOX') style_labels += ('wxTHICK_FRAME', 'wxSTAY_ON_TOP', 'wxNO_3D', 'wxDIALOG_NO_PARENT', 'wxNO_FULL_REPAINT_ON_RESIZE', 'wxFULL_REPAINT_ON_RESIZE', 'wxCLIP_CHILDREN') #note that the tooltips are only for wxPython>=2.5 self.tooltips = (_("Equivalent to a combination of wxCAPTION, " "wxCLOSE_BOX and wxSYSTEM_MENU " "(the last one is not used under Unix)"), _("NO DESCRIPTION"), _("Puts a caption on the dialog box."), _("Display a resizeable frame around the window."), _("Display a system menu."), _("Displays a close box on the frame."), _("Displays a maximize box on the dialog."), _("Displays a minimize box on the dialog."), _("Display a thick frame around the window."), _("The dialog stays on top of all other windows."), _("Under Windows, specifies that the child controls should " "not have 3D borders unless specified in the control."), _("By default, a dialog created with a NULL parent window " "will be given the application's top level window as parent. " "Use this style to prevent this from happening and create " "an orphan dialog. " "This is not recommended for modal dialogs."), _("NO DESCRIPTION"), _("NO DESCRIPTION"), _("NO DESCRIPTION")) self.style_pos = (wx.DEFAULT_DIALOG_STYLE, wx.DIALOG_MODAL, wx.CAPTION, wx.RESIZE_BORDER, wx.SYSTEM_MENU) self.style_pos += (wx.CLOSE_BOX, wx.MAXIMIZE_BOX, wx.MINIMIZE_BOX) self.style_pos += (wx.THICK_FRAME, wx.STAY_ON_TOP, wx.NO_3D, wx.DIALOG_NO_PARENT, wx.NO_FULL_REPAINT_ON_RESIZE, wx.FULL_REPAINT_ON_RESIZE, wx.CLIP_CHILDREN) prop['style'] = CheckListProperty(self, 'style', None, style_labels, tooltips=self.tooltips) # icon property self.icon = "" self.access_functions['icon'] = (self.get_icon, self.set_icon) prop['icon'] = FileDialogProperty(self, 'icon', None, style=wx.OPEN|wx.FILE_MUST_EXIST, can_disable=True, label=_("icon")) # centered property self.centered = False self.access_functions['centered'] = (self.get_centered, self.set_centered) prop['centered'] = CheckBoxProperty(self, 'centered', None, label=_("centered")) # size hints property self.sizehints = False self.access_functions['sizehints'] = (self.get_sizehints, self.set_sizehints) prop['sizehints'] = CheckBoxProperty(self, 'sizehints', None, label=_('Set Size Hints'))
def __init__(self, name, parent, id, title, property_window, style=wx.DEFAULT_FRAME_STYLE, show=True, klass='wxFrame'): TopLevelBase.__init__(self, name, klass, parent, id, property_window, show=show, title=title) self.base = 'wxFrame' self.style = style self.statusbar = None self.icon = '' self.access_functions['statusbar'] = (self.get_statusbar, self.set_statusbar) self.menubar = None self.access_functions['menubar'] = (self.get_menubar, self.set_menubar) self.toolbar = None self.access_functions['toolbar'] = (self.get_toolbar, self.set_toolbar) self.access_functions['style'] = (self.get_style, self.set_style) self.access_functions['icon'] = (self.get_icon, self.set_icon) prop = self.properties style_labels = ['#section#' + _('Style'), 'wxDEFAULT_FRAME_STYLE', 'wxICONIZE', 'wxCAPTION', 'wxMINIMIZE', 'wxMINIMIZE_BOX', 'wxMAXIMIZE', 'wxMAXIMIZE_BOX', 'wxSTAY_ON_TOP', 'wxSYSTEM_MENU', 'wxSIMPLE_BORDER', 'wxRESIZE_BORDER', 'wxFRAME_TOOL_WINDOW', 'wxFRAME_NO_TASKBAR', 'wxFRAME_FLOAT_ON_PARENT', 'wxNO_BORDER', 'wxNO_FULL_REPAINT_ON_RESIZE', 'wxFULL_REPAINT_ON_RESIZE', 'wxTAB_TRAVERSAL', 'wxCLIP_CHILDREN'] self.style_pos = [wx.DEFAULT_FRAME_STYLE, wx.ICONIZE, wx.CAPTION, wx.MINIMIZE, wx.MINIMIZE_BOX, wx.MAXIMIZE, wx.MAXIMIZE_BOX, wx.STAY_ON_TOP, wx.SYSTEM_MENU, wx.SIMPLE_BORDER, wx.RESIZE_BORDER, wx.FRAME_TOOL_WINDOW, wx.FRAME_NO_TASKBAR, wx.FRAME_FLOAT_ON_PARENT, wx.NO_BORDER, wx.NO_FULL_REPAINT_ON_RESIZE, wx.FULL_REPAINT_ON_RESIZE, wx.TAB_TRAVERSAL, wx.CLIP_CHILDREN] if misc.check_wx_version(2, 5): style_labels.insert(5, 'wxCLOSE_BOX') self.style_pos.insert(4, wx.CLOSE_BOX) prop['style'] = CheckListProperty(self, 'style', None, style_labels) # menubar property prop['menubar'] = CheckBoxProperty(self, 'menubar', None, _('Has MenuBar')) # statusbar property prop['statusbar'] = CheckBoxProperty(self, 'statusbar', None, _('Has StatusBar')) # toolbar property prop['toolbar'] = CheckBoxProperty(self, 'toolbar', None, _('Has ToolBar')) # icon property prop['icon'] = FileDialogProperty(self, 'icon', None, style=wx.OPEN|wx.FILE_MUST_EXIST, can_disable=True, label=_("icon")) # centered property self.centered = False self.access_functions['centered'] = (self.get_centered, self.set_centered) prop['centered'] = CheckBoxProperty(self, 'centered', None, label=_("centered")) # size hints property self.sizehints = False self.access_functions['sizehints'] = (self.get_sizehints, self.set_sizehints) prop['sizehints'] = CheckBoxProperty(self, 'sizehints', None, label=_('Set Size Hints'))
def __init__(self, name, parent, id, title, property_window, style=wx.DEFAULT_FRAME_STYLE, show=True, klass='wxFrame'): TopLevelBase.__init__(self, name, klass, parent, id, property_window, show=show, title=title) self.base = 'wxFrame' self.style = style self.statusbar = None self.icon = '' self.access_functions['statusbar'] = (self.get_statusbar, self.set_statusbar) self.menubar = None self.access_functions['menubar'] = (self.get_menubar, self.set_menubar) self.toolbar = None self.access_functions['toolbar'] = (self.get_toolbar, self.set_toolbar) self.access_functions['style'] = (self.get_style, self.set_style) self.access_functions['icon'] = (self.get_icon, self.set_icon) prop = self.properties style_labels = [ '#section#' + _('Style'), 'wxDEFAULT_FRAME_STYLE', 'wxICONIZE', 'wxCAPTION', 'wxMINIMIZE', 'wxMINIMIZE_BOX', 'wxMAXIMIZE', 'wxMAXIMIZE_BOX', 'wxSTAY_ON_TOP', 'wxSYSTEM_MENU', 'wxSIMPLE_BORDER', 'wxRESIZE_BORDER', 'wxFRAME_TOOL_WINDOW', 'wxFRAME_NO_TASKBAR', 'wxFRAME_FLOAT_ON_PARENT', 'wxNO_BORDER', 'wxNO_FULL_REPAINT_ON_RESIZE', 'wxFULL_REPAINT_ON_RESIZE', 'wxTAB_TRAVERSAL', 'wxCLIP_CHILDREN' ] self.style_pos = [ wx.DEFAULT_FRAME_STYLE, wx.ICONIZE, wx.CAPTION, wx.MINIMIZE, wx.MINIMIZE_BOX, wx.MAXIMIZE, wx.MAXIMIZE_BOX, wx.STAY_ON_TOP, wx.SYSTEM_MENU, wx.SIMPLE_BORDER, wx.RESIZE_BORDER, wx.FRAME_TOOL_WINDOW, wx.FRAME_NO_TASKBAR, wx.FRAME_FLOAT_ON_PARENT, wx.NO_BORDER, wx.NO_FULL_REPAINT_ON_RESIZE, wx.FULL_REPAINT_ON_RESIZE, wx.TAB_TRAVERSAL, wx.CLIP_CHILDREN ] if misc.check_wx_version(2, 5): style_labels.insert(5, 'wxCLOSE_BOX') self.style_pos.insert(4, wx.CLOSE_BOX) prop['style'] = CheckListProperty(self, 'style', None, style_labels) # menubar property prop['menubar'] = CheckBoxProperty(self, 'menubar', None, _('Has MenuBar')) # statusbar property prop['statusbar'] = CheckBoxProperty(self, 'statusbar', None, _('Has StatusBar')) # toolbar property prop['toolbar'] = CheckBoxProperty(self, 'toolbar', None, _('Has ToolBar')) # icon property prop['icon'] = FileDialogProperty(self, 'icon', None, style=wx.OPEN | wx.FILE_MUST_EXIST, can_disable=True, label=_("icon")) # centered property self.centered = False self.access_functions['centered'] = (self.get_centered, self.set_centered) prop['centered'] = CheckBoxProperty(self, 'centered', None, label=_("centered")) # size hints property self.sizehints = False self.access_functions['sizehints'] = (self.get_sizehints, self.set_sizehints) prop['sizehints'] = CheckBoxProperty(self, 'sizehints', None, label=_('Set Size Hints'))
def __init__(self, name, parent, id, title, property_window, style=wx.DEFAULT_DIALOG_STYLE, show=True, klass='wxDialog'): TopLevelBase.__init__(self, name, klass, parent, id, property_window, show=show, title=title) self.base = 'wxDialog' self.style = style prop = self.properties # style property self.access_functions['style'] = (self.get_style, self.set_style) style_labels = ('#section#' + _('Style'), 'wxDEFAULT_DIALOG_STYLE', 'wxDIALOG_MODAL', 'wxCAPTION', 'wxRESIZE_BORDER', 'wxSYSTEM_MENU') if misc.check_wx_version(2, 5): style_labels += ('wxCLOSE_BOX', 'wxMAXIMIZE_BOX', 'wxMINIMIZE_BOX') style_labels += ('wxTHICK_FRAME', 'wxSTAY_ON_TOP', 'wxNO_3D', 'wxDIALOG_NO_PARENT', 'wxNO_FULL_REPAINT_ON_RESIZE', 'wxFULL_REPAINT_ON_RESIZE', 'wxCLIP_CHILDREN') #note that the tooltips are only for wxPython>=2.5 self.tooltips = ( _("Equivalent to a combination of wxCAPTION, wxCLOSE_BOX and wxSYSTEM_MENU (the last one is not used under Unix)" ), _("NO DESCRIPTION"), _("Puts a caption on the dialog box."), _("Display a resizeable frame around the window."), _("Display a system menu."), _("Displays a close box on the frame."), _("Displays a maximize box on the dialog."), _("Displays a minimize box on the dialog."), _("Display a thick frame around the window."), _("The dialog stays on top of all other windows."), _("Under Windows, specifies that the child controls should not have 3D borders unless specified in the control." ), _("By default, a dialog created with a NULL parent window will be given the application's top level window as parent. Use this style to prevent this from happening and create an orphan dialog. This is not recommended for modal dialogs." ), _("NO DESCRIPTION"), _("NO DESCRIPTION"), _("NO DESCRIPTION")) self.style_pos = (wx.DEFAULT_DIALOG_STYLE, wx.DIALOG_MODAL, wx.CAPTION, wx.RESIZE_BORDER, wx.SYSTEM_MENU) if misc.check_wx_version(2, 5): self.style_pos += (wx.CLOSE_BOX, wx.MAXIMIZE_BOX, wx.MINIMIZE_BOX) self.style_pos += (wx.THICK_FRAME, wx.STAY_ON_TOP, wx.NO_3D, wx.DIALOG_NO_PARENT, wx.NO_FULL_REPAINT_ON_RESIZE, wx.FULL_REPAINT_ON_RESIZE, wx.CLIP_CHILDREN) prop['style'] = CheckListProperty(self, 'style', None, style_labels, tooltips=self.tooltips) # icon property self.icon = "" self.access_functions['icon'] = (self.get_icon, self.set_icon) prop['icon'] = FileDialogProperty(self, 'icon', None, style=wx.OPEN | wx.FILE_MUST_EXIST, can_disable=True, label=_("icon")) # centered property self.centered = False self.access_functions['centered'] = (self.get_centered, self.set_centered) prop['centered'] = CheckBoxProperty(self, 'centered', None, label=_("centered")) # size hints property self.sizehints = False self.access_functions['sizehints'] = (self.get_sizehints, self.set_sizehints) prop['sizehints'] = CheckBoxProperty(self, 'sizehints', None, label=_('Set Size Hints'))