merged 2.2 branch

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@7748 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Bryan Petty
2000-07-15 19:51:35 +00:00
parent 8a693e6e04
commit f6bcfd974e
1835 changed files with 237729 additions and 67990 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 B

View File

@@ -0,0 +1,25 @@
/* XPM */
static char *copy_xpm[] = {
/* columns rows colors chars-per-pixel */
"16 15 4 1",
" c None",
". c Black",
"X c Gray100",
"o c #000080",
/* pixels */
" ",
" ...... ",
" .XXXX.. ",
" .XXXX.X. ",
" .X..X.oooooo ",
" .XXXXXoXXXXoo ",
" .X....oXXXXoXo ",
" .XXXXXoX..Xoooo",
" .X....oXXXXXXXo",
" .XXXXXoX.....Xo",
" ......oXXXXXXXo",
" oX.....Xo",
" oXXXXXXXo",
" ooooooooo",
" "
};

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 B

View File

@@ -0,0 +1,24 @@
/* XPM */
static char *cut_xpm[] = {
/* columns rows colors chars-per-pixel */
"16 15 3 1",
" c None",
". c Black",
"X c #000080",
/* pixels */
" ",
" . . ",
" . . ",
" . . ",
" .. .. ",
" . . ",
" ... ",
" . ",
" X.X ",
" X XXX ",
" XXX X X ",
" X X X X ",
" X X X X ",
" X X XX ",
" XX "
};

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 B

View File

@@ -0,0 +1,25 @@
/* XPM */
static char *help_xpm[] = {
/* columns rows colors chars-per-pixel */
"16 15 4 1",
" c None",
". c Black",
"X c Blue",
"o c #000080",
/* pixels */
" ",
" ...... ",
" .XXXXX.. ",
" .XX...oX.. ",
" .X.. .X.. ",
" .X.. .XX.. ",
" .. .XX.. ",
" .XX.. ",
" .X.. ",
" .X.. ",
" .o.. ",
" .. ",
" .XX.. ",
" .XX.. ",
" ... "
};

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 B

View File

@@ -0,0 +1,24 @@
/* XPM */
static char *new_xpm[] = {
/* columns rows colors chars-per-pixel */
"16 15 3 1",
" c None",
". c Black",
"X c Gray100",
/* pixels */
" ",
" ........ ",
" .XXXXXX.. ",
" .XXXXXX.X. ",
" .XXXXXX.... ",
" .XXXXXXXXX. ",
" .XXXXXXXXX. ",
" .XXXXXXXXX. ",
" .XXXXXXXXX. ",
" .XXXXXXXXX. ",
" .XXXXXXXXX. ",
" .XXXXXXXXX. ",
" .XXXXXXXXX. ",
" ........... ",
" "
};

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 B

View File

@@ -0,0 +1,26 @@
/* XPM */
static char *open_xpm[] = {
/* columns rows colors chars-per-pixel */
"16 15 5 1",
" c None",
". c Black",
"X c Yellow",
"o c Gray100",
"O c #bfbf00",
/* pixels */
" ",
" ... ",
" . . .",
" ..",
" ... ...",
" .XoX....... ",
" .oXoXoXoXo. ",
" .XoXoXoXoX. ",
" .oXoX..........",
" .XoX.OOOOOOOOO.",
" .oo.OOOOOOOOO. ",
" .X.OOOOOOOOO. ",
" ..OOOOOOOOO. ",
" ........... ",
" "
};

Binary file not shown.

After

Width:  |  Height:  |  Size: 714 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 B

View File

@@ -0,0 +1,26 @@
/* XPM */
static char *paste_xpm[] = {
/* columns rows colors chars-per-pixel */
"16 15 5 1",
" c Black",
". c None",
"X c Gray100",
"o c #808080",
"O c Cyan",
/* pixels */
" .......",
" XXXXXXX ......",
" XXXXXXX . .....",
" XXXXXXX ....",
" XXXXXXXXXX ....",
" XXXXXXX ....",
" XXXXXX o..o ...",
" XXXXX oOO.oo ..",
" XXXXX .O..o. ..",
" XXXXX ....o. ..",
" XXXXX o..Ooo ..",
" XXXXXX o..o o..",
" XXXXXXX o .",
" XXXXXXXXXX . ",
" .. "
};

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 B

