X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/631f1bfed5d2df0215035207355d838328237578..5ed3dab2615f9d2214c8e452daf844d65620cbbb:/utils/dialoged/src/reseditr.cpp diff --git a/utils/dialoged/src/reseditr.cpp b/utils/dialoged/src/reseditr.cpp index 34a5dd365c..6ec0f160a3 100644 --- a/utils/dialoged/src/reseditr.cpp +++ b/utils/dialoged/src/reseditr.cpp @@ -44,16 +44,6 @@ #include #include -#if wxUSE_IOSTREAMH -#if defined(__WXMSW__) && !defined(__GNUWIN32__) -#include -#else -#include -#endif -#else -#include -#endif - #ifdef __WXMSW__ #include "wx/help.h" #endif @@ -64,7 +54,6 @@ #include "edtree.h" #include "edlist.h" -static void ObjectMenuProc(wxMenu& menu, wxCommandEvent& event); wxResourceManager *wxResourceManager::sm_currentResourceManager = NULL; #if defined(__WXGTK__) || defined(__WXMOTIF__) @@ -169,7 +158,7 @@ bool wxResourceManager::Initialize() m_helpController->Initialize("dialoged"); #endif - m_popupMenu = new wxMenu("", (wxFunction)ObjectMenuProc); + m_popupMenu = new wxMenu; m_popupMenu->Append(OBJECT_MENU_EDIT, "Edit properties"); m_popupMenu->Append(OBJECT_MENU_DELETE, "Delete object"); @@ -235,14 +224,14 @@ bool wxResourceManager::SaveOptions() { wxConfig config("DialogEd", "wxWindows"); - config.Write("editorWindowX", m_resourceEditorWindowSize.x); - config.Write("editorWindowY", m_resourceEditorWindowSize.y); - config.Write("editorWindowWidth", m_resourceEditorWindowSize.width); - config.Write("editorWindowHeight", m_resourceEditorWindowSize.height); - config.Write("propertyWindowX", m_propertyWindowSize.x); - config.Write("propertyWindowY", m_propertyWindowSize.y); - config.Write("propertyWindowWidth", m_propertyWindowSize.width); - config.Write("propertyWindowHeight", m_propertyWindowSize.height); + config.Write("editorWindowX", (long) m_resourceEditorWindowSize.x); + config.Write("editorWindowY", (long) m_resourceEditorWindowSize.y); + config.Write("editorWindowWidth", (long) m_resourceEditorWindowSize.width); + config.Write("editorWindowHeight", (long) m_resourceEditorWindowSize.height); + config.Write("propertyWindowX", (long) m_propertyWindowSize.x); + config.Write("propertyWindowY", (long) m_propertyWindowSize.y); + config.Write("propertyWindowWidth", (long) m_propertyWindowSize.width); + config.Write("propertyWindowHeight", (long) m_propertyWindowSize.height); /* wxWriteResource("DialogEd", "editorWindowX", m_resourceEditorWindowSize.x, m_optionsResourceFilename.GetData()); wxWriteResource("DialogEd", "editorWindowY", m_resourceEditorWindowSize.y, m_optionsResourceFilename.GetData()); @@ -336,7 +325,6 @@ bool wxResourceManager::ShowResourceEditor(bool show, wxWindow *WXUNUSED(parent) } else { - wxFrame *fr = m_editorFrame; if (m_editorFrame->Close()) { m_editorFrame = NULL; @@ -1613,7 +1601,7 @@ wxString wxResourceManager::FindBitmapFilenameForResource(wxItemResource *resour wxItemResource *child = (wxItemResource *)node->Data(); return child->GetName(); - node = node->Next(); + //node = node->Next(); } return wxEmptyString; } @@ -2124,7 +2112,7 @@ void wxResourceEditorFrame::OnExit(wxCommandEvent& WXUNUSED(event)) void wxResourceEditorFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) { char buf[300]; - sprintf(buf, "wxWindows Dialog Editor %.1f\nAuthor: Julian Smart J.Smart@ed.ac.uk\nJulian Smart (c) 1996", wxDIALOG_EDITOR_VERSION); + sprintf(buf, "wxWindows Dialog Editor %.1f\nAuthor: Julian Smart \nJulian Smart (c) 1996-1999", wxDIALOG_EDITOR_VERSION); wxMessageBox(buf, "About Dialog Editor", wxOK|wxCENTRE); } @@ -2164,7 +2152,7 @@ void wxResourceEditorFrame::OnCloseWindow(wxCloseEvent& event) } } - if (!Iconized()) + if (!IsIconized()) { int w, h; GetSize(&w, &h); @@ -2188,7 +2176,6 @@ void wxResourceEditorFrame::OnCloseWindow(wxCloseEvent& event) */ BEGIN_EVENT_TABLE(wxResourceEditorScrolledWindow, wxScrolledWindow) - EVT_SCROLL(wxResourceEditorScrolledWindow::OnScroll) EVT_PAINT(wxResourceEditorScrolledWindow::OnPaint) END_EVENT_TABLE() @@ -2207,17 +2194,6 @@ wxResourceEditorScrolledWindow::~wxResourceEditorScrolledWindow() { } -void wxResourceEditorScrolledWindow::OnScroll(wxScrollEvent& event) -{ - wxScrolledWindow::OnScroll(event); - - int x, y; - ViewStart(& x, & y); - - if (m_childWindow) - m_childWindow->Move(m_marginX + (- x * 10), m_marginY + (- y * 10)); -} - void wxResourceEditorScrolledWindow::OnPaint(wxPaintEvent& WXUNUSED(event)) { wxPaintDC dc(this); @@ -2250,9 +2226,9 @@ void wxResourceEditorScrolledWindow::DrawTitle(wxDC& dc) } // Popup menu callback -void ObjectMenuProc(wxMenu& menu, wxCommandEvent& event) +void ObjectMenuProc(wxMenu *menu, wxCommandEvent& event) { - wxWindow *data = (wxWindow *)menu.GetClientData(); + wxWindow *data = (wxWindow *)menu->GetClientData(); if (!data) return; @@ -2280,19 +2256,10 @@ void ObjectMenuProc(wxMenu& menu, wxCommandEvent& event) * */ -#if defined(__WXGTK__) || defined(__WXMOTIF__) // I don't dare to delete it... - -BEGIN_EVENT_TABLE(EditorToolBar, wxToolBar) -END_EVENT_TABLE() - -#else - BEGIN_EVENT_TABLE(EditorToolBar, wxToolBar) - EVT_PAINT(EditorToolBar::OnPaint) +// EVT_PAINT(EditorToolBar::OnPaint) END_EVENT_TABLE() -#endif - EditorToolBar::EditorToolBar(wxFrame *frame, const wxPoint& pos, const wxSize& size, long style): wxToolBar(frame, -1, pos, size, style)