warning msgs

toolbar updates
mdi fixes
dnd works now
Forty Thieves drawing optimization
wxDF_Text constants
ListCtrl bugs fixed
memory leak work
imrc now refers to home dir
dcclient/memory leak fixed


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@381 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
1998-07-27 20:50:48 +00:00
parent bf79063cc8
commit e3e65dac0c
76 changed files with 1654 additions and 474 deletions

1
samples/dnd/Makefile Normal file
View File

@@ -0,0 +1 @@
include ../../src/gtk/setup/general/makeapp

26
samples/dnd/Makefile.in Normal file
View File

@@ -0,0 +1,26 @@
# WXXT base directory
WXBASEDIR=@WXBASEDIR@
# set the OS type for compilation
OS=@OS@
# compile a library only
RULE=bin
# define library name
BIN_TARGET=dnd
# define library sources
BIN_SRC=\
dnd.cpp
#define library objects
BIN_OBJ=\
dnd.o
# additional things needed to link
BIN_LINK=
# additional things needed to compile
ADD_COMPILE=
# include the definitions now
include ../../../template.mak

View File

@@ -138,8 +138,12 @@ DnDFrame::DnDFrame(wxFrame *frame, char *title, int x, int y, int w, int h)
m_strText("wxWindows drag & drop works :-)")
{
#ifdef __WXMSW__
// frame icon and status bar
SetIcon(wxIcon("mondrian"));
#endif
const int widths[] = { -1 };
CreateStatusBar();
@@ -172,6 +176,7 @@ DnDFrame::DnDFrame(wxFrame *frame, char *title, int x, int y, int w, int h)
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);
@@ -181,10 +186,10 @@ DnDFrame::DnDFrame(wxFrame *frame, char *title, int x, int y, int w, int h)
m_pLogPrev = wxLog::SetActiveTarget(m_pLog);
// associate drop targets with 2 text controls
m_ctrlFile->SetDropTarget(new DnDFile(m_ctrlFile));
m_ctrlText->SetDropTarget(new DnDText(m_ctrlText));
// m_ctrlFile->SetDropTarget(new DnDFile(m_ctrlFile));
m_ctrlText->SetDropTarget(new DnDText(m_ctrlText));
wxLayoutConstraints *c;
wxLayoutConstraints *c;
// Top-left listbox
c = new wxLayoutConstraints;
@@ -274,7 +279,7 @@ void DnDFrame::OnHelp(wxCommandEvent& /* event */)
dialog.ShowModal();
}
void DnDFrame::OnLogClear(wxCommandEvent& event)
void DnDFrame::OnLogClear(wxCommandEvent& /* event */ )
{
m_ctrlLog->Clear();
}
@@ -284,12 +289,12 @@ bool DnDFrame::OnClose()
return TRUE;
}
void DnDFrame::OnMouseBtnDown(wxMouseEvent& event)
void DnDFrame::OnMouseBtnDown(wxMouseEvent& /* event */ )
{
if ( !m_strText.IsEmpty() ) {
// start drag operation
wxTextDataObject data(m_strText);
wxDropSource dragSource(data);
wxDropSource dragSource(data, this);
const char *pc;
switch ( dragSource.DoDragDrop(TRUE) ) {

View File

@@ -244,7 +244,7 @@ MyFrame::MyFrame(wxDocManager *manager, wxFrame *frame, const wxString& title,
editMenu = NULL;
}
void MyFrame::OnAbout(wxCommandEvent& event)
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event) )
{
(void)wxMessageBox("DocView Demo\nAuthor: Julian Smart julian.smart@ukonline.co.uk\nUsage: docview.exe [-single]", "About DocView");
}

View File

@@ -44,7 +44,7 @@ END_EVENT_TABLE()
// What to do when a view is created. Creates actual
// windows for displaying the view.
bool DrawingView::OnCreate(wxDocument *doc, long flags)
bool DrawingView::OnCreate(wxDocument *doc, long WXUNUSED(flags) )
{
if (!singleWindowMode)
{
@@ -99,7 +99,7 @@ void DrawingView::OnDraw(wxDC *dc)
}
}
void DrawingView::OnUpdate(wxView *sender, wxObject *hint)
void DrawingView::OnUpdate(wxView *WXUNUSED(sender), wxObject *WXUNUSED(hint))
{
if (canvas)
canvas->Refresh();
@@ -147,7 +147,7 @@ bool DrawingView::OnClose(bool deleteWindow)
return TRUE;
}
void DrawingView::OnCut(wxCommandEvent& event)
void DrawingView::OnCut(wxCommandEvent& WXUNUSED(event) )
{
DrawingDocument *doc = (DrawingDocument *)GetDocument();
doc->GetCommandProcessor()->Submit(new DrawingCommand("Cut Last Segment", DOODLE_CUT, doc, NULL));
@@ -155,7 +155,7 @@ void DrawingView::OnCut(wxCommandEvent& event)
IMPLEMENT_DYNAMIC_CLASS(TextEditView, wxView)
bool TextEditView::OnCreate(wxDocument *doc, long flags)
bool TextEditView::OnCreate(wxDocument *doc, long WXUNUSED(flags) )
{
frame = wxGetApp().CreateChildFrame(doc, this, FALSE);
@@ -178,11 +178,11 @@ bool TextEditView::OnCreate(wxDocument *doc, long flags)
}
// Handled by wxTextWindow
void TextEditView::OnDraw(wxDC *dc)
void TextEditView::OnDraw(wxDC *WXUNUSED(dc) )
{
}
void TextEditView::OnUpdate(wxView *sender, wxObject *hint)
void TextEditView::OnUpdate(wxView *WXUNUSED(sender), wxObject *WXUNUSED(hint) )
{
}
@@ -264,11 +264,13 @@ void MyCanvas::OnMouseEvent(wxMouseEvent& event)
currentSegment = new DoodleSegment;
DoodleLine *newLine = new DoodleLine;
newLine->x1 = xpos; newLine->y1 = ypos;
newLine->x2 = pt.x; newLine->y2 = pt.y;
newLine->x1 = (long)xpos;
newLine->y1 = (long)ypos;
newLine->x2 = pt.x;
newLine->y2 = pt.y;
currentSegment->lines.Append(newLine);
dc.DrawLine(xpos, ypos, pt.x, pt.y);
dc.DrawLine( (long)xpos, (long)ypos, pt.x, pt.y);
}
xpos = pt.x;
ypos = pt.y;

View File

@@ -79,8 +79,7 @@ bool MyApp::OnInit(void)
// Make a panel with a message
wxPanel *panel = new wxPanel(frame, -1, wxPoint(0, 0), wxSize(400, 200), wxTAB_TRAVERSAL);
wxStaticText *msg = new wxStaticText(panel, 311, "Hello!", wxPoint(10, 10), wxSize(-1, -1),
0);
(void)new wxStaticText(panel, 311, "Hello!", wxPoint(10, 10), wxSize(-1, -1), 0);
// Show the frame
frame->Show(TRUE);

View File

@@ -109,6 +109,7 @@ void FortyCanvas::OnDraw(wxDC& dc)
m_game->DisplayScore(dc);
delete m_playerDialog;
m_playerDialog = 0;
Refresh();
}
else
{

View File

@@ -11,12 +11,12 @@
// Last modified: 22nd July 1998 - ported to wxWindows 2.0
/////////////////////////////////////////////////////////////////////////////
//+-------------------------------------------------------------+
//| Description: |
//| A class for drawing playing cards. |
//| Currently assumes that the card symbols have been |
//| loaded into hbmap_symbols and the pictures for the |
//| Jack, Queen and King have been loaded into |
//| hbmap_pictures. |
//| Description
//| A class for drawing playing cards.
//| Currently assumes that the card symbols have been
//| loaded into hbmap_symbols and the pictures for the
//| Jack, Queen and King have been loaded into
//| hbmap_pictures.
//+-------------------------------------------------------------+
#ifdef __GNUG__

View File

@@ -41,6 +41,7 @@
#include "card.h"
#include "pile.h"
#include "wx/app.h"
//+-------------------------------------------------------------+
//| Pile::Pile() |
@@ -72,13 +73,22 @@ Pile::Pile(int x, int y, int dx, int dy)
//| at the origin of the pile, shifting each subsequent |
//| card by the pile's x and y offsets. |
//+-------------------------------------------------------------+
void Pile::Redraw(wxDC& dc)
void Pile::Redraw(wxDC& dc )
{
wxWindow *frame = wxTheApp->GetTopWindow();
wxWindow *canvas = NULL;
if (frame)
{
wxNode *node = frame->GetChildren()->First();
if (node) canvas = (wxWindow*)node->Data();
}
if (m_topCard >= 0)
{
if (m_dx == 0 && m_dy == 0)
{
m_cards[m_topCard]->Draw(dc, m_x, m_y);
if ((canvas) && (canvas->IsExposed(m_x,m_y,60,200)))
m_cards[m_topCard]->Draw(dc, m_x, m_y);
}
else
{
@@ -86,14 +96,16 @@ void Pile::Redraw(wxDC& dc)
int y = m_y;
for (int i = 0; i <= m_topCard; i++)
{
m_cards[i]->Draw(dc, x, y);
x += m_dx;
y += m_dy;
if ((canvas) && (canvas->IsExposed(x,y,60,200)))
m_cards[i]->Draw(dc, x, y);
x += m_dx;
y += m_dy;
}
}
}
else
{
if ((canvas) && (canvas->IsExposed(m_x,m_y,60,200)))
Card::DrawNullCard(dc, m_x, m_y);
}
}

View File

@@ -102,20 +102,20 @@ MyFrame::MyFrame(wxWindow *parent, const wxWindowID id, const wxString& title, c
InitToolBar(GetToolBar());
}
void MyFrame::OnQuit(wxCommandEvent& event)
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event) )
{
Close(TRUE);
}
void MyFrame::OnAbout(wxCommandEvent& event)
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event) )
{
(void)wxMessageBox("wxWindows 2.0 MDI Demo\nAuthor: Julian Smart (c) 1997\nUsage: mdi.exe", "About MDI Demo");
}
void MyFrame::OnNewWindow(wxCommandEvent& event)
void MyFrame::OnNewWindow(wxCommandEvent& WXUNUSED(event) )
{
// Make another frame, containing a canvas
MyChild *subframe = new MyChild(frame, "Canvas Frame", wxPoint(10, 10), wxSize(300, 300),
MyChild *subframe = new MyChild(frame, "Canvas Frame", wxPoint(4, 4), wxSize(100, 100),
wxDEFAULT_FRAME);
char titleBuf[100];
@@ -241,12 +241,10 @@ bool MyFrame::OnClose(void)
return TRUE;
}
void MyFrame::OnSize(wxSizeEvent& event)
void MyFrame::OnSize(wxSizeEvent& WXUNUSED(event) )
{
int w, h;
GetClientSize(&w, &h);
int tw = 0;
int th = 0;
textWindow->SetSize(0, 0, 200, h);
GetClientWindow()->SetSize(200, 0, w - 200, h);
@@ -318,7 +316,6 @@ void MyFrame::InitToolBar(wxToolBar* toolBar)
#else
int width = 16;
#endif
int offX = 5;
int currentX = 5;
toolBar->AddTool(0, *bitmaps[0], wxNullBitmap, FALSE, currentX, -1, NULL, "New file");

View File

@@ -28,7 +28,7 @@
#include "wx/date.h"
#if !WXDEBUG
#error You must set WXDEBUG to 1 on the 'make' command line or make.env.
#error You must set WXDEBUG to 1 on the 'make' command line (MSW) or with configure (GTK)
#endif
// #define new WXDEBUG_NEW

View File

@@ -84,8 +84,7 @@ bool MyApp::OnInit(void)
// Make a panel with a message
wxPanel *panel = new wxPanel(frame, -1, wxPoint(0, 0), wxSize(400, 200), wxTAB_TRAVERSAL);
wxStaticText *msg = new wxStaticText(panel, 311, "Hello!", wxPoint(10, 10), wxSize(-1, -1),
0);
(void)new wxStaticText(panel, 311, "Hello!", wxPoint(10, 10), wxSize(-1, -1), 0);
// Show the frame
frame->Show(TRUE);

View File

@@ -89,18 +89,18 @@ MyFrame::MyFrame(wxFrame *frame, const wxString& title, const wxPoint& pos, cons
canvas = NULL;
}
void MyFrame::OnQuit(wxCommandEvent& event)
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
{
Close(TRUE);
}
void MyFrame::OnAbout(wxCommandEvent& event)
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
{
(void)wxMessageBox("PNG demo\nJulian Smart (c) 1998",
"About PNG Demo", wxOK);
}
void MyFrame::OnLoadFile(wxCommandEvent& event)
void MyFrame::OnLoadFile(wxCommandEvent& WXUNUSED(event))
{
// Show file selector.
char *f = wxFileSelector("Open Image", NULL, NULL,"png",
@@ -136,7 +136,7 @@ MyCanvas::~MyCanvas(void)
}
// Define the repainting behaviour
void MyCanvas::OnPaint(wxPaintEvent& event)
void MyCanvas::OnPaint(wxPaintEvent& WXUNUSED(event))
{
wxPaintDC dc(this);
dc.SetPen(wxRED_PEN);

View File

@@ -159,12 +159,12 @@ MyFrame::MyFrame(wxFrame *frame, const wxString& title, const wxPoint& pos, cons
canvas = NULL;
}
void MyFrame::OnExit(wxCommandEvent& event)
void MyFrame::OnExit(wxCommandEvent& WXUNUSED(event))
{
Close(TRUE);
}
void MyFrame::OnPrint(wxCommandEvent& event)
void MyFrame::OnPrint(wxCommandEvent& WXUNUSED(event))
{
#ifdef __WXMSW__
wxGetApp().SetPrintMode(wxPRINT_WINDOWS);
@@ -177,7 +177,7 @@ void MyFrame::OnPrint(wxCommandEvent& event)
wxMessageBox("There was a problem printing.\nPerhaps your current printer is not set correctly?", "Printing", wxOK);
}
void MyFrame::OnPrintPS(wxCommandEvent& event)
void MyFrame::OnPrintPS(wxCommandEvent& WXUNUSED(event))
{
wxGetApp().SetPrintMode(wxPRINT_POSTSCRIPT);
@@ -186,7 +186,7 @@ void MyFrame::OnPrintPS(wxCommandEvent& event)
printer.Print(this, &printout, TRUE);
}
void MyFrame::OnPrintPreview(wxCommandEvent& event)
void MyFrame::OnPrintPreview(wxCommandEvent& WXUNUSED(event))
{
#ifdef __WXMSW__
wxGetApp().SetPrintMode(wxPRINT_WINDOWS);
@@ -211,7 +211,7 @@ void MyFrame::OnPrintPreview(wxCommandEvent& event)
frame->Show(TRUE);
}
void MyFrame::OnPrintPreviewPS(wxCommandEvent& event)
void MyFrame::OnPrintPreviewPS(wxCommandEvent& WXUNUSED(event))
{
wxGetApp().SetPrintMode(wxPRINT_POSTSCRIPT);
@@ -226,7 +226,7 @@ void MyFrame::OnPrintPreviewPS(wxCommandEvent& event)
frame->Show(TRUE);
}
void MyFrame::OnPrintSetup(wxCommandEvent& event)
void MyFrame::OnPrintSetup(wxCommandEvent& WXUNUSED(event))
{
#ifdef __WXMSW__
wxGetApp().SetPrintMode(wxPRINT_WINDOWS);
@@ -247,7 +247,7 @@ void MyFrame::OnPrintSetup(wxCommandEvent& event)
orientation = printerDialog.GetPrintData().GetOrientation();
}
void MyFrame::OnPageSetup(wxCommandEvent& event)
void MyFrame::OnPageSetup(wxCommandEvent& WXUNUSED(event))
{
#ifdef __WXMSW__
wxGetApp().SetPrintMode(wxPRINT_WINDOWS);
@@ -268,7 +268,7 @@ void MyFrame::OnPageSetup(wxCommandEvent& event)
orientation = data.GetOrientation();
}
void MyFrame::OnPrintSetupPS(wxCommandEvent& event)
void MyFrame::OnPrintSetupPS(wxCommandEvent& WXUNUSED(event))
{
wxGetApp().SetPrintMode(wxPRINT_POSTSCRIPT);
@@ -282,7 +282,7 @@ void MyFrame::OnPrintSetupPS(wxCommandEvent& event)
orientation = printerDialog.GetPrintData().GetOrientation();
}
void MyFrame::OnPageSetupPS(wxCommandEvent& event)
void MyFrame::OnPageSetupPS(wxCommandEvent& WXUNUSED(event))
{
wxGetApp().SetPrintMode(wxPRINT_POSTSCRIPT);
@@ -295,7 +295,7 @@ void MyFrame::OnPageSetupPS(wxCommandEvent& event)
orientation = pageSetupDialog.GetPageSetupData().GetOrientation();
}
void MyFrame::OnPrintAbout(wxCommandEvent& event)
void MyFrame::OnPrintAbout(wxCommandEvent& WXUNUSED(event))
{
(void)wxMessageBox("wxWindows printing demo\nAuthor: Julian Smart julian.smart@ukonline.co.uk",
"About wxWindows printing demo", wxOK|wxCENTRE);
@@ -309,19 +309,19 @@ void MyFrame::Draw(wxDC& dc)
dc.SetBrush(wxCYAN_BRUSH);
dc.SetPen(wxRED_PEN);
dc.DrawRectangle(0.0, 30.0, 200.0, 100.0);
dc.DrawText("Rectangle 200 by 100", 40.0, 40.0);
dc.DrawRectangle(0, 30, 200, 100);
dc.DrawText("Rectangle 200 by 100", 40, 40);
dc.DrawEllipse(50.0, 140.0, 100.0, 50.0);
dc.DrawEllipse(50, 140, 100, 50);
dc.DrawText("Test message: this is in 11 point text", 10.0, 180.0);
dc.DrawText("Test message: this is in 11 point text", 10, 180);
dc.SetPen(wxBLACK_PEN);
dc.DrawLine(0.0, 0.0, 200.0, 200.0);
dc.DrawLine(200.0, 0.0, 0.0, 200.0);
dc.DrawLine(0, 0, 200, 200);
dc.DrawLine(200, 0, 0, 200);
}
void MyFrame::OnSize(wxSizeEvent& event)
void MyFrame::OnSize(wxSizeEvent& event )
{
wxFrame::OnSize(event);
}
@@ -346,7 +346,7 @@ void MyCanvas::OnDraw(wxDC& dc)
frame->Draw(dc);
}
void MyCanvas::OnEvent(wxMouseEvent& event)
void MyCanvas::OnEvent(wxMouseEvent& WXUNUSED(event))
{
}
@@ -373,7 +373,7 @@ bool MyPrintout::OnPrintPage(int page)
char buf[200];
sprintf(buf, "PAGE %d", page);
dc->DrawText(buf, 10.0, 10.0);
dc->DrawText(buf, 10, 10);
return TRUE;
}
@@ -438,7 +438,7 @@ void MyPrintout::DrawPageOne(wxDC *dc)
// Set the scale and origin
dc->SetUserScale(actualScale, actualScale);
dc->SetDeviceOrigin(posX, posY);
dc->SetDeviceOrigin( (long)posX, (long)posY );
frame->Draw(*dc);
}
@@ -486,13 +486,13 @@ void MyPrintout::DrawPageTwo(wxDC *dc)
float logUnitsFactor = (float)(ppiPrinterX/(scale*25.1));
float logUnits = (float)(50*logUnitsFactor);
dc->SetPen(wxBLACK_PEN);
dc->DrawLine(50.0, 50.0, (float)(50.0 + logUnits), 50.0);
dc->DrawLine(50.0, 50.0, 50.0, (float)(50.0 + logUnits));
dc->DrawLine(50, 50, (long)(50.0 + logUnits), 50);
dc->DrawLine(50, 50, 50, (long)(50.0 + logUnits));
dc->SetFont(itemFont);
dc->SetBackgroundMode(wxTRANSPARENT);
dc->DrawText("Some test text", 200.0, 200.0);
dc->DrawText("Some test text", 200, 200 );
// TESTING
@@ -510,8 +510,10 @@ void MyPrintout::DrawPageTwo(wxDC *dc)
float rightMarginLogical = (float)(logUnitsFactor*(pageWidthMM - rightMargin));
dc->SetPen(wxBLACK_PEN);
dc->DrawLine(leftMarginLogical, topMarginLogical, rightMarginLogical, topMarginLogical);
dc->DrawLine(leftMarginLogical, bottomMarginLogical, rightMarginLogical, bottomMarginLogical);
dc->DrawLine( (long)leftMarginLogical, (long)topMarginLogical,
(long)rightMarginLogical, (long)topMarginLogical);
dc->DrawLine( (long)leftMarginLogical, (long)bottomMarginLogical,
(long)rightMarginLogical, (long)bottomMarginLogical);
WritePageHeader(this, dc, "A header", logUnitsFactor);
}
@@ -541,10 +543,11 @@ bool WritePageHeader(wxPrintout *printout, wxDC *dc, char *text, float mmToLogic
long xExtent, yExtent;
dc->GetTextExtent(text, &xExtent, &yExtent);
float xPos = (float)(((((pageWidthMM - leftMargin - rightMargin)/2.0)+leftMargin)*mmToLogical) - (xExtent/2.0));
dc->DrawText(text, (long)xPos, topMarginLogical);
dc->DrawText(text, (long)xPos, (long)topMarginLogical);
dc->SetPen(wxBLACK_PEN);
dc->DrawLine(leftMarginLogical, topMarginLogical+yExtent, rightMarginLogical, topMarginLogical+yExtent);
dc->DrawLine( (long)leftMarginLogical, (long)(topMarginLogical+yExtent),
(long)rightMarginLogical, (long)topMarginLogical+yExtent );
return TRUE;
}

