Ignore:
Timestamp:
Jul 16, 2010 9:24:21 AM (14 years ago)
Author:
Jae Cho <jhjcho@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
b5a21aa
Parents:
855546d
Message:

Invariant: undo, redo, bookmark, and saving works now: needs plottool fix for making right order on plotting from file: also need some cleaning-up and doc.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • invariantview/perspectives/invariant/invariant_widgets.py

    rd7a39e5 r4e1c362  
    1515import wx 
    1616import os 
     17from invariant_state import InvariantState as IState 
     18import copy 
    1719 
    1820class InvTextCtrl(wx.TextCtrl): 
     
    2224    """ 
    2325    def __init__(self, *args, **kwds): 
    24          
    2526        wx.TextCtrl.__init__(self, *args, **kwds) 
    26          
    2727        ## Set to True when the mouse is clicked while the whole string is selected 
    28         full_selection = False 
     28        self.full_selection = False 
    2929        ## Call back for EVT_SET_FOCUS events 
    3030        _on_set_focus_callback = None 
     31 
    3132        # Bind appropriate events 
    3233        self.Bind(wx.EVT_LEFT_UP, self._highlight_text) 
    3334        self.Bind(wx.EVT_SET_FOCUS, self._on_set_focus) 
    34  
     35         
    3536    def _on_set_focus(self, event): 
    3637        """ 
     
    3940         
    4041        :param event: mouse event 
    41          
    4242        """ 
    4343        event.Skip() 
     
    4949         
    5050        :param event: mouse event 
    51          
    5251        """ 
    5352        # Make sure the mouse event is available to other listeners 
     
    6362                if start==end: 
    6463                    control.SetSelection(-1,-1) 
     64            
    6565 
     66     
    6667class OutputTextCtrl(wx.TextCtrl): 
    6768    """ 
     
    7879        # The event will be skipped once the call-back 
    7980        # is called. 
     81         
    8082        self.Bind(wx.EVT_MOUSE_EVENTS, self._click) 
     83 
    8184         
    8285    def _click(self, event): 
     
    8689        """  
    8790        pass 
     91     
     92     
     93 
    8894  
Note: See TracChangeset for help on using the changeset viewer.