Add wxCLOSE_BOX to wxFL samples (consider using wxDEFAULT_FRAME_STYLE).
Whitespace/typo fixes. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34912 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -129,7 +129,7 @@ MyFrame::MyFrame(wxFrame *frame)
|
|||||||
: wxFrame( frame, wxID_ANY, _("wxWidgets 2.0 wxFrameLayout Test Application"), wxDefaultPosition,
|
: wxFrame( frame, wxID_ANY, _("wxWidgets 2.0 wxFrameLayout Test Application"), wxDefaultPosition,
|
||||||
wxSize( 700, 500 ),
|
wxSize( 700, 500 ),
|
||||||
wxCLIP_CHILDREN | wxMINIMIZE_BOX | wxMAXIMIZE_BOX |
|
wxCLIP_CHILDREN | wxMINIMIZE_BOX | wxMAXIMIZE_BOX |
|
||||||
wxTHICK_FRAME | wxSYSTEM_MENU | wxCAPTION,
|
wxTHICK_FRAME | wxSYSTEM_MENU | wxCAPTION | wxCLOSE_BOX,
|
||||||
wxT("freimas") )
|
wxT("freimas") )
|
||||||
{
|
{
|
||||||
mpClientWnd = CreateTextCtrl( _("Client window") );
|
mpClientWnd = CreateTextCtrl( _("Client window") );
|
||||||
|
@@ -622,7 +622,7 @@ wxWindow* MyFrame::CreateDevLayout( wxFrameLayout& layout, wxWindow* pParent )
|
|||||||
{
|
{
|
||||||
bool isNested = (pParent != mpInternalFrm);
|
bool isNested = (pParent != mpInternalFrm);
|
||||||
|
|
||||||
// check if we're craeting nested layout
|
// check if we're creating nested layout
|
||||||
if ( isNested )
|
if ( isNested )
|
||||||
{
|
{
|
||||||
layout.mBorderPen.SetColour( 128,255,128 );
|
layout.mBorderPen.SetColour( 128,255,128 );
|
||||||
|
@@ -107,7 +107,7 @@ MyFrame::MyFrame( wxWindow* parent, const wxChar *title )
|
|||||||
: wxFrame( parent, wxID_ANY, title, wxDefaultPosition,
|
: wxFrame( parent, wxID_ANY, title, wxDefaultPosition,
|
||||||
wxSize( 700, 500 ),
|
wxSize( 700, 500 ),
|
||||||
wxCLIP_CHILDREN | wxMINIMIZE_BOX | wxMAXIMIZE_BOX |
|
wxCLIP_CHILDREN | wxMINIMIZE_BOX | wxMAXIMIZE_BOX |
|
||||||
wxTHICK_FRAME | wxSYSTEM_MENU | wxCAPTION,
|
wxTHICK_FRAME | wxSYSTEM_MENU | wxCAPTION | wxCLOSE_BOX,
|
||||||
wxT("freimas") )
|
wxT("freimas") )
|
||||||
{
|
{
|
||||||
mpInternalFrm = (wxPanel*)this;
|
mpInternalFrm = (wxPanel*)this;
|
||||||
|
@@ -108,7 +108,7 @@ MyFrame::MyFrame( wxWindow* parent, const wxChar *title )
|
|||||||
: wxFrame( parent, wxID_ANY, title, wxDefaultPosition,
|
: wxFrame( parent, wxID_ANY, title, wxDefaultPosition,
|
||||||
wxSize( 700, 500 ),
|
wxSize( 700, 500 ),
|
||||||
wxCLIP_CHILDREN | wxMINIMIZE_BOX | wxMAXIMIZE_BOX |
|
wxCLIP_CHILDREN | wxMINIMIZE_BOX | wxMAXIMIZE_BOX |
|
||||||
wxTHICK_FRAME | wxSYSTEM_MENU | wxCAPTION,
|
wxTHICK_FRAME | wxSYSTEM_MENU | wxCAPTION | wxCLOSE_BOX,
|
||||||
wxT("freimas") )
|
wxT("freimas") )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -145,12 +145,12 @@ void MyFrame::populateMyFrame()
|
|||||||
//sizes.mIsFixed = i % 2 > 0; // every fifth bar is not fixed-size
|
//sizes.mIsFixed = i % 2 > 0; // every fifth bar is not fixed-size
|
||||||
|
|
||||||
if ( !sizes.mIsFixed ) name += wxT(" (flexible)");
|
if ( !sizes.mIsFixed ) name += wxT(" (flexible)");
|
||||||
// mpLayout->AddBar( CreateTextCtrl(name),// bar window
|
// mpLayout->AddBar( CreateTextCtrl(name), // bar window
|
||||||
mpLayout->AddBar( new wxTextCtrl(this, wxID_ANY, name),// bar window
|
mpLayout->AddBar( new wxTextCtrl(this, wxID_ANY, name), // bar window
|
||||||
sizes, i % MAX_PANES,// alignment ( 0-top,1-bottom, etc)
|
sizes, i % MAX_PANES, // alignment ( 0-top,1-bottom, etc)
|
||||||
0, // insert into 0th row (vert. position)
|
0, // insert into 0th row (vert. position)
|
||||||
0, // offset from the start of row (in pixels)
|
0, // offset from the start of row (in pixels)
|
||||||
name // name to refere in customization pop-ups
|
name // name to refere in customization pop-ups
|
||||||
);
|
);
|
||||||
|
|
||||||
mpLayout->RecalcLayout(true);
|
mpLayout->RecalcLayout(true);
|
||||||
|
@@ -113,7 +113,7 @@ MyFrame::MyFrame( wxWindow* parent, const wxChar *title )
|
|||||||
: wxFrame( parent, wxID_ANY, title, wxDefaultPosition,
|
: wxFrame( parent, wxID_ANY, title, wxDefaultPosition,
|
||||||
wxSize( 700, 500 ),
|
wxSize( 700, 500 ),
|
||||||
wxCLIP_CHILDREN | wxMINIMIZE_BOX | wxMAXIMIZE_BOX |
|
wxCLIP_CHILDREN | wxMINIMIZE_BOX | wxMAXIMIZE_BOX |
|
||||||
wxTHICK_FRAME | wxSYSTEM_MENU | wxCAPTION,
|
wxTHICK_FRAME | wxSYSTEM_MENU | wxCAPTION | wxCLOSE_BOX,
|
||||||
wxT("freimas") )
|
wxT("freimas") )
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -145,39 +145,39 @@ MyFrame::MyFrame( wxWindow* parent, const wxChar *title )
|
|||||||
sizes.mIsFixed = (i !=3); // every fifth bar is not fixed-size
|
sizes.mIsFixed = (i !=3); // every fifth bar is not fixed-size
|
||||||
|
|
||||||
if ( !sizes.mIsFixed ) name += wxT(" (flexible)");
|
if ( !sizes.mIsFixed ) name += wxT(" (flexible)");
|
||||||
// mpLayout->AddBar( CreateTextCtrl(name),// bar window
|
// mpLayout->AddBar( CreateTextCtrl(name), // bar window
|
||||||
if(i != 4 && i!= 5 && i!=11) {
|
if(i != 4 && i!= 5 && i!=11) {
|
||||||
mpLayout->AddBar( new wxTextCtrl(this, wxID_ANY, name),// bar window
|
mpLayout->AddBar( new wxTextCtrl(this, wxID_ANY, name), // bar window
|
||||||
sizes,
|
sizes,
|
||||||
i % MAX_PANES,// alignment ( 0-top,1-bottom, etc)
|
i % MAX_PANES, // alignment ( 0-top,1-bottom, etc)
|
||||||
0, // insert into 0th row (vert. position)
|
0, // insert into 0th row (vert. position)
|
||||||
0, // offset from the start of row (in pixels)
|
0, // offset from the start of row (in pixels)
|
||||||
name // name to refere in customization pop-ups
|
name // name to refere in customization pop-ups
|
||||||
);
|
);
|
||||||
} else if(i==4){
|
} else if(i==4){
|
||||||
mpLayout->AddBar( new wxTextCtrl(this, wxID_ANY, name),// bar window
|
mpLayout->AddBar( new wxTextCtrl(this, wxID_ANY, name), // bar window
|
||||||
cbDimInfo( 100,100, 100,100, 100,100, true, 5, 5),
|
cbDimInfo( 100,100, 100,100, 100,100, true, 5, 5),
|
||||||
i % MAX_PANES,// alignment ( 0-top,1-bottom, etc)
|
i % MAX_PANES, // alignment ( 0-top,1-bottom, etc)
|
||||||
0, // insert into 0th row (vert. position)
|
0, // insert into 0th row (vert. position)
|
||||||
0, // offset from the start of row (in pixels)
|
0, // offset from the start of row (in pixels)
|
||||||
name // name to refere in customization pop-ups
|
name // name to refere in customization pop-ups
|
||||||
);
|
);
|
||||||
} else if(i==5) {
|
} else if(i==5) {
|
||||||
my_butt = new wxButton(this, ID_BUTT, name);
|
my_butt = new wxButton(this, ID_BUTT, name);
|
||||||
mpLayout->AddBar( my_butt,// bar window
|
mpLayout->AddBar( my_butt, // bar window
|
||||||
cbDimInfo( 100,100, 200,200, 400,400, true, 5, 5),
|
cbDimInfo( 100,100, 200,200, 400,400, true, 5, 5),
|
||||||
i % MAX_PANES,// alignment ( 0-top,1-bottom, etc)
|
i % MAX_PANES, // alignment ( 0-top,1-bottom, etc)
|
||||||
0, // insert into 0th row (vert. position)
|
0, // insert into 0th row (vert. position)
|
||||||
0, // offset from the start of row (in pixels)
|
0, // offset from the start of row (in pixels)
|
||||||
name // name to refere in customization pop-ups
|
name // name to refere in customization pop-ups
|
||||||
);
|
);
|
||||||
} else if(i==11) {
|
} else if(i==11) {
|
||||||
mpLayout->AddBar( new wxButton(this, ID_BUTT2, name+wxT("_2")),
|
mpLayout->AddBar( new wxButton(this, ID_BUTT2, name+wxT("_2")),
|
||||||
cbDimInfo( 100,100, 200,200, 400,400, true, 5, 5),
|
cbDimInfo( 100,100, 200,200, 400,400, true, 5, 5),
|
||||||
i % MAX_PANES,// alignment ( 0-top,1-bottom, etc)
|
i % MAX_PANES, // alignment ( 0-top,1-bottom, etc)
|
||||||
0, // insert into 0th row (vert. position)
|
0, // insert into 0th row (vert. position)
|
||||||
0, // offset from the start of row (in pixels)
|
0, // offset from the start of row (in pixels)
|
||||||
name // name to refere in customization pop-ups
|
name // name to refere in customization pop-ups
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -316,15 +316,15 @@ void MyFrame::OnButt2( wxCommandEvent& WXUNUSED(event) )
|
|||||||
wxYield(); // HACK !!! needed to resize BEFORE redraw
|
wxYield(); // HACK !!! needed to resize BEFORE redraw
|
||||||
mpLayout->RefreshNow( true ); // HACK !!! needed to trigger redraw
|
mpLayout->RefreshNow( true ); // HACK !!! needed to trigger redraw
|
||||||
|
|
||||||
// // mpLayout->SetBarState(x, wxCBAR_FLOATING, true);
|
// mpLayout->SetBarState(x, wxCBAR_FLOATING, true);
|
||||||
// // mpLayout->RecalcLayout(true);
|
// mpLayout->RecalcLayout(true);
|
||||||
// // mpLayout->RepositionFloatedBar(x);
|
// mpLayout->RepositionFloatedBar(x);
|
||||||
// // mpLayout->RecalcLayout(true);
|
// mpLayout->RecalcLayout(true);
|
||||||
// // mpLayout->RepositionFloatedBar(x);
|
// mpLayout->RepositionFloatedBar(x);
|
||||||
// // mpLayout->SetBarState(x, 0, true);
|
// mpLayout->SetBarState(x, 0, true);
|
||||||
// // wxYield();
|
// wxYield();
|
||||||
// // mpLayout->RefreshNow( true );
|
// mpLayout->RefreshNow( true );
|
||||||
// // mpLayout->RecalcLayout(true);
|
// mpLayout->RecalcLayout(true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user