New location for more samples

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19889 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart 2003-03-30 19:36:46 +00:00
parent ed0c2af3ab
commit 820893d0d4
34 changed files with 8705 additions and 0 deletions

View File

@ -0,0 +1,6 @@
resourceM5.mcp
resourceM*Data
*Classic?Debug*
*Classic?Release*
*Carbon?Debug*
*Carbon?Release*

View File

@ -0,0 +1,23 @@
#
# File: Makefile.in
# Author: Julian Smart
# Created: 1998
# Updated:
# Copyright: (c) 1998 Julian Smart
#
# "%W% %G%"
#
# Makefile for resource example (UNIX).
top_srcdir = @top_srcdir@/..
top_builddir = ../../../..
program_dir = samples/resource
PROGRAM=resource
OBJECTS =$(PROGRAM).o
DEPFILES=$(PROGRAM).d
include ../../../../src/makeprog.env
@IF_GNU_MAKE@-include $(DEPFILES)

View File

@ -0,0 +1,47 @@
#*****************************************************************************
# *
# Make file for VMS *
# Author : J.Jansen (joukj@hrem.stm.tudelft.nl) *
# Date : 10 November 1999 *
# *
#*****************************************************************************
.first
define wx [--.include.wx]
.ifdef __WXMOTIF__
CXX_DEFINE = /define=(__WXMOTIF__=1)/name=(as_is,short)\
/assume=(nostdnew,noglobal_array_new)
.else
.ifdef __WXGTK__
CXX_DEFINE = /define=(__WXGTK__=1)/float=ieee/name=(as_is,short)/ieee=denorm\
/assume=(nostdnew,noglobal_array_new)
.else
CXX_DEFINE =
.endif
.endif
.suffixes : .cpp
.cpp.obj :
cxx $(CXXFLAGS)$(CXX_DEFINE) $(MMS$TARGET_NAME).cpp
all :
.ifdef __WXMOTIF__
$(MMS)$(MMSQUALIFIERS) resource.exe
.else
.ifdef __WXGTK__
$(MMS)$(MMSQUALIFIERS) resource_gtk.exe
.endif
.endif
.ifdef __WXMOTIF__
resource.exe : resource.obj
cxxlink resource,[--.lib]vms/opt
.else
.ifdef __WXGTK__
resource_gtk.exe : resource.obj
cxxlink/exec=resource_gtk.exe resource,[--.lib]vms_gtk/opt
.endif
.endif
resource.obj : resource.cpp

View File

@ -0,0 +1,14 @@
/*
* dialog1.h
* Window identifiers file written by Dialog Editor
*/
#define ID_TEXTCTRL104 104
#define ID_STATICBOX101 101
#define ID_DIALOG100 100
#define ID_STATIC107 107
#define ID_BUTTON108 108
#define ID_BUTTON109 109
#define ID_LISTBOX105 105
#define ID_CHECKBOX106 106
#define ID_RADIOBOX102 102

View File

@ -0,0 +1,26 @@
static char *dialog1 = "dialog(name = 'dialog1',\
style = 'wxRAISED_BORDER | wxCAPTION | wxTHICK_FRAME | wxSYSTEM_MENU',\
title = 'Test dialog box',\
id = 100,\
x = 10, y = 10, width = 210, height = 145,\
background_colour = 'D6D6D6',\
use_dialog_units = 1,\
use_system_defaults = 1,\
font = [12, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0],\
control = [101, wxStaticBox, 'wxStaticBox', '0', 'group6', 5, 7, 200, 103,\
[12, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0]],\
control = [102, wxRadioBox, 'Radiobox', 'wxRA_SPECIFY_COLS', 'radiobox2', 13, 24, 60, 72, ['One', 'Two', 'Three', 'Four', 'One more'], 1,\
[12, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0]],\
control = [104, wxTextCtrl, '', 'wxTE_MULTILINE', 'multitext3', 80, 24, 67, 33, 'wxWindows rules!',\
[12, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0]],\
control = [105, wxListBox, '', '0', 'listbox4', 80, 66, 67, 33, ['Apples', 'Bananas', 'Pears', 'Kiwis'],\
[12, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0]],\
control = [106, wxCheckBox, 'Checkbox', '0', 'checkbox9', 150, 26, 50, 14, 0,\
[12, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0]],\
control = [107, wxStaticText, 'My Message', '0', 'message10', 150, 57, 50, 12, '',\
[12, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0]],\
control = [108, wxButton, 'Press me', '0', 'button7', 150, 81, 50, 13, '',\
[12, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0]],\
control = [109, wxButton, 'Cancel', '0', 'button8', 80, 119, 55, 17, '',\
[12, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0]]).";

View File

