X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8552e6f031ded8ae61b4a5b489fbf06962365da7..a6905d8b558f1a0d258365b815bff0b5b5c76a0b:/contrib/samples/ogl/studio/dialogs.cpp diff --git a/contrib/samples/ogl/studio/dialogs.cpp b/contrib/samples/ogl/studio/dialogs.cpp index 753bdf1022..c555e6c600 100644 --- a/contrib/samples/ogl/studio/dialogs.cpp +++ b/contrib/samples/ogl/studio/dialogs.cpp @@ -24,14 +24,14 @@ #include #endif -#include -#include #include "dialogs.h" #include "doc.h" #include "view.h" #include "studio.h" #include "studio_resources.h" +#if wxUSE_WX_RESOURCES + IMPLEMENT_CLASS(csLabelEditingDialog, wxDialog) BEGIN_EVENT_TABLE(csLabelEditingDialog, wxDialog) @@ -90,7 +90,7 @@ END_EVENT_TABLE() // For 400x400 settings dialog, size your panels to about 375x325 in dialog editor csSettingsDialog::csSettingsDialog(wxWindow* parent): - wxDialog(parent, -1, _T("Settings"), wxPoint(0, 0), wxSize(PROPERTY_DIALOG_WIDTH, PROPERTY_DIALOG_HEIGHT)) + wxDialog(parent, wxID_ANY, _T("Settings"), wxPoint(0, 0), wxSize(PROPERTY_DIALOG_WIDTH, PROPERTY_DIALOG_HEIGHT)) { m_generalSettings = NULL; m_diagramSettings = NULL; @@ -101,16 +101,16 @@ csSettingsDialog::csSettingsDialog(wxWindow* parent): m_generalSettings = new wxPanel; #ifdef __WXDEBUG__ - bool success = + bool success = #endif wxLoadFromResource(m_generalSettings, m_notebook, _T("general_settings_dialog")); wxASSERT_MSG( (success), _T("Could not load general settings panel.")); - m_notebook->AddPage(m_generalSettings, _T("General"), TRUE); + m_notebook->AddPage(m_generalSettings, _T("General"), true); m_diagramSettings = new wxPanel; #ifdef __WXDEBUG__ - success = + success = #endif wxLoadFromResource(m_diagramSettings, m_notebook, _T("diagram_settings_dialog")); wxASSERT_MSG( (success), _T("Could not load diagram settings panel.")); @@ -181,7 +181,7 @@ bool csSettingsDialog::TransferDataToWindow() str.Printf(_T("%d"), wxGetApp().GetGridSpacing()); gridSpacing->SetValue(str); - return TRUE; + return true; } bool csSettingsDialog::TransferDataFromWindow() @@ -201,11 +201,11 @@ bool csSettingsDialog::TransferDataFromWindow() if (wxGetApp().GetGridStyle() == csGRID_STYLE_DOTTED) { wxMessageBox(_T("Dotted grid style not yet implemented."), _T("Studio"), wxICON_EXCLAMATION); - return FALSE; + return false; } // Apply settings to all open diagram documents - wxNode* node = wxGetApp().GetDocManager()->GetDocuments().GetFirst(); + wxObjectList::compatibility_iterator node = wxGetApp().GetDocManager()->GetDocuments().GetFirst(); while (node) { wxDocument* doc = (wxDocument*) node->GetData(); @@ -219,12 +219,12 @@ bool csSettingsDialog::TransferDataFromWindow() { case csGRID_STYLE_NONE: { - diagram->SetSnapToGrid(FALSE); + diagram->SetSnapToGrid(false); break; } case csGRID_STYLE_INVISIBLE: { - diagram->SetSnapToGrid(TRUE); + diagram->SetSnapToGrid(true); break; } case csGRID_STYLE_DOTTED: @@ -237,7 +237,7 @@ bool csSettingsDialog::TransferDataFromWindow() node = node->GetNext(); } - return TRUE; + return true; } /* @@ -257,8 +257,8 @@ END_EVENT_TABLE() // For 400x400 settings dialog, size your panels to about 375x325 in dialog editor csShapePropertiesDialog::csShapePropertiesDialog(wxWindow* parent, const wxString& title, - wxPanel* attributeDialog, const wxString& attributeDialogName): - wxDialog(parent, -1, title, wxPoint(0, 0), wxSize(SHAPE_PROPERTY_DIALOG_WIDTH, SHAPE_PROPERTY_DIALOG_HEIGHT)) + wxPanel* attributeDialog, const wxString& attributeDialogName): + wxDialog(parent, wxID_ANY, title, wxPoint(0, 0), wxSize(SHAPE_PROPERTY_DIALOG_WIDTH, SHAPE_PROPERTY_DIALOG_HEIGHT)) { m_attributeDialog = attributeDialog; m_alternativeAttributeDialog = NULL; @@ -269,7 +269,7 @@ csShapePropertiesDialog::csShapePropertiesDialog(wxWindow* parent, const wxStrin m_generalPropertiesDialog = new csGeneralShapePropertiesDialog; #ifdef __WXDEBUG__ - bool success = + bool success = #endif wxLoadFromResource(m_generalPropertiesDialog, m_notebook, _T("general_shape_properties_dialog")); wxASSERT_MSG( (success), _T("Could not load general properties panel.")); @@ -365,7 +365,7 @@ void csShapePropertiesDialog::SetDefaults() if (!m_attributeDialog) return; - wxWindowListNode* node = m_attributeDialog->GetChildren().GetFirst(); + wxWindowList::compatibility_iterator node = m_attributeDialog->GetChildren().GetFirst(); while (node) { wxWindow* child = (wxWindow*) node->GetData(); @@ -416,6 +416,8 @@ void csGeneralShapePropertiesDialog::SetShapeLabel(const wxString& label) textCtrl->SetValue(label); } +#endif // wxUSE_WX_RESOURCES + /* * csThinRectangleDialog */