Example #1
0
    def __init__(self, parent, id, args={}):
        """
        Creates a new ComponentFrame instance.

        """

        wx.Frame.__init__(self, parent, id, title=FRAME_TITLE+" - Component", style=FRAME_STYLE)

        # To enable translations of wx stock items.
        #self.locale = wx.Locale(wx.LANGUAGE_DEFAULT)

        # Members
        self._init_members( args )

        # Set title and icon of the frame
        self._init_infos( args )

        # Creates the default menubar, toolbar, and status bar
        # and the client panel
        self._init_frame( )

        # Frame properties
        self._frame_properties()

        # Events of this frame
        wx.EVT_CLOSE(self, self.OnExitApp)

        # events sent by the file manager
        spEVT_FILE_WANDER(self, self.OnFileWander)

        self._LayoutFrame()
        self.Show(True)
Example #2
0
    def __init__(self, parent, ID=0, pos=wx.DefaultPosition, size=wx.DefaultSize, style=0, prefsIO=None):

        wx.lib.scrolledpanel.ScrolledPanel.__init__(self, parent, -1, style=wx.TAB_TRAVERSAL|wx.NO_BORDER)

        # members
        self._xfiles  = xFiles()
        self._prefsIO = self._check_prefs(prefsIO)
        try:
            self._ccbmultiple = self._prefsIO.GetValue('F_CCB_MULTIPLE')
        except Exception:
            self._ccbmultiple = False

        # ... the list of files
        self._ccbsizer = wx.BoxSizer( wx.VERTICAL )
        self.SetSizer( self._ccbsizer )

        spEVT_FILE_CHECK(self,  self.OnCheck)
        spEVT_FILE_WANDER(self, self.OnWander)
        spEVT_SETTINGS(self,    self.OnSettings)

        self.SetBackgroundColour( self._prefsIO.GetValue('M_BG_COLOUR') )
        self.SetSize(wx.Size(180, 300))
        self.SetAutoLayout( True )
        self.Layout()
        self.SetupScrolling()
Example #3
0
    def __init__(self, parent, idf, args={}):
        """
        Creates a new ComponentFrame instance.

        """
        wx.Frame.__init__(self, parent, idf, title=FRAME_TITLE+" - Component", style=FRAME_STYLE)

        # Members
        self._init_members( args )

        # Create GUI
        self._init_infos( args )
        self._mainpanel = self._create_content( )

        # Events of this frame
        self.Bind(wx.EVT_CLOSE,  self.ProcessEvent)
        self.Bind(wx.EVT_BUTTON, self.ProcessEvent)

        # events sent by the file manager
        spEVT_FILE_WANDER(self, self.OnFileWander)

        self.SetMinSize( (MIN_FRAME_W,MIN_FRAME_H) )
        (w,h) = wx.GetDisplaySize()
        self.SetSize( wx.Size(w*0.75,h*0.75) )
        self.Centre()
        self.Enable()
        self.SetFocus()

        self.Show( True )
Example #4
0
    def __init__(self, parent, ID=0, pos=wx.DefaultPosition, size=wx.DefaultSize, style=0, prefsIO=None):

        wx.lib.scrolledpanel.ScrolledPanel.__init__(self, parent, -1, style=wx.TAB_TRAVERSAL|wx.SIMPLE_BORDER)

        # members
        self._xfiles  = xFiles()
        self._prefsIO = self._check_prefs(prefsIO)
        try:
            self._ccbmultiple = self._prefsIO.GetValue('F_CCB_MULTIPLE')
        except Exception:
            self._ccbmultiple = False

        # create the sizer items:

        # ... a text to introduce the panel
        self._text = wx.StaticText(self, -1, "List of files:", size=(150,-1), style=wx.TE_READONLY|wx.NO_BORDER)
        font = self._prefsIO.GetValue('M_FONT')
        font.SetWeight(wx.BOLD)
        self._text.SetFont( font )
        self._text.SetBackgroundColour( self._prefsIO.GetValue('M_BG_COLOUR') )
        self._text.SetForegroundColour( self._prefsIO.GetValue('M_FG_COLOUR') )

        # ... the list of files
        self._ccbsizer = wx.BoxSizer( wx.VERTICAL )

        # create the main sizer
        sizer = wx.BoxSizer( wx.VERTICAL )
        sizer.Add(self._text, proportion=0, flag=wx.ALL, border=5 )
        sizer.Add(self._ccbsizer, proportion=1, flag=wx.ALL, border=5 )
        self.SetSizer( sizer )

        spEVT_FILE_CHECK(self,  self.OnCheck)
        spEVT_FILE_WANDER(self, self.OnWander)
        spEVT_SETTINGS(self,    self.OnSettings)

        self.SetBackgroundColour( self._prefsIO.GetValue('M_BG_COLOUR') )
        self.SetSize(wx.Size(180, 300))
        self.SetAutoLayout( True )
        self.Layout()
        self.SetupScrolling()