Ejemplo n.º 1
0
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);
}
Ejemplo n.º 2
0
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));
}
Ejemplo n.º 3
0
// 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));
}
Ejemplo n.º 4
0
 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));
 	}
 }
Ejemplo n.º 5
0
//     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();
}
Ejemplo n.º 6
0
/*****************************************************
**
**   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 ));
}
Ejemplo n.º 7
0
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();
	}
}
Ejemplo n.º 8
0
dovo_sendStatus::dovo_sendStatus( wxWindow* parent )
	:
	sendStatus( parent )
{
	timer.Connect(wxEVT_TIMER, wxTimerEventHandler( dovo_sendStatus::OnTimer ), NULL, this );
	timer.Start(200);	
}
Ejemplo n.º 9
0
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
}
Ejemplo n.º 10
0
/*----------*/
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));
}
Ejemplo n.º 11
0
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) );
}
Ejemplo n.º 12
0
//      glTextureManager Implementation
glTextureManager::glTextureManager()
{
    // ideally we would use the cpu count -1, and only launch jobs
    // when the idle load average is sufficient (greater than 1)
    int nCPU =  wxMax(1, wxThread::GetCPUCount());
    m_max_jobs =  wxMax(nCPU, 1);
    m_prevMemUsed = 0;    

    if(bthread_debug)
        printf(" nCPU: %d    m_max_jobs :%d\n", nCPU, m_max_jobs);
    
    m_progDialog = NULL;
    
    for(int i=0 ; i < m_max_jobs ; i++)
        progList.Append( new ProgressInfoItem);
    
    //  Create/connect a dynamic event handler slot for messages from the worker threads
    Connect( wxEVT_OCPN_COMPRESSIONTHREAD,
             (wxObjectEventFunction) (wxEventFunction) &glTextureManager::OnEvtThread );
    
    m_ticks = 0;
    m_skip = false;
    m_bcompact = false;
    m_skipout = false;
    
    m_timer.Connect(wxEVT_TIMER, wxTimerEventHandler( glTextureManager::OnTimer ), NULL, this);
    m_timer.Start(500);
}
Ejemplo n.º 13
0
ClimatologyConfigDialog::ClimatologyConfigDialog(ClimatologyDialog *parent)
  : ClimatologyConfigDialogBase(parent)
{
    pParent = parent;

#ifdef WIN32 // windows is too slow for very fine steps
    m_cIsoBarStep->Delete(4);
#endif

    m_Settings.Load();
    LoadSettings();
 
    for(int i=0; i<ClimatologyOverlaySettings::SETTINGS_COUNT; i++)
        m_cDataType->Append(SettingName(i));

    m_cDataType->SetSelection(m_lastdatatype);
    PopulateUnits(m_lastdatatype);
    ReadDataTypeSettings(m_lastdatatype);

    m_stVersion->SetLabel(wxString::Format(_T("%d.%d"),
                                           PLUGIN_VERSION_MAJOR, PLUGIN_VERSION_MINOR));
    m_tDataDirectory->SetValue(ClimatologyDataDirectory());

    m_refreshTimer.Connect(wxEVT_TIMER, wxTimerEventHandler( ClimatologyConfigDialog::OnRefreshTimer ), NULL, this);

    DimeWindow( this );
}
Ejemplo n.º 14
0
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);
}
Ejemplo n.º 15
0
bool watchdog_pi::DeInit(void)
{
    Alarm::SaveConfigAll();
    Alarm::DeleteAll();
    Alarm::s_Alarms.clear();

    //    Record the dialog position
    if (m_WatchdogDialog)
    {
        if(m_ConfigurationDialog) {
            delete m_ConfigurationDialog;
        }
        m_WatchdogDialog->Close();
        delete m_WatchdogDialog;
        m_WatchdogDialog = NULL;
        m_ConfigurationDialog = NULL;
    }
    
    m_Timer.Stop();
    m_Timer.Disconnect(wxEVT_TIMER, wxTimerEventHandler( watchdog_pi::OnTimer ), NULL, this);
    
    RemovePlugInTool(m_leftclick_tool_id);

    return true;
}
Ejemplo n.º 16
0
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();
}
Ejemplo n.º 17
0
// ------------------------------------------------------------
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);
}
Ejemplo n.º 18
0
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);
}
ManageFieldTextureDialog::~ManageFieldTextureDialog() {
	m_texturepicker->GetTextCtrl()->Disconnect(wxEVT_SET_FOCUS,wxFocusEventHandler(ManageFieldTextureDialog::OnFocusFileImage),NULL,this);
	Disconnect(wxEVT_TIMER,wxTimerEventHandler(ManageFieldTextureDialog::OnTimer),NULL,this);
	delete timer;
	delete[] anim_tick_time;
	delete[] anim_tile_pos;
	delete[] anim_play_flag;
}
Ejemplo n.º 20
0
MyProcessOutput::MyProcessOutput(wxWindow *parent)
    : ProcessOutput(parent), m_process(0), m_wakeup(this)
{
    this->Connect(wxEVT_END_PROCESS, wxProcessEventHandler(MyProcessOutput::OnTerminate));
    this->Connect(wxEVT_TIMER, wxTimerEventHandler(MyProcessOutput::OnTimer),NULL, this);
    this->GetSizer()->SetSizeHints(this);
    this->SetDoubleBuffered(true);
}
Ejemplo n.º 21
0
CPyProcess::CPyProcess(void)
{
  m_pid = 0;
  wxProcess(heeksCAD->GetMainFrame());
  Connect(wxEVT_TIMER, wxTimerEventHandler(CPyProcess::OnTimer));
  m_timer.SetOwner(this);

}
Ejemplo n.º 22
0
weather_routing_pi::weather_routing_pi(void *ppimgr)
      :opencpn_plugin_110(ppimgr)
{
      // Create the PlugIn icons
      initialize_images();

      m_tCursorLatLon.Connect(wxEVT_TIMER, wxTimerEventHandler
                              ( weather_routing_pi::OnCursorLatLonTimer ), NULL, this);
}
Ejemplo n.º 23
0
    void SetTimeout(unsigned timeout)
    {
        if ( !timeout )
            return;

        Connect(wxEVT_TIMER, wxTimerEventHandler(wxRichToolTipPopup::OnTimer));

        m_timer.Start(timeout, true /* one shot */);
    }