@ -0,0 +1,16 @@
#
# File: makefile.b32
# Author: Julian Smart
# Created: 1999
# Updated:
# Copyright:
#
# Makefile : Builds sample for 32-bit BC++
WXDIR = $(WXWIN)
TARGET=resource
OBJECTS = $(TARGET).obj
!include $(WXDIR)\src\makeprog.b32

View File

@ -0,0 +1,16 @@
#
# File: makefile.g95
# Author: Julian Smart
# Created: 1999
# Updated:
# Copyright: (c) Julian Smart, 1999
#
# Makefile for wxWindows sample (Cygwin/Mingw32).
WXDIR = ../../../..
TARGET=resource
OBJECTS = $(TARGET).o
include $(WXDIR)/src/makeprog.g95

View File

@ -0,0 +1,35 @@
# Symantec C++ makefile for hello example
# NOTE that peripheral libraries are now dealt in main wxWindows makefile.
WXDIR = $(WXWIN)
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
.cc.obj:
*$(CC) -c $(CFLAGS) -I$(INCLUDE) $<
.rc.res:
*$(RC) -r -I$(INCLUDE) $<
hello.exe: hello.obj hello.def hello.res
*$(CC) $(LDFLAGS) -o$@ hello.obj hello.def $(LIBS)
*$(RC) -k hello.res
clean:
-del *.obj
-del *.exe
-del *.res
-del *.map
-del *.rws

View File

@ -0,0 +1,35 @@
#
# File: Makefile for samples
# Author: Robert Roebling
# Created: 1999
# Updated:
# Copyright: (c) 1998 Robert Roebling
#
# This makefile requires a Unix version of wxWindows
# to be installed on your system. This is most often
# done typing "make install" when using the complete
# sources of wxWindows or by installing the two
# RPM packages wxGTK.XXX.rpm and wxGTK-devel.XXX.rpm
# under Linux.
#
CXX = $(shell wx-config --cxx)
PROGRAM = resource
OBJECTS = $(PROGRAM).o
# implementation
.SUFFIXES: .o .cpp
.cpp.o :
$(CXX) -c `wx-config --cxxflags` -o $@ $<
all: $(PROGRAM)
$(PROGRAM): $(OBJECTS)
$(CXX) -o $(PROGRAM) $(OBJECTS) `wx-config --libs`
clean:
rm -f *.o $(PROGRAM)

View File

@ -0,0 +1,18 @@
#
# File: makefile.vc
# Author: Julian Smart
# Created: 1999
# Updated:
# Copyright: (c) Julian Smart
#
# Makefile : Builds sample (VC++, WIN32)
# Use FINAL=1 argument to nmake to build final version with no debug info.
# Set WXDIR for your system
WXDIR = $(WXWIN)
PROGRAM=resource
OBJECTS = $(PROGRAM).obj
!include $(WXDIR)\src\makeprog.vc

View File

@ -0,0 +1,38 @@
#************************************************************************
# Makefile for resource 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 = resource
# Object modules of the application.
OBJS = resource.obj
.include [--.src]makevms.env
# main dependency
$(MAIN).exe : $(MAIN).$(OBJ)
$(LINK) $(LINKFLAGS) /exec=$(MAIN).exe $(MAIN).$(OBJ),$(WXLIB)/lib,$(OPTSFILE)/option
- purge *.exe
#************************************************************************
# Header file depedencies following
#************************************************************************
resource.obj : resource.cc resource.h

View File

@ -0,0 +1,15 @@
#
# Makefile for WATCOM
#
# Created by Julian Smart, January 1999
#
#
WXDIR = $(%WXWIN)
PROGRAM = resource
OBJECTS = $(PROGRAM).obj
!include $(WXDIR)\src\makeprog.wat

View File

@ -0,0 +1,13 @@
static char *menu1 = "menu(name = 'menu1',\
menu = \
[\
['&File', 1, '', \
['&Dialog box test', 2, ''],\
[],\
['&Exit', 4, '']\
],\
['&Help', 5, '', \
['&About', 6, '']\
]\
]).";

View File

