Changeset 2256


Ignore:
Timestamp:
12/29/08 19:15:44 (3 years ago)
Author:
adamk
Message:

Mosing the custom AUI logic out into a standalone sub-class

Location:
trunk/Padre/lib/Padre/Wx
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Padre/lib/Padre/Wx/MainWindow.pm

    r2214 r2256  
    3636use Padre::Wx::Output         (); 
    3737use Padre::Wx::ErrorList      (); 
     38use Padre::wx::AuiManager     (); 
     39use Padre::Wx::FileDropTarget (); 
    3840use Padre::Document           (); 
    3941use Padre::Documents          (); 
    40 use Padre::Wx::FileDropTarget (); 
    4142 
    4243our $VERSION = '0.22'; 
     
    109110    ); 
    110111 
    111     $self->{manager} = Wx::AuiManager->new; 
    112     $self->{manager}->SetManagedWindow($self); 
     112    # Temporary store for the function list. 
     113    # TODO: Storing this here violates encapsulation. 
    113114    $self->{_methods} = []; 
    114115 
    115     # do NOT use hints other than Rectangle or the app will crash on Linux/GTK 
    116     my $flags = $self->{manager}->GetFlags; 
    117     $flags &= ~Wx::wxAUI_MGR_TRANSPARENT_HINT; 
    118     $flags &= ~Wx::wxAUI_MGR_VENETIAN_BLINDS_HINT; 
    119     $self->{manager}->SetFlags( $flags ^ Wx::wxAUI_MGR_RECTANGLE_HINT ); 
     116    # Set the window manager 
     117    $self->{manager} = Padre::Wx::AuiManager->new($self); 
    120118 
    121119    # Add some additional attribute slots 
     
    134132 
    135133    # Create the syntax checker and sidebar for syntax check messages 
    136     # create it AFTER the bottom pane! 
     134    # Must be created after the bottom pane! 
    137135    $self->{syntax_checker} = Padre::Wx::SyntaxChecker->new($self); 
    138136    $self->show_syntaxbar( $self->menu->view->{show_syntaxcheck}->IsChecked ); 
    139137 
    140138    # Create the error list 
    141     # create it AFTER the bottom pane! 
     139    # Must be created after the bottom pane! 
    142140    $self->{errorlist} = Padre::Wx::ErrorList->new($self); 
    143  
    144141 
    145142    # on close pane 
     
    178175    Wx::Event::EVT_STC_DWELLSTART(  $self, -1, \&on_stc_dwell_start  ); 
    179176 
    180     # As ugly as the WxPerl icon is, the new file toolbar image is uglier 
     177    # As ugly as the WxPerl icon is, the new file toolbar image we 
     178    # used to use was far uglier 
    181179    $self->SetIcon( Wx::GetWxPerlIcon() ); 
    182180 
Note: See TracChangeset for help on using the changeset viewer.