OGL fixes for wxMotif; added Set/GetClientData to wxMenu in wxMSW/wxMotif/wxStubs.

Sorry, I may be overwriting changes Robert made due to a file copying error.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@971 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
1998-11-08 22:35:18 +00:00
parent d18ed59a36
commit 3dd4e4e05c
36 changed files with 192 additions and 233 deletions

View File

@@ -25,6 +25,8 @@ zip32 -@ %dest\wx200hlp.zip < %src\distrib\msw\wx_hlp.rsp
zip32 -@ %dest\wx200htm.zip < %src\distrib\msw\wx_html.rsp
zip32 -@ %dest\wx200pdf.zip < %src\distrib\msw\wx_pdf.rsp
zip32 -@ %dest\ogl3.zip < %src\utils\ogl\distrib\ogl.rsp
cd %dest
echo wxWindows archived.

View File

@@ -1,7 +1,7 @@
wxMotif TODO
------------
Updated: 20/10/98
Updated: 8/11/98
-------------------------------o-------------------------
@@ -87,7 +87,23 @@ Low Priority
- Get Dialog Editor working under Motif.
- New wxHelp version: try using the XmHTML widget at
http://www.xs4all.nl/~ripley/XmHTML/
http://www.xs4all.nl/~ripley/XmHTML/.
We need to:
- make a minimal distribution under wx/src/xmhtml, just enough
to compile the source.
- add XMHTML_C_SRC to src/motif/makefile.unx with the source files
listed.
- make sure we can compile the sources, passing the correct
flags for zlib/png compilation.
- make a wxHTMLWindow class from e.g. examples/example_2.c. Should
probably make the cache and history facilities part of the class.
- add the driver code to src/motif/helphtml.cpp (a frame, toolbar,
history list).
Note that a quicker route to a help system may be to use the
code in the contrib dir of XmHTML to control a Netscape session --
but Netscape can be a colour resource hog.
- Optimize screen refresh for non-native widgets, e.g. wxWindow
created with Create(), using technique in flicker patch for 1.68

View File

@@ -15,5 +15,10 @@
#include "wx/generic/colrdlgg.h"
#endif
#ifndef __WXMSW__
#define wxColourDialog wxGenericColourDialog
#define sm_classwxColourDialog sm_classwxColourDialog
#endif
#endif
// _WX_COLORDLG_H_BASE_

View File

@@ -62,6 +62,10 @@ public:
bool Checked(int id) const;
inline bool IsChecked(int id) const { return IsChecked(id); };
// Client data
inline void SetClientData(void* clientData) { m_clientData = clientData; }
inline void* GetClientData() const { return m_clientData; }
// item properties
// title
void SetTitle(const wxString& label);
@@ -120,6 +124,7 @@ public:
wxList m_menuItems;
wxEvtHandler * m_parent;
wxEvtHandler * m_eventHandler;
void* m_clientData;
//// Motif-specific
int m_numColumns;

View File

@@ -18,6 +18,7 @@
#include "wx/list.h"
#include "wx/gdiobj.h"
#include "wx/gdicmn.h"
class WXDLLEXPORT wxRect;
class WXDLLEXPORT wxPoint;

View File