View File

@@ -0,0 +1,26 @@
/* XPM */
static char *print_xpm[] = {
/* columns rows colors chars-per-pixel */
"16 15 5 1",
" c None",
". c Black",
"X c Gray100",
"o c #808000",
"O c Yellow",
/* pixels */
" ",
" ......... ",
" .XXXXXXXX. ",
" .X.....X. ",
" .XXXXXXXX. ",
" .X.....X.... ",
" .XXXXXXXX. . .",
" .......... . ..",
". . . .",
"............. .",
". ooo . . ",
". OOO ... ",
"............. . ",
" . . . ",
" ........... "
};

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 B

View File

@@ -0,0 +1,25 @@
/* XPM */
static char *save_xpm[] = {
/* columns rows colors chars-per-pixel */
"16 15 4 1",
" c None",
". c Black",
"X c #808000",
"o c #808080",
/* pixels */
" ",
" .............. ",
" .X. . . ",
" .X. ... ",
" .X. .X. ",
" .X. .X. ",
" .X. .X. ",
" .X. .X. ",
" .XX........oX. ",
" .XXXXXXXXXXXX. ",
" .XX.........X. ",
" .XX...... .X. ",
" .XX...... .X. ",
" .XX...... .X. ",
" ............. "
};

View File

@@ -0,0 +1,23 @@
# Purpose: makefile for toolbar example (Unix)
# Created: 2000-03-14
CC = gcc
PROGRAM = wxib
OBJECTS = $(PROGRAM).o
# implementation
.SUFFIXES: .o .cpp
.cpp.o :
$(CC) -c `wx-config --cflags` -o $@ $<
all: $(PROGRAM)
$(PROGRAM): $(OBJECTS)
$(CC) -o $(PROGRAM) $(OBJECTS) `wx-config --libs`
clean:
rm -f *.o $(PROGRAM)

View File

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

View File

@@ -0,0 +1,14 @@
# Purpose: makefile for toolbar example (BC++ 16bit)
# Created: 2000-03-14
!if "$(WXWIN)" == ""
!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
!endif
WXDIR = $(WXWIN)
TARGET=toolbar
OBJECTS=$(TARGET).obj
!include $(WXDIR)\src\makeprog.bcc

View File

@@ -0,0 +1,10 @@
# Purpose: makefile for toolbar example (VC++ 1.5x)
# Created: 2000-03-14
WXDIR = $(WXWIN)
TARGET=toolbar
OBJECTS=$(TARGET).obj
!include $(WXDIR)\src\makeprog.msc

View File

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

View File

@@ -0,0 +1,37 @@
# Purpose: makefile for toolbar example (Symantec C++)
# Created: 2000-03-14
WXDIR = $(WXWIN)
WXLIB = $(WXDIR)\lib\wx.lib
INCDIR = $(WXDIR)\include
INCLUDE=$(INCDIR)
TARGET=toolbar
include $(WXDIR)\src\makesc.env
toolbar.exe: toolbar.obj $(DEFFILE) toolbar.res
*$(CC) $(LDFLAGS) -o$@ $** $(LIBS)
*$(RC) -k toolbar.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,14 @@
# Purpose: makefile for toolbar example (Salford C++)
# Created: 2000-03-14
PROGRAM = toolbar
OBJECTS = $(PROGRAM).obj
include ..\..\src\makeprog.sl
all: wx $(TARGET)
wx:
cd $(WXDIR)\src\msw ^ mk32 -f makefile.sl all
cd $(WXDIR)\samples\toolbar

View File

