X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7b28757f5e64bac68d9b159240616fc4d9ad66bc..08a092f9f4de6c80a2d43d4072c379ac84e6cc2f:/contrib/samples/ogl/studio/studio.cpp?ds=sidebyside diff --git a/contrib/samples/ogl/studio/studio.cpp b/contrib/samples/ogl/studio/studio.cpp index 18dd46d166..61f0f6a820 100644 --- a/contrib/samples/ogl/studio/studio.cpp +++ b/contrib/samples/ogl/studio/studio.cpp @@ -112,10 +112,16 @@ bool csApp::OnInit(void) (void) new wxDocTemplate(m_docManager, "Diagram", "*.dia", "", "dia", "Diagram Doc", "Diagram View", CLASSINFO(csDiagramDocument), CLASSINFO(csDiagramView)); - // Create the main frame window + // Create the main frame window. + // Note that we use a frame style that doesn't have wxCLIP_CHILDREN in it + // (the default frame style contains wxCLIP_CHILDREN), otherwise the client + // area doesn't refresh properly when we change its position, under Windows. + +#define wxDEFAULT_FRAME_STYLE_NO_CLIP \ + (wxSYSTEM_MENU | wxRESIZE_BORDER | wxMINIMIZE_BOX | wxMAXIMIZE_BOX | wxTHICK_FRAME | wxSYSTEM_MENU | wxCAPTION) csFrame* frame = new csFrame(m_docManager, NULL, -1, "OGL Studio", m_mainFramePos, m_mainFrameSize, - wxDEFAULT_FRAME_STYLE | wxHSCROLL | wxVSCROLL); + wxDEFAULT_FRAME_STYLE_NO_CLIP | wxHSCROLL | wxVSCROLL); // Give it an icon frame->SetIcon(wxICON(studio)); @@ -162,9 +168,11 @@ bool csApp::OnInit(void) // The ordering of these is important for layout purposes CreateDiagramToolBar(frame); CreatePalette(frame); - CreateProjectWindow(frame); + /* + CreateProjectWindow(frame); FillProjectTreeCtrl(); + */ // Create the shape editing menu m_shapeEditMenu = new ShapeEditMenu; @@ -447,6 +455,10 @@ void csApp::CreateDiagramToolBar(wxFrame* parent) "", wxPoint(controlX, 1), wxSize(pointSizeW, pointSizeH), maxPointSize, pointSizes); delete[] pointSizes; +#ifdef __WXGTK__ + m_diagramToolBar->AddControl(m_pointSizeComboBox); +#endif + m_pointSizeComboBox->SetSelection(10 - 1); // Create a combobox for zooming @@ -466,6 +478,10 @@ void csApp::CreateDiagramToolBar(wxFrame* parent) "", wxPoint(controlX, 1), wxSize(zoomW, zoomH), noStrings, zoomStrings); delete[] zoomStrings; +#ifdef __WXGTK__ + m_diagramToolBar->AddControl(m_zoomComboBox); +#endif + // i = (zoom - minZoom)/increment // index = noStrings - i - 1 // 100%