@@ -81,6 +81,33 @@ WXDLLEXPORT_DATA(extern const char*) wxPanelNameStr;
WXDLLEXPORT_DATA(extern const wxSize) wxDefaultSize;
WXDLLEXPORT_DATA(extern const wxPoint) wxDefaultPosition;
//-----------------------------------------------------------------------------
// wxClientData
//-----------------------------------------------------------------------------
class wxClientData
{
public:
wxClientData() { }
virtual ~wxClientData() { }
};
//-----------------------------------------------------------------------------
// wxStringClientData
//-----------------------------------------------------------------------------
class wxStringClientData: public wxClientData
{
public:
wxStringClientData() { }
wxStringClientData( wxString &data ) { m_data = data; }
void SetData( wxString &data ) { m_data = data; }
wxString GetData() const { return m_data; }
private:
wxString m_data;
};
class WXDLLEXPORT wxWindow: public wxEvtHandler
{
DECLARE_ABSTRACT_CLASS(wxWindow)
@@ -279,6 +306,12 @@ public:
void SetValidator(const wxValidator& validator);
inline wxValidator *GetValidator() const;
virtual void SetClientObject( wxClientData *data );
virtual wxClientData *GetClientObject();
virtual void SetClientData( void *data );
virtual void *GetClientData();
// Set/get the window's style
inline void SetWindowStyleFlag(long flag);
inline long GetWindowStyleFlag() const;
@@ -369,7 +402,7 @@ public:
// Does this window want to accept keyboard focus?
virtual bool AcceptsFocus() const;
virtual void PrepareDC( wxDC &WXUNUSED(dc) ) {};
virtual void PrepareDC( wxDC &dc ) {};
public:
@@ -538,6 +571,8 @@ protected:
wxColour m_backgroundColour ;
wxColour m_foregroundColour ;
wxAcceleratorTable m_acceleratorTable;
wxClientData* m_clientObject;
void* m_clientData;
#if wxUSE_DRAG_AND_DROP
wxDropTarget *m_pDropTarget; // the current drop target or NULL

View File

@@ -54,6 +54,10 @@ public:
// delete an item
void Delete(int id); /* If it's a submenu, menu is not destroyed. VZ: why? */
// Client data
inline void SetClientData(void* clientData) { m_clientData = clientData; }
inline void* GetClientData() const { return m_clientData; }
// menu item control
void Enable(int id, bool Flag);
bool Enabled(int id) const;
@@ -120,6 +124,7 @@ public:
wxEvtHandler * m_parent;
wxEvtHandler * m_eventHandler;
wxWindow *m_pInvokingWindow;
void* m_clientData;
};
// ----------------------------------------------------------------------------

View File

@@ -62,6 +62,10 @@ public:
bool Checked(int id) const;
inline bool IsChecked(int id) const { return IsChecked(id); };
// Client data
inline void SetClientData(void* clientData) { m_clientData = clientData; }
inline void* GetClientData() const { return m_clientData; }
// item properties
// title
void SetTitle(const wxString& label);
@@ -97,6 +101,7 @@ public:
wxList m_menuItems;
wxEvtHandler * m_parent;
wxEvtHandler * m_eventHandler;
void* m_clientData;
};
// ----------------------------------------------------------------------------

View File

@@ -57,7 +57,7 @@ bool MyApp::OnInit(void)
frame = new MyFrame((wxFrame *) NULL, -1, (char *) "MDI Demo", wxPoint(-1, -1), wxSize(500, 400),
wxDEFAULT_FRAME | wxHSCROLL | wxVSCROLL);
// Give it an icon (this is ignored in MDI mode: uses resources)
// Give it an icon
#ifdef __WXMSW__
frame->SetIcon(wxIcon("mdi_icn"));
#else

View File

@@ -38,7 +38,7 @@
// ressources
// ----------------------------------------------------------------------------
// the application icon
#ifdef __WXGTK__
#if defined(__WXGTK__) || defined(__WXMOTIF__)
#include "mondrian.xpm"
#endif

View File

@@ -83,7 +83,7 @@ LDLIBS = $(EXTRALDLIBS) $(GUILDLIBS)
.SUFFIXES: .o .cpp .c
.c.o :
$(CC) -c $(CFLAGS) -o $@ $<
$(CCC) -c $(CFLAGS) -o $@ $<
.cpp.o :
$(CC) -c $(CPPFLAGS) -o $@ $<

View File

@@ -158,14 +158,24 @@ LIB_CPP_SRC=\
# listctrl.cpp \
# imaglist.cpp \
# statusbr.cpp \
ZLIB_SRC=\
../zlib/adler32.c ../zlib/deflate.c ../zlib/infblock.c\
../zlib/inflate.c ../zlib/zutil.c ../zlib/compress.c \
../zlib/infcodes.c ../zlib/inftrees.c ../zlib/trees.c \
../zlib/crc32.c ../zlib/gzio.c ../zlib/inffast.c\
../zlib/infutil.c ../zlib/uncompr.c
LIB_C_SRC=\
\
../common/y_tab.c \
../common/extended.c
# Only need to compile zlib files if we don't
# already have a zlib library installed on our system
# (or we wish to statically link them for some reason)
EXTRA_C_SRC=\
xmcombo/xmcombo.c
xmcombo/xmcombo.c # $(ZLIB_SRC)
EXTRA_CPP_SRC=\
mdi/lib/XsComponent.C\

View File

