git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4459
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
--- /dev/null
+#
+# 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
+
+BEGIN_EVENT_TABLE(MyApp, wxApp)
+ EVT_MENU(OBJECT_MENU_EDIT, MyApp::OnObjectPopupMenu)
+ EVT_MENU(OBJECT_MENU_DELETE, MyApp::OnObjectPopupMenu)
+END_EVENT_TABLE()
+
#include "wx/proplist.h"
#include "reseditr.h"
#include "wx/proplist.h"
#include "reseditr.h"
+extern void ObjectMenuProc(wxMenu *menu, wxCommandEvent& event);
+
class MyChild;
// Define a new application
class MyChild;
// Define a new application
MyApp(void);
bool OnInit(void);
int OnExit(void);
MyApp(void);
bool OnInit(void);
int OnExit(void);
+
+ void OnObjectPopupMenu(wxCommandEvent& event)
+ {
+ return ObjectMenuProc((wxMenu *)event.GetEventObject(), event);
+ }
+
+private:
+ DECLARE_EVENT_TABLE()
- 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();
// Find which selection handle we're on, if any
wxNode *node = handlerDialog->GetChildren().First();
// Not a selection handle event: just a normal item event.
// Transform to panel coordinates.
// Not a selection handle event: just a normal item event.
// Transform to panel coordinates.
item->GetPosition(&x, &y);
event.m_x = event.m_x + x;
item->GetPosition(&x, &y);
event.m_x = event.m_x + x;
{
wxResourceEditorControlHandler *childHandler = (wxResourceEditorControlHandler *)item->GetEventHandler();
{
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;
int keys = 0;
if (event.ShiftDown()) keys = keys | wxKEY_SHIFT;
if (event.ControlDown()) keys = keys | wxKEY_CTRL;
#include "edtree.h"
#include "edlist.h"
#include "edtree.h"
#include "edlist.h"
-static void ObjectMenuProc(wxMenu& menu, wxCommandEvent& event);
wxResourceManager *wxResourceManager::sm_currentResourceManager = NULL;
#if defined(__WXGTK__) || defined(__WXMOTIF__)
wxResourceManager *wxResourceManager::sm_currentResourceManager = NULL;
#if defined(__WXGTK__) || defined(__WXMOTIF__)
m_helpController->Initialize("dialoged");
#endif
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");
m_popupMenu->Append(OBJECT_MENU_EDIT, "Edit properties");
m_popupMenu->Append(OBJECT_MENU_DELETE, "Delete object");
- wxFrame *fr = m_editorFrame;
if (m_editorFrame->Close())
{
m_editorFrame = NULL;
if (m_editorFrame->Close())
{
m_editorFrame = NULL;
-void ObjectMenuProc(wxMenu& menu, wxCommandEvent& event)
+void ObjectMenuProc(wxMenu *menu, wxCommandEvent& event)
- wxWindow *data = (wxWindow *)menu.GetClientData();
+ wxWindow *data = (wxWindow *)menu->GetClientData();