@ -0,0 +1,217 @@
/////////////////////////////////////////////////////////////////////////////
// Name: resource.cpp
// Purpose: Dialog resource sample
// Author: Julian Smart
// Modified by:
// Created: 04/01/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// 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 !wxUSE_RESOURCES
#error "You should set wxUSE_RESOURCES to 1 to compile this sample"
#endif
#if wxUSE_UNICODE
// #error "This sample can't be compiled in Unicode mode."
#endif // wxUSE_UNICODE
#include "wx/resource.h"
#include <ctype.h>
#include "resource.h"
// If we wanted to demonstrate total platform independence,
// then we'd use the dynamic file loading form for all platforms.
// But this shows how to embed the wxWindows resources
// in the program code/executable for UNIX and Windows
// platforms.
// In order to get the ID of the controls defined in the
// dialog, we include the header automatically generated
// by DialogEd
#include "dialog1.h"
// If you have a Windows compiler that can cope with long strings,
// then you can always use the #include form for simplicity.
// NOTE: Borland's brc32.exe resource compiler doesn't recognize
// the TEXT resource, for some reason, so either run-time file loading
// or file inclusion should be used.
#if defined(__WXMSW__) && !wxUSE_UNICODE
// Under Windows, some compilers can't include
// a whole .wxr file. So we use a .rc user-defined resource
// instead. dialog1 will point to the whole .wxr 'file'.
static wxChar *dialog1 = NULL;
static wxChar *menu1 = NULL;
#else
// Other platforms should have sensible compilers that
// cope with long strings.
#include "dialog1.wxr"
#include "menu1.wxr"
#endif
// Declare two frames
MyFrame *frame = (MyFrame *) NULL;
IMPLEMENT_APP(MyApp)
// Testing of ressources
MyApp::MyApp()
{
}
// The `main program' equivalent, creating the windows and returning the
// main frame
bool MyApp::OnInit(void)
{
#if defined(__WXMSW__) && !wxUSE_UNICODE
// Load the .wxr 'file' from a .rc resource, under Windows.
// note that the resource really is a char*, not a wxChar*!
dialog1 = wxLoadUserResource(wxT("dialog1"), wxT("WXRDATA"));
menu1 = wxLoadUserResource(wxT("menu1"), wxT("WXRDATA"));
// All resources in the file (only one in this case) get parsed
// by this call.
wxResourceParseString(dialog1);
wxResourceParseString(menu1);
#else
// Simply parse the data pointed to by the variable dialog1.
// If there were several resources, there would be several
// variables, and this would need to be called several times.
wxResourceParseData(dialog1);
wxResourceParseData(menu1);
#endif
// Create the main frame window
frame = new MyFrame( (wxFrame *) NULL, -1,
wxT("wxWindows Resource Sample"),
wxPoint(-1, -1), wxSize(300, 250) );
// Give it a status line
frame->CreateStatusBar(2);
wxMenuBar *menu_bar = wxResourceCreateMenuBar(wxT("menu1"));
// Associate the menu bar with the frame
frame->SetMenuBar(menu_bar);
// Make a panel
frame->panel = new MyPanel( frame, -1, wxPoint(0, 0), wxSize(400, 400),
0, wxT("MyMainFrame") );
frame->Show(TRUE);
SetTopWindow(frame);
return TRUE;
}
MyApp::~MyApp()
{
#if defined(__WXMSW__) && !wxUSE_UNICODE
delete dialog1;
delete menu1;
#endif
}
BEGIN_EVENT_TABLE(MyPanel, wxPanel)
EVT_LEFT_DOWN( MyPanel::OnClick)
END_EVENT_TABLE()
MyPanel::MyPanel
(
wxWindow *parent, wxWindowID id, const wxPoint& pos,
const wxSize& size,
int style, const wxString &name
) : wxPanel( parent, id, pos, size, style, name )
{
}
void MyPanel::OnClick( wxMouseEvent &WXUNUSED(event2) )
{
MyFrame *frame = (MyFrame*)(wxTheApp->GetTopWindow());
wxCommandEvent event;
frame->OnTestDialog( event );
}
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
EVT_MENU(RESOURCE_ABOUT, MyFrame::OnAbout)
EVT_MENU(RESOURCE_QUIT, MyFrame::OnQuit)
EVT_MENU(RESOURCE_TESTDIALOG, MyFrame::OnTestDialog)
END_EVENT_TABLE()
// Define my frame constructor
MyFrame::MyFrame
(
wxWindow *parent, const wxWindowID id,
const wxString& title, const wxPoint& pos, const wxSize& size
) : wxFrame(parent, id, title, pos, size)
{
panel = (wxWindow *) NULL;
}
void MyFrame::OnAbout( wxCommandEvent& WXUNUSED(event) )
{
wxMessageBox(wxT("wxWindows resource sample.\n")
wxT("(c) Julian Smart"), wxT("About wxWindows sample"),
wxICON_INFORMATION | wxOK);
}
void MyFrame::OnQuit( wxCommandEvent& WXUNUSED(event) )
{
Close(TRUE);
}
void MyFrame::OnTestDialog(wxCommandEvent& WXUNUSED(event) )
{
MyDialog *dialog = new MyDialog;
if (dialog->LoadFromResource(this, wxT("dialog1")))
{
wxTextCtrl *text = (wxTextCtrl *)wxFindWindowByName(wxT("multitext3"), dialog);
if (text)
{
text->SetValue(wxT("wxWindows resource demo"));
}
dialog->ShowModal();
}
dialog->Close(TRUE);
}
BEGIN_EVENT_TABLE(MyDialog, wxDialog)
//EVT_BUTTON(RESOURCE_OK, MyDialog::OnOk)
EVT_BUTTON(ID_BUTTON109, MyDialog::OnCancel)
END_EVENT_TABLE()
void MyDialog::OnOk(wxCommandEvent& WXUNUSED(event) )
{
// EndModal(RESOURCE_OK);
}
void MyDialog::OnCancel(wxCommandEvent& WXUNUSED(event) )
{
EndModal(ID_BUTTON109);
}

