compilation fixes, Makefile.in added

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4459 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 1999-11-09 18:10:50 +00:00
parent e75491071d
commit 7bf07d2635
5 changed files with 44 additions and 10 deletions

View File

@ -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

View File

@ -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)
{
}

View File

@ -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)

View File

@ -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;

View File

@ -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;