本文整理汇总了C++中UpdateStatusBar函数的典型用法代码示例。如果您正苦于以下问题:C++ UpdateStatusBar函数的具体用法?C++ UpdateStatusBar怎么用?C++ UpdateStatusBar使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了UpdateStatusBar函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: switch
void wxExFrame::OnUpdateUI(wxUpdateUIEvent& event)
{
switch (event.GetId())
{
#if wxUSE_STATUSBAR
case ID_UPDATE_STATUS_BAR:
{
wxExSTC* stc = GetSTC();
if (stc != NULL && stc->HasFocus())
{
UpdateStatusBar(stc, "PaneInfo");
UpdateStatusBar(stc, "PaneLexer");
UpdateStatusBar(stc, "PaneFileType");
}
else
{
wxExListView* lv = GetListView();
if (lv != NULL && lv->HasFocus())
{
UpdateStatusBar(lv);
}
}
}
break;
#endif
case ID_VIEW_MENUBAR:
if (GetMenuBar() != NULL)
{
event.Check(GetMenuBar()->IsShown());
}
else
{
event.Check(false);
}
break;
#if wxUSE_STATUSBAR
case ID_VIEW_STATUSBAR:
if (GetStatusBar() != NULL)
{
event.Check(GetStatusBar()->IsShown());
}
else
{
event.Check(false);
}
break;
#endif
default:
wxFAIL;
break;
}
}
示例2: UpdateView
void XSilChessWindow::MousePress(int x, int y)
{
int i;
SilChessMachine::Move m;
RT.View2Board(x,y,&x,&y);
if (x<0 || y<0 || x>7 || y>7 || (x==SelX && y==SelY)) {
if (SelX!=-1 || SelY!=-1) {
SelX=SelY=-1;
UpdateView();
}
return;
}
i=Machine->GetField(x,y);
if (i!=0 && ((i<7) == Machine->IsWhiteOn())) {
if (SelX!=x || SelY!=y) {
if (SelX==-1 || SelY==-1) {
SelX=x;
SelY=y;
PaintSel();
}
else {
SelX=x;
SelY=y;
UpdateView();
}
}
return;
}
if (SelX!=-1 && SelY!=-1) {
m.X1=SelX;
m.Y1=SelY;
m.X2=x;
m.Y2=y;
if (Machine->IsLegalMove(m)) {
AbortSearching=true;
HintWanted=false;
HintValid=false;
Machine->DoMove(m);
SelX=SelY=-1;
RT.SetWorld(Machine);
UpdateStatusBar();
UpdateMovesList();
UpdateView();
}
else {
SelX=SelY=-1;
UpdateStatusBar();
UpdateView();
}
}
}
示例3: switch
bool C4EditCursor::LeftButtonUp(DWORD dwKeyState)
{
// Finish edit/tool
switch (Mode)
{
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
case C4CNS_ModeEdit:
if (DragFrame) FrameSelection();
if (DropTarget) PutContents();
break;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
case C4CNS_ModeDraw:
switch (Console.ToolsDlg.Tool)
{
case C4TLS_Line:
if (DragLine) ApplyToolLine();
break;
case C4TLS_Rect:
if (DragFrame) ApplyToolRect();
break;
}
break;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
}
// Release
Hold=false;
DragFrame=false;
DragLine=false;
DropTarget=NULL;
// Update
UpdateStatusBar();
return true;
}
示例4: cmd
bool DISPLAY_FOOTPRINTS_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aHotKey )
{
bool eventHandled = true;
// Filter out the 'fake' mouse motion after a keyboard movement
if( !aHotKey && m_movingCursorWithKeyboard )
{
m_movingCursorWithKeyboard = false;
return false;
}
wxCommandEvent cmd( wxEVT_COMMAND_MENU_SELECTED );
cmd.SetEventObject( this );
wxPoint pos = aPosition;
wxPoint oldpos = GetCrossHairPosition();
GeneralControlKeyMovement( aHotKey, &pos, true );
switch( aHotKey )
{
case WXK_F1:
cmd.SetId( ID_POPUP_ZOOM_IN );
GetEventHandler()->ProcessEvent( cmd );
break;
case WXK_F2:
cmd.SetId( ID_POPUP_ZOOM_OUT );
GetEventHandler()->ProcessEvent( cmd );
break;
case WXK_F3:
cmd.SetId( ID_ZOOM_REDRAW );
GetEventHandler()->ProcessEvent( cmd );
break;
case WXK_F4:
cmd.SetId( ID_POPUP_ZOOM_CENTER );
GetEventHandler()->ProcessEvent( cmd );
break;
case WXK_HOME:
cmd.SetId( ID_ZOOM_PAGE );
GetEventHandler()->ProcessEvent( cmd );
break;
case ' ':
GetScreen()->m_O_Curseur = GetCrossHairPosition();
break;
default:
eventHandled = false;
}
SetCrossHairPosition( pos );
RefreshCrossHair( oldpos, aPosition, aDC );
UpdateStatusBar(); /* Display new cursor coordinates */
return eventHandled;
}
示例5: MsgMenuSelect
/*------------------------------------------------------------------------
Procedure: MsgMenuSelect ID:1
Purpose: Shows in the status bar a descriptive explaation of
the purpose of each menu item.The message
WM_MENUSELECT is sent when the user starts browsing
the menu for each menu item where the mouse passes.
Input: Standard windows.
Output: The string from the resources string table is shown
Errors: If the string is not found nothing will be shown.
------------------------------------------------------------------------*/
LRESULT MsgMenuSelect(HWND hwnd, UINT uMessage, WPARAM wparam, LPARAM lparam)
{
static char szBuffer[256];
UINT nStringID = 0;
UINT fuFlags = GET_WM_MENUSELECT_FLAGS(wparam, lparam) & 0xffff;
UINT uCmd = GET_WM_MENUSELECT_CMD(wparam, lparam);
HMENU hMenu = GET_WM_MENUSELECT_HMENU(wparam, lparam);
szBuffer[0] = 0; // First reset the buffer
if (fuFlags == 0xffff && hMenu == NULL) // Menu has been closed
nStringID = 0;
else if (fuFlags & MFT_SEPARATOR) // Ignore separators
nStringID = 0;
else if (fuFlags & MF_POPUP) // Popup menu
{
if (fuFlags & MF_SYSMENU) // System menu
nStringID = IDS_SYSMENU;
else
// Get string ID for popup menu from idPopup array.
nStringID = 0;
} // for MF_POPUP
else // Must be a command item
nStringID = uCmd; // String ID == Command ID
// Load the string if we have an ID
if (0 != nStringID)
LoadString(hInst, nStringID, szBuffer, sizeof(szBuffer));
// Finally... send the string to the status bar
UpdateStatusBar(szBuffer, 0, 0);
return 0;
}
示例6: WXUNUSED
void ControlToolBar::OnPause(wxCommandEvent & WXUNUSED(evt))
{
if (!CanStopAudioStream()) {
return;
}
#ifdef EXPERIMENTAL_SCRUBBING_SUPPORT
if (gAudioIO->IsScrubbing())
// Pausing does not make sense. Force the button
// to pop up below.
mPaused = true;
#endif
if(mPaused)
{
mPause->PopUp();
mPaused=false;
}
else
{
mPause->PushDown();
mPaused=true;
}
gAudioIO->SetPaused(mPaused);
UpdateStatusBar(GetActiveProject());
}
示例7: getGdbTargetStatus
/*! Poll target to check run status
*
*/
void GdbServerWindow::pollTarget() {
static GdbTargetStatus lastTargetStatus = T_UNKNOWN;
// Get status without polling target
targetStatus = getGdbTargetStatus();
switch (targetStatus) {
case T_RUNNING:
case T_SLEEPING:
// Actually poll the target
targetStatus = gdbPollTarget();
// Set up next polling time
statusTimer->Start(pollIntervalFast, wxTIMER_ONE_SHOT);
break;
case T_NOCONNECTION:
Logging::print("GdbServerWindow::pollTarget() - T_NOCONNECTION\n");
dropConnection();
break;
case T_UNKNOWN:
case T_HALT:
// Don't poll while not running
break;
}
if (targetStatus != lastTargetStatus) {
if (targetStatus == T_NOCONNECTION) {
Logging::print("GdbServerWindow::pollTarget(), status changed to T_NOCONNECTION\n");
}
UpdateStatusBar();
}
lastTargetStatus = targetStatus;
}
示例8: Close
/*!
* Drop client connection and clean up
*
*/
void GdbServerWindow::dropConnection() {
if (gdbInOut != NULL) {
Logging::print("GdbServerWindow::dropConnection()\n");
gdbInOut->finish();
delete gdbInOut;
gdbInOut = NULL;
}
if (statusTimer != NULL) {
statusTimer->Stop();
delete statusTimer;
statusTimer = NULL;
}
shared->closeBdm();
if (clientSocket != NULL) {
clientSocket->Destroy();
clientSocket = NULL;
statusTextControl->AppendText(_(
"\n=====================\n"
"Dropped connection\n"));
if (!deferredOpen && shared->isExitOnClose()) {
statusTextControl->AppendText(_("Closing\n\n"));
Close(true);
}
}
serverState = listening;
clientAddr = _("None");
targetStatus = T_UNKNOWN;
UpdateStatusBar();
}
示例9: Zoom_Automatique
void EDA_DRAW_FRAME::OnSelectZoom( wxCommandEvent& event )
{
if( m_zoomSelectBox == NULL )
return; // Should not happen!
int id = m_zoomSelectBox->GetCurrentSelection();
if( id < 0 || !( id < (int)m_zoomSelectBox->GetCount() ) )
return;
if( id == 0 ) // Auto zoom (Fit in Page)
{
Zoom_Automatique( true );
}
else
{
id--;
double selectedZoom = GetScreen()->m_ZoomList[id];
if( GetScreen()->GetZoom() == selectedZoom )
return;
GetScreen()->SetZoom( selectedZoom );
RedrawScreen( GetScrollCenterPosition(), false );
}
// Notify GAL
TOOL_MANAGER* mgr = GetToolManager();
if( mgr && IsGalCanvasActive() )
{
mgr->RunAction( "common.Control.zoomPreset", true, id );
UpdateStatusBar();
}
}
示例10: SetStatusText
static INT_PTR SetStatusText(WPARAM wParam, LPARAM lParam)
{
TWindowData *dat;
HWND hwnd = M.FindWindow(wParam);
if (hwnd != NULL) {
dat = (TWindowData*)GetWindowLongPtr(hwnd, GWLP_USERDATA);
}
else {
SESSION_INFO *si = SM_FindSessionByHCONTACT(wParam);
if (si == NULL)
return 1;
dat = si->dat;
}
// delete old custom data
if (dat->sbCustom) {
delete dat->sbCustom;
dat->sbCustom = NULL;
}
StatusTextData *st = (StatusTextData*)lParam;
if (st != NULL && st->cbSize == sizeof(StatusTextData))
dat->sbCustom = new StatusTextData(*st);
UpdateStatusBar(dat);
return 0;
}
示例11: QMainWindow
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
m_ui(new Ui::MainWindow),
m_errorline(-1),
m_isdebug(false),
m_runline(-1),
m_frame(0),
m_rid(0)
{
g_MainWindow = this;
m_ui->setupUi(this);
m_ui->dockWidget->setVisible(false);
m_ui->dockWidget_2->setVisible(false);
m_ui->dockWidget_3->setVisible(false);
m_ui->dockWidget_4->setVisible(false);
m_file_name.clear();
m_ui->txtedit->setPlainText("");
m_ui->txtedit->setVisible(true);
m_saved.clear();
m_ui->txtedit->setFont(QFont(tr("宋体"), 20, QFont::Normal));
m_ui->txtedit->setLineWrapMode(QPlainTextEdit::NoWrap);
highlightCurrentLine();
m_ui->callstackview->setFont(QFont(tr("宋体"), 20, QFont::Normal));
m_ui->callstackview->setSpacing(5);
m_ui->routineview->setFont(QFont(tr("宋体"), 20, QFont::Normal));
m_ui->routineview->setSpacing(5);
m_ui->byteview->setFont(QFont(tr("宋体"), 10, QFont::Normal));
m_ui->byteview->setLineWrapMode(QTextEdit::NoWrap);
m_ui->memview->setFont(QFont(tr("宋体"), 10, QFont::Normal));
m_ui->memview->setSpacing(5);
new QSyntaxHighlighterFake(m_ui->txtedit->document());
memset(m_argv, 0, sizeof(m_argv));
m_fk = newfake();
fkopenalllib(m_fk);
fkseterrorfunc(m_fk, fk_error_func);
fksetprintfunc(m_fk, fk_print_func);
QFileInfo fi("sample.fk");
if (fi.exists())
{
Openfile("sample.fk");
UpdateStatusBar();
}
m_ui->callstackview->hide();
m_ui->byteview->hide();
m_ui->memview->hide();
m_ui->routineview->hide();
m_ui->horizontalLayout_2->removeItem(m_ui->verticalLayout);
}
示例12: UpdateStatusBar
/*************
* DESCRIPTION: redraws the display
* INPUT: nMode draw mode
* bChanged display changed since editing began
* OUTPUT: -
*************/
void CCamView::Redraw(int nMode, BOOL bChanged)
{
UpdateStatusBar();
bCanceled = TRUE;
pDisplay->Redraw(nMode, bChanged);
}
示例13: GetCrossHairPosition
bool FOOTPRINT_EDIT_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aHotKey )
{
bool eventHandled = true;
// Filter out the 'fake' mouse motion after a keyboard movement
if( !aHotKey && m_movingCursorWithKeyboard )
{
m_movingCursorWithKeyboard = false;
return false;
}
// when moving mouse, use the "magnetic" grid, unless the shift+ctrl keys is pressed
// for next cursor position
// ( shift or ctrl key down are PAN command with mouse wheel)
bool snapToGrid = true;
if( !aHotKey && wxGetKeyState( WXK_SHIFT ) && wxGetKeyState( WXK_CONTROL ) )
snapToGrid = false;
wxPoint oldpos = GetCrossHairPosition();
wxPoint pos = aPosition;
GeneralControlKeyMovement( aHotKey, &pos, snapToGrid );
SetCrossHairPosition( pos, snapToGrid );
RefreshCrossHair( oldpos, aPosition, aDC );
if( aHotKey )
{
eventHandled = OnHotKey( aDC, aHotKey, aPosition );
}
UpdateStatusBar();
return eventHandled;
}
示例14: WXUNUSED
void ControlToolBar::OnPause(wxCommandEvent & WXUNUSED(evt))
{
if (!CanStopAudioStream()) {
return;
}
if(mPaused)
{
mPause->PopUp();
mPaused=false;
}
else
{
mPause->PushDown();
mPaused=true;
}
#ifdef EXPERIMENTAL_SCRUBBING_SUPPORT
if (gAudioIO->IsScrubbing())
GetActiveProject()->GetScrubber().Pause(mPaused);
else
#endif
{
gAudioIO->SetPaused(mPaused);
}
UpdateStatusBar(GetActiveProject());
}
示例15: UpdateFrameComponents
void
UpdateFrameComponents ( WindowObjectType *wo )
{
int X, Y;
if ( QueryPointerPosition ( wo, &X, &Y ) ) {
SetCurrentX ( wo, X );
SetCurrentY ( wo, Y );
}
UpdateTitleObject( wo );
SetPixmapGeoMapping( wo );
UpdateStatusBar( wo );
UpdateFrameCounterWidgets ( wo );
UpdateFrameButtons ( wo );
UpdateFrameEditButtons ( wo );
UpdateAnchorPoint ( wo );
}