@@ -0,0 +1,35 @@
# Purpose: makefile for toolbar example (TWIN)
# Created: 2000-03-14
WXDIR = ../..
# All common UNIX compiler flags and options are now in
# this central makefile.
include $(WXDIR)/src/maketwin.env
OBJECTS = $(OBJDIR)/toolbar.$(OBJSUFF) $(OBJDIR)/toolbar.$(OBJSUFF)
all: $(OBJDIR) toolbar$(GUISUFFIX)$(EXESUFF)
wx:
$(OBJDIR):
mkdir $(OBJDIR)
toolbar$(GUISUFFIX)$(EXESUFF): $(OBJECTS) $(WXLIB)
$(CC) $(LDFLAGS) -o toolbar$(GUISUFFIX)$(EXESUFF) $(OBJECTS) $(LDLIBS)
$(OBJDIR)/toolbar.$(OBJSUFF): toolbar.$(SRCSUFF)
$(CC) -c $(CPPFLAGS) -o $@ toolbar.$(SRCSUFF)
toolbar.c: toolbar.rc
$(RESCOMP) $(RCINPUTSWITCH) toolbar.rc $(RCOUTPUTSWITCH) toolbar.c $(RESFLAGS)
$(OBJDIR)/toolbar.$(OBJSUFF): toolbar.c
$(CC) -c $(CPPFLAGS) -o $@ toolbar.c
#$(OBJDIR)/toolbar.o: toolbar.rc
# $(RESCOMP) $(RCINPUTSWITCH) toolbar.rc $(RCOUTPUTSWITCH) $(OBJDIR)/toolbar.o $(RESFLAGS)
clean:
rm -f $(OBJECTS) toolbar$(GUISUFFIX).exe core *.rsc *.res

View File

@@ -0,0 +1,23 @@
# Purpose: makefile for toolbar example (Unix)
# Created: 2000-03-14
CC = gcc
PROGRAM = toolbar
OBJECTS = $(PROGRAM).o
# implementation
.SUFFIXES: .o .cpp
.cpp.o :
$(CC) -c `wx-config --cflags` -o $@ $<
all: $(PROGRAM)
$(PROGRAM): $(OBJECTS)
$(CC) -o $(PROGRAM) $(OBJECTS) `wx-config --libs`
clean:
rm -f *.o $(PROGRAM)

View File

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

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

View File

@@ -0,0 +1,44 @@
/* XPM */
static char *mondrian_xpm[] = {
/* columns rows colors chars-per-pixel */
"32 32 6 1",
" c Black",
". c Blue",
"X c #00bf00",
"o c Red",
"O c Yellow",
"+ c Gray100",
/* pixels */
" ",
" oooooo +++++++++++++++++++++++ ",
" oooooo +++++++++++++++++++++++ ",
" oooooo +++++++++++++++++++++++ ",
" oooooo +++++++++++++++++++++++ ",
" oooooo +++++++++++++++++++++++ ",
" oooooo +++++++++++++++++++++++ ",
" oooooo +++++++++++++++++++++++ ",
" ",
" ++++++ ++++++++++++++++++ .... ",
" ++++++ ++++++++++++++++++ .... ",
" ++++++ ++++++++++++++++++ .... ",
" ++++++ ++++++++++++++++++ .... ",
" ++++++ ++++++++++++++++++ .... ",
" ++++++ ++++++++++++++++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
" ++++++ ++++++++++++++++++ ++++ ",
" ++++++ ++++ ",
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
" "
};

View File

