本文整理汇总了C++中wxTimerEventHandler函数的典型用法代码示例。如果您正苦于以下问题:C++ wxTimerEventHandler函数的具体用法?C++ wxTimerEventHandler怎么用?C++ wxTimerEventHandler使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wxTimerEventHandler函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: clDebuggerTipWindowBase
DisplayVariableDlg::DisplayVariableDlg( wxWindow* parent)
: clDebuggerTipWindowBase( parent )
, m_debugger(NULL)
, m_keepCurrentPosition(false)
, m_dragging(false)
, m_editDlgIsUp(false)
{
Hide();
Centre();
MSWSetNativeTheme(m_treeCtrl);
m_timer2 = new wxTimer(this);
m_mousePosTimer = new wxTimer(this);
SetName("clDebuggerEditItemDlgBase");
bool sizeSet(false);
if (!wxPersistenceManager::Get().Find(this)) {
sizeSet = wxPersistentRegisterAndRestore(this, "CLDebuggerTip");
}
wxUnusedVar(sizeSet);
if (GetSize().x < 100 || GetSize().y < 100 ) {
SetSize( wxRect(GetPosition(), wxSize(100, 100) ) );
}
Connect(m_timer2->GetId(), wxEVT_TIMER, wxTimerEventHandler(DisplayVariableDlg::OnTimer2), NULL, this);
Connect(m_mousePosTimer->GetId(), wxEVT_TIMER, wxTimerEventHandler(DisplayVariableDlg::OnCheckMousePosTimer), NULL, this);
m_panelStatusBar->Connect(wxEVT_MOUSE_CAPTURE_LOST, wxMouseCaptureLostEventHandler(DisplayVariableDlg::OnCaptureLost), NULL, this);
}
示例2: Disconnect
void Parser::DisconnectEvents()
{
Disconnect(m_Pool.GetId(), cbEVT_THREADTASK_ALLDONE,
(wxObjectEventFunction)(wxEventFunction)(wxCommandEventFunction)&Parser::OnAllThreadsDone);
Disconnect(m_ReparseTimer.GetId(), wxEVT_TIMER, wxTimerEventHandler(Parser::OnReparseTimer));
Disconnect(m_BatchTimer.GetId(), wxEVT_TIMER, wxTimerEventHandler(Parser::OnBatchTimer));
}
示例3: m_AutocompPosition
// class constructor
CCManager::CCManager() :
m_AutocompPosition(wxSCI_INVALID_POSITION),
m_CallTipActive(wxSCI_INVALID_POSITION),
m_LastAutocompIndex(wxNOT_FOUND),
m_LastTipPos(wxSCI_INVALID_POSITION),
m_WindowBound(0),
m_OwnsAutocomp(true),
m_CallTipTimer(this, idCallTipTimer),
m_AutoLaunchTimer(this, idAutoLaunchTimer),
m_AutocompSelectTimer(this, idAutocompSelectTimer),
#ifdef __WXMSW__
m_pAutocompPopup(nullptr),
#endif // __WXMSW__
m_pLastEditor(nullptr),
m_pLastCCPlugin(nullptr)
{
const wxString ctChars = wxT(",;\n()"); // default set
m_CallTipChars[nullptr] = std::set<wxChar>(ctChars.begin(), ctChars.end());
const wxString alChars = wxT(".:<>\"#/"); // default set
m_AutoLaunchChars[nullptr] = std::set<wxChar>(alChars.begin(), alChars.end());
m_LastACLaunchState[lsCaretStart] = wxSCI_INVALID_POSITION;
m_pPopup = new UnfocusablePopupWindow(Manager::Get()->GetAppFrame());
m_pHtml = new wxHtmlWindow(m_pPopup, wxID_ANY, wxDefaultPosition,
wxDefaultSize, wxHW_SCROLLBAR_AUTO | wxBORDER_SIMPLE);
int sizes[7] = {};
CCManagerHelper::BuildFontSizes(sizes, CCManagerHelper::GetDefaultHTMLFontSize());
m_pHtml->SetFonts(wxEmptyString, wxEmptyString, &sizes[0]);
m_pHtml->Connect(wxEVT_COMMAND_HTML_LINK_CLICKED,
wxHtmlLinkEventHandler(CCManager::OnHtmlLink), nullptr, this);
// wxFrame* mainFrame = Manager::Get()->GetAppFrame();
// wxMenuBar* menuBar = mainFrame->GetMenuBar();
// if (menuBar)
// {
// int idx = menuBar->FindMenu(wxT("&Edit"));
// wxMenu* edMenu = menuBar->GetMenu(idx < 0 ? 0 : idx);
// edMenu->Append(idCallTipNext, _("Next call tip\tCtrl-N"));
// edMenu->Append(idCallTipPrevious, _("Previous call tip\tCtrl-P"));
// }
// mainFrame->Connect(idCallTipNext, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(CCManager::OnMenuSelect), nullptr, this);
// mainFrame->Connect(idCallTipPrevious, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(CCManager::OnMenuSelect), nullptr, this);
typedef cbEventFunctor<CCManager, CodeBlocksEvent> CCEvent;
Manager::Get()->RegisterEventSink(cbEVT_APP_DEACTIVATED, new CCEvent(this, &CCManager::OnDeactivateApp));
Manager::Get()->RegisterEventSink(cbEVT_EDITOR_DEACTIVATED, new CCEvent(this, &CCManager::OnDeactivateEd));
Manager::Get()->RegisterEventSink(cbEVT_EDITOR_OPEN, new CCEvent(this, &CCManager::OnEditorOpen));
Manager::Get()->RegisterEventSink(cbEVT_EDITOR_CLOSE, new CCEvent(this, &CCManager::OnEditorClose));
Manager::Get()->RegisterEventSink(cbEVT_EDITOR_TOOLTIP, new CCEvent(this, &CCManager::OnEditorTooltip));
Manager::Get()->RegisterEventSink(cbEVT_SHOW_CALL_TIP, new CCEvent(this, &CCManager::OnShowCallTip));
Manager::Get()->RegisterEventSink(cbEVT_COMPLETE_CODE, new CCEvent(this, &CCManager::OnCompleteCode));
m_EditorHookID = EditorHooks::RegisterHook(new EditorHooks::HookFunctor<CCManager>(this, &CCManager::OnEditorHook));
Connect(idCallTipTimer, wxEVT_TIMER, wxTimerEventHandler(CCManager::OnTimer));
Connect(idAutoLaunchTimer, wxEVT_TIMER, wxTimerEventHandler(CCManager::OnTimer));
Connect(idAutocompSelectTimer, wxEVT_TIMER, wxTimerEventHandler(CCManager::OnTimer));
Connect(cbEVT_DEFERRED_CALLTIP_CANCEL, wxCommandEventHandler(CCManager::OnDeferredCallTipCancel));
}
示例4: Connect
void RenderCanvas::Activate( bool active )
{
if ( active ) {
m_UpdateTimer.Start( 10 );
// init start ticks
m_CurrentTicks = m_RenderManager->GetRenderProfile()->GetTicks();
Connect(wxEVT_PAINT, wxPaintEventHandler(RenderCanvas::OnPaint));
Connect(wxEVT_TIMER, wxTimerEventHandler(RenderCanvas::OnRedrawTimer));
} else {
m_UpdateTimer.Stop();
Disconnect(wxEVT_PAINT, wxPaintEventHandler(RenderCanvas::OnPaint));
Disconnect(wxEVT_TIMER, wxTimerEventHandler(RenderCanvas::OnRedrawTimer));
}
}
示例5: wxPanel
// 1 : 1 : 1
// +---------------------------------+
// | +-----------------------------+ |
// | | +--+ +--+ +--+ +--+ | |
// | | | | | | o | | | | | |
// | | +--+ +--+ +--+ +--+ | | 3
// | | | | | | o | | | | | |
// | | +--+ +--+ +--+ +--+ | |
// | +-----------------------------+ | :
// | |
// | shot clock period | 1
// | +-----------+ +------+ |
// | | +--+ +--+ | \ | +--+ | | :
// | | | | | | | ---\ | | | | |
// | | +--+ +--+ | ---/ | +--+ | |
// | | | | | | | / | | | | | 2
// | | +--+ +--+ | | +--+ | |
// | +-----------+ +------+ |
// +---------------------------------+
//
wxGamePanel::wxGamePanel(wxWindow* parent)
: wxPanel(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize,
wxBORDER_RAISED)
, m_timer(this, ID_CLOCK_TIMER)
, m_playing(false)
, m_buzzerTimer(this, ID_BUZZER_TIMER)
, m_buzzing(false)
{
wxBoxSizer *bgBox = new wxBoxSizer(wxVERTICAL);
// 게임 시간 추가
m_timeCtrl = new wxLCDWindow(this, wxDefaultPosition, wxDefaultSize);
m_timeCtrl->SetNumberDigits(5);
m_timeCtrl->SetValue(wxT("12:25"));
bgBox->Add(m_timeCtrl, 3, wxEXPAND | wxTOP | wxLEFT | wxRIGHT, 10);
bgBox->Add(-1, 10);
// 슛클락, 공격방향, 페리오드 추가
wxFlexGridSizer *etcGrid = new wxFlexGridSizer(2, 3, 10, 10);
etcGrid->Add(new wxStaticTitle(this, wxT("Shot Clock")), 1, wxEXPAND);
etcGrid->Add(new wxStaticText(this, -1, wxT("")), 1, wxEXPAND);
etcGrid->Add(new wxStaticTitle(this, wxT("Period")), 1, wxEXPAND);
m_shotClockCtrl = new wxLCDWindow(this, wxDefaultPosition, wxDefaultSize);
m_shotClockCtrl->SetNumberDigits(2);
wxStaticText *attackDir = new wxStaticText(this, wxID_ANY, wxT(""));
m_periodCtrl = new wxLCDWindow(this, wxDefaultPosition, wxDefaultSize);
m_periodCtrl->SetNumberDigits(1);
etcGrid->Add(m_shotClockCtrl, 1, wxEXPAND);
etcGrid->Add(attackDir, 1, wxEXPAND);
etcGrid->Add(m_periodCtrl, 1, wxEXPAND);
etcGrid->AddGrowableCol(0, 1);
etcGrid->AddGrowableCol(1, 1);
etcGrid->AddGrowableCol(2, 1);
etcGrid->AddGrowableRow(0, 1);
etcGrid->AddGrowableRow(1, 2);
bgBox->Add(etcGrid, 3, wxEXPAND | wxBOTTOM | wxLEFT | wxRIGHT, 10);
SetSizer(bgBox);
// 이벤트 연결
Connect(ID_CLOCK_TIMER, wxEVT_TIMER,
wxTimerEventHandler(wxGamePanel::OnTimer));
Connect(ID_BUZZER_TIMER, wxEVT_TIMER,
wxTimerEventHandler(wxGamePanel::OnBuzzerTimer));
InitTime();
ResetPeriod();
}
示例6: wxStatusBar
/*****************************************************
**
** MyStatusbar --- Constructor
**
******************************************************/
MyStatusbar::MyStatusbar( wxWindow *parent )
: wxStatusBar( parent, -1, wxST_SIZEGRIP )
{
msgtimer = new wxTimer( this, STATUSBAR_MSGTIMER );
Connect( STATUSBAR_MSGTIMER, wxEVT_TIMER, wxTimerEventHandler( MyStatusbar::OnMessageTimer ));
}
示例7: wxTimerEventHandler
void dovo_sendStatus::OnTimer( wxTimerEvent& event )
{
// update cout => log window
std::string str = m_sender->ReadLog();
if(str.length() != 0)
{
m_log->AppendText(wxString::FromUTF8(str.c_str()));
}
if(m_sender->IsDone())
{
timer.Disconnect(wxEVT_TIMER, wxTimerEventHandler( dovo_sendStatus::OnTimer ), NULL, this );
m_stop->SetLabel(_("Close"));
m_log->AppendText("\nDone\n");
m_progress->SetValue(100);
/*
if(m_sender->IsCanceled())
EndDialog(0);*/
}
else
{
m_progress->Pulse();
}
}
示例8: sendStatus
dovo_sendStatus::dovo_sendStatus( wxWindow* parent )
:
sendStatus( parent )
{
timer.Connect(wxEVT_TIMER, wxTimerEventHandler( dovo_sendStatus::OnTimer ), NULL, this );
timer.Start(200);
}
示例9: ClimatologyDialogBase
ClimatologyDialog::ClimatologyDialog(wxWindow *parent, climatology_pi *ppi)
#ifndef __WXOSX__
: ClimatologyDialogBase(parent),
#else
: ClimatologyDialogBase(parent, wxID_ANY, _("Climatology Display Control"), wxDefaultPosition, wxDefaultSize, wxCAPTION|wxCLOSE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU|wxSTAY_ON_TOP),
#endif
pPlugIn(ppi), pParent(parent)
{
#ifdef __OCPN__ANDROID__
GetHandle()->setStyleSheet( qtStyleSheet);
#endif
m_cfgdlg = new ClimatologyConfigDialog(this);
Now();
m_cursorlat = m_cursorlon = 0;
{
#include "now.xpm"
m_bpNow->SetBitmapLabel(now);
}
DimeWindow( this );
PopulateTrackingControls();
// run fit delayed (buggy wxwidgets)
m_fittimer.Connect(wxEVT_TIMER, wxTimerEventHandler
( ClimatologyDialog::OnFitTimer ), NULL, this);
#ifdef __OCPN__ANDROID__
GetHandle()->setAttribute(Qt::WA_AcceptTouchEvents);
GetHandle()->grabGesture(Qt::PanGesture);
GetHandle()->setStyleSheet( qtStyleSheet);
Connect( wxEVT_QT_PANGESTURE,
(wxObjectEventFunction) (wxEventFunction) &ClimatologyDialog::OnEvtPanGesture, NULL, this );
#endif
}
示例10: ColorEditSheet
/*----------*/
ggscfg_ColorEditSheet::ggscfg_ColorEditSheet(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style)
: ColorEditSheet(parent, id, pos, size, style)
{
m_image = NULL;
m_image_w = 0;
m_image_h = 0;
m_palette_size = 0;
memset(m_palette, 0, sizeof(u32) * 256);
memset(m_palette_header, 0, sizeof(u32) * 16);
memset(m_image_addr_list, 0, sizeof(u32) * kImageMaxCount);
m_image_addr_list_count = 0;
memset(m_pal_addr_list, 0, sizeof(u32) * kPaletteMaxCount);
m_pal_addr_list_count = 0;
m_cur_cid = 0;
m_cur_palette = 0;
m_palette_changed = false;
m_select_palette = -1;
// Connect Events
this->Connect(wxID_ANY, wxEVT_TIMER, wxTimerEventHandler(ggscfg_ColorEditSheet::on_timer));
this->Connect(wxID_ANY, wxEVT_DROP_FILES, wxDropFilesEventHandler(ggscfg_ColorEditSheet::on_drop_file));
}
示例11: wxFrame
GSFrame::GSFrame(wxWindow* parent, const wxString& title)
: wxFrame(parent, wxID_ANY, title, g_Conf->GSWindow.WindowPos)
, m_timer_UpdateTitle( this )
{
SetIcons( wxGetApp().GetIconBundle() );
SetBackgroundColour( *wxBLACK );
wxStaticText* label = new wxStaticText( this, wxID_ANY, _("GS Output is Disabled!") );
m_id_OutputDisabled = label->GetId();
label->SetFont( wxFont( 20, wxDEFAULT, wxNORMAL, wxBOLD ) );
label->SetForegroundColour( *wxWHITE );
AppStatusEvent_OnSettingsApplied();
GSPanel* gsPanel = new GSPanel( this );
gsPanel->Show( !EmuConfig.GS.DisableOutput );
m_id_gspanel = gsPanel->GetId();
// TODO -- Implement this GS window status window! Whee.
// (main concern is retaining proper client window sizes when closing/re-opening the window).
//m_statusbar = CreateStatusBar( 2 );
Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler (GSFrame::OnCloseWindow) );
Connect( wxEVT_MOVE, wxMoveEventHandler (GSFrame::OnMove) );
Connect( wxEVT_SIZE, wxSizeEventHandler (GSFrame::OnResize) );
Connect( wxEVT_ACTIVATE, wxActivateEventHandler (GSFrame::OnActivate) );
Connect(m_timer_UpdateTitle.GetId(), wxEVT_TIMER, wxTimerEventHandler(GSFrame::OnUpdateTitle) );
}
示例12: wxDialog
InputConfigDialog::InputConfigDialog(wxWindow* const parent, InputPlugin& plugin, const std::string& name, const int tab_num)
: wxDialog(parent, wxID_ANY, WXTSTR_FROM_CSTR(name.c_str()), wxPoint(128,-1), wxDefaultSize)
, m_plugin(plugin)
{
m_pad_notebook = new wxNotebook(this, -1, wxDefaultPosition, wxDefaultSize, wxNB_DEFAULT);
for (unsigned int i = 0; i < plugin.controllers.size(); ++i)
{
GamepadPage* gp = new GamepadPage(m_pad_notebook, m_plugin, i, this);
m_padpages.push_back(gp);
m_pad_notebook->AddPage(gp, wxString::Format(wxT("%s %u"), WXTSTR_FROM_CSTR(m_plugin.gui_name), 1+i));
}
m_pad_notebook->SetSelection(tab_num);
UpdateDeviceComboBox();
UpdateProfileComboBox();
Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(InputConfigDialog::ClickSave));
wxBoxSizer* const szr = new wxBoxSizer(wxVERTICAL);
szr->Add(m_pad_notebook, 0, wxEXPAND|wxTOP|wxLEFT|wxRIGHT, 5);
szr->Add(CreateButtonSizer(wxOK | wxCANCEL | wxNO_DEFAULT), 0, wxEXPAND|wxALL, 5);
SetSizerAndFit(szr);
Center();
// live preview update timer
m_update_timer = new wxTimer(this, -1);
Connect(wxID_ANY, wxEVT_TIMER, wxTimerEventHandler(InputConfigDialog::UpdateBitmaps), (wxObject*)0, this);
m_update_timer->Start(PREVIEW_UPDATE_TIME, wxTIMER_CONTINUOUS);
}
示例13: initLabels
CmdRecorder::CmdRecorder( wxWindow* parent )
:CmdRecorderGen( parent )
{
m_Me = NULL;
m_Stop->SetBitmapLabel(*_img_stop);
m_Pause->SetBitmapLabel(*_img_pause);
m_Record->SetBitmapLabel(*_img_record);
m_Play->SetBitmapLabel(*_img_play);
m_Stop->Refresh();
m_Pause->Refresh();
m_Record->Refresh();
m_Play->Refresh();
initLabels();
GetSizer()->Layout();
GetSizer()->Fit(this);
GetSizer()->SetSizeHints(this);
Boolean recording = ScriptOp.isRecording(wxGetApp().getScript());
Boolean playing = ScriptOp.isPlaying(wxGetApp().getScript(), NULL);
m_Record->Enable( recording?false:true );
m_Play->Enable( recording?false:true );
m_Pause->Enable( recording?false:true );
m_Timer = new wxTimer( this, ME_CmdTimer );
Connect( wxEVT_TIMER, wxTimerEventHandler( CmdRecorder::OnTimer ), NULL, this );
initList();
}
示例14: _
// ------------------------------------------------------------
void SpellCheck::Init()
{
m_topWin = NULL;
m_pEngine = NULL;
m_longName = _("CodeLite spell-checker");
m_shortName = s_plugName;
m_sepItem = NULL;
m_pToolbar = NULL;
m_topWin = wxTheApp;
m_checkContinuous = false;
m_pEngine = new IHunSpell();
m_currentWspPath = wxEmptyString;
if(m_pEngine) {
LoadSettings();
wxString userDictPath = clStandardPaths::Get().GetUserDataDir();
userDictPath << wxFILE_SEP_PATH << wxT("spellcheck") << wxFILE_SEP_PATH;
if(!wxFileName::DirExists(userDictPath)) wxFileName::Mkdir(userDictPath);
m_pEngine->SetUserDictPath(userDictPath);
m_pEngine->SetPlugIn(this);
if(!m_options.GetDictionaryFileName().IsEmpty()) m_pEngine->InitEngine();
}
m_timer.Connect(wxEVT_TIMER, wxTimerEventHandler(SpellCheck::OnTimer), NULL, this);
m_topWin->Connect(wxEVT_CMD_EDITOR_CONTEXT_MENU, wxCommandEventHandler(SpellCheck::OnContextMenu), NULL, this);
m_topWin->Connect(wxEVT_WORKSPACE_LOADED, wxCommandEventHandler(SpellCheck::OnWspLoaded), NULL, this);
m_topWin->Connect(wxEVT_WORKSPACE_CLOSED, wxCommandEventHandler(SpellCheck::OnWspClosed), NULL, this);
EventNotifier::Get()->Bind(wxEVT_CONTEXT_MENU_EDITOR, &SpellCheck::OnEditorContextMenuShowing, this);
}
示例15: wxIdleEventHandler
MainFrameBaseClass::~MainFrameBaseClass()
{
this->Disconnect(wxEVT_IDLE, wxIdleEventHandler(MainFrameBaseClass::OnIdle), NULL, this);
this->Disconnect(wxID_CLEAR, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(MainFrameBaseClass::OnClearView), NULL, this);
this->Disconnect(wxID_CLEAR, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrameBaseClass::OnClearViewUI), NULL, this);
this->Disconnect(ID_KILL_INFIRIOR, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(MainFrameBaseClass::OnTerminateInfirior), NULL, this);
this->Disconnect(ID_KILL_INFIRIOR, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrameBaseClass::OnSignalInferiorUI), NULL, this);
this->Disconnect(ID_KILL_INFIRIOR, wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN, wxAuiToolBarEventHandler(MainFrameBaseClass::OnSignalinferior), NULL, this);
this->Disconnect(ID_SETTINGS, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(MainFrameBaseClass::OnSettings), NULL, this);
this->Disconnect(wxID_SAVE, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(MainFrameBaseClass::OnSaveContent), NULL, this);
this->Disconnect(wxID_SAVE, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrameBaseClass::OnSaveContentUI), NULL, this);
m_stc->Disconnect(wxEVT_KEY_DOWN, wxKeyEventHandler(MainFrameBaseClass::OnKeyDown), NULL, this);
m_stc->Disconnect(wxEVT_STC_UPDATEUI, wxStyledTextEventHandler(MainFrameBaseClass::OnStcUpdateUI), NULL, this);
this->Disconnect(m_menuItem7->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBaseClass::OnExit), NULL, this);
this->Disconnect(m_menuItem9->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrameBaseClass::OnAbout), NULL, this);
m_timerMarker->Disconnect(wxEVT_TIMER, wxTimerEventHandler(MainFrameBaseClass::OnAddMarker), NULL, this);
std::map<int, wxMenu*>::iterator menuIter = m_dropdownMenus.begin();
for( ; menuIter != m_dropdownMenus.end(); ++menuIter ) {
wxDELETE( menuIter->second );
}
m_dropdownMenus.clear();
m_timerMarker->Stop();
wxDELETE( m_timerMarker );
this->Disconnect(wxID_ANY, wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN, wxAuiToolBarEventHandler(MainFrameBaseClass::ShowAuiToolMenu), NULL, this);
}