no changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6392 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
a95e38c034
commit
9121bed249
@ -111,6 +111,7 @@ public:
|
|||||||
void OnEnableAll(wxCommandEvent& event);
|
void OnEnableAll(wxCommandEvent& event);
|
||||||
void OnChangeColour(wxCommandEvent& event);
|
void OnChangeColour(wxCommandEvent& event);
|
||||||
void OnTestButton(wxCommandEvent& event);
|
void OnTestButton(wxCommandEvent& event);
|
||||||
|
void OnBmpButton(wxCommandEvent& event);
|
||||||
|
|
||||||
wxListBox *m_listbox,
|
wxListBox *m_listbox,
|
||||||
*m_listboxSorted;
|
*m_listboxSorted;
|
||||||
@ -263,7 +264,6 @@ bool MyApp::OnInit()
|
|||||||
frame->SetMenuBar(menu_bar);
|
frame->SetMenuBar(menu_bar);
|
||||||
|
|
||||||
frame->Show(TRUE);
|
frame->Show(TRUE);
|
||||||
frame->SetCursor(wxCursor(wxCURSOR_HAND));
|
|
||||||
|
|
||||||
//frame->GetPanel()->m_notebook->SetSelection(6);
|
//frame->GetPanel()->m_notebook->SetSelection(6);
|
||||||
|
|
||||||
@ -328,6 +328,7 @@ const int ID_SPINCTRL = 185;
|
|||||||
|
|
||||||
const int ID_BUTTON_TEST1 = 190;
|
const int ID_BUTTON_TEST1 = 190;
|
||||||
const int ID_BUTTON_TEST2 = 191;
|
const int ID_BUTTON_TEST2 = 191;
|
||||||
|
const int ID_BITMAP_BTN = 192;
|
||||||
|
|
||||||
const int ID_CHANGE_COLOUR = 200;
|
const int ID_CHANGE_COLOUR = 200;
|
||||||
|
|
||||||
@ -383,6 +384,7 @@ EVT_BUTTON (ID_BUTTON_LABEL, MyPanel::OnUpdateLabel)
|
|||||||
EVT_CHECKBOX (ID_CHANGE_COLOUR, MyPanel::OnChangeColour)
|
EVT_CHECKBOX (ID_CHANGE_COLOUR, MyPanel::OnChangeColour)
|
||||||
EVT_BUTTON (ID_BUTTON_TEST1, MyPanel::OnTestButton)
|
EVT_BUTTON (ID_BUTTON_TEST1, MyPanel::OnTestButton)
|
||||||
EVT_BUTTON (ID_BUTTON_TEST2, MyPanel::OnTestButton)
|
EVT_BUTTON (ID_BUTTON_TEST2, MyPanel::OnTestButton)
|
||||||
|
EVT_BUTTON (ID_BITMAP_BTN, MyPanel::OnBmpButton)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h )
|
MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h )
|
||||||
@ -502,6 +504,7 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h )
|
|||||||
#endif // wxUSE_TOOLTIPS
|
#endif // wxUSE_TOOLTIPS
|
||||||
(void)new wxCheckBox( panel, ID_CHANGE_COLOUR, "&Toggle colour",
|
(void)new wxCheckBox( panel, ID_CHANGE_COLOUR, "&Toggle colour",
|
||||||
wxPoint(110,170) );
|
wxPoint(110,170) );
|
||||||
|
panel->SetCursor(wxCursor(wxCURSOR_HAND));
|
||||||
m_notebook->AddPage(panel, "wxListBox", TRUE, Image_List);
|
m_notebook->AddPage(panel, "wxListBox", TRUE, Image_List);
|
||||||
|
|
||||||
panel = new wxPanel(m_notebook);
|
panel = new wxPanel(m_notebook);
|
||||||
@ -631,7 +634,7 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h )
|
|||||||
dc.DrawText("Bitmap", 30, 40);
|
dc.DrawText("Bitmap", 30, 40);
|
||||||
dc.SelectObject( wxNullBitmap );
|
dc.SelectObject( wxNullBitmap );
|
||||||
|
|
||||||
(void)new wxBitmapButton(panel, -1, bitmap, wxPoint(100, 20));
|
(void)new wxBitmapButton(panel, ID_BITMAP_BTN, bitmap, wxPoint(100, 20));
|
||||||
|
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
// test for masked bitmap display
|
// test for masked bitmap display
|
||||||
@ -745,6 +748,11 @@ void MyPanel::OnTestButton(wxCommandEvent& event)
|
|||||||
event.GetId() == ID_BUTTON_TEST1 ? _T('1') : _T('2'));
|
event.GetId() == ID_BUTTON_TEST1 ? _T('1') : _T('2'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MyPanel::OnBmpButton(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
wxLogMessage(_T("Bitmap button clicked."));
|
||||||
|
}
|
||||||
|
|
||||||
void MyPanel::OnChangeColour(wxCommandEvent& WXUNUSED(event))
|
void MyPanel::OnChangeColour(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
static wxColour s_colOld;
|
static wxColour s_colOld;
|
||||||
@ -1222,7 +1230,7 @@ void MyFrame::OnAbout( wxCommandEvent& WXUNUSED(event) )
|
|||||||
{
|
{
|
||||||
wxBusyCursor bc;
|
wxBusyCursor bc;
|
||||||
|
|
||||||
#if 0 // VZ: my temp test code, will remove
|
#if 1 // VZ: my temp test code, will remove
|
||||||
wxGetTextFromUser("msg", "caption", "val", this);
|
wxGetTextFromUser("msg", "caption", "val", this);
|
||||||
return;
|
return;
|
||||||
#endif // 0
|
#endif // 0
|
||||||
|
@ -223,10 +223,13 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
|
|||||||
// ... and attach this menu bar to the frame
|
// ... and attach this menu bar to the frame
|
||||||
SetMenuBar(menuBar);
|
SetMenuBar(menuBar);
|
||||||
|
|
||||||
|
// create the listbox in which we will show misc messages as they come
|
||||||
|
m_listbox = new wxListBox(this, -1);
|
||||||
|
|
||||||
#if wxUSE_STATUSBAR
|
#if wxUSE_STATUSBAR
|
||||||
// create a status bar just for fun (by default with 1 pane only)
|
// create a status bar just for fun (by default with 1 pane only)
|
||||||
CreateStatusBar();
|
CreateStatusBar();
|
||||||
SetStatusText(_T("Welcome to wxWindows!"));
|
SetStatusText(_T("Welcome to wxWindows exec sample!"));
|
||||||
#endif // wxUSE_STATUSBAR
|
#endif // wxUSE_STATUSBAR
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
// Created: 04/01/98
|
// Created: 04/01/98
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) Julian Smart and Robert Roebling
|
// Copyright: (c) Julian Smart and Robert Roebling
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
// For compilers that support precompilation, includes "wx/wx.h".
|
// For compilers that support precompilation, includes "wx/wx.h".
|
||||||
@ -49,7 +49,7 @@ wxButton *button = (wxButton*) NULL;
|
|||||||
|
|
||||||
// The `main program' equivalent, creating the windows and returning the
|
// The `main program' equivalent, creating the windows and returning the
|
||||||
// main frame
|
// main frame
|
||||||
bool MyApp::OnInit(void)
|
bool MyApp::OnInit()
|
||||||
{
|
{
|
||||||
// Create the mini frame window
|
// Create the mini frame window
|
||||||
mini_frame = new MyMiniFrame((wxFrame *) NULL, -1, "wxMiniFrame sample",
|
mini_frame = new MyMiniFrame((wxFrame *) NULL, -1, "wxMiniFrame sample",
|
||||||
@ -58,14 +58,14 @@ bool MyApp::OnInit(void)
|
|||||||
|
|
||||||
mini_frame->CreateToolBar(wxNO_BORDER|wxTB_HORIZONTAL|wxTB_FLAT, ID_TOOLBAR);
|
mini_frame->CreateToolBar(wxNO_BORDER|wxTB_HORIZONTAL|wxTB_FLAT, ID_TOOLBAR);
|
||||||
InitToolbar(mini_frame->GetToolBar());
|
InitToolbar(mini_frame->GetToolBar());
|
||||||
|
|
||||||
// Create the main frame window
|
// Create the main frame window
|
||||||
main_frame = new MyMainFrame((wxFrame *) NULL, -1, "wxFrame sample",
|
main_frame = new MyMainFrame((wxFrame *) NULL, -1, "wxFrame sample",
|
||||||
wxPoint(100, 100), wxSize(300, 200));
|
wxPoint(100, 100), wxSize(300, 200));
|
||||||
|
|
||||||
main_frame->CreateToolBar(wxNO_BORDER|wxTB_VERTICAL, ID_TOOLBAR);
|
main_frame->CreateToolBar(wxNO_BORDER|wxTB_VERTICAL, ID_TOOLBAR);
|
||||||
InitToolbar(main_frame->GetToolBar());
|
InitToolbar(main_frame->GetToolBar());
|
||||||
|
|
||||||
button = new wxButton( main_frame, ID_REPARENT, "Press to reparent!" );
|
button = new wxButton( main_frame, ID_REPARENT, "Press to reparent!" );
|
||||||
|
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
@ -77,7 +77,7 @@ bool MyApp::OnInit(void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
SetTopWindow(main_frame);
|
SetTopWindow(main_frame);
|
||||||
|
|
||||||
main_frame->Show(TRUE);
|
main_frame->Show(TRUE);
|
||||||
mini_frame->Show(TRUE);
|
mini_frame->Show(TRUE);
|
||||||
|
|
||||||
@ -139,7 +139,7 @@ bool MyApp::InitToolbar(wxToolBar* toolBar)
|
|||||||
toolBar->AddTool(wxID_HELP, *(toolBarBitmaps[7]), wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, "Help");
|
toolBar->AddTool(wxID_HELP, *(toolBarBitmaps[7]), wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, "Help");
|
||||||
|
|
||||||
toolBar->Realize();
|
toolBar->Realize();
|
||||||
|
|
||||||
toolBar->EnableTool( wxID_HELP, FALSE );
|
toolBar->EnableTool( wxID_HELP, FALSE );
|
||||||
|
|
||||||
// Can delete the bitmaps since they're reference counted
|
// Can delete the bitmaps since they're reference counted
|
||||||
@ -201,8 +201,8 @@ void MyMainFrame::OnReparent(wxCommandEvent& WXUNUSED(event))
|
|||||||
// after closing the mini_frame. We'll have the last laugh.
|
// after closing the mini_frame. We'll have the last laugh.
|
||||||
if (! mini_frame_exists)
|
if (! mini_frame_exists)
|
||||||
wxMessageBox("The miniframe no longer exists.\n"
|
wxMessageBox("The miniframe no longer exists.\n"
|
||||||
"You don't want to make this button an orphan, do you?",
|
"You don't want to make this button an orphan, do you?",
|
||||||
"You got to be kidding");
|
"You got to be kidding");
|
||||||
else
|
else
|
||||||
button->Reparent( mini_frame );
|
button->Reparent( mini_frame );
|
||||||
}
|
}
|
||||||
|
@ -815,26 +815,10 @@ static const wxChar* severities[] =
|
|||||||
static struct BugsGridData
|
static struct BugsGridData
|
||||||
{
|
{
|
||||||
int id;
|
int id;
|
||||||
|
wxChar summary[80];
|
||||||
// Borland can't deal with global wxStrings and will generate a
|
|
||||||
// compile time error with the initializing the gs_dataGridBugs
|
|
||||||
// array (below)
|
|
||||||
//
|
|
||||||
#ifndef __BORLANDC__
|
|
||||||
wxString summary;
|
|
||||||
#else
|
|
||||||
wxChar *summary;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
Severity severity;
|
Severity severity;
|
||||||
int prio;
|
int prio;
|
||||||
|
wxChar platform[12];
|
||||||
#ifndef __BORLANDC__
|
|
||||||
wxString platform;
|
|
||||||
#else
|
|
||||||
wxChar *platform;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
bool opened;
|
bool opened;
|
||||||
} gs_dataBugsGrid [] =
|
} gs_dataBugsGrid [] =
|
||||||
{
|
{
|
||||||
@ -958,27 +942,11 @@ void BugsGridTable::SetValue( int row, int col, const wxString& value )
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case Col_Summary:
|
case Col_Summary:
|
||||||
#ifndef __BORLANDC__
|
wxStrncpy(gd.summary, value, WXSIZEOF(gd.summary));
|
||||||
gd.summary = value;
|
|
||||||
#else
|
|
||||||
// this generates a warning message if you are using the
|
|
||||||
// memory tracing code but it should be ok :MB
|
|
||||||
//
|
|
||||||
delete gd.summary;
|
|
||||||
gd.summary = copystring( value.c_str() );
|
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Col_Platform:
|
case Col_Platform:
|
||||||
#ifndef __BORLANDC__
|
wxStrncpy(gd.platform, value, WXSIZEOF(gd.platform));
|
||||||
gd.platform = value;
|
|
||||||
#else
|
|
||||||
// this generates a warning message if you are using the
|
|
||||||
// memory tracing code but it should be ok :MB
|
|
||||||
//
|
|
||||||
delete gd.platform;
|
|
||||||
gd.platform = copystring( value.c_str() );
|
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user