当前位置: 首页>>代码示例>>C++>>正文


C++ UpdateStatusBar函数代码示例

本文整理汇总了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;
    }
}
开发者ID:hfvw,项目名称:wxExtension,代码行数:57,代码来源:frame.cpp

示例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();
		}
	}
}
开发者ID:ackalker,项目名称:eaglemode,代码行数:52,代码来源:XSilChess.cpp

示例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;
}
开发者ID:notprathap,项目名称:openclonk-5.4.1-src,代码行数:34,代码来源:C4EditCursor.cpp

示例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;
}
开发者ID:antogg,项目名称:kicad-source-mirror,代码行数:60,代码来源:class_DisplayFootprintsFrame.cpp

示例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;
}
开发者ID:OCamlPro,项目名称:OCamlPro-OCaml-Branch,代码行数:43,代码来源:ocaml.c

示例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());
}
开发者ID:ZenInTexas,项目名称:audacity,代码行数:27,代码来源:ControlToolBar.cpp

示例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;
}
开发者ID:Gibbon1,项目名称:usbdm-eclipse-makefiles-build,代码行数:33,代码来源:GdbServerWindow.cpp

示例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();
}
开发者ID:Gibbon1,项目名称:usbdm-eclipse-makefiles-build,代码行数:33,代码来源:GdbServerWindow.cpp

示例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();
    }
}
开发者ID:cpavlina,项目名称:kicad,代码行数:35,代码来源:draw_frame.cpp

示例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;
}
开发者ID:Ganster41,项目名称:miranda-ng,代码行数:30,代码来源:msgs.cpp

示例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);
}
开发者ID:dreamsxin,项目名称:fakescript,代码行数:60,代码来源:mainwindow.cpp

示例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);
}
开发者ID:privatosan,项目名称:RayStorm,代码行数:13,代码来源:CamView.cpp

示例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;
}
开发者ID:flighta-zeng,项目名称:kicad-source-mirror,代码行数:35,代码来源:moduleframe.cpp

示例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());
}
开发者ID:amullins83,项目名称:audacity,代码行数:29,代码来源:ControlToolBar.cpp

示例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 );

}
开发者ID:mjames-upc,项目名称:garp,代码行数:28,代码来源:framecontrolcb.c


注:本文中的UpdateStatusBar函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。