From: Vadim Zeitlin Date: Tue, 9 Nov 1999 18:10:50 +0000 (+0000) Subject: compilation fixes, Makefile.in added X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/7bf07d2635c6ddb733e8b00923b2c6e0842b3a95?ds=sidebyside compilation fixes, Makefile.in added git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4459 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/utils/dialoged/src/Makefile.in b/utils/dialoged/src/Makefile.in new file mode 100644 index 0000000000..51c3fdb7e3 --- /dev/null +++ b/utils/dialoged/src/Makefile.in @@ -0,0 +1,21 @@ +# +# File: makefile.unx +# Author: Julian Smart +# Created: 1998 +# Updated: +# Copyright: (c) 1998 Julian Smart +# +# "%W% %G%" +# +# Makefile for Tex2RTF (Unix) + +top_srcdir = @top_srcdir@ +top_builddir = ../../.. +program_dir = utils/dialoged/src + +PROGRAM=DialogEd + +OBJECTS = dialoged.o dlghndlr.o edlist.o edtree.o reseditr.o reswrite.o symbtabl.o winprop.o winstyle.o + +include ../../../src/makeprog.env + diff --git a/utils/dialoged/src/dialoged.cpp b/utils/dialoged/src/dialoged.cpp index 2102995171..776852971d 100644 --- a/utils/dialoged/src/dialoged.cpp +++ b/utils/dialoged/src/dialoged.cpp @@ -27,6 +27,11 @@ IMPLEMENT_APP(MyApp) +BEGIN_EVENT_TABLE(MyApp, wxApp) + EVT_MENU(OBJECT_MENU_EDIT, MyApp::OnObjectPopupMenu) + EVT_MENU(OBJECT_MENU_DELETE, MyApp::OnObjectPopupMenu) +END_EVENT_TABLE() + MyApp::MyApp(void) { } diff --git a/utils/dialoged/src/dialoged.h b/utils/dialoged/src/dialoged.h index adfcb9ace9..fae9807806 100644 --- a/utils/dialoged/src/dialoged.h +++ b/utils/dialoged/src/dialoged.h @@ -19,6 +19,8 @@ #include "wx/proplist.h" #include "reseditr.h" +extern void ObjectMenuProc(wxMenu *menu, wxCommandEvent& event); + class MyChild; // Define a new application @@ -28,6 +30,14 @@ class MyApp: public wxApp MyApp(void); bool OnInit(void); int OnExit(void); + + void OnObjectPopupMenu(wxCommandEvent& event) + { + return ObjectMenuProc((wxMenu *)event.GetEventObject(), event); + } + +private: + DECLARE_EVENT_TABLE() }; DECLARE_APP(MyApp) diff --git a/utils/dialoged/src/dlghndlr.cpp b/utils/dialoged/src/dlghndlr.cpp index 794043ecb0..721af4b4b0 100644 --- a/utils/dialoged/src/dlghndlr.cpp +++ b/utils/dialoged/src/dlghndlr.cpp @@ -331,8 +331,8 @@ void wxResourceEditorDialogHandler::OnMouseEvent(wxMouseEvent& event) return; } - long x, y; - event.Position(&x, &y); + wxCoord x, y; + event.GetPosition(&x, &y); // Find which selection handle we're on, if any wxNode *node = handlerDialog->GetChildren().First(); @@ -401,7 +401,7 @@ void wxResourceEditorDialogHandler::OnItemEvent(wxControl *item, wxMouseEvent& e // Not a selection handle event: just a normal item event. // Transform to panel coordinates. - int x, y; + wxCoord x, y; item->GetPosition(&x, &y); event.m_x = event.m_x + x; @@ -414,8 +414,8 @@ void wxResourceEditorDialogHandler::ProcessItemEvent(wxControl *item, wxMouseEve { wxResourceEditorControlHandler *childHandler = (wxResourceEditorControlHandler *)item->GetEventHandler(); - long x, y; - event.Position(&x, &y); + wxCoord x, y; + event.GetPosition(&x, &y); int keys = 0; if (event.ShiftDown()) keys = keys | wxKEY_SHIFT; if (event.ControlDown()) keys = keys | wxKEY_CTRL; diff --git a/utils/dialoged/src/reseditr.cpp b/utils/dialoged/src/reseditr.cpp index 069cbfbfae..cd539913b8 100644 --- a/utils/dialoged/src/reseditr.cpp +++ b/utils/dialoged/src/reseditr.cpp @@ -54,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__) @@ -159,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"); @@ -326,7 +325,6 @@ bool wxResourceManager::ShowResourceEditor(bool show, wxWindow *WXUNUSED(parent) } else { - wxFrame *fr = m_editorFrame; if (m_editorFrame->Close()) { m_editorFrame = NULL; @@ -2228,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;