@@ -0,0 +1,647 @@
/////////////////////////////////////////////////////////////////////////////
// Name: wxib.cpp
// Purpose: wxInstall Builder
// Author: Julian Smart
// Author: Brian Smith
// Modified by:
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// ============================================================================
// declarations
// ============================================================================
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
// 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/toolbar.h>
#include <wx/log.h>
#include <wx/image.h>
// define this to 1 to use wxToolBarSimple instead of the native one
#define USE_GENERIC_TBAR 0
#if USE_GENERIC_TBAR
#if !wxUSE_TOOLBAR_SIMPLE
#error wxToolBarSimple is not compiled in, set wxUSE_TOOLBAR_SIMPLE \
to 1 in setup.h and recompile the library.
#else
#include <wx/tbarsmpl.h>
#endif
#endif // USE_GENERIC_TBAR
// ----------------------------------------------------------------------------
// resources
// ----------------------------------------------------------------------------
#if defined(__WXGTK__) || defined(__WXMOTIF__)
#include "mondrian.xpm"
#include "bitmaps/new.xpm"
#include "bitmaps/open.xpm"
#include "bitmaps/save.xpm"
#include "bitmaps/copy.xpm"
#include "bitmaps/cut.xpm"
#include "bitmaps/preview.xpm" // paste XPM
#include "bitmaps/print.xpm"
#include "bitmaps/help.xpm"
#endif // GTK or Motif
char appName[] = "wxInstall Builder";
// ----------------------------------------------------------------------------
// classes
// ----------------------------------------------------------------------------
// Define a new application
class MyApp : public wxApp
{
public:
bool OnInit();
};
// Define a new frame
class MyFrame: public wxFrame
{
public:
MyFrame(wxFrame *parent,
wxWindowID id = -1,
const wxString& title = "wxInstall Builder",
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE);
void RecreateToolbar();
void OnQuit(wxCommandEvent& event);
void OnAbout(wxCommandEvent& event);
void OnNewScript(wxCommandEvent& event);
void OnOpenScript(wxCommandEvent& event);
void OnSaveScript(wxCommandEvent& event);
void OnNewProject(wxCommandEvent& event);
void OnOpenProject(wxCommandEvent& event);
void OnSaveProject(wxCommandEvent& event);
void OnCut(wxCommandEvent& event);
void OnCopy(wxCommandEvent& event);
void OnPaste(wxCommandEvent& event);
void OnListBoxDoubleClick(wxCommandEvent& event);
#if USE_GENERIC_TBAR
virtual wxToolBar *OnCreateToolBar(long style,
wxWindowID id,
const wxString& name );
#endif // USE_GENERIC_TBAR
private:
bool m_smallToolbar,
m_horzToolbar;
size_t m_rows; // 1 or 2 only
wxTextCtrl* m_textWindow;
wxListBox* m_listBox;
DECLARE_EVENT_TABLE()
};
// ----------------------------------------------------------------------------
// constants
// ----------------------------------------------------------------------------
const int ID_TOOLBAR = 500;
enum
{
ID_COMBO = 1000,
ID_LISTBOX,
wxID_NEW_SCRIPT,
wxID_SAVE_SCRIPT,
wxID_OPEN_SCRIPT,
wxID_NEW_PROJECT,
wxID_SAVE_PROJECT,
wxID_OPEN_PROJECT
};
// ----------------------------------------------------------------------------
// event tables
// ----------------------------------------------------------------------------
// Notice that wxID_HELP will be processed for the 'About' menu and the toolbar
// help button.
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
EVT_MENU(wxID_EXIT, MyFrame::OnQuit)
EVT_MENU(wxID_HELP, MyFrame::OnAbout)
EVT_MENU(wxID_NEW_SCRIPT, MyFrame::OnNewScript)
EVT_MENU(wxID_OPEN_SCRIPT, MyFrame::OnOpenScript)
EVT_MENU(wxID_SAVE_SCRIPT, MyFrame::OnSaveScript)
EVT_MENU(wxID_NEW_PROJECT, MyFrame::OnNewProject)
EVT_MENU(wxID_OPEN_PROJECT, MyFrame::OnOpenProject)
EVT_MENU(wxID_SAVE_PROJECT, MyFrame::OnSaveProject)
EVT_MENU(wxID_CUT, MyFrame::OnCut)
EVT_MENU(wxID_COPY, MyFrame::OnCopy)
EVT_MENU(wxID_PASTE, MyFrame::OnPaste)
EVT_LISTBOX_DCLICK(ID_LISTBOX, MyFrame::OnListBoxDoubleClick)
END_EVENT_TABLE()
// ============================================================================
// implementation
// ============================================================================
// ----------------------------------------------------------------------------
// MyApp
// ----------------------------------------------------------------------------
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((wxFrame *) NULL, -1,
"wxInstall Builder",
wxPoint(100, 100), wxSize(450, 300));
frame->SetAutoLayout(TRUE);
frame->Show(TRUE);
frame->SetStatusText("Welcome to wxWindows Install Builder");
SetTopWindow(frame);
return TRUE;
}
void MyFrame::RecreateToolbar()
{
// delete and recreate the toolbar
wxToolBarBase *toolBar = GetToolBar();
delete toolBar;
SetToolBar(NULL);
long style = wxNO_BORDER | wxTB_FLAT | wxTB_DOCKABLE;
style |= m_horzToolbar ? wxTB_HORIZONTAL : wxTB_VERTICAL;
toolBar = CreateToolBar(style, ID_TOOLBAR);
toolBar->SetMargins( 4, 4 );
// Set up toolbar
wxBitmap toolBarBitmaps[8];
toolBarBitmaps[0] = wxBITMAP(new);
toolBarBitmaps[1] = wxBITMAP(open);
toolBarBitmaps[2] = wxBITMAP(save);
toolBarBitmaps[3] = wxBITMAP(copy);
toolBarBitmaps[4] = wxBITMAP(cut);
toolBarBitmaps[5] = wxBITMAP(paste);
toolBarBitmaps[6] = wxBITMAP(print);
toolBarBitmaps[7] = wxBITMAP(help);
if ( !m_smallToolbar )
{
int w = 2*toolBarBitmaps[0].GetWidth(),
h = 2*toolBarBitmaps[0].GetHeight();
for ( size_t n = 0; n < WXSIZEOF(toolBarBitmaps); n++ )
{
toolBarBitmaps[n] =
wxImage(toolBarBitmaps[n]).Scale(w, h).ConvertToBitmap();
}
toolBar->SetToolBitmapSize(wxSize(w, h));
}
#ifdef __WXMSW__
int width = 24;
#else
int width = 16;
#endif
int currentX = 5;
toolBar->AddTool(wxID_NEW_SCRIPT, toolBarBitmaps[0], wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, "New script");
currentX += width + 5;
toolBar->AddTool(wxID_OPEN_SCRIPT, toolBarBitmaps[1], wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, "Open script");
// neither the generic nor Motif native toolbars really support this
currentX += width + 5;
toolBar->AddTool(wxID_SAVE_SCRIPT, toolBarBitmaps[2], wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, "Save script");
currentX += width + 5;
toolBar->AddTool(wxID_COPY, toolBarBitmaps[3], wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, "Copy");
currentX += width + 5;
toolBar->AddTool(wxID_CUT, toolBarBitmaps[4], wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, "Cut");
currentX += width + 5;
toolBar->AddTool(wxID_PASTE, toolBarBitmaps[5], wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, "Paste");
currentX += width + 5;
toolBar->AddSeparator();
toolBar->AddTool(wxID_HELP, toolBarBitmaps[7], wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, "Help button");
// after adding the buttons to the toolbar, must call Realize() to reflect
// the changes
toolBar->Realize();
toolBar->SetRows(m_horzToolbar ? m_rows : 10 / m_rows);
}
// ----------------------------------------------------------------------------
// MyFrame
// ----------------------------------------------------------------------------
// Define my frame constructor
MyFrame::MyFrame(wxFrame* parent,
wxWindowID id,
const wxString& title,
const wxPoint& pos,
const wxSize& size,
long style)
: wxFrame(parent, id, title, pos, size, style)
{
m_listBox = new wxListBox(this, ID_LISTBOX, wxPoint(0,0), wxSize(-1, -1));
m_listBox->Append("loadwxr");
m_listBox->Append("closeold");
m_listBox->Append("mleview");
m_listBox->Append("setbutton");
m_listBox->Append("getcheck");
m_listBox->Append("message");
m_listBox->Append("disable");
m_listBox->Append("settext");
m_listBox->Append("gettext");
m_listBox->Append("grabfile");
m_listBox->Append("remove");
m_listBox->Append("system");
m_listBox->Append("startinst");
wxLayoutConstraints *b1 = new wxLayoutConstraints;
b1->left.SameAs (this, wxLeft, 0);
b1->top.SameAs (this, wxTop, 0);
b1->width.PercentOf (this, wxWidth, 20);
b1->bottom.SameAs (this, wxBottom, 0);
m_listBox->SetConstraints(b1);
m_textWindow = new wxTextCtrl(this, -1, "", wxPoint(0,0), wxSize(-1, -1), wxTE_MULTILINE);
m_textWindow->AppendText("; Script generated by wxInstall Builder\n");
wxLayoutConstraints *b2 = new wxLayoutConstraints;
b2->top.SameAs (this, wxTop, 0);
b2->left.SameAs (m_listBox, wxRight, 0);
b2->width.PercentOf (this, wxWidth, 80);
b2->bottom.SameAs (this, wxBottom, 0);
m_textWindow->SetConstraints(b2);
m_smallToolbar = TRUE;
m_horzToolbar = TRUE;
m_rows = 1;
// Give it a status line
CreateStatusBar();
// Give it an icon
SetIcon(wxICON(mondrian));
wxMenu *fileMenu = new wxMenu;
fileMenu->Append(wxID_NEW_SCRIPT, "&New Script", "New wxInstall Script" );
fileMenu->Append(wxID_OPEN_SCRIPT, "&Open Script", "Open wxInstall Script" );
fileMenu->Append(wxID_SAVE_SCRIPT, "&Save Script", "Save wxInstall Script" );
fileMenu->AppendSeparator();
/*fileMenu->Append(wxID_NEW_PROJECT, "N&ew Project", "New wxInstall Project" );
fileMenu->Append(wxID_OPEN_PROJECT, "O&pen Project", "Open wxInstall Project" );
fileMenu->Append(wxID_SAVE_PROJECT, "S&ave Project", "Save wxInstall Project" );
fileMenu->AppendSeparator();*/
fileMenu->Append(wxID_EXIT, "E&xit", "Quit wxInstall Builder" );
wxMenu *helpMenu = new wxMenu;
helpMenu->Append(wxID_HELP, "&About", "About wxInstall Builder");
wxMenuBar* menuBar = new wxMenuBar( wxMB_DOCKABLE );
menuBar->Append(fileMenu, "&File");
menuBar->Append(helpMenu, "&Help");
// Associate the menu bar with the frame
SetMenuBar(menuBar);
// Create the toolbar
RecreateToolbar();
}
#if USE_GENERIC_TBAR
wxToolBar* MyFrame::OnCreateToolBar(long style,
wxWindowID id,
const wxString& name)
{
return (wxToolBar *)new wxToolBarSimple(this, id,
wxDefaultPosition, wxDefaultSize,
style, name);
}
#endif // USE_GENERIC_TBAR
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
{
Close(TRUE);
}
void MyFrame::OnCut(wxCommandEvent& WXUNUSED(event))
{
m_textWindow->Cut();
}
void MyFrame::OnCopy(wxCommandEvent& WXUNUSED(event))
{
m_textWindow->Copy();
}
void MyFrame::OnPaste(wxCommandEvent& WXUNUSED(event))
{
m_textWindow->Paste();
}
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
{
(void)wxMessageBox("wxInstall Builder by Brian Smith", "About wxInstall Builder");
}
void MyFrame::OnNewScript(wxCommandEvent& event)
{
m_textWindow->Clear();
m_textWindow->AppendText("; Script generated by wxInstall Builder\n");
}
void MyFrame::OnOpenScript(wxCommandEvent& event)
{
wxFileDialog dialog2(this, "Open Script", "", "", "*.ini", 0);
if (dialog2.ShowModal() == wxID_OK)
m_textWindow->LoadFile(dialog2.GetPath());
}
void MyFrame::OnSaveScript(wxCommandEvent& event)
{
wxFileDialog dialog2(this, "Save Script", "", "", "*.ini", 0);
if (dialog2.ShowModal() == wxID_OK)
m_textWindow->SaveFile(dialog2.GetPath());
}
void MyFrame::OnNewProject(wxCommandEvent& event)
{
}
void MyFrame::OnOpenProject(wxCommandEvent& event)
{
}
void MyFrame::OnSaveProject(wxCommandEvent& event)
{
}
void MyFrame::OnListBoxDoubleClick( wxCommandEvent &event )
{
int item;
item = m_listBox->GetSelection();
switch(item)
{
case 0:
{
wxFileDialog dialog2(this, "Choose wxr filename", "", "", "*.wxr", 0);
if (dialog2.ShowModal() == wxID_OK)
{
char tempbuf[1024] = "DialogEd ";
wxString tmp = dialog2.GetFilename();
m_textWindow->WriteText("loadwxr,");
m_textWindow->WriteText(tmp);
m_textWindow->WriteText("\n");
strcat(tempbuf, tmp);
wxExecute(tempbuf);
}
}
break;
case 1:
{
m_textWindow->WriteText("closeold\n");
}
break;
case 2:
{
wxFileDialog dialog2(this, "Choose filename to view", "", "", "*.txt", 0);
if (dialog2.ShowModal() == wxID_OK)
{
wxTextEntryDialog dialog3(this,
"Please enter name of the MLE widget",
appName,
"",
wxOK | wxCANCEL);
if (dialog3.ShowModal() == wxID_OK)
{
m_textWindow->WriteText("mleview,");
m_textWindow->WriteText(dialog3.GetValue());
m_textWindow->WriteText(",");
m_textWindow->WriteText(dialog2.GetFilename());
m_textWindow->WriteText("\n");
}
}
}
break;
case 3:
{
wxFileDialog dialog2(this, "Choose script to attach to button", "", "", "*.ini", 0);
if (dialog2.ShowModal() == wxID_OK)
{
wxTextEntryDialog dialog3(this,
"Please enter ID of the button",
appName,
"",
wxOK | wxCANCEL);
if (dialog3.ShowModal() == wxID_OK)
{
m_textWindow->WriteText("setbutton,");
m_textWindow->WriteText(dialog3.GetValue());
m_textWindow->WriteText(",");
m_textWindow->WriteText(dialog2.GetFilename());
m_textWindow->WriteText("\n");
}
}
}
break;
case 4:
{
wxFileDialog dialog2(this, "Choose script to run if not checked", "", "", "*.ini", 0);
if (dialog2.ShowModal() == wxID_OK)
{
wxTextEntryDialog dialog3(this,
"Please enter name of the checkbox widget",
appName,
"",
wxOK | wxCANCEL);
if (dialog3.ShowModal() == wxID_OK)
{
m_textWindow->WriteText("getcheck,");
m_textWindow->WriteText(dialog3.GetValue());
m_textWindow->WriteText(",");
m_textWindow->WriteText(dialog2.GetFilename());
m_textWindow->WriteText("\n");
}
}
}
break;
case 5:
{
wxTextEntryDialog dialog2(this,
"Please enter the message to display to the user",
appName,
"",
wxOK | wxCANCEL);
if (dialog2.ShowModal() == wxID_OK)
{
m_textWindow->WriteText("message,\"");
m_textWindow->WriteText(dialog2.GetValue());
m_textWindow->WriteText("\"\n");
}
}
break;
case 6:
{
wxTextEntryDialog dialog2(this,
"Please enter the widget name to disable",
appName,
"",
wxOK | wxCANCEL);
if (dialog2.ShowModal() == wxID_OK)
{
m_textWindow->WriteText("disable,");
m_textWindow->WriteText(dialog2.GetValue());
m_textWindow->WriteText("\n");
}
}
break;
case 7:
{
wxTextEntryDialog dialog2(this,
"Please enter text widget name to set from",
appName,
"",
wxOK | wxCANCEL);
if (dialog2.ShowModal() == wxID_OK)
{
m_textWindow->WriteText("settext,");
m_textWindow->WriteText(dialog2.GetValue());
m_textWindow->WriteText("\n");
}
}
break;
case 8:
{
wxTextEntryDialog dialog2(this,
"Please enter text widget name to get from",
appName,
"",
wxOK | wxCANCEL);
if (dialog2.ShowModal() == wxID_OK)
{
m_textWindow->WriteText("gettext,");
m_textWindow->WriteText(dialog2.GetValue());
m_textWindow->WriteText("\n");
}
}
break;
case 9:
{
wxFileDialog dialog2(this, "Choose file to grab", "", "", "*", 0);
if (dialog2.ShowModal() == wxID_OK)
{
m_textWindow->WriteText("grabfile,");
m_textWindow->WriteText(dialog2.GetFilename());
m_textWindow->WriteText("\n");
}
}
break;
case 10:
{
wxFileDialog dialog2(this, "Choose file to remove", "", "", "*", 0);
if (dialog2.ShowModal() == wxID_OK)
{
m_textWindow->WriteText("remove,");
m_textWindow->WriteText(dialog2.GetFilename());
m_textWindow->WriteText("\n");
}
}
break;
case 11:
{
wxTextEntryDialog dialog2(this,
"Please enter the command to execute",
appName,
"",
wxOK | wxCANCEL);
if (dialog2.ShowModal() == wxID_OK)
{
m_textWindow->WriteText("system,");
m_textWindow->WriteText(dialog2.GetValue());
m_textWindow->WriteText("\n");
}
}
break;
case 12:
{
wxFileDialog dialog2(this, "Choose script to run at installation completion", "", "", "*.ini", 0);
if (dialog2.ShowModal() == wxID_OK)
{
wxTextEntryDialog dialog3(this,
"Please enter name of the gauge widget",
appName,
"",
wxOK | wxCANCEL);
if (dialog3.ShowModal() == wxID_OK)
{
m_textWindow->WriteText("startinst,");
m_textWindow->WriteText(dialog3.GetValue());
m_textWindow->WriteText(",");
m_textWindow->WriteText(dialog2.GetFilename());
m_textWindow->WriteText("\n");
}
}
}
break;
}
}

