Changeset 5844
- Timestamp:
- 07/05/09 01:50:20 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Padre-Plugin-Perl6/lib/Padre/Plugin/Perl6/Perl6HelpDialog.pm
r5843 r5844 23 23 _help_viewer => '_help_viewer', # HTML Help Viewer 24 24 _plugin => '_plugin', # plugin object 25 _topic => '_topic', # default help topic 25 26 }; 26 27 … … 43 44 $self->SetIcon( Wx::GetWxPerlIcon() ); 44 45 $self->_plugin($plugin); 46 $self->_topic($opt{topic} // ''); 45 47 46 48 # create dialog 47 49 $self->_create; 48 50 49 $self->_search_text->SetValue($opt{topic} // ''); 50 51 # fit and center the dialog 52 $self->Fit; 53 $self->CentreOnParent; 54 51 55 return $self; 52 56 } … … 98 102 99 103 # wrap everything in a box to add some padding 100 $self->SetSizerAndFit($self->_hbox); 101 $self->_hbox->SetSizeHints($self); 102 103 # center the dialog 104 $self->Centre; 105 104 $self->SetMinSize( [ 640, 480 ] ); 105 $self->SetSizer( $self->_hbox ); 106 106 107 # focus on the search text box 107 108 $self->_search_text->SetFocus(); 108 109 110 $self->_search_text->SetValue( $self->_topic ); 109 111 $self->_update_list_box; 110 112 } … … 134 136 my $matches_label = Wx::StaticText->new( $self, -1, 135 137 Wx::gettext('&Matching Help Topics:') ); 136 $self->_list( Wx::ListBox->new( $self, -1, [-1, -1], [200, 300], [], 137 Wx::wxLB_SINGLE ) ); 138 $self->_list( 139 Wx::ListBox->new( 140 $self, 141 -1, 142 Wx::wxDefaultPosition, 143 Wx::wxDefaultSize, 144 [], 145 Wx::wxLB_SINGLE 146 ) 147 ); 138 148 139 149 # HTML Help Viewer 140 150 require Padre::Wx::HtmlWindow; 141 $self->_help_viewer( Padre::Wx::HtmlWindow->new($self, -1, [-1,-1], [350, 300], Wx::wxBORDER_STATIC ) ); 151 $self->_help_viewer( 152 Padre::Wx::HtmlWindow->new( 153 $self, 154 -1, 155 Wx::wxDefaultPosition, 156 Wx::wxDefaultSize, 157 Wx::wxBORDER_STATIC 158 ) 159 ); 142 160 $self->_help_viewer->SetPage(''); 143 161 144 162 145 $self->_vbox->AddSpacer(10);146 163 $self->_vbox->Add( $search_label, 0, Wx::wxALL|Wx::wxEXPAND, 2 ); 147 164 $self->_vbox->Add( $self->_search_text, 0, Wx::wxALL|Wx::wxEXPAND, 2 ); 148 165 $self->_vbox->Add( $matches_label, 0, Wx::wxALL|Wx::wxEXPAND, 2 ); 149 $self->_vbox->Add( $self->_list, 0, Wx::wxALL|Wx::wxEXPAND, 2 );166 $self->_vbox->Add( $self->_list, 1, Wx::wxALL|Wx::wxEXPAND, 2 ); 150 167 $self->_hbox->Add( $self->_vbox, 0, Wx::wxALL|Wx::wxEXPAND, 2 ); 151 $self->_hbox->Add( $self->_help_viewer, 0, Wx::wxALL|Wx::wxEXPAND, 0 ); 168 $self->_hbox->Add( $self->_help_viewer, 1, 169 Wx::wxALL | Wx::wxALIGN_TOP | Wx::wxALIGN_CENTER_HORIZONTAL | Wx::wxEXPAND, 1 ); 152 170 153 171 $self->_setup_events();
Note: See TracChangeset
for help on using the changeset viewer.