View File

@ -0,0 +1,154 @@
# Microsoft Developer Studio Project File - Name="resource" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Application" 0x0101
CFG=resource - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "resource.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "resource.mak" CFG="resource - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "resource - Win32 Release DLL" (based on "Win32 (x86) Application")
!MESSAGE "resource - Win32 Debug DLL" (based on "Win32 (x86) Application")
!MESSAGE "resource - Win32 Release" (based on "Win32 (x86) Application")
!MESSAGE "resource - Win32 Debug" (based on "Win32 (x86) Application")
!MESSAGE
# Begin Project
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!ELSEIF "$(CFG)" == "resource - Win32 Release DLL"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "ReleaseDll"
# PROP BASE Intermediate_Dir "ReleaseDll"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "ReleaseDll"
# PROP Intermediate_Dir "ReleaseDll"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W4 /O2 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /YX /FD /c
# ADD CPP /nologo /W4 /O2 /I "../../include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D WIN32 /D WINVER=0x400 /D _MT /D wxUSE_GUI=1 /YX /FD /c /MD /D WXUSINGDLL /I..\..\lib\mswdll
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG" /I "../../include"
# ADD RSC /l 0x409 /d "NDEBUG" /I "../../include"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib /nologo /subsystem:windows /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib /nologo /subsystem:windows /machine:I386 ..\..\lib\wxmsw250.lib
!ELSEIF "$(CFG)" == "resource - Win32 Debug DLL"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "DebugDll"
# PROP BASE Intermediate_Dir "DebugDll"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "DebugDll"
# PROP Intermediate_Dir "DebugDll"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W4 /Zi /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /YX /FD /c
# ADD CPP /nologo /W4 /Zi /Od /I "../../include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D WIN32 /D WINVER=0x400 /D _MT /D wxUSE_GUI=1 /YX /FD /c /MDd /D "__WXDEBUG__" /D "WXDEBUG=1" /D WXUSINGDLL /I..\..\lib\mswdlld
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG" /I "../../include"
# ADD RSC /l 0x409 /d "_DEBUG" /I "../../include"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept ..\..\lib\wxmsw250d.lib
!ELSEIF "$(CFG)" == "resource - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W4 /O2 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /YX /FD /c
# ADD CPP /nologo /W4 /O2 /I "../../include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D WIN32 /D WINVER=0x400 /D _MT /D wxUSE_GUI=1 /YX /FD /c /MD /I..\..\lib\msw
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG" /I "../../include"
# ADD RSC /l 0x409 /d "NDEBUG" /I "../../include"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib /nologo /subsystem:windows /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib /nologo /subsystem:windows /machine:I386 ..\..\lib\zlib.lib ..\..\lib\regex.lib ..\..\lib\png.lib ..\..\lib\jpeg.lib ..\..\lib\tiff.lib ..\..\lib\wxmsw.lib
!ELSEIF "$(CFG)" == "resource - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W4 /Zi /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /YX /FD /c
# ADD CPP /nologo /W4 /Zi /Od /I "../../include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D WIN32 /D WINVER=0x400 /D _MT /D wxUSE_GUI=1 /YX /FD /c /MDd /D "__WXDEBUG__" /D "WXDEBUG=1" /I..\..\lib\mswd
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG" /I "../../include"
# ADD RSC /l 0x409 /d "_DEBUG" /I "../../include"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept ..\..\lib\zlibd.lib ..\..\lib\regexd.lib ..\..\lib\pngd.lib ..\..\lib\jpegd.lib ..\..\lib\tiffd.lib ..\..\lib\wxmswd.lib
!ENDIF
# Begin Target
# Name "resource - Win32 Release DLL"
# Name "resource - Win32 Debug DLL"
# Name "resource - Win32 Release"
# Name "resource - Win32 Debug"
# Begin Source File
SOURCE=.\resource.cpp
# End Source File
# Begin Source File
SOURCE=.\resource.rc
# End Source File
# End Target
# End Project

View File