View File

@@ -0,0 +1,8 @@
NAME ToolTest
DESCRIPTION 'wxToolBar Sample'
EXETYPE WINDOWS
STUB 'WINSTUB.EXE'
CODE PRELOAD MOVEABLE DISCARDABLE
DATA PRELOAD MOVEABLE MULTIPLE
HEAPSIZE 1024
STACKSIZE 8192

View File

@@ -0,0 +1,12 @@
mondrian ICON "mondrian.ico"
#include "wx/msw/wx.rc"
new BITMAP "bitmaps/new.bmp"
open BITMAP "bitmaps/open.bmp"
save BITMAP "bitmaps/save.bmp"
copy BITMAP "bitmaps/copy.bmp"
cut BITMAP "bitmaps/cut.bmp"
paste BITMAP "bitmaps/paste.bmp"
print BITMAP "bitmaps/print.bmp"
help BITMAP "bitmaps/help.bmp"

View File

@@ -0,0 +1,175 @@
# Microsoft Developer Studio Project File - Name="wxibVC" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Application" 0x0101
CFG=wxibVC - 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 "wxibVC.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 "wxibVC.mak" CFG="wxibVC - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "wxibVC - Win32 Release" (based on "Win32 (x86) Application")
!MESSAGE "wxibVC - Win32 Debug" (based on "Win32 (x86) Application")
!MESSAGE "wxibVC - Win32 Debug DLL" (based on "Win32 (x86) Application")
!MESSAGE "wxibVC - Win32 Release DLL" (based on "Win32 (x86) Application")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "wxibVC - 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 /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c
# SUBTRACT CPP /YX
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
# ADD BASE RSC /l 0x809 /d "NDEBUG"
# ADD RSC /l 0x809 /d "NDEBUG"
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 wsock32.lib winmm.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 winmm.lib wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/wxib.exe" /libpath:"../../lib" /libpath:"../../contrib/lib"
!ELSEIF "$(CFG)" == "wxibVC - 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 /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
# ADD BASE RSC /l 0x809 /d "_DEBUG"
# ADD RSC /l 0x809 /d "_DEBUG"
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 wsock32.lib winmm.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 winmm.lib wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"wxib.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib"
!ELSEIF "$(CFG)" == "wxibVC - 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 /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
# ADD BASE RSC /l 0x809 /d "_DEBUG"
# ADD RSC /l 0x809 /d "_DEBUG"
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 wsock32.lib winmm.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 winmm.lib wxdlld.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/wxib.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib"
!ELSEIF "$(CFG)" == "wxibVC - 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 /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c
# SUBTRACT CPP /YX
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
# ADD BASE RSC /l 0x809 /d "NDEBUG"
# ADD RSC /l 0x809 /d "NDEBUG"
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 wsock32.lib winmm.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 winmm.lib wxdll.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/wxib.exe" /libpath:"../../lib" /libpath:"../../contrib/lib"
!ENDIF
# Begin Target
# Name "wxibVC - Win32 Release"
# Name "wxibVC - Win32 Debug"
# Name "wxibVC - Win32 Debug DLL"
# Name "wxibVC - Win32 Release DLL"
# Begin Source File
SOURCE=.\wxib.cpp
!IF "$(CFG)" == "wxibVC - Win32 Release"
!ELSEIF "$(CFG)" == "wxibVC - Win32 Debug"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "wxibVC - Win32 Debug DLL"
# SUBTRACT BASE CPP /YX /Yc /Yu
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "wxibVC - Win32 Release DLL"
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\wxib.rc
# ADD BASE RSC /l 0x809
# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include"
# End Source File
# End Target
# End Project

View File

@@ -0,0 +1,29 @@
Microsoft Developer Studio Workspace File, Format Version 5.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "wxibVC"=.\wxibVC.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################