Changeset d0923a3 in sasview


Ignore:
Timestamp:
Apr 25, 2013 4:16:58 PM (12 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:
523f828
Parents:
8833c77
Message:

Instead of mdi, use wxframe on linux

Files:
9 edited

Legend:

Unmodified
Added
Removed
  • calculatorview/src/sans/perspectives/calculator/calculator_widgets.py

    r7d45a56 rd0923a3  
    99""" 
    1010import wx 
    11 #import os 
     11import sys 
     12CHILD_FRAME = wx.MDIChildFrame 
     13if sys.platform.count("win32") < 1: 
     14    if sys.platform.count("darwin") < 1: 
     15        CHILD_FRAME = wx.Frame 
    1216 
    1317class InputTextCtrl(wx.TextCtrl): 
  • calculatorview/src/sans/perspectives/calculator/data_operator.py

    re35534f rd0923a3  
    1515from matplotlib.figure import Figure 
    1616from sans.guiframe.events import StatusEvent  
    17         
     17from sans.perspectives.calculator import calculator_widgets as widget    
    1818#Control panel width  
    1919if sys.platform.count("win32") > 0: 
     
    934934        self.draw() 
    935935         
    936 class DataOperatorWindow(wx.MDIChildFrame): 
     936class DataOperatorWindow(widget.CHILD_FRAME): 
    937937    def __init__(self, parent, manager, *args, **kwds): 
    938938        kwds["size"] = (PANEL_WIDTH, PANEL_HEIGTH) 
    939         wx.MDIChildFrame.__init__(self, parent, *args, **kwds) 
     939        widget.CHILD_FRAME.__init__(self, parent, *args, **kwds) 
    940940        self.parent = parent 
    941941        self.manager = manager 
  • calculatorview/src/sans/perspectives/calculator/density_panel.py

    re35534f rd0923a3  
    1010from sans.guiframe.events import StatusEvent   
    1111from periodictable import formula as Formula 
     12from sans.perspectives.calculator import calculator_widgets as widget 
    1213        
    1314AVOGADRO =  6.02214129e23 
     
    371372        return output.lstrip().rstrip()   
    372373         
    373 class DensityWindow(wx.MDIChildFrame): 
     374class DensityWindow(widget.CHILD_FRAME): 
    374375    """ 
    375376    """ 
     
    381382        kwds['title'] = title 
    382383        kwds['size'] = size 
    383         wx.MDIChildFrame.__init__(self, parent, *args, **kwds) 
     384        widget.CHILD_FRAME.__init__(self, parent, *args, **kwds) 
    384385        """ 
    385386        """ 
  • calculatorview/src/sans/perspectives/calculator/gen_scatter_panel.py

    re35534f rd0923a3  
    3535from sans.perspectives.calculator.load_thread import GenReader 
    3636from danse.common.plottools.arrow3d import Arrow3D 
     37from sans.perspectives.calculator import calculator_widgets as widget    
    3738 
    3839_BOX_WIDTH = 76 
     
    17911792        return flag 
    17921793 
    1793 class SasGenWindow(wx.MDIChildFrame): 
     1794class SasGenWindow(widget.CHILD_FRAME): 
    17941795    """ 
    17951796    GEN SAS main window 
     
    18091810        kwds['size'] = size 
    18101811        kwds['title'] = title 
    1811         wx.MDIChildFrame.__init__(self, parent, *args, **kwds) 
     1812        widget.CHILD_FRAME.__init__(self, parent, *args, **kwds) 
    18121813        self.parent = parent 
    18131814        self.base = manager 
  • calculatorview/src/sans/perspectives/calculator/kiessig_calculator_panel.py

    re35534f rd0923a3  
    1616from calculator_widgets import OutputTextCtrl 
    1717from calculator_widgets import InputTextCtrl 
     18from sans.perspectives.calculator import calculator_widgets as widget    
    1819 
    1920_BOX_WIDTH = 77 
     
    190191        self.on_compute(event) 
    191192              
    192 class KiessigWindow(wx.MDIChildFrame): 
     193class KiessigWindow(widget.CHILD_FRAME): 
    193194    def __init__(self, parent=None, manager=None,  
    194195                 title="Kiessig Thickness Calculator", 
     
    196197        kwds['title'] = title 
    197198        kwds['size'] = size 
    198         wx.MDIChildFrame.__init__(self, parent, *args, **kwds) 
     199        widget.CHILD_FRAME.__init__(self, parent, *args, **kwds) 
    199200        self.parent = parent 
    200201        self.manager = manager 
  • calculatorview/src/sans/perspectives/calculator/resolution_calculator_panel.py

    re35534f rd0923a3  
    3030from wx.lib.scrolledpanel import ScrolledPanel 
    3131from math import fabs 
     32from sans.perspectives.calculator import calculator_widgets as widget    
     33 
    3234_BOX_WIDTH = 100 
    3335_Q_DEFAULT = 0.0 
     
    13901392            raise  
    13911393         
    1392 class ResolutionWindow(wx.MDIChildFrame): 
     1394class ResolutionWindow(widget.CHILD_FRAME): 
    13931395    """ 
    13941396    Resolution Window 
     
    14061408        kwds['title'] = title 
    14071409        kwds['size'] = size 
    1408         wx.MDIChildFrame.__init__(self, parent=parent, *args, **kwds) 
     1410        widget.CHILD_FRAME.__init__(self, parent=parent, *args, **kwds) 
    14091411        self.parent = parent 
    14101412        self.manager = manager 
  • calculatorview/src/sans/perspectives/calculator/sld_panel.py

    re35534f rd0923a3  
    2020from periodictable.xsf import xray_sld_from_atoms 
    2121from periodictable.nsf import neutron_scattering 
     22from sans.perspectives.calculator import calculator_widgets as widget    
    2223        
    2324WAVELENGTH = 6.0 
     
    437438         
    438439         
    439 class SldWindow(wx.MDIChildFrame): 
     440class SldWindow(widget.CHILD_FRAME): 
    440441    """ 
    441442    """ 
     
    447448        kwds['title'] = title 
    448449        kwds['size'] = size 
    449         wx.MDIChildFrame.__init__(self, parent, *args, **kwds) 
     450        widget.CHILD_FRAME.__init__(self, parent, *args, **kwds) 
    450451        """ 
    451452        """ 
  • calculatorview/src/sans/perspectives/calculator/slit_length_calculator_panel.py

    re35534f rd0923a3  
    1919from calculator_widgets import OutputTextCtrl 
    2020from calculator_widgets import InterActiveOutputTextCtrl 
     21from sans.perspectives.calculator import calculator_widgets as widget    
    2122 
    2223_BOX_WIDTH = 76 
     
    251252     
    252253     
    253 class SlitLengthCalculatorWindow(wx.MDIChildFrame): 
     254class SlitLengthCalculatorWindow(widget.CHILD_FRAME): 
    254255    """ 
    255256    """ 
     
    260261        kwds['size']= size 
    261262        kwds['title']= title 
    262         wx.MDIChildFrame.__init__(self, parent, *args, **kwds) 
     263        widget.CHILD_FRAME.__init__(self, parent, *args, **kwds) 
    263264        self.parent = parent 
    264265        self.manager = manager 
  • sansguiframe/src/sans/guiframe/gui_manager.py

    r8833c77 rd0923a3  
    194194CLOSE_SHOW = True 
    195195TIME_FACTOR = 2 
     196MDI_STYLE = wx.DEFAULT_FRAME_STYLE 
    196197NOT_SO_GRAPH_LIST = ["BoxSum"] 
    197 if sys.platform.count("darwin") > 0: 
     198PARENT_FRAME = wx.MDIParentFrame 
     199CHILD_FRAME = wx.MDIChildFrame 
     200if sys.platform.count("win32") < 1: 
    198201    IS_WIN = False 
    199202    TIME_FACTOR = 2 
     
    201204        if int(str(wx.__version__).split('.')[1]) < 9: 
    202205            CLOSE_SHOW = False 
    203      
    204 class ViewerFrame(wx.MDIParentFrame): 
     206    if sys.platform.count("darwin") < 1: 
     207        PARENT_FRAME = wx.Frame 
     208        CHILD_FRAME = wx.Frame 
     209     
     210class ViewerFrame(PARENT_FRAME): 
    205211    """ 
    206212    Main application frame 
     
    216222        """ 
    217223 
    218         wx.MDIParentFrame.__init__(self, parent=parent, title=title, pos=pos, size=size) 
     224        PARENT_FRAME.__init__(self, parent=parent, title=title, pos=pos, size=size) 
    219225        # title 
    220226        self.title = title 
     
    11761182        p.window_name = windowname + str(self.graph_num) 
    11771183         
    1178         style1 = self.__gui_style & GUIFRAME.FIXED_PANEL 
    1179         style2 = self.__gui_style & GUIFRAME.FLOATING_PANEL 
     1184        #style1 = self.__gui_style & GUIFRAME.FIXED_PANEL 
     1185        #style2 = self.__gui_style & GUIFRAME.FLOATING_PANEL 
    11801186         
    11811187        p.frame.SetTitle(p.window_caption) 
     
    34063412 
    34073413 
    3408 class MDIFrame(wx.MDIChildFrame): 
     3414class MDIFrame(CHILD_FRAME): 
    34093415    """ 
    34103416    Frame for panels 
     
    34183424        kwds['size']= size 
    34193425        kwds['title']= title 
     3426        kwds['style'] = MDI_STYLE 
    34203427        # Initialize the Frame object 
    3421         wx.MDIChildFrame.__init__(self, parent, *args, **kwds) 
     3428        CHILD_FRAME.__init__(self, parent, *args, **kwds) 
    34223429        self.parent = parent 
    34233430        self.name = "Untitled" 
Note: See TracChangeset for help on using the changeset viewer.