@ -0,0 +1,69 @@
/////////////////////////////////////////////////////////////////////////////
// Name: resource.h
// Purpose: Dialog resource sample
// Author: Julian Smart
// Modified by:
// Created: 04/01/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
// #pragma interface
#endif
// Define a new application
class MyApp: public wxApp
{
public:
MyApp();
virtual bool OnInit();
virtual ~MyApp();
};
class MyPanel: public wxPanel
{
public:
MyPanel(wxWindow *parent, wxWindowID id, const wxPoint& pos,
const wxSize& size, int style, const wxString &name);
void OnClick(wxMouseEvent &event);
private:
DECLARE_EVENT_TABLE()
};
class MyFrame: public wxFrame
{
public:
MyFrame(wxWindow *parent, const wxWindowID id, const wxString& title,
const wxPoint& pos, const wxSize& size);
void OnQuit(wxCommandEvent& event);
void OnAbout(wxCommandEvent& event);
void OnTestDialog(wxCommandEvent& event);
wxWindow *panel;
private:
DECLARE_EVENT_TABLE()
};
class MyDialog : public wxDialog
{
public:
void OnOk(wxCommandEvent& event);
void OnCancel(wxCommandEvent& event);
private:
DECLARE_EVENT_TABLE()
};
// the values should be the same as in menu.wxr file!
enum
{
RESOURCE_TESTDIALOG = 2,
RESOURCE_QUIT = 4,
RESOURCE_ABOUT = 6
};

View File

@ -0,0 +1,17 @@
# this is the project file for the resource wxWindows sample
# we generate the VC++ IDE project file, comment this line
# to generate a makefile for (n)make
TEMPLATE = vc6app
# wx is mandatory for wxWindows projects
CONFIG = wx
# the configurations of wxWindows we want to use: the value below is the
# default one; possible other values are {Debug|Release}Unicode[Dll]
#WXCONFIGS = Debug Release DebugDll ReleaseDll
# project files
SOURCES = resource.cpp
RC_FILE = resource.rc
TARGET = resource

View File

@ -0,0 +1,10 @@
#include "wx/msw/wx.rc"
/* Comment out these lines for Borland C++ or GNU-WIN32 */
/*
dialog1 TEXT "dialog1.wxr"
menu1 TEXT "menu1.wxr"
*/
dialog1 WXRDATA "dialog1.wxr"
menu1 WXRDATA "menu1.wxr"

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
treelayM5.mcp
treelayM*Data
*Classic?Debug*
*Classic?Release*
*Carbon?Debug*
*Carbon?Release*
treelay

View File

@ -0,0 +1,15 @@
# Purpose: makefile for treelay example (UNIX).
# Created: 2000-03-15
top_srcdir = @top_srcdir@/..
top_builddir = ../../../..
program_dir = samples/treelay
PROGRAM=treelay
OBJECTS =$(PROGRAM).o
DEPFILES=$(PROGRAM).d
include ../../../../src/makeprog.env
@IF_GNU_MAKE@-include $(DEPFILES)

View File

@ -0,0 +1,10 @@
# Purpose: makefile for treelay example (BC++ 32bit)
# Created: 2000-03-15
WXDIR = $(WXWIN)
TARGET=treelay
OBJECTS = $(TARGET).obj
!include $(WXDIR)\src\makeprog.b32

View File

@ -0,0 +1,10 @@
# Purpose: makefile for treelay example (Cygwin/Mingw32)
# Created: #03.01.00
WXDIR = ../../../..
TARGET=treelay
OBJECTS = $(TARGET).o
include $(WXDIR)/src/makeprog.g95

View File

@ -0,0 +1,37 @@
# Purpose: makefile for treelay example (Symantec C++)
# Created: 2000-03-15
WXDIR = $(WXWIN)
WXLIB = $(WXDIR)\lib\wx.lib
INCDIR = $(WXDIR)\include
INCLUDE=$(INCDIR)
TARGET=treelay
include $(WXDIR)\src\makesc.env
treelay.exe: treelay.obj $(DEFFILE) treelay.res
*$(CC) $(LDFLAGS) -o$@ $** $(LIBS)
*$(RC) -k treelay.res
sc32.def:
echo EXETYPE NT > sc32.def
echo SUBSYSTEM WINDOWS >> sc32.def
sc16.def:
echo NAME $(TARGET) > sc16.def
echo EXETYPE WINDOWS >> sc16.def
echo STUB 'WINSTUB.EXE' >> sc16.def
echo CODE PRELOAD MOVEABLE DISCARDABLE >> sc16.def
echo DATA PRELOAD MOVEABLE MULTIPLE >> sc16.def
echo HEAPSIZE 1024 >> sc16.def
echo STACKSIZE 8192 >> sc16.def
clean:
-del *.obj
-del *.exe
-del *.res
-del *.map
-del *.rws
-del sc32.def
-del sc16.def

View File