Ejemplo n.º 24
0
/*****************************************************
**
**   MainWindowStatusbar   ---   Constructor
**
******************************************************/
MainWindowStatusbar::MainWindowStatusbar( wxWindow *parent )
		: MyStatusbar( parent )
{
	SetFieldsCount( 2 );
	planettimer = new wxTimer( this, STATUSBAR_PTIMER );

	Connect( STATUSBAR_PTIMER, wxEVT_TIMER, wxTimerEventHandler( MainWindowStatusbar::OnPlanetTimer ));
	Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( MainWindowStatusbar::OnRightDown ));
}
Ejemplo n.º 25
0
//------------------------------------------------------------------------------
//          custom grid implementation
//------------------------------------------------------------------------------
CustomGrid::CustomGrid( wxWindow *parent, wxWindowID id, const wxPoint &pos,
					   const wxSize &size, long style,
					   const wxString &name )
  : wxGrid( parent, id, pos, size, style, name )
{
    //create grid
    SetTable( new wxGridStringTable(0, 0), true, wxGridSelectRows );
    //some general settings
    EnableEditing( false );
    EnableGridLines( true );
    EnableDragGridSize( false );
    SetMargins( 0, 0 );
    EnableDragColMove( false );
    EnableDragColSize( false );
    EnableDragRowSize( false );
    //init rows pref
    wxFileConfig *pConf = GetOCPNConfigObject();
    if (pConf) {
        pConf->SetPath(_T("/Settings/GRIB"));
        m_IsDigit = pConf->Read(_T("GribDataTableRowPref"), _T("XXX"));
    }
    if( m_IsDigit.Len() != wxString(_T("XXX")).Len() ) m_IsDigit = _T("XXX");
    //create structure for all numerical rows
    for( unsigned int i = 0; i < m_IsDigit.Len(); i++ ){
        m_NumRow.push_back(wxNOT_FOUND);
        m_NumRowVal.push_back(std::vector <double>());
    }
    //init labels attr
    wxFont labelfont = GetOCPNGUIScaledFont_PlugIn( _T("Dialog") ).MakeBold();
    SetLabelFont(labelfont);
    wxColour colour;
    GetGlobalColor(_T("DILG0"), &colour);
    SetLabelBackgroundColour(colour);
    //set row label size
    int w;
    GetTextExtent( _T("Ab"), &w, NULL, 0, 0, &labelfont);
    double x = (double)w * 6.5;
    SetRowLabelSize((int)x);
    //colour settings
    GetGlobalColor(_T("GREEN1"), &m_greenColour);
    GetGlobalColor(_T("DILG1"), &m_greyColour);

#ifdef __WXOSX__
    m_bLeftDown = false;
#endif

    //connect events at dialog level
    Connect(wxEVT_SCROLLWIN_THUMBTRACK, wxScrollEventHandler( CustomGrid::OnScroll ), NULL, this );
    Connect(wxEVT_SIZE, wxSizeEventHandler( CustomGrid::OnResize ), NULL, this );
    Connect(wxEVT_GRID_LABEL_LEFT_CLICK, wxGridEventHandler( CustomGrid::OnLabeClick ), NULL, this );
    //connect events at grid level
    GetGridWindow()->Connect(wxEVT_LEFT_DOWN, wxMouseEventHandler( CustomGrid::OnMouseEvent ), NULL, this );
    GetGridWindow()->Connect(wxEVT_LEFT_UP, wxMouseEventHandler( CustomGrid::OnMouseEvent ), NULL, this );
    GetGridWindow()->Connect(wxEVT_MOTION, wxMouseEventHandler( CustomGrid::OnMouseEvent ), NULL, this );
    //timer event
    m_tRefreshTimer.Connect(wxEVT_TIMER, wxTimerEventHandler( CustomGrid::OnRefreshTimer ), NULL, this);
}
Ejemplo n.º 26
0
/*****************************************************
**
**   Document   ---   Constructor
**
******************************************************/
Document::Document() : Horoscope()
{
	dirty = false;
	mainwindow = 0;
	timer = new wxTimer( this, DOCUMENT_TIMER );
	StartTimer( false );

	Connect( DOCUMENT_TIMER, wxEVT_TIMER, wxTimerEventHandler( Document::OnTimer ));
}
Ejemplo n.º 27
0
CVideoControlSoft::CVideoControlSoft(wxWindow* parent, wxWindowID id, CWindowMain * windowMain, IVideoInterface * eventPlayer)
: CWindowOpenGLMain("CVideoControl",parent, id)
{
	renderBitmapOpenGL = new Regards::Video::CRenderBitmapInterfaceOpenGL(this);
    printf("CVideoControl initialisation \n");
    
#ifdef WIN32
    renderBitmapOpenGL->Init(this);
#endif  

#ifndef __APPLE__
    int argc = 1;
    char* argv[1] ={wxString((wxTheApp->argv)[0]).char_str()};
    glutInit(&argc, argv);  
#endif

	widthVideo = 0;
	heightVideo = 0;
	subtilteUpdate = false;
	threadVideo = nullptr;
	volumeStart = 64;
	old_width = 0;
	old_height = 0;
	pause = false;
	config = nullptr;
	angle = 0;
	flipV = false;
    newVideo = true;
	flipH = false;
	videoEnd = false;
	exit = false;
	quitWindow = false;
    videoStart = false;
    videoRenderStart = false;
	pictureSubtitle = nullptr;
	video_aspect_ratio = 0.0;
	config = CParamInit::getInstance();
    Connect(wxEVT_PAINT, wxPaintEventHandler(CVideoControlSoft::OnPaint));
    Connect(wxEVT_SIZE, wxSizeEventHandler(CVideoControlSoft::OnSize));
    Connect(EVENT_ENDVIDEOTHREAD, wxCommandEventHandler(CVideoControlSoft::EndVideoThread));
    Connect(EVENT_VIDEOSTART, wxCommandEventHandler(CVideoControlSoft::VideoStart));
	Connect(wxEVT_IDLE, wxIdleEventHandler(CVideoControlSoft::OnIdle));
	Connect(EVENT_VIDEOROTATION, wxCommandEventHandler(CVideoControlSoft::VideoRotation));
    Connect(wxEVENT_VIDEOREFRESH, wxCommandEventHandler(CVideoControlSoft::OnRefresh));
    fpsTimer = new wxTimer(this, TIMER_FPS);
	Connect(wxEVT_RIGHT_DOWN, wxMouseEventHandler(CVideoControlSoft::OnRButtonDown));
    Connect(TIMER_FPS, wxEVT_TIMER, wxTimerEventHandler(CVideoControlSoft::OnShowFPS), nullptr, this);
	pause = false;
	videoEnd = true;
	this->windowMain = windowMain;
	this->eventPlayer = eventPlayer;
	openCLEngine = nullptr;
	openclContext = nullptr;
	openclEffectYUV = nullptr;
	
}
RosoutPanel::~RosoutPanel()
{
  unsubscribe();

  Disconnect(process_timer_->GetId(), wxEVT_TIMER, wxTimerEventHandler(RosoutPanel::onProcessTimer), NULL, this);

  delete process_timer_;

  clear();
}
Ejemplo n.º 29
0
mxCommandFinderList::mxCommandFinderList (wxWindow * parent) 
	: wxDialog(parent,wxID_ANY,"",wxDefaultPosition,wxDefaultSize,wxNO_BORDER|wxSTAY_ON_TOP)
	, timer(GetEventHandler())
{
	list = new wxListBox(this,wxID_ANY);
	wxSizer * sizer = new wxBoxSizer(wxVERTICAL);
	sizer->Add(list,wxSizerFlags().Proportion(1).Expand());
	SetSizerAndFit(sizer);
	Connect(wxEVT_TIMER,wxTimerEventHandler(mxCommandFinderList::OnTimer),NULL,this);
}
Ejemplo n.º 30
0
AutocloseMessageBox::AutocloseMessageBox( wxWindow *parent, const wxString& message,
										  const wxString& caption ,
										  unsigned int delay,
										  long style, const wxPoint& pos )
	: TimedMessageBox( new wxIcon( SLcustomizations().GetAppIcon() ), parent, message, caption, delay, style, pos )
{
	wxWindowID delay_timerID = wxNewId();
	m_delay_timer.SetOwner( this, delay_timerID );
	Connect( delay_timerID, wxEVT_TIMER, wxTimerEventHandler( AutocloseMessageBox::OnUnlock) );
}