Пример #1
0
	def __init__( self, parent ):
		BaseWidget.__init__ ( self, parent )

		self.m_mainSizer = wx.BoxSizer( wx.VERTICAL )

		m_errorMsgSizer = wx.BoxSizer( wx.VERTICAL )

		self.m_errorLabel = wx.StaticText( self, wx.ID_ANY, u"Error Message", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_errorLabel.Wrap( -1 )
		m_errorMsgSizer.Add( self.m_errorLabel, 0, wx.TOP|wx.RIGHT|wx.LEFT, 5 )

		self.m_errorMsgCtrl = wx.richtext.RichTextCtrl( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0|wx.VSCROLL|wx.HSCROLL|wx.NO_BORDER|wx.WANTS_CHARS )
		m_errorMsgSizer.Add( self.m_errorMsgCtrl, 1, wx.EXPAND |wx.ALL, 5 )

		self.m_mainSizer.Add( m_errorMsgSizer, 1, wx.EXPAND, 5 )

		m_diagnosticSizer = wx.BoxSizer( wx.VERTICAL )

		self.m_diagnosticLabel = wx.StaticText( self, wx.ID_ANY, u"Diagnostics", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_diagnosticLabel.Wrap( -1 )
		m_diagnosticSizer.Add( self.m_diagnosticLabel, 0, wx.TOP|wx.RIGHT|wx.LEFT, 5 )

		self.m_diagnosticCtrl = wx.richtext.RichTextCtrl( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0|wx.VSCROLL|wx.HSCROLL|wx.NO_BORDER|wx.WANTS_CHARS )
		m_diagnosticSizer.Add( self.m_diagnosticCtrl, 1, wx.EXPAND |wx.ALL, 5 )

		self.m_mainSizer.Add( m_diagnosticSizer, 2, wx.EXPAND, 5 )

		self.initButtons( [Globals.ButtonTypes.NETWORK_LOG] )

		self.SetSizer( self.m_mainSizer )
		self.Layout()
Пример #2
0
    def __init__(self, lines, characters, y, x, resultsObj=None, colWidth=7, rowHeight=1, delimiter=" | "):
        BaseWidget.__init__(self, lines, characters, y, x)
        
        # position of the selector in DataTable
        self.PosY = 0                   # row
        self.PosX = 0                   # col
        
        # DataTable UI Settings independent of Results Object
        # Can update these as we choose for each DataTable Widget
        if colWidth < 4:
            self.ColWidth = 4
        else:
            self.ColWidth = colWidth               # Width of each column, update as desired
        if rowHeight < 1:
            self.RowHeight = 1
        else:
            self.RowHeight = rowHeight              # Height of each row, update as desired
        if delimiter == "":
            self.ColumnDelimiter = " | "
        else:
            self.ColumnDelimiter = delimiter    # Delimiter string between each column's data, update as desired
        
        # variables that govern table data
        # these are base values to show an empty data table
        # LoadResultsObject() will overwrite these with resultsObj data
        self.Rows = 10
        self.Columns = 10
        self.RowLabelWidth = 2

        # load data from resultsObj to be displayed
        self.LoadResultsObject(resultsObj)    # must be called upon init to set graphics for widget
        self.UpdateDisplay()
Пример #3
0
 def __init__(self, checked_text, unchecked_text, height, width, y, x, attr=None):
     BaseWidget.__init__(self, height, width, y, x, attr)
     self.CheckedText = "< " + checked_text + " >"
     self.UncheckedText = "< " + unchecked_text + " >"
     self.Text = self.UncheckedText
     self.Checked = False
     self.UpdateDisplay()
Пример #4
0
    def __init__(self, image):
        BaseWidget.__init__(self)

        self._padding = 2
        self._border = BORDER_NONE
        self._picture = None
        self._path = None
        self.set_picture(image)
Пример #5
0
 def __init__(self, height, width, y, x, attr=None):
     BaseWidget.__init__(self, height, width, y, x, attr)
     self.Type = "TextBox"
     self.Text = ""
     self.DisplayText = ' ' * (width - 1)
     self.DisplayMode = "STANDARD"
     self.IsActive = False
     self.UpdateDisplay()
Пример #6
0
    def __init__ (self, image):
        BaseWidget.__init__ (self)

        self._padding = 2
        self._border = BORDER_NONE
        self._picture = None
        self._path = None
        self.set_picture (image)
Пример #7
0
    def __init__ (self, scrolledlist):
        BaseWidget.__init__ (self)
        self._itemcollection = None
        self.itemcollection = ListItemCollection ()
        self.scrolledlist = scrolledlist
        self._spacing = 2

        self._signals[SIG_MOUSEDOWN] = []
        self._signals[SIG_KEYDOWN] = None # Dummy for keyboard activation.
Пример #8
0
    def __init__ (self):
        BaseWidget.__init__ (self)
        self.size = 104, 24 # Use a fixed size.

        # The current value, max is 100 (%), min is 0 (%) and step range.
        self._value = 0
        self._step = 0.1 

        self._text = None
        self._signals[SIG_VALCHANGE] = []
Пример #9
0
    def __init__(self):
        BaseWidget.__init__(self)

        # The current value, max is 100 (%), min is 0 (%) and step range.
        self._value = 0
        self._step = 0.1

        self._text = None
        self._signals[SIG_VALCHANGED] = []

        self.minsize = 104, 24  # Use a fixed size.
Пример #10
0
    def __init__ (self, text):
        BaseWidget.__init__ (self)

        # Mnemonic identifiers in a tuple: (index, key).
        self._mnemonic = (-1, None)
        self._widget = None
        self.__active = False # Internal mnemonic handler.
        
        self._text = None
        self.set_text (text)
        
        self._padding = 2
Пример #11
0
	def __init__( self, parent ):
		BaseWidget.__init__ ( self, parent )

		self.m_mainSizer = wx.BoxSizer( wx.VERTICAL )

		self.m_bitmapHolder = wx.StaticBitmap( self, wx.ID_ANY, wx.NullBitmap, wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_mainSizer.Add( self.m_bitmapHolder, 1, wx.ALL|wx.EXPAND, 5 )

		self.initButtons( [Globals.ButtonTypes.OLD, Globals.ButtonTypes.NEW, Globals.ButtonTypes.DIFF, Globals.ButtonTypes.UPDATE] )

		self.SetSizer( self.m_mainSizer )
		self.Layout()
Пример #12
0
    def __init__ (self, text):
        BaseWidget.__init__ (self)

        # Mnemonic identifiers in a tuple: (index, key).
        self._mnemonic = (-1, None)
        self._widget = None
        self.__active = False # Internal mnemonic handler.
        
        self._multiline = False
        self._linespace = 0
        self._text = None
        self._padding = 2
        self._align = ALIGN_NONE
        self.set_text (text)
Пример #13
0
    def __init__ (self, minimum, maximum, step=1.0):
        BaseWidget.__init__ (self)

        self._signals[SIG_VALCHANGED] = []
        
        # Ranges and step value.
        self._minimum = minimum  # Set the min and max values temporary
        self._maximum = maximum  # and check them later.
        self._step = 0.0
        self._value = 0.0

        if minimum >= maximum:
            raise ValueError ("minimum must be smaller than maximum")
        self.set_step (step)
Пример #14
0
    def __init__ (self, image):
        BaseWidget.__init__ (self)
        self._picture = None
        self._path = None

        self.__click = False
        self._lastevent = None
        
        self._signals[SIG_MOUSEDOWN] = []
        self._signals[SIG_MOUSEUP] = []
        self._signals[SIG_CLICKED] = []
        self._signals[SIG_MOUSEMOVE] = []

        self.set_picture (image)
Пример #15
0
    def __init__(self, image):
        BaseWidget.__init__(self)
        self._picture = None
        self._path = None

        self.__click = False
        self._lastevent = None

        self._signals[SIG_MOUSEDOWN] = []
        self._signals[SIG_MOUSEUP] = []
        self._signals[SIG_CLICKED] = []
        self._signals[SIG_MOUSEMOVE] = []

        self.set_picture(image)
Пример #16
0
    def __init__(self, minimum, maximum, step=1.0):
        BaseWidget.__init__(self)

        self._signals[SIG_VALCHANGED] = []

        # Ranges and step value.
        self._minimum = minimum  # Set the min and max values temporary
        self._maximum = maximum  # and check them later.
        self._step = 0.0
        self._value = 0.0

        if minimum >= maximum:
            raise ValueError("minimum must be smaller than maximum")
        self.set_step(step)
Пример #17
0
    def __init__ (self):
        BaseWidget.__init__ (self)
        
        self._text = ''
        self._editable = True

        # Caret | position.
        self._caret = 0
        self._caretvisible = True
        self._timer = _TIMER
        
        self._signals[SIG_KEYDOWN] = []
        self._signals[SIG_INPUT] = []
        self._signals[SIG_TICK] = None # No events for this one.

        # Temporary placeholder for text input and ESCAPE.
        self._temp = None
Пример #18
0
    def __init__(self):
        BaseWidget.__init__(self)

        self._text = ''
        self._editable = True

        # Caret | position.
        self._caret = 0
        self._caretvisible = True
        self._timer = _TIMER

        self._signals[SIG_KEYDOWN] = []
        self._signals[SIG_INPUT] = []
        self._signals[SIG_TICK] = None  # No events for this one.

        # Temporary placeholder for text input and ESCAPE.
        self._temp = None
Пример #19
0
    def __init__ (self):
        BaseWidget.__init__ (self)

        # Negative values. Influences the axes.
        self._negative = False

        # Horizontal or vertical mapping of the axes.
        self._orientation = ORIENTATION_HORIZONTAL

        # Coordinates of the point of origin on the widget.
        self._origin = (0, 0)

        # The data to evaluate and the return values.
        self._data = None
        self._values = None

        # The eval func.
        self._evalfunc = None
Пример #20
0
    def __init__(self):
        BaseWidget.__init__(self)

        # Negative values. Influences the axes.
        self._negative = False

        # Horizontal or vertical mapping of the axes.
        self._orientation = ORIENTATION_HORIZONTAL

        # Coordinates of the point of origin on the widget.
        self._origin = (0, 0)

        # The data to evaluate and the return values.
        self._data = None
        self._values = None

        # The eval func.
        self._evalfunc = None
Пример #21
0
    def __init__ (self):
        BaseWidget.__init__ (self)
        
        self._text = None
        self._editable = True

        # Caret | position.
        self._caret = 0
        self._caret_visible = True

        # Internal counter for tick events (time measuring).
        self._counter = 50

        self._signals[SIG_KEYDOWN] = []
        self._signals[SIG_INPUT] = []
        self._signals[SIG_TICK] = None # No events for this one.

        # Temporary placeholder for text input and ESCAPE.
        self._temp = None
Пример #22
0
	def __init__( self, parent ):

		BaseWidget.__init__(self, parent)

		self.m_mainSizer = wx.BoxSizer( wx.VERTICAL )
		self.m_mainPanel = wx.Panel( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )

		m_outcomeCont = wx.BoxSizer( wx.VERTICAL )

		self.m_outcomeLabel = wx.StaticText( self, wx.ID_ANY, u"Outcome", wx.DefaultPosition, wx.Size( -1,20 ), 0 )
		self.m_outcomeLabel.Wrap( -1 )
		m_outcomeCont.Add( self.m_outcomeLabel, 0, wx.TOP|wx.RIGHT|wx.LEFT, 5 )

		self.m_outcomeCtrl = wx.richtext.RichTextCtrl( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0|wx.VSCROLL|wx.HSCROLL|wx.NO_BORDER|wx.WANTS_CHARS )
		m_outcomeCont.Add( self.m_outcomeCtrl, 1, wx.EXPAND |wx.ALL, 5 )

		self.m_mainSizer.Add( m_outcomeCont, 1, wx.EXPAND, 5 )


		self.initButtons( [Globals.ButtonTypes.UPDATE, Globals.ButtonTypes.NETWORK_LOG] )

		self.SetSizer( self.m_mainSizer )
		self.Layout()
Пример #23
0
 def __init__(self, height, width, y, x):
     BaseWidget.__init__(self, height, width, y, x)
     self.Text = ""
     self.DisplayText = ' ' * (width - 1)
     self.DisplayMode = "STANDARD"
     self.UpdateDisplay()
Пример #24
0
    def __init__ (self):
        BaseWidget.__init__ (self)

        self._child = None
        self._padding = 2
Пример #25
0
 def __init__ (self, text):
     BaseWidget.__init__ (self)
     self._padding = 2
     self._text = None
     self.set_text (text)
Пример #26
0
 def __init__(self, text):
     BaseWidget.__init__(self)
     self._padding = 2
     self._text = None
     self.set_text(text)
Пример #27
0
	def __init__(self, text, height, width, y, x, attr=None):
		BaseWidget.__init__(self, height, width, y, x, attr)
		self.Text = text
		self.Type = "Label"
		self.UpdateDisplay()
Пример #28
0
    def __init__(self):
        BaseWidget.__init__(self)

        self._child = None
        self._padding = 2
Пример #29
0
 def __init__(self):
     BaseWidget.__init__(self)
     self._children = []
     self._spacing = 2
     self._padding = 2
Пример #30
0
 def __init__(self):
     BaseWidget.__init__(self)
     self._children = []
     self._spacing = 2
     self._padding = 2
Пример #31
0
	def __init__( self, parent ):
		BaseWidget.__init__ ( self, parent )

		m_mainSizer = wx.BoxSizer( wx.VERTICAL )


		m_mainSizer.AddSpacer( ( 0, 30), 0, 0, 5 )

		m_statusSizer = wx.BoxSizer( wx.VERTICAL )

		m_statusCont = wx.BoxSizer( wx.HORIZONTAL )

		self.m_testStatusIcon = wx.StaticBitmap( self, wx.ID_ANY, wx.NullBitmap, wx.DefaultPosition, wx.DefaultSize, 0 )
		m_statusCont.Add( self.m_testStatusIcon, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )

		self.m_testStatusLabel = wx.StaticText( self, wx.ID_ANY, u"MyLabel", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_testStatusLabel.Wrap( -1 )
		self.m_testStatusLabel.SetFont( wx.Font( 22, 70, 90, 90, False, wx.EmptyString ) )

		m_statusCont.Add( self.m_testStatusLabel, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )

		m_statusSizer.Add( m_statusCont, 1, wx.EXPAND|wx.ALIGN_CENTER_HORIZONTAL, 5 )

		m_mainSizer.Add( m_statusSizer, 0, wx.ALIGN_CENTER_HORIZONTAL, 5 )


		m_mainSizer.AddSpacer( ( 0, 20), 0, 0, 5 )

		bSizer31 = wx.BoxSizer( wx.HORIZONTAL )


		bSizer31.AddSpacer( ( 40, 0), 1, wx.EXPAND, 5 )

		m_infoGrid = wx.FlexGridSizer( 4, 2, 0, 0 )
		m_infoGrid.SetFlexibleDirection( wx.BOTH )
		m_infoGrid.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED )

		self.m_testLabel = wx.StaticText( self, wx.ID_ANY, u"Test:", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_testLabel.Wrap( -1 )
		m_infoGrid.Add( self.m_testLabel, 0, wx.ALL, 5 )

		self.m_testValue = wx.StaticText( self, wx.ID_ANY, u"MyLabel", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_testValue.Wrap( -1 )
		m_infoGrid.Add( self.m_testValue, 0, wx.ALL, 5 )

		self.m_groupLabel = wx.StaticText( self, wx.ID_ANY, u"Group:", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_groupLabel.Wrap( -1 )
		m_infoGrid.Add( self.m_groupLabel, 0, wx.ALL, 5 )

		self.m_groupValue = wx.StaticText( self, wx.ID_ANY, u"MyLabel", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_groupValue.Wrap( -1 )
		m_infoGrid.Add( self.m_groupValue, 0, wx.ALL, 5 )

		self.m_descLabel = wx.StaticText( self, wx.ID_ANY, u"Description:", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_descLabel.Wrap( -1 )
		m_infoGrid.Add( self.m_descLabel, 0, wx.ALL, 5 )

		self.m_descValue = wx.StaticText( self, wx.ID_ANY, u"MyLabel", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_descValue.Wrap( 100 )
		m_infoGrid.Add( self.m_descValue, 0, wx.ALL, 5 )

		self.m_fbLabel = wx.StaticText( self, wx.ID_ANY, u"FB:", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_fbLabel.Wrap( -1 )
		m_infoGrid.Add( self.m_fbLabel, 0, wx.ALL, 5 )

		self.m_fbValue = wx.StaticText( self, wx.ID_ANY, u"MyLabel", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_fbValue.Wrap( -1 )
		m_infoGrid.Add( self.m_fbValue, 0, wx.ALL, 5 )

		bSizer31.Add( m_infoGrid, 0, 0, 5 )

		m_mainSizer.Add( bSizer31, 0, 0, 5 )

		self.SetSizer( m_mainSizer )
		self.Layout()