View File

@@ -163,12 +163,12 @@ bool MyFrame::OnClose()
return TRUE;
}
void MyFrame::Quit(wxCommandEvent& event)
void MyFrame::Quit(wxCommandEvent& WXUNUSED(event) )
{
Close(TRUE);
}
void MyFrame::SplitHorizontal(wxCommandEvent& event)
void MyFrame::SplitHorizontal(wxCommandEvent& WXUNUSED(event) )
{
if ( splitter->IsSplit() )
splitter->Unsplit();
@@ -177,7 +177,7 @@ void MyFrame::SplitHorizontal(wxCommandEvent& event)
splitter->SplitHorizontally( leftCanvas, rightCanvas );
}
void MyFrame::SplitVertical(wxCommandEvent& event)
void MyFrame::SplitVertical(wxCommandEvent& WXUNUSED(event) )
{
if ( splitter->IsSplit() )
splitter->Unsplit();
@@ -186,7 +186,7 @@ void MyFrame::SplitVertical(wxCommandEvent& event)
splitter->SplitVertically( leftCanvas, rightCanvas );
}
void MyFrame::Unsplit(wxCommandEvent& event)
void MyFrame::Unsplit(wxCommandEvent& WXUNUSED(event) )
{
if ( splitter->IsSplit() )
splitter->Unsplit();

View File

@@ -52,12 +52,12 @@ MyDialog::MyDialog(wxWindow* parent, const wxWindowID id, const wxString& title,
Init();
}
void MyDialog::OnOK(wxCommandEvent& event)
void MyDialog::OnOK(wxCommandEvent& WXUNUSED(event) )
{
EndModal(wxID_OK);
}
void MyDialog::OnCloseWindow(wxCloseEvent& event)
void MyDialog::OnCloseWindow(wxCloseEvent& WXUNUSED(event) )
{
EndModal(wxID_CANCEL);
}
@@ -68,8 +68,8 @@ void MyDialog::Init(void)
int dialogHeight = 390;
wxButton *okButton = new wxButton(this, wxID_OK, "Close", wxPoint(100, 330), wxSize(80, 25));
wxButton *cancelButton = new wxButton(this, wxID_CANCEL, "Cancel", wxPoint(185, 330), wxSize(80, 25));
wxButton *HelpButton = new wxButton(this, wxID_HELP, "Help", wxPoint(270, 330), wxSize(80, 25));
(void)new wxButton(this, wxID_CANCEL, "Cancel", wxPoint(185, 330), wxSize(80, 25));
(void)new wxButton(this, wxID_HELP, "Help", wxPoint(270, 330), wxSize(80, 25));
okButton->SetDefault();
// Note, omit the wxTAB_STYLE_COLOUR_INTERIOR, so we will guarantee a match
@@ -136,7 +136,7 @@ void MyDialog::Init(void)
view->AddTabWindow(TEST_TAB_DOG, panel2);
// Don't know why this is necessary under Motif...
#ifdef wx_motif
#ifndef __WXMSW__
this->SetSize(dialogWidth, dialogHeight-20);
#endif

View File

@@ -157,7 +157,7 @@ MyFrame::MyFrame(wxFrame *frame, char *title, int x, int y, int w, int h):
wxFrame(frame, -1, title, wxPoint(x, y), wxSize(w, h))
{}
void MyFrame::OnStartThread(wxCommandEvent& event)
void MyFrame::OnStartThread(wxCommandEvent& WXUNUSED(event) )
{
MyThread *thread = new MyThread(this);
@@ -166,9 +166,9 @@ void MyFrame::OnStartThread(wxCommandEvent& event)
m_threads.Add(thread);
}
void MyFrame::OnStopThread(wxCommandEvent& event)
void MyFrame::OnStopThread(wxCommandEvent& WXUNUSED(event) )
{
uint no_thrd = m_threads.Count()-1;
int no_thrd = m_threads.Count()-1;
if (no_thrd < 0)
return;
@@ -177,10 +177,10 @@ void MyFrame::OnStopThread(wxCommandEvent& event)
m_threads.Remove(no_thrd);
}
void MyFrame::OnPauseThread(wxCommandEvent& event)
void MyFrame::OnPauseThread(wxCommandEvent& WXUNUSED(event) )
{}
void MyFrame::OnQuit(wxCommandEvent& event)
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event) )
{
uint i;
for (i=0;i<m_threads.Count();i++)
@@ -188,7 +188,7 @@ void MyFrame::OnQuit(wxCommandEvent& event)
Close(TRUE);
}
void MyFrame::OnAbout(wxCommandEvent& event)
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event) )
{
wxMessageDialog dialog(this, "wxThread sample (based on minimal)\nJulian Smart and Guilhem Lavaux",
"About wxThread sample", wxYES_NO|wxCANCEL);

1
samples/toolbar/Makefile Normal file
View File

@@ -0,0 +1 @@
include ../../src/gtk/setup/general/makeapp

View File

@@ -0,0 +1,26 @@
# WXXT base directory
WXBASEDIR=@WXBASEDIR@
# set the OS type for compilation
OS=@OS@
# compile a library only
RULE=bin
# define library name
BIN_TARGET=test
# define library sources
BIN_SRC=\
test.cpp
#define library objects
BIN_OBJ=\
test.o
# additional things needed to link
BIN_LINK=
# additional things needed to compile
ADD_COMPILE=
# include the definitions now
include ../../../template.mak

View File

@@ -163,12 +163,12 @@ MyFrame::~MyFrame(void)
delete wxGetApp().m_imageListNormal;
}
void MyFrame::OnQuit(wxCommandEvent& event)
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event) )
{
Close(TRUE);
}
void MyFrame::OnAbout(wxCommandEvent& event)
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event) )
{
wxMessageDialog dialog(this, "Tree test sample\nJulian Smart (c) 1997",
"About tree test", wxOK|wxCANCEL);
@@ -178,7 +178,7 @@ void MyFrame::OnAbout(wxCommandEvent& event)
// MyTreeCtrl
void MyTreeCtrl::OnBeginDrag(wxTreeEvent& event)
void MyTreeCtrl::OnBeginDrag(wxTreeEvent& WXUNUSED(event) )
{
if ( !wxGetApp().GetTopWindow() )
return;
@@ -195,7 +195,7 @@ void MyTreeCtrl::OnBeginDrag(wxTreeEvent& event)
#endif
}
void MyTreeCtrl::OnBeginRDrag(wxTreeEvent& event)
void MyTreeCtrl::OnBeginRDrag(wxTreeEvent& WXUNUSED(event) )
{
if ( !wxGetApp().GetTopWindow() )
return;
@@ -212,7 +212,7 @@ void MyTreeCtrl::OnBeginRDrag(wxTreeEvent& event)
#endif
}
void MyTreeCtrl::OnBeginLabelEdit(wxTreeEvent& event)
void MyTreeCtrl::OnBeginLabelEdit(wxTreeEvent& WXUNUSED(event) )
{
if ( !wxGetApp().GetTopWindow() )
return;
@@ -229,7 +229,7 @@ void MyTreeCtrl::OnBeginLabelEdit(wxTreeEvent& event)
#endif
}
void MyTreeCtrl::OnEndLabelEdit(wxTreeEvent& event)
void MyTreeCtrl::OnEndLabelEdit(wxTreeEvent& WXUNUSED(event) )
{
if ( !wxGetApp().GetTopWindow() )
return;
@@ -246,7 +246,7 @@ void MyTreeCtrl::OnEndLabelEdit(wxTreeEvent& event)
#endif
}
void MyTreeCtrl::OnDeleteItem(wxTreeEvent& event)
void MyTreeCtrl::OnDeleteItem(wxTreeEvent& WXUNUSED(event) )
{
if ( !wxGetApp().GetTopWindow() )
return;
@@ -263,7 +263,7 @@ void MyTreeCtrl::OnDeleteItem(wxTreeEvent& event)
#endif
}
void MyTreeCtrl::OnGetInfo(wxTreeEvent& event)
void MyTreeCtrl::OnGetInfo(wxTreeEvent& WXUNUSED(event) )
{
if ( !wxGetApp().GetTopWindow() )
return;
@@ -280,7 +280,7 @@ void MyTreeCtrl::OnGetInfo(wxTreeEvent& event)
#endif
}
void MyTreeCtrl::OnSetInfo(wxTreeEvent& event)
void MyTreeCtrl::OnSetInfo(wxTreeEvent& WXUNUSED(event) )
{
if ( !wxGetApp().GetTopWindow() )
return;
@@ -297,7 +297,7 @@ void MyTreeCtrl::OnSetInfo(wxTreeEvent& event)
#endif
}
void MyTreeCtrl::OnItemExpanded(wxTreeEvent& event)
void MyTreeCtrl::OnItemExpanded(wxTreeEvent& WXUNUSED(event) )
{
if ( !wxGetApp().GetTopWindow() )
return;
@@ -314,7 +314,7 @@ void MyTreeCtrl::OnItemExpanded(wxTreeEvent& event)
#endif
}
void MyTreeCtrl::OnItemExpanding(wxTreeEvent& event)
void MyTreeCtrl::OnItemExpanding(wxTreeEvent& WXUNUSED(event) )
{
if ( !wxGetApp().GetTopWindow() )
return;
@@ -331,7 +331,7 @@ void MyTreeCtrl::OnItemExpanding(wxTreeEvent& event)
#endif
}
void MyTreeCtrl::OnSelChanged(wxTreeEvent& event)
void MyTreeCtrl::OnSelChanged(wxTreeEvent& WXUNUSED(event) )
{
if ( !wxGetApp().GetTopWindow() )
return;
@@ -348,7 +348,7 @@ void MyTreeCtrl::OnSelChanged(wxTreeEvent& event)
#endif
}
void MyTreeCtrl::OnSelChanging(wxTreeEvent& event)
void MyTreeCtrl::OnSelChanging(wxTreeEvent& WXUNUSED(event) )
{
if ( !wxGetApp().GetTopWindow() )
return;
@@ -365,7 +365,7 @@ void MyTreeCtrl::OnSelChanging(wxTreeEvent& event)
#endif
}
void MyTreeCtrl::OnKeyDown(wxTreeEvent& event)
void MyTreeCtrl::OnKeyDown(wxTreeEvent& WXUNUSED(event) )
{
if ( !wxGetApp().GetTopWindow() )
return;