- cdrom, floppy, harddisk and keyboard indicators added using the default status bar
This commit is contained in:
parent
72f787b555
commit
1f44ea57fd
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////
|
||||
// $Id: wx.cc,v 1.65 2003-08-23 17:53:27 vruppert Exp $
|
||||
// $Id: wx.cc,v 1.66 2004-02-10 20:30:14 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// wxWindows VGA display for Bochs. wx.cc implements a custom
|
||||
@ -65,6 +65,7 @@ class bx_wx_gui_c : public bx_gui_c {
|
||||
public:
|
||||
bx_wx_gui_c (void) {}
|
||||
DECLARE_GUI_VIRTUAL_METHODS()
|
||||
virtual void statusbar_setitem(int element, bx_bool active);
|
||||
};
|
||||
|
||||
// declare one instance of the gui object and call macro to insert the
|
||||
@ -1026,6 +1027,26 @@ void bx_wx_gui_c::handle_events(void)
|
||||
num_events = 0;
|
||||
}
|
||||
|
||||
void
|
||||
bx_wx_gui_c::statusbar_setitem(int element, bx_bool active)
|
||||
{
|
||||
if (element < 0) {
|
||||
for (unsigned i = 0; i < statusitem_count; i++) {
|
||||
if (active) {
|
||||
theFrame->SetStatusText(statusitem_text[i], i+1);
|
||||
} else {
|
||||
theFrame->SetStatusText("", i+1);
|
||||
}
|
||||
}
|
||||
} else if ((unsigned)element < statusitem_count) {
|
||||
if (active) {
|
||||
theFrame->SetStatusText(statusitem_text[element], element+1);
|
||||
} else {
|
||||
theFrame->SetStatusText("", element+1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ::FLUSH()
|
||||
//
|
||||
// Called periodically, requesting that the gui code flush all pending
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////
|
||||
// $Id: wxmain.cc,v 1.101 2003-10-24 15:39:57 vruppert Exp $
|
||||
// $Id: wxmain.cc,v 1.102 2004-02-10 20:30:14 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// wxmain.cc implements the wxWindows frame, toolbar, menus, and dialogs.
|
||||
@ -475,6 +475,10 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size,
|
||||
menuLog->Enable (ID_Log_View, FALSE); // not implemented
|
||||
|
||||
CreateStatusBar();
|
||||
wxStatusBar *sb = GetStatusBar();
|
||||
sb->SetFieldsCount(12);
|
||||
const int sbwidth[12] = {160, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, -1};
|
||||
sb->SetStatusWidths(12, sbwidth);
|
||||
|
||||
CreateToolBar(wxNO_BORDER|wxHORIZONTAL|wxTB_FLAT);
|
||||
wxToolBar *tb = GetToolBar();
|
||||
|
Loading…
Reference in New Issue
Block a user