GUI improvements including control of panel sizes and resizing of GL canvas in preview
This commit is contained in:
parent
712f57f002
commit
47f40def0c
|
@ -74,6 +74,7 @@ enum {
|
|||
};
|
||||
|
||||
wxBEGIN_EVENT_TABLE( PANEL_PREV_3D, wxPanel)
|
||||
EVT_SIZE( PANEL_PREV_3D::resize )
|
||||
EVT_CHOICE( ID_SET_DIR, PANEL_PREV_3D::SetRootDir )
|
||||
EVT_BUTTON( ID_CFG_PATHS, PANEL_PREV_3D::Cfg3DPaths )
|
||||
EVT_BUTTON( ID_3D_ISO, PANEL_PREV_3D::View3DISO )
|
||||
|
@ -219,7 +220,7 @@ PANEL_PREV_3D::PANEL_PREV_3D( wxWindow* aParent, bool hasFileSelector ) :
|
|||
|
||||
// add preview items
|
||||
preview = new wxPanel( this, -1 );
|
||||
preview->SetMinSize( wxSize( 320, 240 ) );
|
||||
preview->SetMinSize( wxSize( 320, 200 ) );
|
||||
preview->SetBackgroundColour( wxColor( 0, 0, 0 ));
|
||||
vboxPrev->Add( preview, 1, wxEXPAND | wxALIGN_CENTER | wxLEFT | wxRIGHT, 5 );
|
||||
// buttons:
|
||||
|
@ -626,9 +627,20 @@ void PANEL_PREV_3D::UpdateWindowUI( long flags )
|
|||
modelInfo = info;
|
||||
UpdateModelName( m_FileDlg->GetCurrentlySelectedFilename() );
|
||||
}
|
||||
*/
|
||||
// */
|
||||
|
||||
wxPanel::UpdateWindowUI( flags );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void PANEL_PREV_3D::resize( wxSizeEvent &event )
|
||||
{
|
||||
event.Skip();
|
||||
|
||||
if( NULL != canvas )
|
||||
canvas->SetSize( preview->GetClientSize() );
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -90,6 +90,7 @@ private:
|
|||
|
||||
private:
|
||||
void updateDirChoiceList( void );
|
||||
void resize( wxSizeEvent &event );
|
||||
|
||||
wxDECLARE_EVENT_TABLE();
|
||||
};
|
||||
|
|
|
@ -310,7 +310,8 @@ DIALOG_MODULE_BOARD_EDITOR_BASE::DIALOG_MODULE_BOARD_EDITOR_BASE( wxWindow* pare
|
|||
bSizer18 = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_3D_ShapeNameListBox = new wxListBox( sbSizer3->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_SINGLE );
|
||||
m_3D_ShapeNameListBox->SetMinSize( wxSize( 200,80 ) );
|
||||
m_3D_ShapeNameListBox->SetMinSize( wxSize( 200,110 ) );
|
||||
m_3D_ShapeNameListBox->SetMaxSize( wxSize( -1,110 ) );
|
||||
|
||||
bSizer18->Add( m_3D_ShapeNameListBox, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
@ -330,7 +331,7 @@ DIALOG_MODULE_BOARD_EDITOR_BASE::DIALOG_MODULE_BOARD_EDITOR_BASE( wxWindow* pare
|
|||
bSizer3DButtons->Add( m_buttonRemove, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||
|
||||
m_buttonEdit = new wxButton( sbSizer3->GetStaticBox(), wxID_ANY, _("Edit Filename"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizer3DButtons->Add( m_buttonEdit, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||
bSizer3DButtons->Add( m_buttonEdit, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||
|
||||
|
||||
bSizer19->Add( bSizer3DButtons, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
@ -339,12 +340,12 @@ DIALOG_MODULE_BOARD_EDITOR_BASE::DIALOG_MODULE_BOARD_EDITOR_BASE( wxWindow* pare
|
|||
sbSizer3->Add( bSizer19, 0, wxEXPAND, 5 );
|
||||
|
||||
|
||||
bSizerMain3D->Add( sbSizer3, 1, wxEXPAND, 5 );
|
||||
bSizerMain3D->Add( sbSizer3, 0, wxEXPAND, 5 );
|
||||
|
||||
bLowerSizer3D = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
|
||||
bSizerMain3D->Add( bLowerSizer3D, 0, wxEXPAND, 5 );
|
||||
bSizerMain3D->Add( bLowerSizer3D, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
m_Panel3D->SetSizer( bSizerMain3D );
|
||||
|
|
|
@ -4422,7 +4422,7 @@
|
|||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticBoxSizer" expanded="1">
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">3D Shape Name</property>
|
||||
|
@ -4475,10 +4475,10 @@
|
|||
<property name="id">wxID_ANY</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size">-1,-1</property>
|
||||
<property name="maximum_size">-1,110</property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size">200,80</property>
|
||||
<property name="minimum_size">200,110</property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_3D_ShapeNameListBox</property>
|
||||
<property name="pane_border">1</property>
|
||||
|
@ -4726,7 +4726,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxLEFT|wxRIGHT|wxTOP</property>
|
||||
<property name="flag">wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT|wxTOP</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxButton" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -4821,7 +4821,7 @@
|
|||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxBoxSizer" expanded="0">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bLowerSizer3D</property>
|
||||
|
|
|
@ -247,7 +247,10 @@ DIALOG_MODULE_MODULE_EDITOR_BASE::DIALOG_MODULE_MODULE_EDITOR_BASE( wxWindow* pa
|
|||
wxBoxSizer* bSizer16;
|
||||
bSizer16 = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_3D_ShapeNameListBox = new wxListBox( sbSizer4->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_SINGLE );
|
||||
m_3D_ShapeNameListBox = new wxListBox( sbSizer4->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxSize( -1,120 ), 0, NULL, wxLB_SINGLE );
|
||||
m_3D_ShapeNameListBox->SetMinSize( wxSize( -1,120 ) );
|
||||
m_3D_ShapeNameListBox->SetMaxSize( wxSize( -1,120 ) );
|
||||
|
||||
bSizer16->Add( m_3D_ShapeNameListBox, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
|
@ -272,12 +275,12 @@ DIALOG_MODULE_MODULE_EDITOR_BASE::DIALOG_MODULE_MODULE_EDITOR_BASE( wxWindow* pa
|
|||
sbSizer4->Add( bSizer15, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
bSizerMain3D->Add( sbSizer4, 1, wxEXPAND, 5 );
|
||||
bSizerMain3D->Add( sbSizer4, 0, wxEXPAND, 5 );
|
||||
|
||||
bLowerSizer3D = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
|
||||
bSizerMain3D->Add( bLowerSizer3D, 0, wxALL|wxEXPAND, 5 );
|
||||
bSizerMain3D->Add( bLowerSizer3D, 1, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
m_Panel3D->SetSizer( bSizerMain3D );
|
||||
|
|
|
@ -3455,7 +3455,7 @@
|
|||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticBoxSizer" expanded="1">
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">3D Shape Names</property>
|
||||
|
@ -3468,16 +3468,16 @@
|
|||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<object class="wxBoxSizer" expanded="0">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizer15</property>
|
||||
<property name="orient">wxHORIZONTAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<object class="wxBoxSizer" expanded="0">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizer16</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
|
@ -3517,10 +3517,10 @@
|
|||
<property name="id">wxID_ANY</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="maximum_size">-1,120</property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="minimum_size">-1,120</property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_3D_ShapeNameListBox</property>
|
||||
<property name="pane_border">1</property>
|
||||
|
@ -3531,7 +3531,7 @@
|
|||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="size">-1,120</property>
|
||||
<property name="style">wxLB_SINGLE</property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
|
@ -3757,11 +3757,11 @@
|
|||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxButton" expanded="1">
|
||||
<object class="wxButton" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
|
@ -3854,7 +3854,7 @@
|
|||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bLowerSizer3D</property>
|
||||
|
|
Loading…
Reference in New Issue