@@ -74,6 +74,7 @@ wxMenu::wxMenu(const wxString& title, const wxFunction func)
m_topLevelMenu = (wxMenu*) NULL;
m_ownedByMenuBar = FALSE;
m_menuParent = (wxMenu*) NULL;
m_clientData = (void*) NULL;
if (m_title != "")
{

View File

@@ -108,6 +108,8 @@ wxWindow::wxWindow()
#if wxUSE_DRAG_AND_DROP
m_pDropTarget = NULL;
#endif
m_clientObject = (wxClientData*) NULL;
m_clientData = NULL;
/// Motif-specific
m_mainWidget = (WXWidget) 0;
@@ -239,8 +241,8 @@ wxWindow::~wxWindow()
// dangling pointers.
wxPendingDelete.DeleteObject(this);
if ( m_windowValidator )
delete m_windowValidator;
if ( m_windowValidator ) delete m_windowValidator;
if (m_clientObject) delete m_clientObject;
}
// Destroy the window (delayed, if a managed window)
@@ -282,6 +284,8 @@ bool wxWindow::Create(wxWindow *parent, wxWindowID id,
m_maxSizeY = -1;
m_defaultItem = NULL;
m_windowParent = NULL;
m_clientObject = (wxClientData*) NULL;
m_clientData = NULL;
// Motif-specific
m_canAddEventHandler = FALSE;
@@ -1929,6 +1933,27 @@ void wxWindow::SetValidator(const wxValidator& validator)
m_windowValidator->SetWindow(this) ;
}
void wxWindow::SetClientObject( wxClientData *data )
{
if (m_clientObject) delete m_clientObject;
m_clientObject = data;
}
wxClientData *wxWindow::GetClientObject()
{
return m_clientObject;
}
void wxWindow::SetClientData( void *data )
{
m_clientData = data;
}
void *wxWindow::GetClientData()
{
return m_clientData;
}
// Find a window by id or name
wxWindow *wxWindow::FindWindow(long id)
{

View File

@@ -73,6 +73,8 @@ wxMenu::wxMenu(const wxString& Title, const wxFunction func)
m_hMenu = (WXHMENU) CreatePopupMenu();
m_savehMenu = 0 ;
m_topLevelMenu = this;
m_clientData = (void*) NULL;
if (m_title != "")
{
Append(idMenuTitle, m_title) ;

View File

@@ -50,6 +50,7 @@ wxMenu::wxMenu(const wxString& title, const wxFunction func)
m_eventHandler = this;
m_noItems = 0;
m_menuBar = NULL;
m_clientData = (void*) NULL;
if (m_title != "")
{
Append(-2, m_title) ;

View File

@@ -88,7 +88,7 @@ local int read_buf OF((z_streamp strm, Bytef *buf, unsigned size));
local uInt longest_match OF((deflate_state *s, IPos cur_match));
#endif
#ifdef DEBUG
#ifdef __WXDEBUG__
local void check_match OF((deflate_state *s, IPos start, IPos match,
int length));
#endif
@@ -918,7 +918,7 @@ local uInt longest_match(s, cur_match)
#endif /* FASTEST */
#endif /* ASMV */
#ifdef DEBUG
#ifdef __WXDEBUG__
/* ===========================================================================
* Check that the match at match_start is indeed a match.
*/

View File

@@ -29,7 +29,7 @@
#ifndef local
# define local static
#endif
/* compile with -Dlocal if your __WXDEBUG__ger can't find static symbols */
/* compile with -Dlocal if your debugger can't find static symbols */
typedef unsigned char uch;
typedef uch FAR uchf;

View File

@@ -16,9 +16,9 @@ utils/ogl/samples/ogledit/*.def
utils/ogl/samples/ogledit/*.xbm
utils/ogl/samples/ogledit/makefile*
utils/ogl/samples/ogledit/*.txt
utils/ogl/samples/ogledit/*.ico
utils/ogl/samples/ogledit/*.bmp
utils/ogl/samples/ogledit/*.xpm
utils/ogl/samples/ogledit/bitmaps/*.bmp
utils/ogl/samples/ogledit/bitmaps/*.gif
utils/ogl/samples/ogledit/bitmaps/*.xbm

View File

@@ -1,79 +1,20 @@
#
# File: makefile.unx
# Author: Julian Smart
# Created: 1993
# Created: 1998
# Updated:
# Copyright: (c) 1993, AIAI, University of Edinburgh
# Copyright: (c) 1998 Julian Smart
#
# "%W% %G%"
#
# Makefile for docview example (UNIX).
# Makefile for OGLEdit example (UNIX).
WXDIR = ../../../..
PROGRAM=ogledit
# All common UNIX compiler flags and options are now in
# this central makefile.
include $(WXDIR)/src/make.env
OBJECTS=$(PROGRAM).o doc.o view.o palette.o
OGLDIR = $(WXDIR)/utils/ogl
OGLINC = $(OGLDIR)/src
OGLLIB = $(OGLDIR)/lib/libogl$(GUISUFFIX).a
EXTRACPPFLAGS=-I$(WXDIR)/utils/ogl/src
EXTRALDLIBS=-logl$(GUISUFFIX)
OBJECTS = $(OBJDIR)/ogledit.$(OBJSUFF) $(OBJDIR)/view.$(OBJSUFF) $(OBJDIR)/doc.$(OBJSUFF) $(OBJDIR)/palette.$(OBJSUFF)
include ../../../../src/makeprog.env
LDFLAGS = $(XLIB) -L$(WXDIR)/lib -L$(OGLDIR)/lib -L$(MFDIR)/lib
XVIEWLDLIBS = -logl_ol -lwx_ol -lxview -lolgx -lX11 -lm $(COMPLIBS)
MOTIFLDLIBS = -logl_motif -lwx_motif -lXm -lXt -lX11 -lm $(COMPLIBS)
HPLDLIBS = -logl_motif -lwx_hp -lXm -lXt -lX11 -lm $(COMPLIBS)
CPPFLAGS = -I$(OGLINC) -I$(PROLOGINC) -I$(MFINC) $(XINCLUDE) $(INC) $(GUI) -DDEBUG='$(DEBUG)' $(DEBUGFLAGS) $(WARN) $(OPTIONS) -DPROLOGIO
.SUFFIXES:
all: $(OBJDIR) ogledit$(GUISUFFIX)
wx_motif:
cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx motif
wx_ol:
cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx xview
motif:
$(MAKE) -f makefile.unx GUISUFFIX=_motif GUI=-Dwx_motif GUISUFFIX=_motif OPT='$(OPT)' LDLIBS='$(MOTIFLDLIBS)' OPTIONS='$(OPTIONS)' DEBUG='$(DEBUG)' WARN='$(WARN)' XLIB='$(XLIB)' XINCLUDE='$(XINCLUDE)' XVIEW_LINK=
xview:
$(MAKE) -f makefile.unx GUI=-Dwx_xview GUISUFFIX=_ol CC=$(CC) OPTIONS='$(OPTIONS)' DEBUG='$(DEBUG)' WARN='$(WARN)' XLIB='$(XLIB)' XINCLUDE='$(XINCLUDE)'
hp:
$(MAKE) -f makefile,unx GUI=-Dwx_motif GUISUFFIX=_hp CC=CC DEBUG='' WARN='-w' \
XINCLUDE='$(HPXINCLUDE)' XLIB='$(HPXLIB)' XVIEW_LINK='' LDLIBS='$(HPLDLIBS)'
$(OBJDIR):
mkdir $(OBJDIR)
ogledit$(GUISUFFIX): $(OBJECTS) $(WXLIB)
$(CC) $(LDFLAGS) -o ogledit$(GUISUFFIX) $(OBJECTS) $(XVIEW_LINK) $(LDLIBS)
$(OBJDIR)/ogledit.$(OBJSUFF): ogledit.$(SRCSUFF) ogledit.h doc.h view.h palette.h
$(CC) -c $(CPPFLAGS) -o $@ ogledit.$(SRCSUFF)
$(OBJDIR)/doc.$(OBJSUFF): doc.$(SRCSUFF) doc.h
$(CC) -c $(CPPFLAGS) -o $@ doc.$(SRCSUFF)
$(OBJDIR)/view.$(OBJSUFF): view.$(SRCSUFF) view.h
$(CC) -c $(CPPFLAGS) -o $@ view.$(SRCSUFF)
$(OBJDIR)/palette.$(OBJSUFF): palette.$(SRCSUFF) palette.h
$(CC) -c $(CPPFLAGS) -o $@ palette.$(SRCSUFF)
clean_motif:
$(MAKE) -f makefile.unx GUISUFFIX=_motif cleanany
clean_ol:
$(MAKE) -f makefile.unx GUISUFFIX=_ol cleanany
clean_hp:
$(MAKE) -f makefile.unx GUISUFFIX=_hp cleanany
cleanany:
rm -f $(OBJECTS) ogledit(GUISUFFIX) core

View File

@@ -33,6 +33,10 @@
#include "doc.h"
#include "view.h"
#if defined(__WXGTK__) || defined(__WXMOTIF__)
#include "ogl.xpm"
#endif
// A macro needed for some compilers (AIX) that need 'main' to be defined
// in the application itself.
IMPLEMENT_APP(MyApp)
@@ -63,12 +67,7 @@ bool MyApp::OnInit(void)
frame = new MyFrame(myDocManager, NULL, "OGLEdit Demo", wxPoint(0, 0), wxSize(500, 400), wxDEFAULT_FRAME_STYLE);
//// Give it an icon
#ifdef __WXMSW__
frame->SetIcon(wxIcon("ogl_icn"));
#endif
#ifdef __X__
frame->SetIcon(wxIcon("ogl.xbm"));
#endif
frame->SetIcon(wxICON(ogl));
//// Make a menubar
wxMenu *file_menu = new wxMenu;

View File

@@ -1,4 +1,4 @@
ogl_icn ICON ogl.ico
ogl ICON ogl.ico
TOOL1 BITMAP "bitmaps/tool1.bmp"
TOOL2 BITMAP "bitmaps/tool2.bmp"

View File

@@ -24,7 +24,7 @@
#include <wx/wx.h>
#endif
#include <wx/tbar95.h>
#include <wx/toolbar.h>
#include <ctype.h>
#include <stdlib.h>
@@ -35,6 +35,15 @@
#include "ogledit.h"
#include "palette.h"
// Include pixmaps
#if defined(__WXGTK__) || defined(__WXMOTIF__)
#include "bitmaps/arrow.xpm"
#include "bitmaps/tool1.xpm"
#include "bitmaps/tool2.xpm"
#include "bitmaps/tool3.xpm"
#include "bitmaps/tool4.xpm"
#endif
/*
* Object editor tool palette
*
@@ -82,13 +91,12 @@ EditorToolPalette *MyApp::CreatePalette(wxFrame *parent)
wxBitmap PaletteTool3("TOOL3");
wxBitmap PaletteTool4("TOOL4");
wxBitmap PaletteArrow("ARROWTOOL");
#endif
#ifdef __X__
wxBitmap PaletteTool1(tool1_bits, tool1_width, tool1_height);
wxBitmap PaletteTool2(tool2_bits, tool2_width, tool2_height);
wxBitmap PaletteTool3(tool3_bits, tool3_width, tool3_height);
wxBitmap PaletteTool4(tool4_bits, tool4_width, tool4_height);
wxBitmap PaletteArrow(arrow_bits, arrow_width, arrow_height);
#elif defined(__WXGTK__) || defined(__WXMOTIF__)
wxBitmap PaletteTool1(tool1_xpm);
wxBitmap PaletteTool2(tool2_xpm);
wxBitmap PaletteTool3(tool3_xpm);
wxBitmap PaletteTool4(tool4_xpm);
wxBitmap PaletteArrow(arrow_xpm);
#endif
EditorToolPalette *palette = new EditorToolPalette(parent, wxPoint(0, 0), wxSize(-1, -1), wxTB_HORIZONTAL);

View File

@@ -77,7 +77,7 @@ void DiagramView::OnDraw(wxDC *dc)
/* You might use THIS code if you were scaling
* graphics of known size to fit on the page.
*/
float w, h;
int w, h;
// We need to adjust for the graphic size, a formula will be added
float maxX = 900;

View File

@@ -24,9 +24,7 @@
#include <wx/wx.h>
#endif
#ifdef PROLOGIO
#include <wx/wxexpr.h>
#endif
#if wxUSE_IOSTREAMH
#include <iostream.h>
@@ -1827,8 +1825,8 @@ void wxShape::WriteRegions(wxExpr *clause)
// region1 = (regionName regionText x y width height minWidth minHeight proportionX proportionY
// formatMode fontSize fontFamily fontStyle fontWeight textColour)
wxExpr *regionExpr = new wxExpr(wxExprList);
regionExpr->Append(new wxExpr(wxExprString, (region->m_regionName ? region->m_regionName : "")));
regionExpr->Append(new wxExpr(wxExprString, (region->m_regionText ? region->m_regionText : "")));
regionExpr->Append(new wxExpr(wxExprString, region->m_regionName));
regionExpr->Append(new wxExpr(wxExprString, region->m_regionText));
regionExpr->Append(new wxExpr(region->m_x));
regionExpr->Append(new wxExpr(region->m_y));
@@ -1846,10 +1844,10 @@ void wxShape::WriteRegions(wxExpr *clause)
regionExpr->Append(new wxExpr((long)(region->m_font ? region->m_font->GetFamily() : wxDEFAULT)));
regionExpr->Append(new wxExpr((long)(region->m_font ? region->m_font->GetStyle() : wxDEFAULT)));
regionExpr->Append(new wxExpr((long)(region->m_font ? region->m_font->GetWeight() : wxNORMAL)));
regionExpr->Append(new wxExpr(wxExprString, region->m_textColour ? region->m_textColour : "BLACK"));
regionExpr->Append(new wxExpr(wxExprString, region->m_textColour));
// New members for pen colour/style
regionExpr->Append(new wxExpr(wxExprString, region->m_penColour ? region->m_penColour : "BLACK"));
regionExpr->Append(new wxExpr(wxExprString, region->m_penColour));
regionExpr->Append(new wxExpr((long)region->m_penStyle));
// Formatted text:

View File

@@ -10,6 +10,7 @@
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "basicp.h"
#endif
// For compilers that support precompilation, includes "wx.h".
@@ -23,9 +24,7 @@
#include <wx/wx.h>
#endif
#ifdef PROLOGIO
#include <wx/wxexpr.h>
#endif
#if wxUSE_IOSTREAMH
#include <iostream.h>

View File

@@ -24,9 +24,7 @@
#include <wx/wx.h>
#endif
#ifdef PROLOGIO
#include <wx/wxexpr.h>
#endif
#include "basic.h"
#include "basicp.h"

View File

@@ -24,9 +24,7 @@
#include <wx/wx.h>
#endif
#ifdef PROLOGIO
#include <wx/wxexpr.h>
#endif
#if wxUSE_IOSTREAMH
#include <iostream.h>

View File

@@ -24,9 +24,7 @@
#include <wx/wx.h>
#endif
#ifdef PROLOGIO
#include <wx/wxexpr.h>
#endif
#include "basic.h"
#include "basicp.h"
@@ -1716,7 +1714,7 @@ void wxDivisionShape::EditEdge(int side)
// Popup menu
void wxDivisionShape::PopupMenu(double x, double y)
{
oglPopupDivisionMenu->SetClientData((char *)this);
oglPopupDivisionMenu->SetClientData((void *)this);
if (m_leftSide)
oglPopupDivisionMenu->Enable(DIVISION_MENU_EDIT_LEFT_EDGE, TRUE);
else

View File

@@ -24,9 +24,7 @@
#include <wx/wx.h>
#endif
#ifdef PROLOGIO
#include <wx/wxexpr.h>
#endif
#include "basic.h"
#include "constrnt.h"

View File

@@ -24,9 +24,7 @@
#include <wx/wx.h>
#endif
#ifdef PROLOGIO
#include <wx/wxexpr.h>
#endif
#include "basic.h"
#include "basicp.h"

View File

@@ -11,6 +11,7 @@
#ifdef __GNUG__
#pragma implementation "drawn.h"
#pragma implementation "drawnp.h"
#endif
// For compilers that support precompilation, includes "wx.h".
@@ -24,9 +25,7 @@
#include <wx/wx.h>
#endif
#ifdef PROLOGIO
#include <wx/wxexpr.h>
#endif
#include "basic.h"
#include "basicp.h"

View File

@@ -11,6 +11,7 @@
#ifdef __GNUG__
#pragma implementation "lines.h"
#pragma implementation "linesp.h"
#endif
// For compilers that support precompilation, includes "wx.h".
@@ -24,9 +25,7 @@
#include <wx/wx.h>
#endif
#ifdef PROLOGIO
#include <wx/wxexpr.h>
#endif
#if wxUSE_IOSTREAMH
#include <iostream.h>
@@ -1424,7 +1423,7 @@ void wxLineShape::WriteAttributes(wxExpr *clause)
head_list->Append(new wxExpr((long)head->GetArrowEnd()));
head_list->Append(new wxExpr(head->GetXOffset()));
head_list->Append(new wxExpr(head->GetArrowSize()));
head_list->Append(new wxExpr(wxExprString, (head->GetName() ? head->GetName() : "")));
head_list->Append(new wxExpr(wxExprString, head->GetName()));
head_list->Append(new wxExpr(head->GetId()));
// New members of wxArrowHead

View File

@@ -1,125 +1,42 @@
#
# File: makefile.unx
# Author: Julian Smart
# Created: 1996
# Created: 1998
# Updated:
# Copyright: (c) 1996 Julian Smart
# Copyright: (c) 1998
#
# "%W% %G%"
#
# Makefile for object graphics library (UNIX).
# Makefile for OGL library, Unix
WXDIR = ../../..
include ../../../src/make.env
# All common UNIX compiler flags and options are now in
# this central makefile.
include $(WXDIR)/src/make.env
OGLLIB=$(WXDIR)/lib/libogl$(GUISUFFIX).a
PRODIR = $(WXDIR)/utils/prologio
PROINC = $(PRODIR)/src
PROLIB = $(PRODIR)/lib/libproio$(GUISUFFIX).a
LIB_CPP_SRC=\
\
basic.o\
basic2.o\
canvas.o\
ogldiag.o\
lines.o\
misc.o\
divided.o\
constrnt.o\
composit.o\
drawn.o\
bmpshape.o\
mfutils.o
MFDIR = $(WXDIR)/utils/mfutils
MFINC = $(MFDIR)/src
all: $(OGLLIB)
OGLDIR = $(WXDIR)/utils/ogl
OGLLIB = $(OGLDIR)/lib/libogl$(GUISUFFIX).a
# Define library objects
OBJECTS=\
$(LIB_CPP_SRC:.cpp=.o)
OBJECTS = $(OBJDIR)/basic.o $(OBJDIR)/basic2.o $(OBJDIR)/canvas.o $(OBJDIR)/lines.o $(OBJDIR)/misc.o\
$(OBJDIR)/divided.o $(OBJDIR)/constrnt.o $(OBJDIR)/composit.o $(OBJDIR)/drawn.o\
$(OBJDIR)/bitmap.o $(OBJDIR)/ogldiag.o
CPPFLAGS = -I$(PROINC) -I$(MFINC) $(XINCLUDE) $(INC) $(GUI) -DDEBUG='$(DEBUG)' $(DEBUGFLAGS) $(WARN) $(OPTIONS) -DPROLOGIO
all: $(OBJDIR) $(OGLLIB)
.SUFFIXES:
wx:
cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx OPT=$(OPT) GUI=$(GUI)
motif:
$(MAKE) -f makefile.unx GUI=-Dwx_motif OPT=$(OPT) GUISUFFIX=_motif LDLIBS='$(MOTIFLDLIBS)' XVIEW_LINK=
xview:
$(MAKE) -f makefile.unx GUI=-Dwx_xview OPT=$(OPT) GUISUFFIX=_ol
hp:
$(MAKE) -f makefile.unx GUI=-Dwx_motif GUISUFFIX=_hp CC=CC DEBUG='$(DEBUG)' DEBUGFLAGS='-g' OPT='' WARN='-w' \
XINCLUDE='$(HPXINCLUDE)' XLIB='$(HPXLIB)' XVIEW_LINK='' \
LDLIBS='$(HPLDLIBS)'
$(OBJDIR):
mkdir $(OBJDIR)
$(OGLLIB): $(OBJECTS)
rm -f $@
$(OGLLIB) : $(OBJECTS)
ar $(AROPTIONS) $@ $(OBJECTS)
$(RANLIB) $@
$(OBJDIR)/basic.o: basic.$(SRCSUFF) basic.h lines.h misc.h canvas.h
$(CC) -c $(CPPFLAGS) -o $@ basic.$(SRCSUFF)
$(OBJDIR)/basic2.o: basic2.$(SRCSUFF) basic.h lines.h misc.h canvas.h
$(CC) -c $(CPPFLAGS) -o $@ basic2.$(SRCSUFF)
$(OBJDIR)/canvas.o: canvas.$(SRCSUFF) basic.h misc.h canvas.h
$(CC) -c $(CPPFLAGS) -o $@ canvas.$(SRCSUFF)
$(OBJDIR)/lines.o: lines.$(SRCSUFF) basic.h misc.h canvas.h lines.h
$(CC) -c $(CPPFLAGS) -o $@ lines.$(SRCSUFF)
$(OBJDIR)/misc.o: misc.$(SRCSUFF) basic.h misc.h constrnt.h
$(CC) -c $(CPPFLAGS) -o $@ misc.$(SRCSUFF)
$(OBJDIR)/divided.o: divided.$(SRCSUFF) basic.h misc.h canvas.h divided.h
$(CC) -c $(CPPFLAGS) -o $@ divided.$(SRCSUFF)
$(OBJDIR)/constrnt.o: constrnt.$(SRCSUFF) basic.h constrnt.h
$(CC) -c $(CPPFLAGS) -o $@ constrnt.$(SRCSUFF)
$(OBJDIR)/composit.o: composit.$(SRCSUFF) basic.h misc.h canvas.h constrnt.h composit.h
$(CC) -c $(CPPFLAGS) -o $@ composit.$(SRCSUFF)
$(OBJDIR)/drawn.o: drawn.$(SRCSUFF) basic.h misc.h canvas.h drawn.h drawnp.h
$(CC) -c $(CPPFLAGS) -o $@ drawn.$(SRCSUFF)
$(OBJDIR)/bitmap.o: bitmap.$(SRCSUFF) basic.h misc.h canvas.h bitmap.h
$(CC) -c $(CPPFLAGS) -o $@ bitmap.$(SRCSUFF)
$(OBJDIR)/ogldiag.o: ogldiag.$(SRCSUFF) basic.h misc.h canvas.h bitmap.h ogldiag.h
$(CC) -c $(CPPFLAGS) -o $@ ogldiag.$(SRCSUFF)
HTMLDIR=/home/hardy/html/wx/manuals
docs: ps xlp
ps: $(OGLDIR)/docs/ogl.ps
xlp: $(OGLDIR)/docs/ogl.xlp
html: $(HTMLDIR)/ogl/ogl_contents.html
$(OGLDIR)/docs/ogl.xlp: $(OGLDIR)/docs/classes.tex $(OGLDIR)/docs/ogl.tex $(OGLDIR)/docs/topics.tex $(OGLDIR)/docs/changes.tex $(OGLDIR)/docs/intro.tex
cd ../docs; tex2rtf ogl.tex tmp.xlp -xlp -twice
sed -e "s/WXHELPCONTENTS/OGL Manual/g" < $(OGLDIR)/docs/tmp.xlp > $(OGLDIR)/docs/ogl.xlp
/bin/rm -f $(OGLDIR)/docs/tmp.xlp
$(HTMLDIR)/ogl/ogl_contents.html: $(OGLDIR)/docs/classes.tex $(OGLDIR)/docs/ogl.tex $(OGLDIR)/docs/topics.tex $(OGLDIR)/docs/changes.tex $(OGLDIR)/docs/intro.tex
cd ../docs; tex2rtf ogl.tex $(HTMLDIR)/ogl/ogl -twice -html
$(OGLDIR)/docs/ogl.dvi: $(OGLDIR)/docs/ogl.tex $(OGLDIR)/docs/classes.tex $(OGLDIR)/docs/topics.tex $(OGLDIR)/docs/changes.tex $(OGLDIR)/docs/intro.tex
cd $(OGLDIR)/docs; latex ogl; latex ogl; makeindex ogl; latex ogl; \
$(OGLDIR)/docs/ogl.ps: $(OGLDIR)/docs/ogl.dvi
cd $(OGLDIR)/docs; dvips -f -r < ogl.dvi > ogl.ps
cleaneach:
rm -f $(OBJECTS) $(OGLLIB) core
clean_motif:
$(MAKE) -f makefile.unx GUISUFFIX=_motif cleaneach
clean_ol:
$(MAKE) -f makefile.unx GUISUFFIX=_ol cleaneach
clean_hp:
$(MAKE) -f makefile.unx GUISUFFIX=_hp cleaneach
clean:
rm -f $(OBJECTS) $(OGLLIB)

View File

@@ -24,9 +24,7 @@
#include <wx/wx.h>
#endif
#ifdef PROLOGIO
#include <wx/wxexpr.h>
#endif
#include <wx/types.h>

View File

@@ -24,9 +24,7 @@
#include <wx/wx.h>
#endif
#ifdef PROLOGIO
#include <wx/wxexpr.h>
#endif
#if wxUSE_IOSTREAMH
#include <iostream.h>