@ -0,0 +1,23 @@
# Purpose: makefile for treelay example (Unix)
# Created: 2000-03-15
CXX = $(shell wx-config --cxx)
PROGRAM = treelay
OBJECTS = $(PROGRAM).o
# implementation
.SUFFIXES: .o .cpp
.cpp.o :
$(CXX) -c `wx-config --cxxflags` -o $@ $<
all: $(PROGRAM)
$(PROGRAM): $(OBJECTS)
$(CXX) -o $(PROGRAM) $(OBJECTS) `wx-config --libs`
clean:
rm -f *.o $(PROGRAM)

View File

@ -0,0 +1,11 @@
# Purpose: makefile for treelay example (VC++ 32bit)
# Created: 2000-03-15
# Set WXDIR for your system
WXDIR = $(WXWIN)
PROGRAM=treelay
OBJECTS = $(PROGRAM).obj
!include $(WXDIR)\src\makeprog.vc

View File

@ -0,0 +1,11 @@
# Purpose: makefile for treelay example (Watcom)
# Created: 2000-03-15
WXDIR = $(%WXWIN)
PROGRAM = treelay
OBJECTS = $(PROGRAM).obj
!include $(WXDIR)\src\makeprog.wat

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

View File

@ -0,0 +1,213 @@
///////////////////////////////////////////////////////////////////////////////
// Name: treelay.cpp
// Purpose: wxTreeLayout sample
// Author: Julian Smart
// Modified by:
// Created: 7/4/98
// RCS-ID: $Id$
// Copyright: (c) 1998 Julian Smart
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
// 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/treelay.h"
#include "treelay.h"
wxTreeLayoutStored *myTree = (wxTreeLayoutStored *) NULL;
// A macro needed for some compilers (AIX) that need 'main' to be defined
// in the application itself.
IMPLEMENT_APP(MyApp)
// The `main program' equivalent, creating the windows and returning the
// main frame
bool MyApp::OnInit()
{
// Create the main frame window
MyFrame* frame = new MyFrame(NULL, _T("Tree Test"), wxPoint(-1, -1), wxSize(400, 550));
// Give it a status line
frame->CreateStatusBar(2);
// Give it an icon
#ifdef __WINDOWS__
wxIcon icon(_T("tree_icn"));
frame->SetIcon(icon);
#endif
// Make a menubar
wxMenu *file_menu = new wxMenu;
file_menu->Append(TEST_LEFT_RIGHT, _T("&Left to right"), _T("Redraw left to right"));
file_menu->Append(TEST_TOP_BOTTOM, _T("&Top to bottom"), _T("Redraw top to bottom"));
file_menu->AppendSeparator();
file_menu->Append(TEST_QUIT, _T("E&xit"), _T("Quit program"));
wxMenu *help_menu = new wxMenu;
help_menu->Append(TEST_ABOUT, _T("&About"), _T("About Tree Test"));
wxMenuBar* menu_bar = new wxMenuBar;
menu_bar->Append(file_menu, _T("&File"));
menu_bar->Append(help_menu, _T("&Help"));
// Associate the menu bar with the frame
frame->SetMenuBar(menu_bar);
MyCanvas *canvas = new MyCanvas(frame);
// Give it scrollbars: the virtual canvas is 20 * 50 = 1000 pixels in each direction
canvas->SetScrollbars(20, 20, 50, 50);
frame->canvas = canvas;
myTree = new wxTreeLayoutStored();
wxClientDC dc(canvas);
wxFont font(10, wxROMAN, wxNORMAL, wxBOLD);
dc.SetFont(font);
TreeTest(*myTree, dc);
frame->Show(TRUE);
frame->SetStatusText(_T("Hello, tree!"));
// Return the main frame window
return TRUE;
}
int MyApp::OnExit()
{
if (myTree)
{
delete myTree;
myTree = (wxTreeLayoutStored *) NULL;
}
return 0;
}
void MyApp::TreeTest(wxTreeLayoutStored& tree, wxDC& dc)
{
tree.Initialize(200);
tree.AddChild(_T("animal"));
tree.AddChild(_T("mammal"), _T("animal"));
tree.AddChild(_T("insect"), _T("animal"));
tree.AddChild(_T("bird"), _T("animal"));
tree.AddChild(_T("man"), _T("mammal"));
tree.AddChild(_T("cat"), _T("mammal"));
tree.AddChild(_T("dog"), _T("mammal"));
tree.AddChild(_T("giraffe"), _T("mammal"));
tree.AddChild(_T("elephant"), _T("mammal"));
tree.AddChild(_T("donkey"), _T("mammal"));
tree.AddChild(_T("horse"), _T("mammal"));
tree.AddChild(_T("fido"), _T("dog"));
tree.AddChild(_T("domestic cat"), _T("cat"));
tree.AddChild(_T("lion"), _T("cat"));
tree.AddChild(_T("tiger"), _T("cat"));
tree.AddChild(_T("felix"), _T("domestic cat"));
tree.AddChild(_T("socks"), _T("domestic cat"));
tree.AddChild(_T("beetle"), _T("insect"));
tree.AddChild(_T("earwig"), _T("insect"));
tree.AddChild(_T("eagle"), _T("bird"));
tree.AddChild(_T("bluetit"), _T("bird"));
tree.AddChild(_T("sparrow"), _T("bird"));
tree.AddChild(_T("blackbird"), _T("bird"));
tree.AddChild(_T("emu"), _T("bird"));
tree.AddChild(_T("crow"), _T("bird"));
tree.DoLayout(dc);
}
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
EVT_MENU(TEST_QUIT, MyFrame::OnQuit)
EVT_MENU(TEST_ABOUT, MyFrame::OnAbout)
EVT_MENU(TEST_LEFT_RIGHT, MyFrame::OnLeftRight)
EVT_MENU(TEST_TOP_BOTTOM, MyFrame::OnTopBottom)
EVT_CLOSE(MyFrame::OnCloseWindow)
END_EVENT_TABLE()
// Define my frame constructor
MyFrame::MyFrame(wxWindow *parent, const wxString& title, const wxPoint& pos, const wxSize& size):
wxFrame(parent, -1, title, pos, size)
{
}
void MyFrame::OnQuit(wxCommandEvent& event)
{
Close(TRUE);
}
void MyFrame::OnLeftRight(wxCommandEvent& event)
{
if (myTree)
{
myTree->SetOrientation(FALSE);
wxClientDC dc(canvas);
wxFont font(10, wxROMAN, wxNORMAL, wxBOLD);
dc.SetFont(font);
wxGetApp().TreeTest(*myTree, dc);
canvas->Refresh();
}
}
void MyFrame::OnTopBottom(wxCommandEvent& event)
{
if (myTree)
{
myTree->SetOrientation(TRUE);
wxClientDC dc(canvas);
wxFont font(10, wxROMAN, wxNORMAL, wxBOLD);
dc.SetFont(font);
wxGetApp().TreeTest(*myTree, dc);
canvas->Refresh();
}
}
void MyFrame::OnAbout(wxCommandEvent& event)
{
(void)wxMessageBox(_T("wxWindows tree library demo Vsn 2.0\nAuthor: Julian Smart (c) 1998"), _T("About tree test"));
}
void MyFrame::OnCloseWindow(wxCloseEvent& event)
{
Destroy();
}
BEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow)
EVT_PAINT(MyCanvas::OnPaint)
END_EVENT_TABLE()
// Define a constructor for my canvas
MyCanvas::MyCanvas(wxWindow *parent):
wxScrolledWindow(parent, -1)
{
SetBackgroundColour(*wxWHITE);
}
// Define the repainting behaviour
void MyCanvas::OnPaint(wxPaintEvent& event)
{
wxPaintDC dc(this);
PrepareDC(dc);
if (myTree)
{
wxFont font(10, wxROMAN, wxNORMAL, wxBOLD);
dc.SetFont(font);
myTree->Draw(dc);
}
}

