*** empty log message ***

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
1998-05-22 19:57:05 +00:00
parent 69d2886dfe
commit 457814b5aa
294 changed files with 22682 additions and 0 deletions
+85
View File
@@ -0,0 +1,85 @@
docs/latex/wx/*.tex
docs/latex/wx/*.sty
docs/latex/wx/*.bib
docs/latex/wx/*.hpj
docs/latex/wx/*.ini
docs/latex/wx/*.txt
docs/latex/wx/*.cnt
docs/latex/wx/*.eps
docs/latex/wx/*.bmp
docs/latex/wx/*.gif
docs/latex/wx/*.wmf
docs/latex/porting/*.tex
docs/latex/porting/*.sty
docs/latex/porting/*.bib
docs/latex/porting/*.hpj
docs/latex/porting/*.ini
docs/latex/porting/*.txt
docs/latex/porting/*.cnt
docs/latex/porting/*.eps
docs/latex/porting/*.gif
docs/latex/porting/*.bmp
utils/wxhelp/docs/*.tex
utils/wxhelp/docs/*.txt
utils/wxhelp/docs/*.hpj
utils/wxhelp/docs/*.ini
utils/wxhelp/docs/*.bmp
utils/wxhelp/docs/*.wmf
utils/wxhelp/docs/*.gif
utils/tex2rtf/docs/*.tex
utils/tex2rtf/docs/*.txt
utils/tex2rtf/docs/*.hpj
utils/tex2rtf/docs/*.bib
utils/tex2rtf/docs/*.ini
utils/tex2rtf/docs/*.sty
utils/tex2rtf/docs/*.bmp
utils/tex2rtf/docs/*.shg
utils/tex2rtf/docs/*.wmf
utils/tex2rtf/docs/*.gif
utils/wxtree/docs/*.tex
utils/wxtree/docs/*.ini
utils/wxtree/docs/*.bib
utils/wxtree/docs/*.txt
utils/wxtree/docs/*.hpj
utils/wxtree/docs/*.bmp
utils/wxtree/docs/*.wmf
utils/wxtree/docs/*.gif
utils/wxgraph/docs/*.tex
utils/wxgraph/docs/*.ini
utils/wxgraph/docs/*.bib
utils/wxgraph/docs/*.txt
utils/wxgraph/docs/*.hpj
utils/wxgraph/docs/*.bmp
utils/wxgraph/docs/*.wmf
utils/wxgraph/docs/*.gif
utils/mfutils/docs/*.tex
utils/mfutils/docs/*.txt
utils/mfutils/docs/*.hpj
utils/mfutils/docs/*.wmf
utils/mfutils/docs/*.bmp
utils/wxprop/docs/*.txt
utils/wxprop/docs/*.hpj
utils/wxprop/docs/*.tex
utils/wxprop/docs/*.ini
utils/wxprop/docs/*.eps
utils/wxprop/docs/*.bmp
utils/wxprop/docs/*.wmf
utils/wxprop/docs/*.gif
utils/dialoged/docs/*.txt
utils/dialoged/docs/*.hpj
utils/dialoged/docs/*.tex
utils/dialoged/docs/*.ini
utils/dialoged/docs/*.eps
utils/dialoged/docs/*.bmp
utils/dialoged/docs/*.wmf
utils/dialoged/docs/*.gif
File diff suppressed because it is too large Load Diff
+128
View File
@@ -0,0 +1,128 @@
docs/msw/*.txt
src/makeb32.env
src/makebcc.env
src/makemsw.env
src/makewat.env
src/makesc.env
src/makeg95.env
src/makem95.env
src/ntwxwin.mak
src/makefile.bcc
src/makefile.dos
src/makefile.nt
src/*.bat
src/common/dosyacc.c
src/common/doslex.c
src/msw/*.cpp
src/msw/*.h
src/msw/makefile.*
src/msw/*.lst
src/msw/*.def
src/msw/ctl3d/*.*
src/msw/ctl3d/msvc/*.*
src/msw/ctl3d/wat32/*.*
src/msw/ctl3d/wat386/*.*
src/msw/ctl3d/borland/*.*
src/msw/ole/*.cpp
src/msw/*.prj
include/wx/msw/*.h
include/wx/msw/*.rc
include/wx/msw/ctl3d/*.h
include/wx/msw/gnuwin32/*.h
include/wx/msw/ole/*.h
include/wx/msw/*.cur
include/wx/msw/*.ico
include/wx/msw/*.bmp
lib/dummy
samples/ownerdrw/*.cpp
samples/ownerdrw/*.h
samples/ownerdrw/makefile.*
samples/ownerdrw/*.rc
samples/ownerdrw/*.def
samples/ownerdrw/*.bmp
samples/ownerdrw/*.ico
samples/ownerdrw/*.txt
samples/taskbar/*.cpp
samples/taskbar/*.h
samples/taskbar/makefile.*
samples/taskbar/*.rc
samples/taskbar/*.def
samples/taskbar/*.bmp
samples/taskbar/*.ico
samples/taskbar/*.txt
samples/regtest/*.cpp
samples/regtest/*.h
samples/regtest/makefile.*
samples/regtest/*.rc
samples/regtest/*.def
samples/regtest/*.bmp
samples/regtest/*.ico
samples/regtest/*.txt
samples/nativdlg/*.cpp
samples/nativdlg/*.h
samples/nativdlg/*.def
samples/nativdlg/*.rc
samples/nativdlg/*.txt
samples/nativdlg/makefile.*
samples/nativdlg/*.xbm
samples/nativdlg/*.ico
samples/nativdlg/*.bmp
samples/mfc/*.h
samples/mfc/*.cpp
samples/mfc/*.def
samples/mfc/*.rc
samples/mfc/makefile.*
samples/mfc/*.txt
samples/mfc/*.bmp
samples/mfc/*.ico
samples/joytest/*.h
samples/joytest/*.cpp
samples/joytest/*.def
samples/joytest/*.rc
samples/joytest/makefile.*
samples/joytest/*.txt
samples/joytest/*.bmp
samples/joytest/*.wav
samples/joytest/*.ico
utils/nplugin/make*.*
utils/nplugin/src/*.cpp
utils/nplugin/src/*.h
utils/nplugin/src/*.rc
utils/nplugin/src/*.def
utils/nplugin/src/makefile.*
utils/nplugin/src/*.txt
utils/nplugin/samples/simple/*.cpp
utils/nplugin/samples/simple/*.h
utils/nplugin/samples/simple/*.rc
utils/nplugin/samples/simple/*.def
utils/nplugin/samples/simple/makefile.*
utils/nplugin/samples/simple/*.txt
utils/nplugin/samples/gui/*.cpp
utils/nplugin/samples/gui/*.h
utils/nplugin/samples/gui/*.rc
utils/nplugin/samples/gui/*.def
utils/nplugin/samples/gui/makefile.*
utils/nplugin/samples/gui/*.txt
utils/nplugin/docs/*.tex
utils/nplugin/docs/*.txt
utils/nplugin/docs/*.hpj
utils/nplugin/docs/*.eps
utils/nplugin/docs/*.ps
utils/nplugin/docs/*.ini
utils/nplugin/docs/*.cnt
utils/nplugin/docs/*.hlp
utils/nplugin/lib/dummy
+117
View File
@@ -0,0 +1,117 @@
@echo off
rem Tar up an external distribution of wxWindows 2.0: but
rem putting in separate ASCII and binary files
rem This seems to be the one that works, using
rem separate tar programs for conversion/non-conversion
rem of ASCII/binary files.
if "%1" == "" goto usage
if "%2" == "" goto usage
echo About to archive an external wxWindows 2.0 distribution:
echo From %1
echo To %2\wx200_1.tgz, %2\wx200_2.tgz, %2\wx200hlp.tgz, %2\wx200ps.tgz, %2\wx200htm.tgz
echo CTRL-C if this is not correct.
inkey /W4 `Press any key to continue...` %%input
erase %2\*.tgz
cd %1
rem First, expand the wildcards in the rsp files
rem Create empty list file
erase %1\distrib\*.lis
c:\bin\touch %1\distrib\wx200asc.lis
c:\bin\touch %1\distrib\wx200bin.lis
c:\bin\touch %1\distrib\wx200hlp.lis
c:\bin\touch %1\distrib\wx200ps.lis
c:\bin\touch %1\distrib\wx200xlp.lis
rem Create a .rsp file with backslashes instead
rem of forward slashes
rem No need if using ls2 (from UNIX95 distribution)
rem sed -e "s/\//\\/g" %1\distrib\wx_asc.rsp > %1\distrib\wx_asc.rs2
call %1\distrib\expdwild.bat %1\distrib\wx_asc.rsp %1\distrib\wx200asc.lis
call %1\distrib\expdwild.bat %1\distrib\util_asc.rsp %1\distrib\wx200asc.lis
call %1\distrib\expdwild.bat %1\distrib\smpl_asc.rsp %1\distrib\wx200asc.lis
rem call %1\distrib\expdwild.bat %1\distrib\wxim1asc.rsp %1\distrib\wx200asc.lis
rem call %1\distrib\expdwild.bat %1\distrib\wxim2asc.rsp %1\distrib\wx200asc.lis
call %1\distrib\expdwild.bat %1\distrib\wx_bin.rsp %1\distrib\wx200bin.lis
call %1\distrib\expdwild.bat %1\distrib\util_bin.rsp %1\distrib\wx200bin.lis
call %1\distrib\expdwild.bat %1\distrib\smpl_bin.rsp %1\distrib\wx200bin.lis
rem call %1\distrib\expdwild.bat %1\distrib\wxim1bin.rsp %1\distrib\wx200bin.lis
rem Docs
call %1\distrib\expdwild.bat %1\distrib\wx_hlp.rsp %1\distrib\wx200hlp.lis
call %1\distrib\expdwild.bat %1\distrib\wx_ps.rsp %1\distrib\wx200ps.lis
call %1\distrib\expdwild.bat %1\distrib\wx_html.rsp %1\distrib\wx200htm.lis
call %1\distrib\expdwild.bat %1\distrib\wx_pdf.rsp %1\distrib\wx200pdf.lis
rem Do some further massaging of the .lis files
sed -e "s/\\/\//g" %1\distrib\wx200asc.lis > c:\temp\temp.tmp
sed -e "s/D:\/wx\///g" c:\temp\temp.tmp > %1\distrib\wx200asc.lis
sed -e "s/\\/\//g" %1\distrib\wx200bin.lis > c:\temp\temp.tmp
sed -e "s/D:\/wx\///g" c:\temp\temp.tmp > %1\distrib\wx200bin.lis
sed -e "s/\\/\//g" %1\distrib\wx200hlp.lis > c:\temp\temp.tmp
sed -e "s/D:\/wx\///g" c:\temp\temp.tmp > %1\distrib\wx200hlp.lis
sed -e "s/\\/\//g" %1\distrib\wx200ps.lis > c:\temp\temp.tmp
sed -e "s/D:\/wx\///g" c:\temp\temp.tmp > %1\distrib\wx200ps.lis
sed -e "s/\\/\//g" %1\distrib\wx200htm.lis > c:\temp\temp.tmp
sed -e "s/D:\/wx\///g" c:\temp\temp.tmp > %1\distrib\wx200htm.lis
sed -e "s/\\/\//g" %1\distrib\wx200pdf.lis > c:\temp\temp.tmp
sed -e "s/D:\/wx\///g" c:\temp\temp.tmp > %1\distrib\wx200pdf.lis
rem 'tar' converts linefeeds.
tar -c -T %1\distrib\wx200asc.lis -f %2\wx200.tar
rem pause Press a key to continue.
rem This converts to lower case
ren %2\wx200.tar %2\wx200_1.tar
gzip32 %2\wx200_1.tar
ren %2\wx200_1.tar.gz %2\wx200_1.tgz
rem No linefeed conversion wanted
rem Note: GNU tar seems to crash with a full destination path, so
rem pander to it.
targnu -c -T %1\distrib\wx200bin.lis -f wx200_2.tar
move wx200_2.tar %2
gzip32 %2\wx200_2.tar
ren %2\wx200_2.tar.gz %2\wx200_2.tgz
targnu -c -T %1\distrib\wx200hlp.lis -f wx200_hlp.tar
move wx200_hlp.tar %2
gzip32 %2\wx200_hlp.tar
ren %2\wx200_hlp.tar.gz %2\wx200hlp.tgz
tar -c -T %1\distrib\wx200ps.lis -f %2\wx200ps.tar
gzip32 %2\wx200ps.tar
ren %2\wx200ps.tar.gz %2\wx200ps.tgz
targnu -c -T %1\distrib\wx200htm.lis -f wx200htm.tar
move wx200htm.tar %2
gzip32 %2\wx200htm.tar
ren %2\wx200htm.tar.gz %2\wx200htm.tgz
targnu -c -T %1\distrib\wx200pdf.lis -f wx200pdf.tar
move wx200pdf.tar %2
gzip32 %2\wx200pdf.tar
ren %2\wx200pdf.tar.gz %2\wx200pdf.tgz
cd %2
echo wxWindows archived.
goto end
:usage
echo Tar/gzip wxWindows distribution under DOS, making an ASCII and binary file
echo Usage: tardist source destination
echo e.g. tardist d:\wx d:\wx\deliver
:end
+2
View File
@@ -0,0 +1,2 @@
docs/winhelp/*.hlp
docs/winhelp/*.cnt
+38
View File
@@ -0,0 +1,38 @@
docs/html/*.htm
docs/html/*.gif
docs/html/wx/*.htm
docs/html/wx/*.gif
docs/html/porting/*.htm
docs/html/porting/*.gif
docs/html/faq/*.htm
docs/html/faq/*.gif
docs/html/techref/*.htm
docs/html/techref/*.gif
docs/html/prologio/*.htm
docs/html/prologio/*.gif
docs/html/dialoged/*.htm
docs/html/dialoged/*.gif
docs/html/wxbuild/*.htm
docs/html/wxbuild/*.gif
docs/html/wxtab/*.htm
docs/html/wxtab/*.gif
docs/html/wxchart/*.htm
docs/html/wxchart/*.gif
docs/html/wxtree/*.htm
docs/html/wxtree/*.gif
docs/html/wxgraph/*.htm
docs/html/wxgraph/*.gif
docs/html/wxgrid/*.htm
docs/html/wxgrid/*.gif
docs/html/wxhelp/*.htm
docs/html/wxhelp/*.gif
docs/html/wxhelp2/*.htm
docs/html/wxhelp2/*.gif
docs/html/wxprop/*.htm
docs/html/wxprop/*.gif
docs/html/winstall/*.htm
docs/html/winstall/*.gif
docs/html/tex2rtf/*.htm
docs/html/tex2rtf/*.gif
+1
View File
@@ -0,0 +1 @@
docs/pdf/*.pdf
+34
View File
@@ -0,0 +1,34 @@
@echo off
rem Zip up an external, generic + Windows distribution of wxWindows 2.0
if "%1" == "" goto usage
if "%2" == "" goto usage
echo About to archive an external wxWindows distribution:
echo From %1
echo To %2\wx200gen.zip, %2\wx200doc.zip, %2\wx200msw.zip, %2\wx200ps.zip, %2\wx200hlp.zip, %2\wx200htm.zip, %2\wx200pdf.zip
echo CTRL-C if this is not correct.
pause
erase %2\wx200*.zip
cd %1
echo Zipping...
zip32 -@ %2\wx200gen.zip < %1\distrib\generic.rsp
zip32 -@ %2\wx200msw.zip < %1\distrib\msw.rsp
zip32 -@ %2\wx200doc.zip < %1\distrib\docsrc.rsp
rem zip32 -@ %2\wx200ps.zip < %1\distrib\wx_ps.rsp
zip32 -@ %2\wx200hlp.zip < %1\distrib\wx_hlp.rsp
zip32 -@ %2\wx200htm.zip < %1\distrib\wx_html.rsp
zip32 -@ %2\wx200pdf.zip < %1\distrib\wx_pdf.rsp
cd %2
echo wxWindows archived.
goto end
:usage
echo DOS wxWindows distribution.
echo Usage: zipdistgeneric source destination
echo e.g. zipdistgeneric c:\wx b:
:end
Binary file not shown.

After

Width:  |  Height:  |  Size: 370 B

+185
View File
@@ -0,0 +1,185 @@
///////////////////////////////////////////////////////////////////////////////
// Name: checklst.cpp
// Purpose: wxCheckListBox sample
// Author: Vadim Zeitlin
// Modified by:
// Created: 13.11.97
// RCS-ID: $Id$
// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
// Licence: wxWindows license
///////////////////////////////////////////////////////////////////////////////
// ============================================================================
// headers & declarations
// ============================================================================
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
#include "wx/ownerdrw.h"
#include "wx/menuitem.h"
#include "wx/msw/checklst.h"
// Define a new application type
class CheckListBoxApp: public wxApp
{
public:
bool OnInit();
};
// Define a new frame type
class CheckListBoxFrame : public wxFrame
{
public:
// ctor & dtor
CheckListBoxFrame(wxFrame *frame, char *title, int x, int y, int w, int h);
~CheckListBoxFrame();
// notifications
void OnQuit (wxCommandEvent& event);
void OnAbout (wxCommandEvent& event);
void OnListboxSelect (wxCommandEvent& event);
void OnCheckboxToggle (wxCommandEvent& event);
void OnListboxDblClick (wxCommandEvent& event);
bool OnClose () { return TRUE; }
DECLARE_EVENT_TABLE()
private:
wxCheckListBox *m_pListBox;
};
enum
{
Menu_Quit = 1,
Control_First = 1000,
Control_Listbox, Control_Listbox2,
};
BEGIN_EVENT_TABLE(CheckListBoxFrame, wxFrame)
EVT_MENU(Menu_Quit, CheckListBoxFrame::OnQuit)
EVT_LISTBOX(Control_Listbox, CheckListBoxFrame::OnListboxSelect)
EVT_CHECKLISTBOX(Control_Listbox, CheckListBoxFrame::OnCheckboxToggle)
EVT_COMMAND(Control_Listbox, wxEVT_COMMAND_LISTBOX_DOUBLECLICKED,
CheckListBoxFrame::OnListboxDblClick)
END_EVENT_TABLE()
IMPLEMENT_APP(CheckListBoxApp);
// init our app: create windows
bool CheckListBoxApp::OnInit(void)
{
CheckListBoxFrame *pFrame = new CheckListBoxFrame(NULL, "wxWindows Ownerdraw Sample",
50, 50, 450, 320);
SetTopWindow(pFrame);
return TRUE;
}
// main frame constructor
CheckListBoxFrame::CheckListBoxFrame(wxFrame *frame, char *title, int x, int y, int w, int h)
: wxFrame(frame, -1, title, wxPoint(x, y), wxSize(w, h))
{
// set the icon
SetIcon(wxIcon("mondrian"));
// Make a menubar
wxMenu *file_menu = new wxMenu;
// construct submenu
file_menu->Append(Menu_Quit, "E&xit");
wxMenuBar *menu_bar = new wxMenuBar;
menu_bar->Append(file_menu, "&File");
SetMenuBar(menu_bar);
// make a panel with some controls
wxPanel *pPanel = new wxPanel(this, -1, wxPoint(0, 0),
wxSize(400, 200), wxTAB_TRAVERSAL);
// check list box
static const char* aszChoices[] = { "Hello", "world", "and",
"goodbye", "cruel", "world",
"-------", "owner-drawn", "listbox" };
wxString *astrChoices = new wxString[WXSIZEOF(aszChoices)];
uint ui;
for ( ui = 0; ui < WXSIZEOF(aszChoices); ui++ )
astrChoices[ui] = aszChoices[ui];
m_pListBox = new wxCheckListBox
(
pPanel, // parent
Control_Listbox, // control id
wxPoint(10, 10), // listbox poistion
wxSize(400, 200), // listbox size
WXSIZEOF(aszChoices), // number of strings
astrChoices // array of strings
);
delete [] astrChoices;
for ( ui = 0; ui < WXSIZEOF(aszChoices); ui += 2 ) {
m_pListBox->GetItem(ui)->SetBackColor(wxColor(200, 200, 200));
}
m_pListBox->Check(2);
// create the status line
const int widths[] = { -1, 60 };
CreateStatusBar(2);
SetStatusWidths(2, widths);
SetStatusText("no selection", 0);
Show(TRUE);
}
CheckListBoxFrame::~CheckListBoxFrame()
{
}
void CheckListBoxFrame::OnQuit(wxCommandEvent& event)
{
Close(TRUE);
}
void CheckListBoxFrame::OnAbout(wxCommandEvent& event)
{
wxMessageDialog dialog(this, "Demo of wxCheckListBox control\n"
"About wxCheckListBox", wxYES_NO | wxCANCEL);
dialog.ShowModal();
}
void CheckListBoxFrame::OnListboxSelect(wxCommandEvent& event)
{
wxString strSelection;
uint nSel = event.GetSelection();
strSelection.sprintf("item %d selected (%schecked)", nSel,
m_pListBox->IsChecked(nSel) ? "" : "not ");
SetStatusText(strSelection);
}
void CheckListBoxFrame::OnListboxDblClick(wxCommandEvent& event)
{
wxString strSelection;
strSelection.sprintf("item %d double clicked", m_pListBox->GetSelection());
wxMessageDialog dialog(this, strSelection);
dialog.ShowModal();
}
void CheckListBoxFrame::OnCheckboxToggle(wxCommandEvent& event)
{
wxString strSelection;
uint nItem = event.GetInt();
strSelection.sprintf("item %d was %schecked", nItem,
m_pListBox->IsChecked(nItem) ? "" : "un");
SetStatusText(strSelection);
}
+8
View File
@@ -0,0 +1,8 @@
NAME CHECKLST
DESCRIPTION 'wxCheckListBox sample'
EXETYPE WINDOWS
STUB 'WINSTUB.EXE'
CODE PRELOAD MOVEABLE DISCARDABLE
DATA PRELOAD MOVEABLE MULTIPLE
HEAPSIZE 4048
STACKSIZE 16000
+6
View File
@@ -0,0 +1,6 @@
mondrian ICON "mondrian.ico"
bell BITMAP "bell.bmp"
sound BITMAP "sound.bmp"
nosound BITMAP "nosound.bmp"
#include "wx/msw/wx.rc"
+64
View File
@@ -0,0 +1,64 @@
#
# File: makefile.bcc
# Author: Julian Smart
# Created: 1993
# Updated:
# Copyright: (c) 1993, AIAI, University of Edinburgh
#
# "%W% %G%"
#
# Makefile : Builds checklst example (DOS).
# WXWIN and BCCDIR are set by parent make
WXDIR = $(WXWIN)
!include $(WXDIR)\src\makeb32.env
WXLIBDIR = $(WXDIR)\lib
WXINC = $(WXDIR)\include\msw
WXLIB = $(WXLIBDIR)\wx32.lib
LIBS=$(WXLIB) cw32 import32
TARGET=checklst
!if "$(FINAL)" == "0"
LINKFLAGS=/v /Tpe /L$(WXLIBDIR);$(BCCDIR)\lib
OPT = -Od
DEBUG_FLAGS= -v
!else
LINKFLAGS=/Tpe /L$(WXLIBDIR);$(BCCDIR)\lib
OPT = -Od
DEBUG_FLAGS =
!endif
CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
OBJECTS = checklst.obj
$(TARGET).exe: $(OBJECTS) $(TARGET).def $(TARGET).res
tlink32 $(LINKFLAGS) @&&!
c0w32.obj $(OBJECTS)
$(TARGET)
nul
$(LIBS)
$(TARGET).def
!
brc32 -K $(TARGET).res
.$(SRCSUFF).obj:
bcc32 $(CPPFLAGS) -c {$< }
.c.obj:
bcc32 $(CPPFLAGS) -P- -c {$< }
checklst.obj: checklst.$(SRCSUFF)
$(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc
brc32 -r /i$(BCCDIR)\include /i$(WXDIR)\include $(TARGET)
clean:
-erase *.obj
-erase *.exe
-erase *.res
-erase *.map
-erase *.rws
+65
View File
@@ -0,0 +1,65 @@
#
# File: makefile.dos
# Author: Julian Smart
# Created: 1993
# Updated:
# Copyright: (c) 1993, AIAI, University of Edinburgh
#
# "%W% %G%"
#
# Makefile : Builds checklst example (DOS).
# Use FINAL=1 argument to nmake to build final version with no debugging
# info
WXDIR = $(WXWIN)
!include $(WXDIR)\src\makemsc.env
THISDIR = $(WXDIR)\samples\checklst
!ifndef FINAL
FINAL=0
!endif
HEADERS =
SOURCES = checklst.$(SRCSUFF)
OBJECTS = checklst.obj
all: checklst.exe
wx:
cd $(WXDIR)\src\msw
nmake -f makefile.dos FINAL=$(FINAL)
cd $(THISDIR)
wxclean:
cd $(WXDIR)\src\msw
nmake -f makefile.dos clean
cd $(THISDIR)
checklst.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) checklst.obj checklst.def checklst.res
link $(LINKFLAGS) @<<
checklst.obj $(WXDIR)\src\msw\dummy.obj,
checklst,
NUL,
$(LIBS),
checklst.def
;
<<
rc -K checklst.res
checklst.obj: checklst.$(SRCSUFF)
cl @<<
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
<<
checklst.res : checklst.rc $(WXDIR)\include\wx\msw\wx.rc
rc -r /i$(WXDIR)\include checklst
clean:
-erase *.obj
-erase *.exe
-erase *.res
-erase *.map
-erase *.sbr
-erase *.pdb
+37
View File
@@ -0,0 +1,37 @@
#
# File: makefile.unx
# Author: Julian Smart
# Created: 1993
# Updated:
# Copyright: (c) 1993, AIAI, University of Edinburgh
#
# "%W% %G%"
#
# Makefile for checklst example (UNIX).
WXDIR = ../..
# All common UNIX compiler flags and options are now in
# this central makefile.
include $(WXDIR)/src/makeg95.env
OBJECTS = $(OBJDIR)/checklst.$(OBJSUFF) $(OBJDIR)/checklst_resources.$(OBJSUFF)
all: $(OBJDIR) checklst$(GUISUFFIX)$(EXESUFF)
wx:
$(OBJDIR):
mkdir $(OBJDIR)
checklst$(GUISUFFIX)$(EXESUFF): $(OBJECTS) $(WXLIB)
$(CC) $(LDFLAGS) -o checklst$(GUISUFFIX)$(EXESUFF) $(OBJECTS) $(LDLIBS)
$(OBJDIR)/checklst.$(OBJSUFF): checklst.$(SRCSUFF)
$(CC) -c $(CPPFLAGS) -o $@ checklst.$(SRCSUFF)
$(OBJDIR)/checklst_resources.o: checklst.rc
$(RESCOMP) -i checklst.rc -o $(OBJDIR)/checklst_resources.o $(RESFLAGS)
clean:
rm -f $(OBJECTS) checklst$(GUISUFFIX).exe core *.rsc *.res
+64
View File
@@ -0,0 +1,64 @@
#
# File: makefile.nt
# Author: Julian Smart
# Created: 1993
# Updated:
# Copyright: (c) 1993, AIAI, University of Edinburgh
#
# "%W% %G%"
#
# Makefile : Builds checklst example (MS VC++).
# Use FINAL=1 argument to nmake to build final version with no debugging
# info
# Set WXDIR for your system
WXDIR = $(WXWIN)
WXUSINGDLL=0
!include $(WXDIR)\src\ntwxwin.mak
THISDIR = $(WXDIR)\samples\checklst
PROGRAM=checklst
OBJECTS = $(PROGRAM).obj
$(PROGRAM): $(PROGRAM).exe
all: wx $(PROGRAM).exe
wx:
cd $(WXDIR)\src\msw
nmake -f makefile.nt FINAL=$(FINAL)
cd $(THISDIR)
wxclean:
cd $(WXDIR)\src\msw
nmake -f makefile.nt clean
cd $(THISDIR)
$(PROGRAM).exe: $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(PROGRAM).res
$(link) @<<
-out:$(PROGRAM).exe
$(LINKFLAGS)
$(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res
$(LIBS)
<<
$(PROGRAM).obj: $(PROGRAM).$(SRCSUFF) $(DUMMYOBJ)
$(cc) @<<
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
<<
$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc
$(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc
clean:
-erase *.obj
-erase *.exe
-erase *.res
-erase *.map
-erase *.sbr
-erase *.pdb
Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 370 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 370 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

+293
View File
@@ -0,0 +1,293 @@
/////////////////////////////////////////////////////////////////////////////
// Name: dialogs.cpp
// Purpose: Common dialogs demo
// Author: Julian Smart
// Modified by:
// Created: 04/01/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart and Markus Holzem
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation
#pragma interface
#endif
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
#include <wx/colordlg.h>
#include <wx/filedlg.h>
#include <wx/dirdlg.h>
#include <wx/fontdlg.h>
#include <wx/choicdlg.h>
#if !defined(__WINDOWS__) || USE_GENERIC_DIALOGS_IN_MSW
#include <wx/generic/colrdlgg.h>
#include <wx/generic/fontdlgg.h>
#endif
#include "dialogs.h"
IMPLEMENT_APP(MyApp)
MyCanvas *myCanvas = NULL;
// A macro needed for some compilers (AIX) that need 'main' to be defined
// in the application itself.
IMPLEMENT_WXWIN_MAIN
// `Main program' equivalent, creating windows and returning main app frame
bool MyApp::OnInit(void)
{
m_canvasTextColour = wxColour("BLACK");
m_canvasFont = *wxNORMAL_FONT;
// Create the main frame window
MyFrame *frame = new MyFrame(NULL, "wxWindows dialogs example", wxPoint(50, 50), wxSize(400, 300));
// Make a menubar
wxMenu *file_menu = new wxMenu;
file_menu->Append(DIALOGS_CHOOSE_COLOUR, "&Choose colour");
#if !defined(__WINDOWS__) || USE_GENERIC_DIALOGS_IN_MSW
file_menu->Append(DIALOGS_CHOOSE_COLOUR_GENERIC, "Choose colour (&generic)");
#endif
file_menu->AppendSeparator();
file_menu->Append(DIALOGS_CHOOSE_FONT, "Choose &font");
#if !defined(__WINDOWS__) || USE_GENERIC_DIALOGS_IN_MSW
file_menu->Append(DIALOGS_CHOOSE_FONT_GENERIC, "Choose f&ont (generic)");
#endif
file_menu->AppendSeparator();
file_menu->Append(DIALOGS_MESSAGE_BOX, "&Message box");
file_menu->Append(DIALOGS_TEXT_ENTRY, "Text &entry");
file_menu->Append(DIALOGS_SINGLE_CHOICE, "&Single choice");
file_menu->AppendSeparator();
file_menu->Append(DIALOGS_FILE_OPEN, "&Open file");
file_menu->Append(DIALOGS_FILE_SAVE, "Sa&ve file");
file_menu->Append(DIALOGS_DIR_CHOOSE, "&Choose a directory");
file_menu->AppendSeparator();
file_menu->Append(wxID_EXIT, "E&xit");
wxMenuBar *menu_bar = new wxMenuBar;
menu_bar->Append(file_menu, "&File");
frame->SetMenuBar(menu_bar);
myCanvas = new MyCanvas(frame);
myCanvas->SetBackgroundColour(*wxWHITE);
frame->Centre(wxBOTH);
// Show the frame
frame->Show(TRUE);
SetTopWindow(frame);
return TRUE;
}
// My frame constructor
MyFrame::MyFrame(wxWindow *parent, const wxString& title, const wxPoint& pos, const wxSize& size):
wxFrame(parent, -1, title, pos, size)
{}
void MyFrame::ChooseColour(wxCommandEvent& event)
{
wxColourData data;
data.SetChooseFull(TRUE);
for (int i = 0; i < 16; i++)
{
wxColour colour(i*16, i*16, i*16);
data.SetCustomColour(i, colour);
}
wxColourDialog *dialog = new wxColourDialog(this, &data);
if (dialog->ShowModal() == wxID_OK)
{
wxColourData retData = dialog->GetColourData();
wxColour col = retData.GetColour();
// wxBrush *brush = wxTheBrushList->FindOrCreateBrush(&col, wxSOLID);
myCanvas->SetBackgroundColour(col);
myCanvas->Clear();
myCanvas->Refresh();
}
dialog->Close();
}
void MyFrame::ChooseFont(wxCommandEvent& event)
{
wxFontData data;
data.SetInitialFont(wxGetApp().m_canvasFont);
data.SetColour(wxGetApp().m_canvasTextColour);
wxFontDialog *dialog = new wxFontDialog(this, &data);
if (dialog->ShowModal() == wxID_OK)
{
wxFontData retData = dialog->GetFontData();
wxGetApp().m_canvasFont = retData.GetChosenFont();
wxGetApp().m_canvasTextColour = retData.GetColour();
myCanvas->Refresh();
}
dialog->Close();
}
#if !defined(__WINDOWS__) || USE_GENERIC_DIALOGS_IN_MSW
void MyFrame::ChooseColourGeneric(wxCommandEvent& event)
{
wxColourData data;
data.SetChooseFull(TRUE);
for (int i = 0; i < 16; i++)
{
wxColour colour(i*16, i*16, i*16);
data.SetCustomColour(i, colour);
}
wxGenericColourDialog *dialog = new wxGenericColourDialog(this, &data);
if (dialog->ShowModal() == wxID_OK)
{
wxColourData retData = dialog->GetColourData();
wxColour col = retData.GetColour();
// wxBrush *brush = wxTheBrushList->FindOrCreateBrush(&col, wxSOLID);
myCanvas->SetBackgroundColour(col);
myCanvas->Clear();
myCanvas->Refresh();
}
dialog->Close();
}
void MyFrame::ChooseFontGeneric(wxCommandEvent& event)
{
wxFontData data;
data.SetInitialFont(wxGetApp().m_canvasFont);
data.SetColour(wxGetApp().m_canvasTextColour);
wxGenericFontDialog *dialog = new wxGenericFontDialog(this, &data);
if (dialog->ShowModal() == wxID_OK)
{
wxFontData retData = dialog->GetFontData();
wxGetApp().m_canvasFont = retData.GetChosenFont();
wxGetApp().m_canvasTextColour = retData.GetColour();
myCanvas->Refresh();
}
dialog->Close();
}
#endif
void MyFrame::MessageBox(wxCommandEvent& event)
{
wxMessageDialog dialog(this, "This is a message box\nA long, long string to test out the message box properly",
"Message box text", wxYES_NO|wxCANCEL);
dialog.ShowModal();
}
void MyFrame::TextEntry(wxCommandEvent& event)
{
wxTextEntryDialog dialog(this, "This is a small sample\nA long, long string to test out the text entrybox",
"Please enter a string", "Default value", wxOK|wxCANCEL);
if (dialog.ShowModal() == wxID_OK)
{
wxMessageDialog dialog2(this, dialog.GetValue(), "Got string");
dialog2.ShowModal();
}
}
void MyFrame::SingleChoice(wxCommandEvent& event)
{
const wxString choices[] = { "One", "Two", "Three", "Four", "Five" } ;
int n = 5;
wxSingleChoiceDialog dialog(this, "This is a small sample\nA single-choice convenience dialog",
"Please select a value", n, (const wxString *)choices);
if (dialog.ShowModal() == wxID_OK)
{
wxMessageDialog dialog2(this, dialog.GetStringSelection(), "Got string");
dialog2.ShowModal();
}
}
void MyFrame::FileOpen(wxCommandEvent& event)
{
wxFileDialog dialog(this, "Testing open file dialog", "", "", "*.txt", 0);
if (dialog.ShowModal() == wxID_OK)
{
wxMessageDialog dialog2(this, dialog.GetPath(), "Selected path");
dialog2.ShowModal();
}
}
void MyFrame::FileSave(wxCommandEvent& event)
{
wxFileDialog dialog(this, "Testing save file dialog", "", "",
"Text files (*.txt)|*.txt|Document files (*.doc)|*.doc",
wxSAVE|wxOVERWRITE_PROMPT);
if (dialog.ShowModal() == wxID_OK)
{
char buf[400];
sprintf(buf, "%s, filter %d", (const char *)dialog.GetPath(), dialog.GetFilterIndex());
wxMessageDialog dialog2(this, wxString(buf), "Selected path");
dialog2.ShowModal();
}
}
void MyFrame::DirChoose(wxCommandEvent& event)
{
wxDirDialog dialog(this, "Testing directory picker", "");
if (dialog.ShowModal() == wxID_OK)
{
wxMessageDialog dialog2(this, dialog.GetPath(), "Selected path");
dialog2.ShowModal();
}
}
void MyFrame::OnExit(wxCommandEvent& event)
{
Close(TRUE);
}
void MyCanvas::OnPaint(wxPaintEvent& event)
{
wxPaintDC dc(this);
dc.SetFont(wxGetApp().m_canvasFont);
dc.SetTextForeground(wxGetApp().m_canvasTextColour);
dc.SetBackgroundMode(wxTRANSPARENT);
dc.DrawText("wxWindows common dialogs test application", 10, 10);
}
BEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow)
EVT_PAINT(MyCanvas::OnPaint)
END_EVENT_TABLE()
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
EVT_MENU(DIALOGS_CHOOSE_COLOUR, MyFrame::ChooseColour)
EVT_MENU(DIALOGS_CHOOSE_FONT, MyFrame::ChooseFont)
EVT_MENU(DIALOGS_MESSAGE_BOX, MyFrame::MessageBox)
EVT_MENU(DIALOGS_TEXT_ENTRY, MyFrame::TextEntry)
EVT_MENU(DIALOGS_SINGLE_CHOICE, MyFrame::SingleChoice)
EVT_MENU(DIALOGS_FILE_OPEN, MyFrame::FileOpen)
EVT_MENU(DIALOGS_FILE_SAVE, MyFrame::FileSave)
EVT_MENU(DIALOGS_DIR_CHOOSE, MyFrame::DirChoose)
#if !defined(__WINDOWS__) || USE_GENERIC_DIALOGS_IN_MSW
EVT_MENU(DIALOGS_CHOOSE_COLOUR_GENERIC, MyFrame::ChooseColourGeneric)
EVT_MENU(DIALOGS_CHOOSE_FONT_GENERIC, MyFrame::ChooseFontGeneric)
#endif
EVT_MENU(wxID_EXIT, MyFrame::OnExit)
END_EVENT_TABLE()
+8
View File
@@ -0,0 +1,8 @@
NAME Dialogs
DESCRIPTION 'wxWindows Dialogs example'
EXETYPE WINDOWS
STUB 'WINSTUB.EXE'
CODE PRELOAD MOVEABLE DISCARDABLE
DATA PRELOAD MOVEABLE MULTIPLE
HEAPSIZE 1024
STACKSIZE 8192
+73
View File
@@ -0,0 +1,73 @@
/////////////////////////////////////////////////////////////////////////////
// Name: dialogs.h
// Purpose: Common dialogs demo
// Author: Julian Smart
// Modified by:
// Created: 04/01/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart and Markus Holzem
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
#ifndef __DIALOGSH__
#define __DIALOGSH__
// Define a new application type
class MyApp: public wxApp
{ public:
bool OnInit(void);
wxFont m_canvasFont;
wxColour m_canvasTextColour;
};
// Define a new frame type
class MyFrame: public wxFrame
{ public:
MyFrame(wxWindow *parent, const wxString& title, const wxPoint& pos,
const wxSize& size);
bool OnClose(void) { return TRUE; }
void ChooseColour(wxCommandEvent& event);
void ChooseFont(wxCommandEvent& event);
void MessageBox(wxCommandEvent& event);
void SingleChoice(wxCommandEvent& event);
void TextEntry(wxCommandEvent& event);
void FileOpen(wxCommandEvent& event);
void FileSave(wxCommandEvent& event);
void DirChoose(wxCommandEvent& event);
#if !defined(__WINDOWS__) || USE_GENERIC_DIALOGS_IN_MSW
void ChooseColourGeneric(wxCommandEvent& event);
void ChooseFontGeneric(wxCommandEvent& event);
#endif
void OnExit(wxCommandEvent& event);
DECLARE_EVENT_TABLE()
};
class MyCanvas: public wxScrolledWindow
{
public:
MyCanvas(wxWindow *parent):
wxScrolledWindow(parent)
{
}
void OnPaint(wxPaintEvent& event);
DECLARE_EVENT_TABLE()
};
// Menu IDs
#define DIALOGS_CHOOSE_COLOUR 1
#define DIALOGS_CHOOSE_COLOUR_GENERIC 2
#define DIALOGS_CHOOSE_FONT 3
#define DIALOGS_CHOOSE_FONT_GENERIC 4
#define DIALOGS_MESSAGE_BOX 5
#define DIALOGS_SINGLE_CHOICE 6
#define DIALOGS_TEXT_ENTRY 7
#define DIALOGS_FILE_OPEN 8
#define DIALOGS_FILE_SAVE 9
#define DIALOGS_DIR_CHOOSE 10
#endif
+3
View File
@@ -0,0 +1,3 @@
aiai_icn ICON "aiai.ico"
#include "wx/msw/wx.rc"
+62
View File
@@ -0,0 +1,62 @@
#
# File: makefile.bcc
# Author: Adnre Beltman
# Created: 1995
# Updated:
# Copyright: (c) 1995, AIAI, University of Edinburgh
#
# "%W% %G%"
#
# Makefile : Builds dialogs example (DOS).
# WXWIN and BCCDIR are set by parent make
WXDIR = $(WXWIN)
!include $(WXDIR)\src\makeb32.env
WXLIBDIR = $(WXDIR)\lib
WXLIB=$(WXLIBDIR)\wx32.lib
LIBS=$(WXLIB) cw32 import32
TARGET=dialogs
!if "$(FINAL)" == "0"
LINKFLAGS=/v /Tpe /L$(WXLIBDIR);$(BCCDIR)\lib
OPT = -Od
DEBUG_FLAGS= -v
!else
LINKFLAGS=/Tpe /L$(WXLIBDIR);$(BCCDIR)\lib
OPT = -Od
DEBUG_FLAGS =
!endif
CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
OBJECTS = dialogs.obj
$(TARGET).exe: $(OBJECTS) $(TARGET).def $(TARGET).res
tlink32 $(LINKFLAGS) @&&!
c0w32.obj $(OBJECTS)
$(TARGET)
nul
$(LIBS)
!
brc32 -K $(TARGET).res
.$(SRCSUFF).obj:
bcc32 $(CPPFLAGS) -c {$< }
.c.obj:
bcc32 $(CPPFLAGS) -P- -c {$< }
dialogs.obj: dialogs.$(SRCSUFF)
$(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc
brc32 -r /i$(BCCDIR)\include /i$(WXDIR)\include $(TARGET)
clean:
-erase *.obj
-erase *.exe
-erase *.res
-erase *.map
-erase *.rws
+74
View File
@@ -0,0 +1,74 @@
#
# File: makefile.bcc
# Author: Julian Smart
# Created: 1993
# Updated:
# Copyright: (c) 1993, AIAI, University of Edinburgh
#
# "%W% %G%"
#
# Makefile : Builds dialogs example (DOS).
!if "$(BCCDIR)" == ""
!error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4
!endif
!if "$(WXWIN)" == ""
!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
!endif
WXDIR = $(WXWIN)
!include $(WXDIR)\src\makebcc.env
THISDIR = $(WXDIR)\samples\dialogs
WXLIB = $(WXDIR)\lib\wx.lib
LIBS=$(WXLIB) mathwl cwl import
INC=-I$(WXDIR)\include\base -I$(WXDIR)\include\msw
CFG=$(WXDIR)\src\wxwin.cfg
!ifndef FINAL
FINAL=0
!endif
!if "$(FINAL)" == "0"
#LINKFLAGS=/v /Vt /Twe /s /L$(WXDIR)\lib;$(BCCDIR)\lib
LINKFLAGS=/Vt /Twe /s /L$(WXDIR)\lib;$(BCCDIR)\lib
OPT = -Od
DEBUG_FLAGS= -v
!else
LINKFLAGS=/Twe /L$(WXDIR)\lib;$(BCCDIR)\lib
OPT = -O2
DEBUG_FLAGS=
!endif
CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
OBJECTS = dialogs.obj
dialogs: dialogs.exe
all: dialogs.exe
dialogs.exe: $(WXLIB) dialogs.obj dialogs.def dialogs.res
tlink $(LINKFLAGS) @&&!
c0wl.obj dialogs.obj
dialogs
nul
$(LIBS)
dialogs.def
!
rc -31 -K dialogs.res
.$(SRCSUFF).obj:
bcc $(CPPFLAGS) -c {$< }
dialogs.obj: dialogs.$(SRCSUFF)
dialogs.res : dialogs.rc $(WXDIR)\include\msw\wx.rc
rc -r /i$(BCCDIR)\include /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa dialogs
clean:
-erase *.obj
-erase *.exe
-erase *.res
-erase *.map
-erase *.rws
+81
View File
@@ -0,0 +1,81 @@
#
# File: makefile.dos
# Author: Julian Smart
# Created: 1993
# Updated:
# Copyright: (c) 1993, AIAI, University of Edinburgh
#
# "%W% %G%"
#
# Makefile : Builds dialogs example (DOS).
# Use FINAL=1 argument to nmake to build final version with no debugging
# info
WXDIR = $(WXWIN)
!include $(WXDIR)\src\makemsc.env
THISDIR = $(WXDIR)\samples\dialogs
WXLIB = $(WXDIR)\lib\wx.lib
LIBS=$(WXLIB) oldnames libw llibcew commdlg shell ddeml
!ifndef FINAL
FINAL=0
!endif
INC=/I$(WXDIR)\include\msw /I$(WXDIR)\include\base
# Set this to nothing if using MS C++ 7
ZOPTION=/Z7
!if "$(FINAL)" == "0"
CPPFLAGS=/AL /W3 /Zi $(ZOPTION) /G2sw /Od /YuWX_PREC.H /DDEBUG=$(DEBUG) /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch $(INC)
LINKFLAGS=/NOD /CO /ONERROR:NOEXE /SEG:512
!else
CPPFLAGS=/AL /W3 /G2sw /Ox /YuWX_PREC.H /Dwx_msw /DDEBUG=$(DEBUG) /Fp$(WXDIR)\src\msw\wx.pch $(INC)
LINKFLAGS=/NOD /ONERROR:NOEXE /SEG:512
!endif
HEADERS =
SOURCES = dialogs.$(SRCSUFF)
OBJECTS = dialogs.obj
all: dialogs.exe
wx:
cd $(WXDIR)\src\msw
nmake -f makefile.dos FINAL=$(FINAL)
cd $(THISDIR)
wxclean:
cd $(WXDIR)\src\msw
nmake -f makefile.dos clean
cd $(THISDIR)
dialogs.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) $(OBJECTS) dialogs.def dialogs.res
link $(LINKFLAGS) @<<
$(OBJECTS) $(WXDIR)\src\msw\dummy.obj,
dialogs,
NUL,
$(LIBS),
dialogs.def
;
<<
rc -30 -K dialogs.res
dialogs.obj: dialogs.$(SRCSUFF)
cl @<<
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
<<
dialogs.res : dialogs.rc $(WXDIR)\include\msw\wx.rc
rc -r /dFAFA_LIB /i$(WXDIR)\contrib\fafa /i$(WXDIR)\include\msw dialogs
clean:
-erase *.obj
-erase *.exe
-erase *.res
-erase *.map
-erase *.sbr
-erase *.pdb
+35
View File
@@ -0,0 +1,35 @@
#
# File: makefile.unx
# Author: Julian Smart
# Created: 1993
# Updated:
# Copyright: (c) 1993, AIAI, University of Edinburgh
#
# "%W% %G%"
#
# Makefile for dialogs example (UNIX).
WXDIR = ../..
# All common UNIX compiler flags and options are now in
# this central makefile.
include $(WXDIR)/src/makeg95.env
OBJECTS = $(OBJDIR)/dialogs.$(OBJSUFF) $(OBJDIR)/dialogs_resources.$(OBJSUFF)
all: $(OBJDIR) dialogs$(GUISUFFIX)
$(OBJDIR):
mkdir $(OBJDIR)
dialogs$(GUISUFFIX): $(OBJECTS) $(WXLIB)
$(CC) $(LDFLAGS) -o dialogs$(GUISUFFIX)$(EXESUFF) $(OBJECTS) $(LDLIBS)
$(OBJDIR)/dialogs.$(OBJSUFF): dialogs.$(SRCSUFF)
$(CC) -c $(CPPFLAGS) -o $@ dialogs.$(SRCSUFF)
$(OBJDIR)/dialogs_resources.o: dialogs.rc
$(RESCOMP) -i dialogs.rc -o $(OBJDIR)/dialogs_resources.o $(RESFLAGS)
clean:
rm -f $(OBJECTS) dialogs$(GUISUFFIX).exe core *.rsc *.res
+63
View File
@@ -0,0 +1,63 @@
#
# File: makefile.nt
# Author: Julian Smart
# Created: 1993
# Updated:
# Copyright: (c) 1993, AIAI, University of Edinburgh
#
# "%W% %G%"
#
# Makefile : Builds dialogs example (MS VC++).
# Use FINAL=1 argument to nmake to build final version with no debugging
# info
# Set WXDIR for your system
WXDIR = $(WXWIN)
!include $(WXDIR)\src\ntwxwin.mak
THISDIR = $(WXDIR)\samples\dialogs
PROGRAM=dialogs
OBJECTS = $(PROGRAM).obj
$(PROGRAM): $(PROGRAM).exe
all: wx $(PROGRAM).exe
wx:
cd $(WXDIR)\src\msw
nmake -f makefile.nt FINAL=$(FINAL)
cd $(THISDIR)
wxclean:
cd $(WXDIR)\src\msw
nmake -f makefile.nt clean
cd $(THISDIR)
$(PROGRAM).exe: $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(PROGRAM).res
$(link) @<<
-out:$(PROGRAM).exe
$(LINKFLAGS)
$(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res
$(LIBS)
<<
$(PROGRAM).obj: $(PROGRAM).$(SRCSUFF) dialogs.h $(DUMMYOBJ)
$(cc) @<<
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
<<
$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc
$(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc
clean:
-erase *.obj
-erase *.sbr
-erase *.exe
-erase *.res
-erase *.map
-erase *.pdb
+35
View File
@@ -0,0 +1,35 @@
# Symantec C++ makefile for dialogs example
# NOTE that peripheral libraries are now dealt in main wxWindows makefile.
WXDIR = $(WXWIN)
!include $(WXDIR)\src\makesc.env
WXLIB = $(WXDIR)\lib\wx.lib
INCDIR = $(WXDIR)\include
MSWINC = $(INCDIR)\msw
BASEINC = $(INCDIR)\base
CC=sc
RC=rc
CFLAGS = -o -ml -W -Dwx_msw
LDFLAGS = -ml -W
INCLUDE=$(BASEINC);$(MSWINC)
LIBS=$(WXLIB) libw.lib commdlg.lib shell.lib
.$(SRCSUFF).obj:
*$(CC) -c $(CFLAGS) -I$(INCLUDE) $<
.rc.res:
*$(RC) -r -I$(INCLUDE) $<
dialogs.exe: dialogs.obj dialogs.def dialogs.res
*$(CC) $(LDFLAGS) -o$@ $** $(LIBS)
clean:
-del *.obj
-del *.exe
-del *.res
-del *.map
-del *.rws
+58
View File
@@ -0,0 +1,58 @@
#
# File: makefile.unx
# Author: Julian Smart
# Created: 1993
# Updated:
# Copyright: (c) 1993, AIAI, University of Edinburgh
#
# "%W% %G%"
#
# Makefile for dialogs example (UNIX).
WXDIR = ../..
# All common UNIX compiler flags and options are now in
# this central makefile.
include $(WXDIR)/src/make.env
OBJECTS = $(OBJDIR)/dialogs.$(OBJSUFF)
.SUFFIXES:
all: $(OBJDIR) dialogs$(GUISUFFIX)
wx:
motif:
$(MAKE) -f makefile.unx GUISUFFIX=_motif GUI=-Dwx_motif GUISUFFIX=_motif OPT='$(OPT)' LDLIBS='$(MOTIFLDLIBS)' WXLIB=$(WXDIR)/lib/libwx_motif.a OPTIONS='$(OPTIONS)' DEBUG='$(DEBUG)' WARN='$(WARN)' XLIB='$(XLIB)' XINCLUDE='$(XINCLUDE)' XVIEW_LINK=
xview:
cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx xview
$(MAKE) -f makefile.unx GUI=-Dwx_xview GUISUFFIX=_ol CC=$(CC) OPTIONS='$(OPTIONS)' DEBUG='$(DEBUG)' WARN='$(WARN)' XLIB='$(XLIB)' XINCLUDE='$(XINCLUDE)'
hp:
cd $(WXDIR)/src/x; $(MAKE) -f makefile.unx hp
$(MAKE) -f makefile.unx GUI=-Dwx_motif GUISUFFIX=_hp CC=CC DEBUG='$(DEBUG)' WARN='-w' \
XINCLUDE='$(HPXINCLUDE)' XLIB='$(HPXLIB)' XVIEW_LINK='' LDLIBS='$(HPLDLIBS)'
$(OBJDIR):
mkdir $(OBJDIR)
dialogs$(GUISUFFIX): $(OBJDIR)/dialogs.$(OBJSUFF) $(WXLIB)
$(CC) $(LDFLAGS) -o dialogs$(GUISUFFIX) $(OBJDIR)/dialogs.$(OBJSUFF) $(XVIEW_LINK) $(LDLIBS)
$(OBJDIR)/dialogs.$(OBJSUFF): dialogs.$(SRCSUFF)
$(CC) -c $(CPPFLAGS) -o $@ dialogs.$(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) dialogs$(GUISUFFIX) core
+38
View File
@@ -0,0 +1,38 @@
#************************************************************************
# Makefile for MINIMAL under VMS
# by Stefan Hammes
# (incomplete) update history:
# 11.04.95
#************************************************************************
#************************************************************************
# Definition section
# (cave: definitions and includes must begin with ',')
#************************************************************************
APPOPTS =
APPDEFS =
APPINCS =
#************************************************************************
# Module section
#************************************************************************
# Name of main module
MAIN = minimal
# Object modules of the application.
OBJS = minimal.obj
OBJLIST =minimal.obj
.include [--.src]makevms.env
# main dependency
$(MAIN).exe : $(OBJS)
$(LINK) $(LINKFLAGS) /exec=$(MAIN).exe $(OBJLIST),$(WXLIB)/lib,$(OPTSFILE)/option
- purge *.exe
#************************************************************************
# Header file depedencies following
#************************************************************************
+43
View File
@@ -0,0 +1,43 @@
#
# Makefile for WATCOM
#
# Created by D.Chubraev, chubraev@iem.ee.ethz.ch
# 8 Nov 1994
#
WXDIR = ..\..
!include $(WXDIR)\src\makewat.env
WXLIB = $(WXDIR)\lib
NAME = dialogs
LNK = $(name).lnk
OBJS = $(name).obj
all: $(name).exe
$(name).exe : $(OBJS) $(name).res $(LNK) $(WXLIB)\wx$(LEVEL).lib
wlink @$(LNK)
$(BINDCOMMAND) $(name).res
$(name).res : $(name).rc $(WXDIR)\include\msw\wx.rc
$(RC) $(RESFLAGS1) $(name).rc
$(LNK) : makefile.wat
%create $(LNK)
@%append $(LNK) debug all
@%append $(LNK) system $(LINKOPTION)
@%append $(LNK) $(MINDATA)
@%append $(LNK) $(MAXDATA)
@%append $(LNK) $(STACK)
@%append $(LNK) name $(name)
@%append $(LNK) file $(WXLIB)\wx$(LEVEL).lib
@for %i in ($(EXTRALIBS)) do @%append $(LNK) file %i
@for %i in ($(OBJS)) do @%append $(LNK) file %i
thing: .SYMBOLIC
echo $(WATLIBDIR)
clean: .SYMBOLIC
-erase *.obj *.bak *.err *.pch *.lib *.lnk *.res *.exe *.rex
+167
View File
@@ -0,0 +1,167 @@
Drag-and-Drop Support in wxWindows
==================================
1. Overview
--------
a) What is it?
We're calling drag-and-drop (or d&d for short) the OLE mechanism of data
transfer. Please note that it's not the same thing as the file oriented d&d
of Windows 3.1 "File Manager" which is designed for and limited to the file
names only.
OLE d&d allows application to transfer data of any type to the same or
another process.
b) How is it done? (user's point of view)
To start a d&d operation the user presses the mouse button 1 (left) and
drags the selected object to another window (which must be at least partially
visible on the screen) or to an icon on the taskbar in which case the
corresponding window will be automatically restored. To finish the operation,
the user releases the button. Default d&d operation is "move", but several key
act as modifiers: keeping down the <Ctrl> key at the moment of drop does
"copy", while <Shift> or <Alt> force the "move" (makes sense if default isn't
"move").
c) How is it done? (programmer's point of view)
There are several objects participating in a d&d operation. First of all,
there is the data object itself. Second, there is the drop source which is
responsible for creating the data object (if it doesn't exist yet) and starting
the d&d operation. Finally, the drop target recieves the notification when
the data is dropped onto the associated window (see below) and is responsible
for pasting the data and returning the result code (copy, move or failure).
There is one class for each one of these roles in wxWindows d&d implementation,
plese see their descriptions below for details.
2. Drop Target
-----------
a) Being a drop target
... is as easy as deriving your window class from wxDropTarget and
associating it with a wxWindow object (or perhaps some wxWindow-derived class,
such as wxFrame). The pure virtual function wxDropTarget::OnDrop() must be
implemented in your application and will be called whenever the mouse button
is released over the window in question. Other virtual functions that will be
called in the process of the d&d operation are OnEnter and OnLeave.
@@ should OnDragOver() be user overridable also?
You should associate wxDropTarget and wxWindow calling SetDropTarget:
wxWindow *pWindow = GetTopWindow();
pWindow->SetDropTarget(new MyDropTarget);
The object created passed to SetDropTarget becomes the propriety of wxWindow
and will be deleted with the window (or when you call SetDropTarget next
time). You can always break the association by calling SetDropTarget(NULL).
When some data is dragged over a window, the program must decide if it's
going to accept this data or not. The virtual function IsAcceptedData() is
called to do it. The default implementation takes care of OLE interface
pointer manipulations and only requires you to override GetCountFormats()
and GetFormat(n) functions to let it know what data formats you support.
If it's not flexible enough for your application (i.e. the set of supported
formats changes over time...), you should override IsAcceptedData(). In 99%
of cases the default implementation is ok and you only have to return count
of supported formats (CF_xxx constants or one of your custom formats which
must have been registered) and their values.
b) OnDrop(long x, long y, const void *pData)
(x, y) are drop point (client) coordinates, pData is the pointer to data
(whatever it is).
If 'true' is returned from OnDrop, the operation is considered to be
successful and the corresponding code (MOVE or COPY depending on the
keyboard control keys) is returned. Otherwise, the operation is cancelled.
Please remember that returning 'true' here may mean 'move' and so the
drop source will delete the corresponding data - which would lead to
data loss if you didn't paste it properly.
c) OnEnter()
called when the mouse enters the window: you might use this function to
give some additional visual feedback.
d) OnLeave()
called when the mouse leaves the window; might be a good place to clean
up things allocated in OnEnter.
e) Simple wxDropTarget specializations
Two (very simple) wxDropTarget-derived classes are provided for two most
common situations: d&d of text and file d&d. To use them you only need to
override one virtual function OnDropText in wxTextDropTarget's case and
OnDropFiles for wxFileDropTarget.
The (x, y) are the same as for OnDrop() function. OnDropText's last
parameter points to a (always ANSI, not Unicode) text string, while
OnDropFiles() parameter is the array of file names just dropped (and the
count of them is passed in the 3rd parameter).
3. Data Object
-----------
a) Drag and drop and clipboard
The effect of a d&d operation is the same as using the clipboard to
cut/copy and paste data and it would be nice to use the same code to implement
these two data transfer mechanisms. The wxDataObject allows you to do exactly
this. It encapsulates the data which can be passed either through the clipboard
or d&d.
b) Data format
There are several standard clipboard formats, such as text, bitmap or
metafile picture. All of them are defined in wxDataObject::StdFormats
enumeration. Of course, it's not always enough and you'll often need your
own format for data transfer. The simple helper class wxDataFormat may help
you: when you create an object of this class, it registers a new clipboard
data format identified by the string passed to it's ctor.
After your new format is registered, you may use it as any other one.
4. Drop Source
-----------
a) Starting the d&d operation
In order to start the d&d operation you should call the DoDragDrop function
(typically in reply to a "mouse button press" message). NB: DoDragDrop() is a
blocking function which enters into it's own message loop and may return after
an arbitrarily long time interval. During it, the QueryContinueDrag() is called
whenever the mouse or keyboard state changes. The default behaviour is quite
reasonable for 99% of cases: the drag operation is cancelled if the <Esc> key
is preessed and the drop is initiated if the mouse button is released.
b) After the end of d&d
The drop source behaviour depends on DoDragDrop() return code. If it
returns wxDropSource::None or wxDropSource::Copy there is normally nothing to
do, but you shouldn't forget to delete your data if it returns the
wxDropSource::Move code.
c) DoDragDrop
d) QueryContinueDrag
5. Remarks
-------
@@@@ TODO: support tymed != TYMED_HGLOBAL;
better support of CF_BMP, CF_METAFILE
scrolling support!! (how?)
sample demonstrating use of user-defined formats
sample which really does something useful
+264
View File
@@ -0,0 +1,264 @@
///////////////////////////////////////////////////////////////////////////////
// Name: dnd.cpp
// Purpose: Drag and drop sample
// Author: Vadim Zeitlin
// Modified by:
// Created: 13.11.97
// RCS-ID: $Id$
// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
// Licence: wxWindows license
///////////////////////////////////////////////////////////////////////////////
// ============================================================================
// headers & declarations
// ============================================================================
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
#include "wx/intl.h"
#include "wx/log.h"
#include "wx/dnd.h"
// ----------------------------------------------------------------------------
// Derive 2 simple classes which just put in the listbox the strings (text or
// file names) we drop on them
// ----------------------------------------------------------------------------
class DnDText : public wxTextDropTarget
{
public:
DnDText(wxListBox *pOwner) { m_pOwner = pOwner; }
virtual bool OnDropText(long x, long y, const char *psz);
private:
wxListBox *m_pOwner;
};
class DnDFile : public wxFileDropTarget
{
public:
DnDFile(wxListBox *pOwner) { m_pOwner = pOwner; }
virtual bool OnDropFiles(long x, long y,
size_t nFiles, const char * const aszFiles[]);
private:
wxListBox *m_pOwner;
};
// ----------------------------------------------------------------------------
// Define a new application type
// ----------------------------------------------------------------------------
class DnDApp : public wxApp
{
public:
bool OnInit();
};
IMPLEMENT_APP(DnDApp);
// ----------------------------------------------------------------------------
// Define a new frame type
// ----------------------------------------------------------------------------
class DnDFrame : public wxFrame
{
public:
DnDFrame(wxFrame *frame, char *title, int x, int y, int w, int h);
~DnDFrame();
void OnPaint(wxPaintEvent& event);
void OnQuit (wxCommandEvent& event);
void OnAbout(wxCommandEvent& event);
void OnHelp (wxCommandEvent& event);
bool OnClose();
DECLARE_EVENT_TABLE()
private:
wxListBox *m_ctrlFile,
*m_ctrlText;
wxTextCtrl *m_ctrlLog;
wxLogTarget *m_pLog, *m_pLogPrev;
};
// ----------------------------------------------------------------------------
// IDs for the menu commands
// ----------------------------------------------------------------------------
enum
{
Menu_Quit = 1,
Menu_About = 101,
Menu_Help,
};
BEGIN_EVENT_TABLE(DnDFrame, wxFrame)
EVT_MENU(Menu_Quit, DnDFrame::OnQuit)
EVT_MENU(Menu_About, DnDFrame::OnAbout)
EVT_MENU(Menu_Help, DnDFrame::OnHelp)
//EVT_PAINT(DnDFrame::OnPaint)
END_EVENT_TABLE()
// `Main program' equivalent, creating windows and returning main app frame
bool DnDApp::OnInit(void)
{
// create the main frame window
DnDFrame *frame = new DnDFrame(NULL, "Drag & Drop wxWindows App",
50, 50, 450, 340);
// activate it
frame->Show(TRUE);
SetTopWindow(frame);
return TRUE;
}
DnDFrame::DnDFrame(wxFrame *frame, char *title, int x, int y, int w, int h)
: wxFrame(frame, -1, title, wxPoint(x, y), wxSize(w, h))
{
SetIcon(wxIcon("mondrian"));
// construct menu
wxMenu *file_menu = new wxMenu;
file_menu->Append(Menu_Help, "&Help");
file_menu->Append(Menu_About, "&About");
file_menu->AppendSeparator();
file_menu->Append(Menu_Quit, "E&xit");
wxMenuBar *menu_bar = new wxMenuBar;
menu_bar->Append(file_menu, "&File");
SetMenuBar(menu_bar);
// make a panel with 3 subwindows
wxPoint pos(0, 0);
wxSize size(400, 200);
wxString strFile("Drop files here!"), strText("Drop text on me");
m_ctrlFile = new wxListBox(this, -1, pos, size, 1, &strFile, wxLB_HSCROLL);
m_ctrlText = new wxListBox(this, -1, pos, size, 1, &strText, wxLB_HSCROLL);
m_ctrlLog = new wxTextCtrl(this, -1, "", pos, size,
wxTE_MULTILINE | wxTE_READONLY |
wxSUNKEN_BORDER| wxHSCROLL);
// redirect log messages to the text window (don't forget to delete it!)
// m_pLog = new wxLogTextCtrl(m_ctrlLog);
m_pLog = NULL;
m_pLogPrev = wxLogTarget::SetActiveTarget(m_pLog);
// associate drop targets with 2 text controls
m_ctrlFile->SetDropTarget(new DnDFile(m_ctrlFile));
m_ctrlText->SetDropTarget(new DnDText(m_ctrlText));
wxLayoutConstraints *c;
c = new wxLayoutConstraints;
c->left.SameAs (this, wxLeft);
c->top.SameAs (this, wxTop);
c->right.PercentOf(this, wxRight, 50);
c->height.PercentOf(this, wxHeight, 50);
m_ctrlFile->SetConstraints(c);
c = new wxLayoutConstraints;
c->left.SameAs (m_ctrlFile, wxRight);
c->top.SameAs (this, wxTop);
c->right.SameAs (this, wxRight);
c->height.PercentOf(this, wxHeight, 50);
m_ctrlText->SetConstraints(c);
c = new wxLayoutConstraints;
c->left.SameAs (this, wxLeft);
c->right.SameAs (this, wxRight);
c->height.PercentOf(this, wxHeight, 50);
c->bottom.SameAs(this, wxBottom);
m_ctrlLog->SetConstraints(c);
SetAutoLayout(TRUE);
}
void DnDFrame::OnQuit(wxCommandEvent& /* event */)
{
Close(TRUE);
}
void DnDFrame::OnAbout(wxCommandEvent& /* event */)
{
wxMessageDialog dialog(this,
"Drag-&-Drop Demo\n"
"Please see File|Help for details",
"About wxDnD");
dialog.ShowModal();
}
void DnDFrame::OnHelp(wxCommandEvent& /* event */)
{
wxMessageDialog dialog(this,
"This small program demonstrates drag & drop support in wxWindows.\n"
"The program window consists of 3 parts: the bottom pane is for\n"
"debug messages, so that you can see what's going on inside.\n"
"The top part is split into 2 listboxes, the left one accepts\n"
"files and the right one accepts text.\n"
"\n"
"To test it: open wordpad (write.exe), select some text in it and\n"
"drag it to the right listbox (you'll notice the usual visual\n"
"feedback, i.e. the cursor will change). Also, try dragging some\n"
"files (you can select several at once) from Windows Explorer (or\n"
"File Manager) to the left pane. Hold down Ctrl/Shift keys when\n"
"you drop text (doesn't work with files) and see what changes.\n"
"\n"
"Please address any questions/bug reports/suggestions &c to\n"
"Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>",
"wxDnD Help");
dialog.ShowModal();
}
bool DnDFrame::OnClose()
{
return TRUE;
}
DnDFrame::~DnDFrame()
{
if ( m_pLog != NULL ) {
if ( wxLogTarget::SetActiveTarget(m_pLogPrev) == m_pLog )
delete m_pLog;
}
}
// ----------------------------------------------------------------------------
// Notifications called by the base class
// ----------------------------------------------------------------------------
bool DnDText::OnDropText(long, long, const char *psz)
{
m_pOwner->Append(psz);
return TRUE;
}
bool DnDFile::OnDropFiles(long, long, size_t nFiles,
const char * const aszFiles[])
{
wxString str;
str.Printf("%d files dropped", nFiles);
m_pOwner->Append(str);
for ( size_t n = 0; n < nFiles; n++ ) {
m_pOwner->Append(aszFiles[n]);
}
return TRUE;
}
+8
View File
@@ -0,0 +1,8 @@
NAME DND
DESCRIPTION 'Drag and drop sample'
EXETYPE WINDOWS
STUB 'WINSTUB.EXE'
CODE PRELOAD MOVEABLE DISCARDABLE
DATA PRELOAD MOVEABLE MULTIPLE
HEAPSIZE 4048
STACKSIZE 16000
+3
View File
@@ -0,0 +1,3 @@
mondrian ICON "mondrian.ico"
#include "wx/msw/wx.rc"
+64
View File
@@ -0,0 +1,64 @@
#
# File: makefile.bcc
# Author: Julian Smart
# Created: 1993
# Updated:
# Copyright: (c) 1993, AIAI, University of Edinburgh
#
# "%W% %G%"
#
# Makefile : Builds dnd example (DOS).
# WXWIN and BCCDIR are set by parent make
WXDIR = $(WXWIN)
!include $(WXDIR)\src\makeb32.env
WXLIBDIR = $(WXDIR)\lib
WXINC = $(WXDIR)\include\msw
WXLIB = $(WXLIBDIR)\wx32.lib
LIBS=$(WXLIB) cw32 import32 ole2w32
TARGET=dnd
!if "$(FINAL)" == "0"
LINKFLAGS=/v /Tpe /L$(WXLIBDIR);$(BCCDIR)\lib
OPT = -Od
DEBUG_FLAGS= -v
!else
LINKFLAGS=/Tpe /L$(WXLIBDIR);$(BCCDIR)\lib
OPT = -Od
DEBUG_FLAGS =
!endif
CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
OBJECTS = dnd.obj
$(TARGET).exe: $(OBJECTS) $(TARGET).def $(TARGET).res
tlink32 $(LINKFLAGS) @&&!
c0w32.obj $(OBJECTS)
$(TARGET)
nul
$(LIBS)
$(TARGET).def
!
brc32 -K $(TARGET).res
.$(SRCSUFF).obj:
bcc32 $(CPPFLAGS) -c {$< }
.c.obj:
bcc32 $(CPPFLAGS) -P- -c {$< }
dnd.obj: dnd.$(SRCSUFF)
$(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc
brc32 -r /i$(BCCDIR)\include /i$(WXDIR)\include $(TARGET)
clean:
-erase *.obj
-erase *.exe
-erase *.res
-erase *.map
-erase *.rws
+65
View File
@@ -0,0 +1,65 @@
#
# File: makefile.dos
# Author: Julian Smart
# Created: 1993
# Updated:
# Copyright: (c) 1993, AIAI, University of Edinburgh
#
# "%W% %G%"
#
# Makefile : Builds dnd example (DOS).
# Use FINAL=1 argument to nmake to build final version with no debugging
# info
WXDIR = $(WXWIN)
!include $(WXDIR)\src\makemsc.env
THISDIR = $(WXDIR)\samples\dnd
!ifndef FINAL
FINAL=0
!endif
HEADERS =
SOURCES = dnd.$(SRCSUFF)
OBJECTS = dnd.obj
all: dnd.exe
wx:
cd $(WXDIR)\src\msw
nmake -f makefile.dos FINAL=$(FINAL)
cd $(THISDIR)
wxclean:
cd $(WXDIR)\src\msw
nmake -f makefile.dos clean
cd $(THISDIR)
dnd.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) dnd.obj dnd.def dnd.res
link $(LINKFLAGS) @<<
dnd.obj $(WXDIR)\src\msw\dummy.obj,
dnd,
NUL,
$(LIBS),
dnd.def
;
<<
rc -K dnd.res
dnd.obj: dnd.$(SRCSUFF)
cl @<<
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
<<
dnd.res : dnd.rc $(WXDIR)\include\wx\msw\wx.rc
rc -r /i$(WXDIR)\include dnd
clean:
-erase *.obj
-erase *.exe
-erase *.res
-erase *.map
-erase *.sbr
-erase *.pdb
+37
View File
@@ -0,0 +1,37 @@
#
# File: makefile.unx
# Author: Julian Smart
# Created: 1993
# Updated:
# Copyright: (c) 1993, AIAI, University of Edinburgh
#
# "%W% %G%"
#
# Makefile for dnd example (UNIX).
WXDIR = ../..
# All common UNIX compiler flags and options are now in
# this central makefile.
include $(WXDIR)/src/makeg95.env
OBJECTS = $(OBJDIR)/dnd.$(OBJSUFF) $(OBJDIR)/dnd_resources.$(OBJSUFF)
all: $(OBJDIR) dnd$(GUISUFFIX)$(EXESUFF)
wx:
$(OBJDIR):
mkdir $(OBJDIR)
dnd$(GUISUFFIX)$(EXESUFF): $(OBJECTS) $(WXLIB)
$(CC) $(LDFLAGS) -o dnd$(GUISUFFIX)$(EXESUFF) $(OBJECTS) $(LDLIBS)
$(OBJDIR)/dnd.$(OBJSUFF): dnd.$(SRCSUFF)
$(CC) -c $(CPPFLAGS) -o $@ dnd.$(SRCSUFF)
$(OBJDIR)/dnd_resources.o: dnd.rc
$(RESCOMP) -i dnd.rc -o $(OBJDIR)/dnd_resources.o $(RESFLAGS)
clean:
rm -f $(OBJECTS) dnd$(GUISUFFIX).exe core *.rsc *.res
+64
View File
@@ -0,0 +1,64 @@
#
# File: makefile.nt
# Author: Julian Smart
# Created: 1993
# Updated:
# Copyright: (c) 1993, AIAI, University of Edinburgh
#
# "%W% %G%"
#
# Makefile : Builds dnd example (MS VC++).
# Use FINAL=1 argument to nmake to build final version with no debugging
# info
# Set WXDIR for your system
WXDIR = $(WXWIN)
WXUSINGDLL=0
!include $(WXDIR)\src\ntwxwin.mak
THISDIR = $(WXDIR)\samples\dnd
PROGRAM=dnd
OBJECTS = $(PROGRAM).obj
$(PROGRAM): $(PROGRAM).exe
all: wx $(PROGRAM).exe
wx:
cd $(WXDIR)\src\msw
nmake -f makefile.nt FINAL=$(FINAL)
cd $(THISDIR)
wxclean:
cd $(WXDIR)\src\msw
nmake -f makefile.nt clean
cd $(THISDIR)
$(PROGRAM).exe: $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(PROGRAM).res
$(link) @<<
-out:$(PROGRAM).exe
$(LINKFLAGS)
$(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res
$(LIBS)
<<
$(PROGRAM).obj: $(PROGRAM).$(SRCSUFF) $(DUMMYOBJ)
$(cc) @<<
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
<<
$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc
$(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc
clean:
-erase *.obj
-erase *.exe
-erase *.res
-erase *.map
-erase *.sbr
-erase *.pdb
Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

+275
View File
@@ -0,0 +1,275 @@
/////////////////////////////////////////////////////////////////////////////
// Name: doc.cpp
// Purpose: Implements document functionality
// Author: Julian Smart
// Modified by:
// Created: 04/01/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart and Markus Holzem
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
// #pragma implementation
#endif
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
#if !USE_DOC_VIEW_ARCHITECTURE
#error You must set USE_DOC_VIEW_ARCHITECTURE to 1 in wx_setup.h!
#endif
#include "doc.h"
#include "view.h"
IMPLEMENT_DYNAMIC_CLASS(DrawingDocument, wxDocument)
DrawingDocument::DrawingDocument(void)
{
}
DrawingDocument::~DrawingDocument(void)
{
doodleSegments.DeleteContents(TRUE);
}
ostream& DrawingDocument::SaveObject(ostream& stream)
{
wxDocument::SaveObject(stream);
stream << doodleSegments.Number() << '\n';
wxNode *node = doodleSegments.First();
while (node)
{
DoodleSegment *segment = (DoodleSegment *)node->Data();
segment->SaveObject(stream);
stream << '\n';
node = node->Next();
}
return stream;
}
istream& DrawingDocument::LoadObject(istream& stream)
{
wxDocument::LoadObject(stream);
int n = 0;
stream >> n;
for (int i = 0; i < n; i++)
{
DoodleSegment *segment = new DoodleSegment;
segment->LoadObject(stream);
doodleSegments.Append(segment);
}
return stream;
}
DoodleSegment::DoodleSegment(void)
{
}
DoodleSegment::DoodleSegment(DoodleSegment& seg)
{
wxNode *node = seg.lines.First();
while (node)
{
DoodleLine *line = (DoodleLine *)node->Data();
DoodleLine *newLine = new DoodleLine;
newLine->x1 = line->x1;
newLine->y1 = line->y1;
newLine->x2 = line->x2;
newLine->y2 = line->y2;
lines.Append(newLine);
node = node->Next();
}
}
DoodleSegment::~DoodleSegment(void)
{
lines.DeleteContents(TRUE);
}
ostream& DoodleSegment::SaveObject(ostream& stream)
{
stream << lines.Number() << '\n';
wxNode *node = lines.First();
while (node)
{
DoodleLine *line = (DoodleLine *)node->Data();
stream << line->x1 << " " << line->y1 << " " << line->x2 << " " << line->y2 << "\n";
node = node->Next();
}
return stream;
}
istream& DoodleSegment::LoadObject(istream& stream)
{
int n = 0;
stream >> n;
for (int i = 0; i < n; i++)
{
DoodleLine *line = new DoodleLine;
stream >> line->x1 >> line->y1 >> line->x2 >> line->y2;
lines.Append(line);
}
return stream;
}
void DoodleSegment::Draw(wxDC *dc)
{
wxNode *node = lines.First();
while (node)
{
DoodleLine *line = (DoodleLine *)node->Data();
dc->DrawLine(line->x1, line->y1, line->x2, line->y2);
node = node->Next();
}
}
/*
* Implementation of drawing command
*/
DrawingCommand::DrawingCommand(const wxString& name, int command, DrawingDocument *ddoc, DoodleSegment *seg):
wxCommand(TRUE, name)
{
doc = ddoc;
segment = seg;
cmd = command;
}
DrawingCommand::~DrawingCommand(void)
{
if (segment)
delete segment;
}
bool DrawingCommand::Do(void)
{
switch (cmd)
{
case DOODLE_CUT:
{
// Cut the last segment
if (doc->GetDoodleSegments().Number() > 0)
{
wxNode *node = doc->GetDoodleSegments().Last();
if (segment)
delete segment;
segment = (DoodleSegment *)node->Data();
delete node;
doc->Modify(TRUE);
doc->UpdateAllViews();
}
break;
}
case DOODLE_ADD:
{
doc->GetDoodleSegments().Append(new DoodleSegment(*segment));
doc->Modify(TRUE);
doc->UpdateAllViews();
break;
}
}
return TRUE;
}
bool DrawingCommand::Undo(void)
{
switch (cmd)
{
case DOODLE_CUT:
{
// Paste the segment
if (segment)
{
doc->GetDoodleSegments().Append(segment);
doc->Modify(TRUE);
doc->UpdateAllViews();
segment = NULL;
}
doc->Modify(TRUE);
doc->UpdateAllViews();
break;
}
case DOODLE_ADD:
{
// Cut the last segment
if (doc->GetDoodleSegments().Number() > 0)
{
wxNode *node = doc->GetDoodleSegments().Last();
DoodleSegment *seg = (DoodleSegment *)node->Data();
delete seg;
delete node;
doc->Modify(TRUE);
doc->UpdateAllViews();
}
}
}
return TRUE;
}
IMPLEMENT_DYNAMIC_CLASS(TextEditDocument, wxDocument)
// Since text windows have their own method for saving to/loading from files,
// we override OnSave/OpenDocument instead of Save/LoadObject
bool TextEditDocument::OnSaveDocument(const wxString& filename)
{
TextEditView *view = (TextEditView *)GetFirstView();
if (!view->textsw->SaveFile(filename))
return FALSE;
Modify(FALSE);
return TRUE;
}
bool TextEditDocument::OnOpenDocument(const wxString& filename)
{
TextEditView *view = (TextEditView *)GetFirstView();
if (!view->textsw->LoadFile(filename))
return FALSE;
SetFilename(filename, TRUE);
Modify(FALSE);
UpdateAllViews();
return TRUE;
}
bool TextEditDocument::IsModified(void) const
{
TextEditView *view = (TextEditView *)GetFirstView();
if (view)
{
return (wxDocument::IsModified() || view->textsw->Modified());
}
else
return wxDocument::IsModified();
}
void TextEditDocument::Modify(bool mod)
{
TextEditView *view = (TextEditView *)GetFirstView();
wxDocument::Modify(mod);
if (!mod && view && view->textsw)
view->textsw->DiscardEdits();
}
+98
View File
@@ -0,0 +1,98 @@
/////////////////////////////////////////////////////////////////////////////
// Name: doc.h
// Purpose: Document classes
// Author: Julian Smart
// Modified by:
// Created: 04/01/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart and Markus Holzem
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
// #pragma interface
#endif
#ifndef __DOCSAMPLEH__
#define __DOCSAMPLEH__
#include "wx/docview.h"
// Plots a line from one point to the other
class DoodleLine: public wxObject
{
public:
long x1;
long y1;
long x2;
long y2;
};
// Contains a list of lines: represents a mouse-down doodle
class DoodleSegment: public wxObject
{
public:
wxList lines;
DoodleSegment(void);
DoodleSegment(DoodleSegment& seg);
~DoodleSegment(void);
void Draw(wxDC *dc);
ostream& SaveObject(ostream& stream);
istream& LoadObject(istream& stream);
};
class DrawingDocument: public wxDocument
{
DECLARE_DYNAMIC_CLASS(DrawingDocument)
private:
public:
wxList doodleSegments;
DrawingDocument(void);
~DrawingDocument(void);
ostream& SaveObject(ostream& stream);
istream& LoadObject(istream& stream);
inline wxList& GetDoodleSegments(void) const { return (wxList&) doodleSegments; };
};
#define DOODLE_CUT 1
#define DOODLE_ADD 2
class DrawingCommand: public wxCommand
{
protected:
DoodleSegment *segment;
DrawingDocument *doc;
int cmd;
public:
DrawingCommand(const wxString& name, int cmd, DrawingDocument *ddoc, DoodleSegment *seg);
~DrawingCommand(void);
bool Do(void);
bool Undo(void);
};
class TextEditDocument: public wxDocument
{
DECLARE_DYNAMIC_CLASS(TextEditDocument)
private:
public:
/*
ostream& SaveObject(ostream& stream);
istream& LoadObject(istream& stream);
*/
virtual bool OnSaveDocument(const wxString& filename);
virtual bool OnOpenDocument(const wxString& filename);
virtual bool IsModified(void) const;
virtual void Modify(bool mod);
TextEditDocument(void) {}
~TextEditDocument(void) {}
};
#endif
Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

+274
View File
@@ -0,0 +1,274 @@
/////////////////////////////////////////////////////////////////////////////
// Name: docview.cpp
// Purpose: Document/view demo
// Author: Julian Smart
// Modified by:
// Created: 04/01/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart and Markus Holzem
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
// #pragma implementation "docview.h"
#endif
/*
* Purpose: Document/view architecture demo for wxWindows class library
* Run with no arguments for multiple top-level windows, -single
* for a single window.
*/
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
#if !USE_DOC_VIEW_ARCHITECTURE
#error You must set USE_DOC_VIEW_ARCHITECTURE to 1 in wx_setup.h!
#endif
#include "wx/docview.h"
#include "docview.h"
#include "doc.h"
#include "view.h"
MyFrame *frame = NULL;
// In single window mode, don't have any child windows; use
// main window.
bool singleWindowMode = FALSE;
IMPLEMENT_APP(MyApp)
MyApp::MyApp(void)
{
m_docManager = NULL;
}
bool MyApp::OnInit(void)
{
//// Find out if we're:
//// SDI : multiple windows and documents but not MDI
//// MDI : multiple windows and documents with containing frame - MSW only)
/// single window : (one document at a time, only one frame, as in Windows Write)
if (argc > 1)
{
if (strcmp(argv[1], "-single") == 0)
{
singleWindowMode = TRUE;
}
}
//// Create a document manager
m_docManager = new wxDocManager;
//// Create a template relating drawing documents to their views
(void) new wxDocTemplate(m_docManager, "Drawing", "*.drw", "", "drw", "Drawing Doc", "Drawing View",
CLASSINFO(DrawingDocument), CLASSINFO(DrawingView));
if (singleWindowMode)
{
// If we've only got one window, we only get to edit
// one document at a time. Therefore no text editing, just
// doodling.
m_docManager->SetMaxDocsOpen(1);
}
else
//// Create a template relating text documents to their views
(void) new wxDocTemplate(m_docManager, "Text", "*.txt", "", "txt", "Text Doc", "Text View",
CLASSINFO(TextEditDocument), CLASSINFO(TextEditView));
//// Create the main frame window
frame = new MyFrame(m_docManager, NULL, "DocView Demo", wxPoint(0, 0), wxSize(500, 400), wxDEFAULT_FRAME_STYLE);
//// Give it an icon (this is ignored in MDI mode: uses resources)
#ifdef __WINDOWS__
frame->SetIcon(wxIcon("doc_icn"));
#endif
#ifdef __X__
frame->SetIcon(wxIcon("aiai.xbm"));
#endif
//// Make a menubar
wxMenu *file_menu = new wxMenu;
wxMenu *edit_menu = NULL;
file_menu->Append(wxID_NEW, "&New...");
file_menu->Append(wxID_OPEN, "&Open...");
if (singleWindowMode)
{
file_menu->Append(wxID_CLOSE, "&Close");
file_menu->Append(wxID_SAVE, "&Save");
file_menu->Append(wxID_SAVEAS, "Save &As...");
file_menu->AppendSeparator();
file_menu->Append(wxID_PRINT, "&Print...");
file_menu->Append(wxID_PRINT_SETUP, "Print &Setup...");
file_menu->Append(wxID_PREVIEW, "Print Pre&view");
edit_menu = new wxMenu;
edit_menu->Append(wxID_UNDO, "&Undo");
edit_menu->Append(wxID_REDO, "&Redo");
edit_menu->AppendSeparator();
edit_menu->Append(DOCVIEW_CUT, "&Cut last segment");
frame->editMenu = edit_menu;
}
file_menu->AppendSeparator();
file_menu->Append(wxID_EXIT, "E&xit");
// A nice touch: a history of files visited. Use this menu.
m_docManager->FileHistoryUseMenu(file_menu);
wxMenu *help_menu = new wxMenu;
help_menu->Append(DOCVIEW_ABOUT, "&About");
wxMenuBar *menu_bar = new wxMenuBar;
menu_bar->Append(file_menu, "&File");
if (edit_menu)
menu_bar->Append(edit_menu, "&Edit");
menu_bar->Append(help_menu, "&Help");
if (singleWindowMode)
frame->canvas = frame->CreateCanvas(NULL, frame);
//// Associate the menu bar with the frame
frame->SetMenuBar(menu_bar);
frame->Centre(wxBOTH);
frame->Show(TRUE);
SetTopWindow(frame);
return TRUE;
}
int MyApp::OnExit(void)
{
delete m_docManager;
return 0;
}
/*
* Centralised code for creating a document frame.
* Called from view.cpp, when a view is created, but not used at all
* in 'single window' mode.
*/
wxFrame *MyApp::CreateChildFrame(wxDocument *doc, wxView *view, bool isCanvas)
{
//// Make a child frame
wxDocChildFrame *subframe = new wxDocChildFrame(doc, view, GetMainFrame(), "Child Frame",
wxPoint(10, 10), wxSize(300, 300), wxDEFAULT_FRAME_STYLE);
#ifdef __WINDOWS__
subframe->SetIcon(wxString(isCanvas ? "chrt_icn" : "notepad_icn"));
#endif
#ifdef __X__
subframe->SetIcon(wxIcon("aiai.xbm"));
#endif
//// Make a menubar
wxMenu *file_menu = new wxMenu;
file_menu->Append(wxID_NEW, "&New...");
file_menu->Append(wxID_OPEN, "&Open...");
file_menu->Append(wxID_CLOSE, "&Close");
file_menu->Append(wxID_SAVE, "&Save");
file_menu->Append(wxID_SAVEAS, "Save &As...");
if (isCanvas)
{
file_menu->AppendSeparator();
file_menu->Append(wxID_PRINT, "&Print...");
file_menu->Append(wxID_PRINT_SETUP, "Print &Setup...");
file_menu->Append(wxID_PREVIEW, "Print Pre&view");
}
wxMenu *edit_menu = NULL;
if (isCanvas)
{
edit_menu = new wxMenu;
edit_menu->Append(wxID_UNDO, "&Undo");
edit_menu->Append(wxID_REDO, "&Redo");
edit_menu->AppendSeparator();
edit_menu->Append(DOCVIEW_CUT, "&Cut last segment");
doc->GetCommandProcessor()->SetEditMenu(edit_menu);
}
wxMenu *help_menu = new wxMenu;
help_menu->Append(DOCVIEW_ABOUT, "&About");
wxMenuBar *menu_bar = new wxMenuBar;
menu_bar->Append(file_menu, "&File");
if (isCanvas)
menu_bar->Append(edit_menu, "&Edit");
menu_bar->Append(help_menu, "&Help");
//// Associate the menu bar with the frame
subframe->SetMenuBar(menu_bar);
subframe->Centre(wxBOTH);
return subframe;
}
/*
* This is the top-level window of the application.
*/
IMPLEMENT_CLASS(MyFrame, wxDocParentFrame)
BEGIN_EVENT_TABLE(MyFrame, wxDocParentFrame)
EVT_MENU(DOCVIEW_ABOUT, MyFrame::OnAbout)
END_EVENT_TABLE()
MyFrame::MyFrame(wxDocManager *manager, wxFrame *frame, const wxString& title,
const wxPoint& pos, const wxSize& size, const long type):
wxDocParentFrame(manager, frame, title, pos, size, type)
{
// This pointer only needed if in single window mode
canvas = NULL;
editMenu = NULL;
}
void MyFrame::OnAbout(wxCommandEvent& event)
{
(void)wxMessageBox("DocView Demo\nAuthor: Julian Smart julian.smart@ukonline.co.uk\nUsage: docview.exe [-single]", "About DocView");
}
// Creates a canvas. Called either from view.cc when a new drawing
// view is created, or in OnInit as a child of the main window,
// if in 'single window' mode.
MyCanvas *MyFrame::CreateCanvas(wxView *view, wxFrame *parent)
{
int width, height;
parent->GetClientSize(&width, &height);
// Non-retained canvas
MyCanvas *canvas = new MyCanvas(view, parent, wxPoint(0, 0), wxSize(width, height), 0);
canvas->SetCursor(wxCursor(wxCURSOR_PENCIL));
// Give it scrollbars
canvas->SetScrollbars(20, 20, 50, 50);
return canvas;
}
MyFrame *GetMainFrame(void)
{
return frame;
}
+8
View File
@@ -0,0 +1,8 @@
NAME DocView
DESCRIPTION 'Document architecture test'
EXETYPE WINDOWS
STUB 'WINSTUB.EXE'
CODE PRELOAD MOVEABLE DISCARDABLE
DATA PRELOAD MOVEABLE MULTIPLE
HEAPSIZE 1024
STACKSIZE 8192
+66
View File
@@ -0,0 +1,66 @@
/////////////////////////////////////////////////////////////////////////////
// Name: docview.h
// Purpose: Document/view demo
// Author: Julian Smart
// Modified by:
// Created: 04/01/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart and Markus Holzem
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
// #pragma interface "docview.h"
#endif
#ifndef __DOCVIEWSAMPLEH__
#define __DOCVIEWSAMPLEH__
#include "wx/docview.h"
class wxDocManager;
// Define a new application
class MyApp: public wxApp
{
public:
MyApp(void);
bool OnInit(void);
int OnExit(void);
wxFrame *CreateChildFrame(wxDocument *doc, wxView *view, bool isCanvas);
protected:
wxDocManager* m_docManager;
};
DECLARE_APP(MyApp)
// Define a new frame
class MyCanvas;
class MyFrame: public wxDocParentFrame
{
DECLARE_CLASS(MyFrame)
public:
wxMenu *editMenu;
// This pointer only needed if in single window mode
MyCanvas *canvas;
MyFrame(wxDocManager *manager, wxFrame *frame, const wxString& title, const wxPoint& pos, const wxSize& size,
const long type);
void OnAbout(wxCommandEvent& event);
MyCanvas *CreateCanvas(wxView *view, wxFrame *parent);
DECLARE_EVENT_TABLE()
};
extern MyFrame *GetMainFrame(void);
#define DOCVIEW_CUT 1
#define DOCVIEW_ABOUT 2
extern bool singleWindowMode;
#endif

Some files were not shown because too many files have changed in this diff Show More