View File

@ -0,0 +1,154 @@
# Microsoft Developer Studio Project File - Name="treelay" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Application" 0x0101
CFG=treelay - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "treelay.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "treelay.mak" CFG="treelay - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "treelay - Win32 Release DLL" (based on "Win32 (x86) Application")
!MESSAGE "treelay - Win32 Debug DLL" (based on "Win32 (x86) Application")
!MESSAGE "treelay - Win32 Release" (based on "Win32 (x86) Application")
!MESSAGE "treelay - Win32 Debug" (based on "Win32 (x86) Application")
!MESSAGE
# Begin Project
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!ELSEIF "$(CFG)" == "treelay - Win32 Release DLL"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "ReleaseDll"
# PROP BASE Intermediate_Dir "ReleaseDll"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "ReleaseDll"
# PROP Intermediate_Dir "ReleaseDll"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W4 /O2 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /YX /FD /c
# ADD CPP /nologo /W4 /O2 /I "../../include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D WIN32 /D WINVER=0x400 /D _MT /D wxUSE_GUI=1 /YX /FD /c /MD /D WXUSINGDLL /I..\..\lib\mswdll
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG" /I "../../include"
# ADD RSC /l 0x409 /d "NDEBUG" /I "../../include"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib /nologo /subsystem:windows /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib /nologo /subsystem:windows /machine:I386 ..\..\lib\wxmsw250.lib
!ELSEIF "$(CFG)" == "treelay - Win32 Debug DLL"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "DebugDll"
# PROP BASE Intermediate_Dir "DebugDll"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "DebugDll"
# PROP Intermediate_Dir "DebugDll"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W4 /Zi /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /YX /FD /c
# ADD CPP /nologo /W4 /Zi /Od /I "../../include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D WIN32 /D WINVER=0x400 /D _MT /D wxUSE_GUI=1 /YX /FD /c /MDd /D "__WXDEBUG__" /D "WXDEBUG=1" /D WXUSINGDLL /I..\..\lib\mswdlld
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG" /I "../../include"
# ADD RSC /l 0x409 /d "_DEBUG" /I "../../include"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept ..\..\lib\wxmsw250d.lib
!ELSEIF "$(CFG)" == "treelay - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W4 /O2 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /YX /FD /c
# ADD CPP /nologo /W4 /O2 /I "../../include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D WIN32 /D WINVER=0x400 /D _MT /D wxUSE_GUI=1 /YX /FD /c /MD /I..\..\lib\msw
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG" /I "../../include"
# ADD RSC /l 0x409 /d "NDEBUG" /I "../../include"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib /nologo /subsystem:windows /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib /nologo /subsystem:windows /machine:I386 ..\..\lib\zlib.lib ..\..\lib\regex.lib ..\..\lib\png.lib ..\..\lib\jpeg.lib ..\..\lib\tiff.lib ..\..\lib\wxmsw.lib
!ELSEIF "$(CFG)" == "treelay - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W4 /Zi /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /YX /FD /c
# ADD CPP /nologo /W4 /Zi /Od /I "../../include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D WIN32 /D WINVER=0x400 /D _MT /D wxUSE_GUI=1 /YX /FD /c /MDd /D "__WXDEBUG__" /D "WXDEBUG=1" /I..\..\lib\mswd
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG" /I "../../include"
# ADD RSC /l 0x409 /d "_DEBUG" /I "../../include"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept ..\..\lib\zlibd.lib ..\..\lib\regexd.lib ..\..\lib\pngd.lib ..\..\lib\jpegd.lib ..\..\lib\tiffd.lib ..\..\lib\wxmswd.lib
!ENDIF
# Begin Target
# Name "treelay - Win32 Release DLL"
# Name "treelay - Win32 Debug DLL"
# Name "treelay - Win32 Release"
# Name "treelay - Win32 Debug"
# Begin Source File
SOURCE=.\treelay.cpp
# End Source File
# Begin Source File
SOURCE=.\treelay.rc
# End Source File
# End Target
# End Project

View File

@ -0,0 +1,55 @@
///////////////////////////////////////////////////////////////////////////////
// Name: treelay.h
// Purpose: wxTreeLayout sample
// Author: Julian Smart
// Modified by:
// Created: 7/4/98
// RCS-ID: $Id$
// Copyright: (c) 1998 Julian Smart
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
// Define a new application
class MyApp: public wxApp
{
public:
virtual bool OnInit();
virtual int OnExit();
void TreeTest(wxTreeLayoutStored& tree, wxDC& dc);
};
DECLARE_APP(MyApp)
class MyCanvas;
class MyFrame: public wxFrame
{
public:
MyCanvas *canvas;
MyFrame(wxWindow *parent, const wxString& title, const wxPoint& pos, const wxSize& size);
void OnCloseWindow(wxCloseEvent& event);
void OnQuit(wxCommandEvent& event);
void OnAbout(wxCommandEvent& event);
void OnLeftRight(wxCommandEvent& event);
void OnTopBottom(wxCommandEvent& event);
DECLARE_EVENT_TABLE()
};
// Define a new canvas which can receive some events
class MyCanvas: public wxScrolledWindow
{
public:
MyCanvas(wxWindow *frame);
void OnPaint(wxPaintEvent& event);
void OnEvent(wxMouseEvent& event);
void OnChar(wxKeyEvent& event);
DECLARE_EVENT_TABLE()
};
#define TEST_QUIT 1
#define TEST_ABOUT 2
#define TEST_LEFT_RIGHT 3
#define TEST_TOP_BOTTOM 4

View File

@ -0,0 +1,17 @@
# this is the project file for the treelay wxWindows sample
# we generate the VC++ IDE project file, comment this line
# to generate a makefile for (n)make
TEMPLATE = vc6app
# wx is mandatory for wxWindows projects
CONFIG = wx
# the configurations of wxWindows we want to use: the value below is the
# default one; possible other values are {Debug|Release}Unicode[Dll]
#WXCONFIGS = Debug Release DebugDll ReleaseDll
# project files
SOURCES = treelay.cpp
RC_FILE = treelay.rc
TARGET = treelay

View File

@ -0,0 +1,3 @@
tree_icn ICON "mondrian.ico"
#include "wx/msw/wx.rc"

File diff suppressed because it is too large Load Diff