Ejemplo n.º 1
0
VisualizeReconstructionsGui::~VisualizeReconstructionsGui()
{
	// Disconnect Events
	this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( VisualizeReconstructionsGui::OnTryToClose ) );
	m_example_spin->Disconnect( wxEVT_COMMAND_SPINCTRL_UPDATED, wxSpinEventHandler( VisualizeReconstructionsGui::OnChangeExample ), NULL, this );
	m_slider1->Disconnect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( VisualizeReconstructionsGui::OnTemperatureChanged ), NULL, this );
	m_slider11->Disconnect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( VisualizeReconstructionsGui::OnNumAgsIterationsChanged ), NULL, this );
}
Ejemplo n.º 2
0
GUIFrame::~GUIFrame() {

	this->GetParent()->Show(true);
	this->GetParent()->SetFocus();

	// Disconnect Events
	this->Disconnect(wxEVT_SIZE, wxSizeEventHandler( GUIFrame::OnSizeChange ));
	ImageField->Disconnect(wxEVT_LEAVE_WINDOW,
			wxMouseEventHandler( GUIFrame::OnLeftImageField ), NULL, this);
	ImageField->Disconnect(wxEVT_LEFT_DOWN,
			wxMouseEventHandler( GUIFrame::OnLeftMousePressed ), NULL, this);
	ImageField->Disconnect(wxEVT_LEFT_UP,
			wxMouseEventHandler( GUIFrame::OnLeftMouseRelease ), NULL, this);
	ImageField->Disconnect(wxEVT_MOTION,
			wxMouseEventHandler( GUIFrame::OnImageMotion ), NULL, this);
	ColorSlider->Disconnect(wxEVT_SCROLL_TOP,
			wxScrollEventHandler( GUIFrame::OnColorSlider ), NULL, this);
	ColorSlider->Disconnect(wxEVT_SCROLL_BOTTOM,
			wxScrollEventHandler( GUIFrame::OnColorSlider ), NULL, this);
	ColorSlider->Disconnect(wxEVT_SCROLL_LINEUP,
			wxScrollEventHandler( GUIFrame::OnColorSlider ), NULL, this);
	ColorSlider->Disconnect(wxEVT_SCROLL_LINEDOWN,
			wxScrollEventHandler( GUIFrame::OnColorSlider ), NULL, this);
	ColorSlider->Disconnect(wxEVT_SCROLL_PAGEUP,
			wxScrollEventHandler( GUIFrame::OnColorSlider ), NULL, this);
	ColorSlider->Disconnect(wxEVT_SCROLL_PAGEDOWN,
			wxScrollEventHandler( GUIFrame::OnColorSlider ), NULL, this);
	ColorSlider->Disconnect(wxEVT_SCROLL_THUMBTRACK,
			wxScrollEventHandler( GUIFrame::OnColorSlider ), NULL, this);
	ColorSlider->Disconnect(wxEVT_SCROLL_THUMBRELEASE,
			wxScrollEventHandler( GUIFrame::OnColorSlider ), NULL, this);
	ColorSlider->Disconnect(wxEVT_SCROLL_CHANGED,
			wxScrollEventHandler( GUIFrame::OnColorSlider ), NULL, this);
	ColorSlider->Disconnect(wxEVT_SCROLL_CHANGED,
			wxScrollEventHandler( GUIFrame::OnColorSlider ), NULL, this);
	ZoomButton->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED,
			wxCommandEventHandler( GUIFrame::OnZoom ), NULL, this);
	OriginalImageButton->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED,
			wxCommandEventHandler( GUIFrame::OnOriginal ), NULL, this);
	ObjectComboBox->Disconnect(wxEVT_COMMAND_TEXT_UPDATED,
			wxCommandEventHandler( GUIFrame::OnComboSelect ), NULL, this);
	CrateButton->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED,
			wxCommandEventHandler( GUIFrame::OnCrateButton ), NULL, this);
	NoRotationCheckBox->Disconnect(wxEVT_LEFT_DOWN,
			wxMouseEventHandler( GUIFrame::NoRotation ), NULL, this);
	NextObjectButton->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED,
			wxCommandEventHandler( GUIFrame::OnNextObjectButton ), NULL, this);
	SkipButton->Disconnect(wxEVT_LEFT_DOWN,
			wxMouseEventHandler( GUIFrame::OnSkip ), NULL, this);
	ResetButton->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED,
			wxCommandEventHandler( GUIFrame::OnReset ), NULL, this);
	DoneButton->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED,
			wxCommandEventHandler( GUIFrame::OnDoneButton ), NULL, this);
	ZoomBox_radioBtn->Disconnect(wxEVT_LEFT_DOWN,
			wxMouseEventHandler( GUIFrame::OnZoomChange ), NULL, this);
	ZoomCheckBox->Disconnect(wxEVT_LEFT_DOWN,
			wxMouseEventHandler( GUIFrame::OnZoomChange ), NULL, this);
}
Ejemplo n.º 3
0
GRIBUIDialogBase::~GRIBUIDialogBase()
{
	// Disconnect Events
	this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( GRIBUIDialogBase::OnClose ) );
	this->Disconnect( wxEVT_SIZE, wxSizeEventHandler( GRIBUIDialogBase::OnSize ) );
	m_bpPrev->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GRIBUIDialogBase::OnPrev ), NULL, this );
	m_cRecordForecast->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( GRIBUIDialogBase::OnRecordForecast ), NULL, this );
	m_bpNext->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GRIBUIDialogBase::OnNext ), NULL, this );
	m_bpNow->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GRIBUIDialogBase::OnNow ), NULL, this );
	m_bpOpenFile->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GRIBUIDialogBase::OnOpenFile ), NULL, this );
	m_bpSettings->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GRIBUIDialogBase::OnSettings ), NULL, this );
	m_bpRequest->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GRIBUIDialogBase::OnRequest ), NULL, this );
	m_tbPlayStop->Disconnect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( GRIBUIDialogBase::OnPlayStop ), NULL, this );
	m_sTimeline->Disconnect( wxEVT_SCROLL_TOP, wxScrollEventHandler( GRIBUIDialogBase::OnTimeline ), NULL, this );
	m_sTimeline->Disconnect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( GRIBUIDialogBase::OnTimeline ), NULL, this );
	m_sTimeline->Disconnect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( GRIBUIDialogBase::OnTimeline ), NULL, this );
	m_sTimeline->Disconnect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( GRIBUIDialogBase::OnTimeline ), NULL, this );
	m_sTimeline->Disconnect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( GRIBUIDialogBase::OnTimeline ), NULL, this );
	m_sTimeline->Disconnect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( GRIBUIDialogBase::OnTimeline ), NULL, this );
	m_sTimeline->Disconnect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( GRIBUIDialogBase::OnTimeline ), NULL, this );
	m_sTimeline->Disconnect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( GRIBUIDialogBase::OnTimeline ), NULL, this );
	m_sTimeline->Disconnect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( GRIBUIDialogBase::OnTimeline ), NULL, this );
	m_cbWind->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( GRIBUIDialogBase::OnCBAny ), NULL, this );
	m_cbWindScat->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( GRIBUIDialogBase::OnCBAny ), NULL, this );
	m_cbWave->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( GRIBUIDialogBase::OnCBAny ), NULL, this );
	m_cbCurrent->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( GRIBUIDialogBase::OnCBAny ), NULL, this );
	m_cbWindGust->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( GRIBUIDialogBase::OnCBAny ), NULL, this );
	m_cbPressure->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( GRIBUIDialogBase::OnCBAny ), NULL, this );
	m_cbPrecipitation->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( GRIBUIDialogBase::OnCBAny ), NULL, this );
	m_cbCloud->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( GRIBUIDialogBase::OnCBAny ), NULL, this );
	m_cbAirTemperature->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( GRIBUIDialogBase::OnCBAny ), NULL, this );
	m_cbSeaTemperature->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( GRIBUIDialogBase::OnCBAny ), NULL, this );
	
}
Ejemplo n.º 4
0
Options1::Options1( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
{
	wxBoxSizer* ContoursOptionsSizer;
	ContoursOptionsSizer = new wxBoxSizer( wxVERTICAL );
	
	m_staticText1 = new wxStaticText( this, wxID_ANY, wxT("Treshold:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText1->Wrap( -1 );
	ContoursOptionsSizer->Add( m_staticText1, 0, wxALL, 5 );
	
	m_Treshold = new wxSlider( this, wxID_ANY, 50, 0, 255, wxDefaultPosition, wxSize(100,100), wxSL_HORIZONTAL );
	ContoursOptionsSizer->Add( m_Treshold, 0, wxALL, 5 );
	
	m_ResetStatistics = new wxButton( this, wxID_ANY, wxT("Reset statistics"), wxDefaultPosition, wxDefaultSize, 0 );
	ContoursOptionsSizer->Add( m_ResetStatistics, 0, wxALL, 5 );
	
	this->SetSizer( ContoursOptionsSizer );
	this->Layout();
	
	// Connect Events
	m_Treshold->Connect( wxEVT_SCROLL_TOP, wxScrollEventHandler( Options1::OnTreshold ), NULL, this );
	m_Treshold->Connect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( Options1::OnTreshold ), NULL, this );
	m_Treshold->Connect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( Options1::OnTreshold ), NULL, this );
	m_Treshold->Connect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( Options1::OnTreshold ), NULL, this );
	m_Treshold->Connect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( Options1::OnTreshold ), NULL, this );
	m_Treshold->Connect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( Options1::OnTreshold ), NULL, this );
	m_Treshold->Connect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( Options1::OnTreshold ), NULL, this );
	m_Treshold->Connect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( Options1::OnTreshold ), NULL, this );
	m_Treshold->Connect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( Options1::OnTreshold ), NULL, this );
	m_ResetStatistics->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( Options1::OnResetStatistics ), NULL, this );
}
Ejemplo n.º 5
0
// -------------------------------------------------------------------------------- //
guEq10Band::~guEq10Band()
{
    guConfig * Config = ( guConfig * ) guConfig::Get();
    wxPoint WindowPos = GetPosition();
    Config->WriteNum( wxT( "PosX" ), WindowPos.x, wxT( "equalizer" ) );
    Config->WriteNum( wxT( "PosY" ), WindowPos.y, wxT( "equalizer" ) );
    wxSize WindowSize = GetSize();
    Config->WriteNum( wxT( "Width" ), WindowSize.x, wxT( "equalizer" ) );
    Config->WriteNum( wxT( "Height" ), WindowSize.y, wxT( "equalizer" ) );

    Config->WriteStr( wxT( "LastEqPreset" ), m_BandChanged ? wxT( "" ) : m_PresetComboBox->GetValue(), wxT( "equalizer" ) );

    wxFileConfig * EqConfig = new wxFileConfig( wxEmptyString, wxEmptyString, wxGetHomeDir() + wxT( "/.guayadeque/equalizers.conf" ) );
    if( EqConfig )
    {
        EqConfig->DeleteGroup( wxT( "Equalizers" ) );
        EqConfig->SetPath( wxT( "Equalizers" ) );
        int index;
        int count = m_EQPresets.Count();
        for( index = 0; index < count; index++ )
        {
            if( !EqConfig->Write( m_EQPresets[ index ].m_Name, wxString::Format( wxT( "%i,%i,%i,%i,%i,%i,%i,%i,%i,%i" ),
              m_EQPresets[ index ].m_Sets[ 0 ],
              m_EQPresets[ index ].m_Sets[ 1 ],
              m_EQPresets[ index ].m_Sets[ 2 ],
              m_EQPresets[ index ].m_Sets[ 3 ],
              m_EQPresets[ index ].m_Sets[ 4 ],
              m_EQPresets[ index ].m_Sets[ 5 ],
              m_EQPresets[ index ].m_Sets[ 6 ],
              m_EQPresets[ index ].m_Sets[ 7 ],
              m_EQPresets[ index ].m_Sets[ 8 ],
              m_EQPresets[ index ].m_Sets[ 9 ] ) ) )
              guLogError( wxT( "Error writing key %s" ), m_EQPresets[ index ].m_Name.c_str() );
        }
        delete EqConfig;
    }

    //
	m_PresetComboBox->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( guEq10Band::OnPresetSelected ), NULL, this );
	m_PresetComboBox->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( guEq10Band::OnPresetText ), NULL, this );
	m_ResetButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( guEq10Band::OnResetPreset ), NULL, this );
	m_SaveButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( guEq10Band::OnAddPreset ), NULL, this );
	m_DelButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( guEq10Band::OnDelPreset ), NULL, this );

    int Index;
    for( Index = 0; Index < guEQUALIZER_BAND_COUNT; Index++ )
    {
        m_Bands[ Index ]->Disconnect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( guEq10Band::OnBandChanged ), NULL, this );
        m_Bands[ Index ]->Disconnect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( guEq10Band::OnUpdateLabel ), NULL, this );
    }
}
Ejemplo n.º 6
0
wxHugeScrollBar::~wxHugeScrollBar(){
			m_scrollbar->Disconnect( wxEVT_SCROLL_TOP, wxScrollEventHandler( wxHugeScrollBar::OnOffsetScroll ), NULL, this );
			m_scrollbar->Disconnect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( wxHugeScrollBar::OnOffsetScroll ), NULL, this );
			m_scrollbar->Disconnect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( wxHugeScrollBar::OnOffsetScroll ), NULL, this );
			m_scrollbar->Disconnect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( wxHugeScrollBar::OnOffsetScroll ), NULL, this );
			m_scrollbar->Disconnect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( wxHugeScrollBar::OnOffsetScroll ), NULL, this );
			m_scrollbar->Disconnect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( wxHugeScrollBar::OnOffsetScroll ), NULL, this );
			m_scrollbar->Disconnect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( wxHugeScrollBar::OnOffsetScroll ), NULL, this );
			m_scrollbar->Disconnect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( wxHugeScrollBar::OnOffsetScroll ), NULL, this );
			m_scrollbar->Disconnect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( wxHugeScrollBar::OnOffsetScroll ), NULL, this );
			}
Ejemplo n.º 7
0
Options1::~Options1()
{
	// Disconnect Events
	m_Treshold->Disconnect( wxEVT_SCROLL_TOP, wxScrollEventHandler( Options1::OnTreshold ), NULL, this );
	m_Treshold->Disconnect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( Options1::OnTreshold ), NULL, this );
	m_Treshold->Disconnect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( Options1::OnTreshold ), NULL, this );
	m_Treshold->Disconnect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( Options1::OnTreshold ), NULL, this );
	m_Treshold->Disconnect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( Options1::OnTreshold ), NULL, this );
	m_Treshold->Disconnect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( Options1::OnTreshold ), NULL, this );
	m_Treshold->Disconnect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( Options1::OnTreshold ), NULL, this );
	m_Treshold->Disconnect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( Options1::OnTreshold ), NULL, this );
	m_Treshold->Disconnect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( Options1::OnTreshold ), NULL, this );
	m_ResetStatistics->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( Options1::OnResetStatistics ), NULL, this );
}
Ejemplo n.º 8
0
wxHugeScrollBar::wxHugeScrollBar( wxScrollBar* m_scrollbar_ ){
         m_range = m_thumb = 0;
         m_scrollbar = m_scrollbar_;

			m_scrollbar->Connect( wxEVT_SCROLL_TOP, wxScrollEventHandler( wxHugeScrollBar::OnOffsetScroll ), NULL, this );
			m_scrollbar->Connect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( wxHugeScrollBar::OnOffsetScroll ), NULL, this );
			m_scrollbar->Connect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( wxHugeScrollBar::OnOffsetScroll ), NULL, this );
			m_scrollbar->Connect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( wxHugeScrollBar::OnOffsetScroll ), NULL, this );
			m_scrollbar->Connect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( wxHugeScrollBar::OnOffsetScroll ), NULL, this );
			m_scrollbar->Connect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( wxHugeScrollBar::OnOffsetScroll ), NULL, this );
			m_scrollbar->Connect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( wxHugeScrollBar::OnOffsetScroll ), NULL, this );
			m_scrollbar->Connect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( wxHugeScrollBar::OnOffsetScroll ), NULL, this );
			m_scrollbar->Connect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( wxHugeScrollBar::OnOffsetScroll ), NULL, this );
         }
Ejemplo n.º 9
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.º 10
0
VistaComplejaBase::~VistaComplejaBase()
{
        // Disconnect Events
        this->Disconnect( wxEVT_PAINT, wxPaintEventHandler( VistaComplejaBase::OnPaint ) );
        m_pSliderSlice->Disconnect( wxEVT_SCROLL_TOP, wxScrollEventHandler( VistaComplejaBase::OnZSliderScroll ), NULL, this );
        m_pSliderSlice->Disconnect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( VistaComplejaBase::OnZSliderScroll ), NULL, this );
        m_pSliderSlice->Disconnect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( VistaComplejaBase::OnZSliderScroll ), NULL, this );
        m_pSliderSlice->Disconnect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( VistaComplejaBase::OnZSliderScroll ), NULL, this );
        m_pSliderSlice->Disconnect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( VistaComplejaBase::OnZSliderScroll ), NULL, this );
        m_pSliderSlice->Disconnect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( VistaComplejaBase::OnZSliderScroll ), NULL, this );
        m_pSliderSlice->Disconnect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( VistaComplejaBase::OnZSliderScroll ), NULL, this );
        m_pSliderSlice->Disconnect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( VistaComplejaBase::OnZSliderScroll ), NULL, this );
        m_pSliderSlice->Disconnect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( VistaComplejaBase::OnZSliderScroll ), NULL, this );

}
Ejemplo n.º 11
0
wxFB_PrintPanel::~wxFB_PrintPanel()
{
	// Disconnect Events
	m_printCustomFonts->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( wxFB_PrintPanel::OnPrintCustomFonts ), NULL, this );
	m_printBlackSquareBrightness->Disconnect( wxEVT_SCROLL_TOP, wxScrollEventHandler( wxFB_PrintPanel::OnBlackSquareBrightness ), NULL, this );
	m_printBlackSquareBrightness->Disconnect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( wxFB_PrintPanel::OnBlackSquareBrightness ), NULL, this );
	m_printBlackSquareBrightness->Disconnect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( wxFB_PrintPanel::OnBlackSquareBrightness ), NULL, this );
	m_printBlackSquareBrightness->Disconnect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( wxFB_PrintPanel::OnBlackSquareBrightness ), NULL, this );
	m_printBlackSquareBrightness->Disconnect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( wxFB_PrintPanel::OnBlackSquareBrightness ), NULL, this );
	m_printBlackSquareBrightness->Disconnect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( wxFB_PrintPanel::OnBlackSquareBrightness ), NULL, this );
	m_printBlackSquareBrightness->Disconnect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( wxFB_PrintPanel::OnBlackSquareBrightness ), NULL, this );
	m_printBlackSquareBrightness->Disconnect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( wxFB_PrintPanel::OnBlackSquareBrightness ), NULL, this );
	m_printBlackSquareBrightness->Disconnect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( wxFB_PrintPanel::OnBlackSquareBrightness ), NULL, this );
	
}
Ejemplo n.º 12
0
VistaSimpleBase::~VistaSimpleBase()
{
        // Disconnect Events
        ViewInteractor2D->Disconnect( wxEVT_CHAR, wxKeyEventHandler( VistaSimpleBase::OnChar ), NULL, this );
        m_pSliderTimeInstant->Disconnect( wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( VistaSimpleBase::OnEraseBackground ), NULL, this );
        m_pSliderTimeInstant->Disconnect( wxEVT_SCROLL_TOP, wxScrollEventHandler( VistaSimpleBase::OnTimeInstantChanged ), NULL, this );
        m_pSliderTimeInstant->Disconnect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( VistaSimpleBase::OnTimeInstantChanged ), NULL, this );
        m_pSliderTimeInstant->Disconnect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( VistaSimpleBase::OnTimeInstantChanged ), NULL, this );
        m_pSliderTimeInstant->Disconnect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( VistaSimpleBase::OnTimeInstantChanged ), NULL, this );
        m_pSliderTimeInstant->Disconnect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( VistaSimpleBase::OnTimeInstantChanged ), NULL, this );
        m_pSliderTimeInstant->Disconnect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( VistaSimpleBase::OnTimeInstantChanged ), NULL, this );
        m_pSliderTimeInstant->Disconnect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( VistaSimpleBase::OnTimeInstantChanged ), NULL, this );
        m_pSliderTimeInstant->Disconnect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( VistaSimpleBase::OnTimeInstantChanged ), NULL, this );
        m_pSliderTimeInstant->Disconnect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( VistaSimpleBase::OnTimeInstantChanged ), NULL, this );

}
Ejemplo n.º 13
0
HexEditorCtrlGui::~HexEditorCtrlGui()
{
	// Disconnect Events
	this->Disconnect( wxEVT_CHAR, wxKeyEventHandler( HexEditorCtrlGui::OnKeyboardChar ) );
	this->Disconnect( wxEVT_SIZE, wxSizeEventHandler( HexEditorCtrlGui::OnResize ) );
	offset_scroll_real->Disconnect( wxEVT_SCROLL_TOP, wxScrollEventHandler( HexEditorCtrlGui::OnOffsetScroll ), NULL, this );
	offset_scroll_real->Disconnect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( HexEditorCtrlGui::OnOffsetScroll ), NULL, this );
	offset_scroll_real->Disconnect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( HexEditorCtrlGui::OnOffsetScroll ), NULL, this );
	offset_scroll_real->Disconnect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( HexEditorCtrlGui::OnOffsetScroll ), NULL, this );
	offset_scroll_real->Disconnect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( HexEditorCtrlGui::OnOffsetScroll ), NULL, this );
	offset_scroll_real->Disconnect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( HexEditorCtrlGui::OnOffsetScroll ), NULL, this );
	offset_scroll_real->Disconnect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( HexEditorCtrlGui::OnOffsetScroll ), NULL, this );
	offset_scroll_real->Disconnect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( HexEditorCtrlGui::OnOffsetScroll ), NULL, this );
	offset_scroll_real->Disconnect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( HexEditorCtrlGui::OnOffsetScroll ), NULL, this );

}
DIALOG_DISPLAY_OPTIONS_BASE::~DIALOG_DISPLAY_OPTIONS_BASE()
{
	// Disconnect Events
	m_scaleSlider->Disconnect( wxEVT_SCROLL_TOP, wxScrollEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleSlider ), NULL, this );
	m_scaleSlider->Disconnect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleSlider ), NULL, this );
	m_scaleSlider->Disconnect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleSlider ), NULL, this );
	m_scaleSlider->Disconnect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleSlider ), NULL, this );
	m_scaleSlider->Disconnect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleSlider ), NULL, this );
	m_scaleSlider->Disconnect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleSlider ), NULL, this );
	m_scaleSlider->Disconnect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleSlider ), NULL, this );
	m_scaleSlider->Disconnect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleSlider ), NULL, this );
	m_scaleSlider->Disconnect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleSlider ), NULL, this );
	m_scaleAuto->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleAuto ), NULL, this );
	m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnCancelButtonClick ), NULL, this );
	m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnOKBUttonClick ), NULL, this );
	
}
Ejemplo n.º 15
0
VistaSimpleBase::VistaSimpleBase( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
{
        this->SetBackgroundColour( wxColour( 64, 64, 64 ) );

        wxBoxSizer* bSizer7;
        bSizer7 = new wxBoxSizer( wxHORIZONTAL );

        ViewInteractor2D  = new wxVTKRenderWindowInteractor (this, wxID_ANY,
                        wxDefaultPosition,
                        wxDefaultSize,
                        wxWANTS_CHARS | wxFULL_REPAINT_ON_RESIZE,
                        wxT(""));

        ViewImage2D = vtkSmartPointer<vtkGinkgoImageViewer> ::New();

        vtkSmartPointer<vtkRenderer> rend1 = vtkSmartPointer<vtkRenderer>::New();

        ViewImage2D->SetRenderWindow ( this->ViewInteractor2D->GetRenderWindow() );
        ViewImage2D->SetRenderer (rend1);

        bSizer7->Add( ViewInteractor2D, 1, wxALL|wxEXPAND, 0 );

        m_pSliderTimeInstant = new wxSlider( this, wxID_ANY, 0, 0, 1, wxDefaultPosition, wxDefaultSize, wxSL_AUTOTICKS|wxSL_LEFT|wxSL_VERTICAL );
        m_pSliderTimeInstant->SetForegroundColour( wxColour( 64, 64, 64 ) );
        m_pSliderTimeInstant->Hide();

        bSizer7->Add( m_pSliderTimeInstant, 0, wxEXPAND, 1 );


        this->SetSizer( bSizer7 );
        this->Layout();
        bSizer7->Fit( this );

        // Connect Events
        ViewInteractor2D->Connect( wxEVT_CHAR, wxKeyEventHandler( VistaSimpleBase::OnChar ), NULL, this );
        m_pSliderTimeInstant->Connect( wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( VistaSimpleBase::OnEraseBackground ), NULL, this );
        m_pSliderTimeInstant->Connect( wxEVT_SCROLL_TOP, wxScrollEventHandler( VistaSimpleBase::OnTimeInstantChanged ), NULL, this );
        m_pSliderTimeInstant->Connect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( VistaSimpleBase::OnTimeInstantChanged ), NULL, this );
        m_pSliderTimeInstant->Connect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( VistaSimpleBase::OnTimeInstantChanged ), NULL, this );
        m_pSliderTimeInstant->Connect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( VistaSimpleBase::OnTimeInstantChanged ), NULL, this );
        m_pSliderTimeInstant->Connect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( VistaSimpleBase::OnTimeInstantChanged ), NULL, this );
        m_pSliderTimeInstant->Connect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( VistaSimpleBase::OnTimeInstantChanged ), NULL, this );
        m_pSliderTimeInstant->Connect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( VistaSimpleBase::OnTimeInstantChanged ), NULL, this );
        m_pSliderTimeInstant->Connect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( VistaSimpleBase::OnTimeInstantChanged ), NULL, this );
        m_pSliderTimeInstant->Connect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( VistaSimpleBase::OnTimeInstantChanged ), NULL, this );
}
Ejemplo n.º 16
0
VisualizeReconstructionsGui::VisualizeReconstructionsGui( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	
	wxFlexGridSizer* fgSizer8;
	fgSizer8 = new wxFlexGridSizer( 2, 3, 0, 0 );
	fgSizer8->SetFlexibleDirection( wxBOTH );
	fgSizer8->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	m_staticText17 = new wxStaticText( this, wxID_ANY, wxT("Example:"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT );
	m_staticText17->Wrap( -1 );
	fgSizer8->Add( m_staticText17, 0, wxALIGN_RIGHT|wxRIGHT|wxTOP, 8 );
	
	m_example_spin = new wxSpinCtrl( this, wxID_ANY, wxT("0"), wxDefaultPosition, wxSize( -1,-1 ), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 5999, 0 );
	fgSizer8->Add( m_example_spin, 0, wxALL, 5 );
	
	m_slider1 = new wxSlider( this, wxID_ANY, 0, -100, 100, wxDefaultPosition, wxDefaultSize, wxSL_VERTICAL );
	m_slider1->SetMinSize( wxSize( -1,256 ) );
	
	fgSizer8->Add( m_slider1, 0, wxALL, 5 );
	
	m_original_image = new wxTrainingExampleControl( this, wxSize( 224, 224 ) );
	fgSizer8->Add( m_original_image, 0, wxALL, 5 );
	
	m_fantasy_image = new wxTrainingExampleControl( this, wxSize( 224, 224 ) );
	fgSizer8->Add( m_fantasy_image, 0, wxALL, 5 );
	
	m_slider11 = new wxSlider( this, wxID_NUM_AGS_ITERATIONS, 0, 0, 16, wxDefaultPosition, wxDefaultSize, wxSL_VERTICAL );
	m_slider11->SetMinSize( wxSize( -1,256 ) );
	
	fgSizer8->Add( m_slider11, 0, wxALL, 5 );
	
	this->SetSizer( fgSizer8 );
	this->Layout();
	
	// Connect Events
	this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( VisualizeReconstructionsGui::OnTryToClose ) );
	m_example_spin->Connect( wxEVT_COMMAND_SPINCTRL_UPDATED, wxSpinEventHandler( VisualizeReconstructionsGui::OnChangeExample ), NULL, this );
	m_slider1->Connect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( VisualizeReconstructionsGui::OnTemperatureChanged ), NULL, this );
	m_slider11->Connect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( VisualizeReconstructionsGui::OnNumAgsIterationsChanged ), NULL, this );
}
Ejemplo n.º 17
0
launcher::~launcher()
{
	// Disconnect Events
	HeadLaser_CB->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( launcher::startStopHeadPtCld ), NULL, this );
	FloorLaser_CB->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( launcher::startStopFloorPtCld ), NULL, this );
	Stereo_CB->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( launcher::startStopStereoPtCld ), NULL, this );
	Model_CB->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( launcher::startStopModel ), NULL, this );
	UCS_CB->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( launcher::startStopUCS ), NULL, this );
	Grid_CB->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( launcher::startStopGrid ), NULL, this );
	Objects_CB->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( launcher::startStopObjects ), NULL, this );
	Objects_CB->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( launcher::deleteObjects ), NULL, this );
	Views_RB->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( launcher::viewChanged ), NULL, this );
	HeadLaser_RB->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( launcher::HeadLaserChanged ), NULL, this );
	panPTZL_S->Disconnect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( launcher::PTZL_ptzChanged ), NULL, this );
	zoomPTZL_S->Disconnect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( launcher::PTZL_ptzChanged ), NULL, this );
	PTZL_B->Disconnect( wxEVT_RIGHT_UP, wxMouseEventHandler( launcher::PTZL_click ), NULL, this );
	tiltPTZL_S->Disconnect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( launcher::PTZL_ptzChanged ), NULL, this );
	Visualization_CB->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( launcher::startStop_Visualization ), NULL, this );
	Topdown_CB->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( launcher::startStopTopdown ), NULL, this );
	PTZL_CB->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( launcher::startStop_PTZL ), NULL, this );
	PTZR_CB->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( launcher::startStop_PTZR ), NULL, this );
	WristL_CB->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( launcher::startStop_WristL ), NULL, this );
	WristR_CB->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( launcher::startStop_WristR ), NULL, this );
	EmStop_B->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( launcher::EmergencyStop ), NULL, this );
	panPTZR_S->Disconnect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( launcher::PTZR_ptzChanged ), NULL, this );
	zoomPTZR_S->Disconnect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( launcher::PTZR_ptzChanged ), NULL, this );
	PTZR_B->Disconnect( wxEVT_RIGHT_UP, wxMouseEventHandler( launcher::PTZR_click ), NULL, this );
	tiltPTZR_S->Disconnect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( launcher::PTZR_ptzChanged ), NULL, this );
}
Ejemplo n.º 18
0
ImagePreview::~ImagePreview()
{
	// Disconnect Events
	this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( ImagePreview::OnClose ) );
	this->Disconnect( wxEVT_SIZE, wxSizeEventHandler( ImagePreview::OnSize ) );
	m_slider1->Disconnect( wxEVT_SCROLL_TOP, wxScrollEventHandler( ImagePreview::OnQualityChanged ), NULL, this );
	m_slider1->Disconnect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( ImagePreview::OnQualityChanged ), NULL, this );
	m_slider1->Disconnect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( ImagePreview::OnQualityChanged ), NULL, this );
	m_slider1->Disconnect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( ImagePreview::OnQualityChanged ), NULL, this );
	m_slider1->Disconnect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( ImagePreview::OnQualityChanged ), NULL, this );
	m_slider1->Disconnect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( ImagePreview::OnQualityChanged ), NULL, this );
	m_slider1->Disconnect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( ImagePreview::OnQualityChanged ), NULL, this );
	m_slider1->Disconnect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( ImagePreview::OnQualityChanged ), NULL, this );
	m_slider1->Disconnect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( ImagePreview::OnQualityChanged ), NULL, this );
	m_button1->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ImagePreview::OnRefresh ), NULL, this );
	m_button2->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ImagePreview::OnSave ), NULL, this );
	m_button3->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ImagePreview::OnCancel ), NULL, this );
}
Ejemplo n.º 19
0
GlobalPoseSensorPanelBase::~GlobalPoseSensorPanelBase()
{
	// Disconnect Events
	this->Disconnect( wxEVT_SET_FOCUS, wxFocusEventHandler( GlobalPoseSensorPanelBase::OnSetFocus ) );
	this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( GlobalPoseSensorPanelBase::OnUpdateUI ) );
	mRefreshButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalPoseSensorPanelBase::OnRefreshList ), NULL, this );
	mConnectButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalPoseSensorPanelBase::OnConnect ), NULL, this );
	mZoomSlider->Disconnect( wxEVT_SCROLL_TOP, wxScrollEventHandler( GlobalPoseSensorPanelBase::OnZoomScroll ), NULL, this );
	mZoomSlider->Disconnect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( GlobalPoseSensorPanelBase::OnZoomScroll ), NULL, this );
	mZoomSlider->Disconnect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( GlobalPoseSensorPanelBase::OnZoomScroll ), NULL, this );
	mZoomSlider->Disconnect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( GlobalPoseSensorPanelBase::OnZoomScroll ), NULL, this );
	mZoomSlider->Disconnect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( GlobalPoseSensorPanelBase::OnZoomScroll ), NULL, this );
	mZoomSlider->Disconnect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( GlobalPoseSensorPanelBase::OnZoomScroll ), NULL, this );
	mZoomSlider->Disconnect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( GlobalPoseSensorPanelBase::OnZoomScroll ), NULL, this );
	mZoomSlider->Disconnect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( GlobalPoseSensorPanelBase::OnZoomScroll ), NULL, this );
	mZoomSlider->Disconnect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( GlobalPoseSensorPanelBase::OnZoomScroll ), NULL, this );
	
}
BM2CMP_FRAME_BASE::~BM2CMP_FRAME_BASE()
{
	// Disconnect Events
	m_InitialPicturePanel->Disconnect( wxEVT_PAINT, wxPaintEventHandler( BM2CMP_FRAME_BASE::OnPaint ), NULL, this );
	m_GreyscalePicturePanel->Disconnect( wxEVT_PAINT, wxPaintEventHandler( BM2CMP_FRAME_BASE::OnPaint ), NULL, this );
	m_BNPicturePanel->Disconnect( wxEVT_PAINT, wxPaintEventHandler( BM2CMP_FRAME_BASE::OnPaint ), NULL, this );
	m_DPIValueX->Disconnect( wxEVT_LEAVE_WINDOW, wxMouseEventHandler( BM2CMP_FRAME_BASE::UpdatePPITextValueX ), NULL, this );
	m_DPIValueX->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( BM2CMP_FRAME_BASE::OnResolutionChange ), NULL, this );
	m_DPIValueY->Disconnect( wxEVT_LEAVE_WINDOW, wxMouseEventHandler( BM2CMP_FRAME_BASE::UpdatePPITextValueY ), NULL, this );
	m_DPIValueY->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( BM2CMP_FRAME_BASE::OnResolutionChange ), NULL, this );
	m_buttonLoad->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BM2CMP_FRAME_BASE::OnLoadFile ), NULL, this );
	m_buttonExport->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BM2CMP_FRAME_BASE::OnExport ), NULL, this );
	m_rbOptions->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( BM2CMP_FRAME_BASE::OnOptionsSelection ), NULL, this );
	m_sliderThreshold->Disconnect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( BM2CMP_FRAME_BASE::OnThresholdChange ), NULL, this );
	
}
Ejemplo n.º 21
0
void ASSDrawFrame::SetToolBars()
{
    drawtbar = new wxToolBar(this, wxID_ANY, __DPDS__ , wxTB_FLAT | wxTB_TEXT | wxTB_NODIVIDER | wxTB_HORIZONTAL);
	drawtbar->AddTool(TB_CLEAR, _T("Clear"), wxBITMAP(new_), wxNullBitmap, wxITEM_NORMAL, _T(""), TIPS_CLEAR);
    //tbar->AddTool(TB_EDITSRC, _T("Source"), wxBITMAP(src_), wxNullBitmap, wxITEM_NORMAL, _T(""), TIPS_EDITSRC);
    drawtbar->AddCheckTool(TB_PREVIEW, _T("Preview"), wxBITMAP(preview_), wxNullBitmap, _T(""), TIPS_PREVIEW);
    //drawtbar->AddTool(TB_TRANSFORM, _T("Transform"), wxBITMAP(rot_), wxNullBitmap, wxITEM_NORMAL, _T(""), TIPS_TRANSFORM);
	zoomslider = new wxSlider(drawtbar, TB_ZOOMSLIDER, 1000, 100, 5000, __DPDS__ );
	//zoomslider->SetSize(280, zoomslider->GetSize().y);
	zoomslider->Connect(wxEVT_SCROLL_LINEUP, wxScrollEventHandler(ASSDrawFrame::OnZoomSliderChanged), NULL, this);
	zoomslider->Connect(wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler(ASSDrawFrame::OnZoomSliderChanged), NULL, this);
	zoomslider->Connect(wxEVT_SCROLL_PAGEUP, wxScrollEventHandler(ASSDrawFrame::OnZoomSliderChanged), NULL, this);
	zoomslider->Connect(wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler(ASSDrawFrame::OnZoomSliderChanged), NULL, this);
	zoomslider->Connect(wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler(ASSDrawFrame::OnZoomSliderChanged), NULL, this);
	zoomslider->Connect(wxEVT_SCROLL_CHANGED, wxScrollEventHandler(ASSDrawFrame::OnZoomSliderChanged), NULL, this);
	drawtbar->AddControl(zoomslider);
    drawtbar->Realize();

    m_mgr.AddPane(drawtbar, wxAuiPaneInfo().Name(_T("drawtbar")).Caption(TBNAME_DRAW).
                  ToolbarPane().Top().Position(0).Dockable(true).LeftDockable(false).RightDockable(false));

    modetbar = new wxToolBar(this, wxID_ANY, __DPDS__ , wxTB_FLAT | wxTB_TEXT | wxTB_NODIVIDER | wxTB_HORIZONTAL);
    modetbar->AddRadioTool(MODE_ARR, _T("Drag"), wxBITMAP(arr_), wxNullBitmap, _T(""), TIPS_ARR);
    modetbar->AddRadioTool(MODE_M, _T("Move"), wxBITMAP(m_), wxNullBitmap, _T(""), TIPS_M);
    //modetbar->AddRadioTool(MODE_N, _T("Move*"), wxBITMAP(n_), wxNullBitmap, _T(""), TIPS_N);
    modetbar->AddRadioTool(MODE_L, _T("Line"), wxBITMAP(l_), wxNullBitmap, _T(""), TIPS_L);
    modetbar->AddRadioTool(MODE_B, _T("Bezier"), wxBITMAP(b_), wxNullBitmap, _T(""), TIPS_B);
    //modetbar->AddRadioTool(MODE_S, _T("Spline"), wxBITMAP(s_), wxNullBitmap, _T(""), TIPS_S);
    //modetbar->AddRadioTool(MODE_P, _T("Extend"), wxBITMAP(p_), wxNullBitmap, _T(""), TIPS_P);
    //modetbar->AddRadioTool(MODE_C, _T("Close"), wxBITMAP(c_), wxNullBitmap, _T(""), TIPS_C);
    modetbar->AddRadioTool(MODE_DEL, _T("Delete"), wxBITMAP(del_), wxNullBitmap, _T(""), TIPS_DEL);
    modetbar->AddRadioTool(MODE_SCALEROTATE, _T("Scale/Rotate"), wxBITMAP(sc_rot_), wxNullBitmap, _T(""), TIPS_SCALEROTATE);
    modetbar->AddRadioTool(MODE_NUT_BILINEAR, _T("Bilinear"), wxBITMAP(nut_), wxNullBitmap, _T(""), TIPS_NUTB);
    //modetbar->AddRadioTool(MODE_NUT_PERSPECTIVE, _T("NUT:P"), wxBITMAP(arr_), wxNullBitmap, _T(""), _T(""));
    modetbar->Realize();

    m_mgr.AddPane(modetbar, wxAuiPaneInfo().Name(_T("modetbar")).Caption(TBNAME_MODE).
                  ToolbarPane().Top().Position(1).Dockable(true).LeftDockable(false).RightDockable(false));

    bgimgtbar = new wxToolBar(this, wxID_ANY, __DPDS__ , wxTB_FLAT | wxTB_TEXT | wxTB_NODIVIDER | wxTB_HORIZONTAL);
	bgimgtbar->SetToolBitmapSize(wxSize(24,15));
    bgimgtbar->AddCheckTool(DRAG_DWG, _T("Pan drawing"), wxBITMAP(pan_shp), wxNullBitmap, _T(""), TIPS_DWG);
    bgimgtbar->AddCheckTool(DRAG_BGIMG, _T("Pan background"), wxBITMAP(pan_bg), wxNullBitmap, _T(""), TIPS_BGIMG);
    //bgimgtbar->AddRadioTool(DRAG_BOTH, _T("Pan both"), wxBITMAP(pan_both), wxNullBitmap, _T(""), TIPS_BOTH);
    bgimgtbar->Realize();

    m_mgr.AddPane(bgimgtbar, wxAuiPaneInfo().Name(_T("bgimgtbar")).Caption(TBNAME_BGIMG).
                  ToolbarPane().Top().Position(2).Dockable(true).LeftDockable(false).RightDockable(false));

}
Ejemplo n.º 22
0
NumericSlider::NumericSlider(
		wxWindow* parent,
		wxWindowID id,
		const wxString &value,
		const wxPoint &pos,
		const wxSize &size,
		long style,
		int min,
		int max,
		int initial,
		const wxString &name 
	) 	
{
    Create(parent, id, pos, size, style);

    wxFlexGridSizer* mainSizer;
    mainSizer = new wxFlexGridSizer(0, 2, 0, 0);
    mainSizer->AddGrowableCol(0);
    mainSizer->AddGrowableRow(0);
    mainSizer->SetFlexibleDirection(wxBOTH);    

    mScroll = new wxScrollBar(this, wxNewId(), wxDefaultPosition, wxDefaultSize, wxSB_HORIZONTAL);
    mScroll->SetMinSize(wxSize(128, -1));
    mainSizer->Add(mScroll, 0, wxEXPAND | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, 0);
    int sliderStep = (max - min) / 20;
    if (sliderStep == 0)
        sliderStep = 1;
    mScroll->SetScrollbar(initial, 1, max - min + 1, sliderStep);
    mScroll->Connect(wxEVT_SCROLL_CHANGED, wxScrollEventHandler(NumericSlider::OnScrollChange), NULL, this);
    
    mSpinner = new wxSpinCtrl(this, wxNewId(), wxEmptyString, wxDefaultPosition, wxSize(-1, -1), wxSP_ARROW_KEYS | wxTE_PROCESS_ENTER, min, max, initial);
    mSpinner->SetMinSize(wxSize(96, -1));
    mainSizer->Add(mSpinner, 0, wxEXPAND |wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, 0);
    mSpinner->Connect(wxEVT_COMMAND_SPINCTRL_UPDATED, wxSpinEventHandler(NumericSlider::OnSpinnerChange), NULL, this);
    mSpinner->Connect(wxEVT_TEXT_ENTER, wxSpinEventHandler(NumericSlider::OnSpinnerChange), NULL, this);

    mScroll->SetThumbPosition(mSpinner->GetValue() - mSpinner->GetMin());

    this->SetSizer(mainSizer);
    this->Layout();
    mainSizer->Fit(this);
}
Ejemplo n.º 23
0
RightPanel::RightPanel(wxPanel * parent, PDF * newpdf)
       : wxPanel(parent, wxID_ANY, wxDefaultPosition, 
         wxSize(270, 150), wxBORDER_SUNKEN) {

	m_parent=parent;

	pdf=newpdf;
	wxBoxSizer *vbox = new wxBoxSizer(wxVERTICAL);

	pdfpanel = new PDFPanel(this, pdf);

	vbox->Add(pdfpanel, 10, wxEXPAND | wxALL, 5);
	slider = new wxSlider(this, ID_SLIDER, 1, 1, 1);
	vbox->Add(slider, 1, wxEXPAND | wxALL, 0);

	showb = new wxButton(this, ID_SHOW, wxT("<< show"), wxPoint(20, 20));
	vbox->Add(showb,1,wxEXPAND | wxALL,0);
	vbox->SetSizeHints(this);
	SetSizer(vbox);
	Connect(ID_SLIDER, wxEVT_COMMAND_SLIDER_UPDATED, wxScrollEventHandler(RightPanel::OnScroll));
	Connect(ID_SHOW, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(RightPanel::OnShowB));
	showb->SetFocus();
}
Ejemplo n.º 24
0
wxFB_PrintPanel::wxFB_PrintPanel( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
{
	wxBoxSizer* bSizer371;
	bSizer371 = new wxBoxSizer( wxVERTICAL );
	
	wxStaticBoxSizer* sbSizer14;
	sbSizer14 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxT("Fonts") ), wxVERTICAL );
	
	m_printCustomFonts = new wxCheckBox( this, wxID_ANY, wxT("Use custom fonts"), wxDefaultPosition, wxDefaultSize, 0 );
	sbSizer14->Add( m_printCustomFonts, 0, wxALL, 8 );
	
	wxFlexGridSizer* fgSizer5;
	fgSizer5 = new wxFlexGridSizer( 3, 2, 10, 10 );
	fgSizer5->SetFlexibleDirection( wxBOTH );
	fgSizer5->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	wxStaticText* m_staticText144;
	m_staticText144 = new wxStaticText( this, wxID_ANY, wxT("Grid Text:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText144->Wrap( -1 );
	fgSizer5->Add( m_staticText144, 0, wxALIGN_CENTER_VERTICAL, 5 );
	
	m_printGridLetterFont = new FontPickerPanel(this, wxID_ANY, wxNullFont, FP_DEFAULT & ~ FP_POINTSIZE);
	fgSizer5->Add( m_printGridLetterFont, 0, 0, 5 );
	
	wxStaticText* m_printGridNumberFontLabel;
	m_printGridNumberFontLabel = new wxStaticText( this, wxID_ANY, wxT("Grid Numbers:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_printGridNumberFontLabel->Wrap( -1 );
	fgSizer5->Add( m_printGridNumberFontLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
	
	m_printGridNumberFont = new FontPickerPanel(this, wxID_ANY, wxNullFont, FP_DEFAULT & ~ FP_POINTSIZE);
	fgSizer5->Add( m_printGridNumberFont, 0, 0, 5 );
	
	wxStaticText* m_staticText1412;
	m_staticText1412 = new wxStaticText( this, wxID_ANY, wxT("Clues:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText1412->Wrap( -1 );
	fgSizer5->Add( m_staticText1412, 0, wxALIGN_CENTER_VERTICAL, 5 );
	
	m_printClueFont = new FontPickerPanel(this, wxID_ANY, wxNullFont, FP_DEFAULT & ~ FP_POINTSIZE);
	fgSizer5->Add( m_printClueFont, 0, 0, 5 );
	
	
	sbSizer14->Add( fgSizer5, 0, wxALL, 5 );
	
	
	bSizer371->Add( sbSizer14, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
	
	wxBoxSizer* bSizer58;
	bSizer58 = new wxBoxSizer( wxHORIZONTAL );
	
	wxStaticBoxSizer* sbSizer8;
	sbSizer8 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxT("Grid alignment") ), wxVERTICAL );
	
	wxGridSizer* gSizer1;
	gSizer1 = new wxGridSizer( 0, 2, 0, 0 );
	
	m_alignTL = new wxRadioButton( this, wxID_ANY, wxT("Top left"), wxDefaultPosition, wxDefaultSize, 0 );
	gSizer1->Add( m_alignTL, 0, wxALL, 5 );
	
	m_alignTR = new wxRadioButton( this, wxID_ANY, wxT("Top right"), wxDefaultPosition, wxDefaultSize, 0 );
	gSizer1->Add( m_alignTR, 0, wxALL, 5 );
	
	m_alignBL = new wxRadioButton( this, wxID_ANY, wxT("Bottom left"), wxDefaultPosition, wxDefaultSize, 0 );
	gSizer1->Add( m_alignBL, 0, wxALL, 5 );
	
	m_alignBR = new wxRadioButton( this, wxID_ANY, wxT("Bottom right"), wxDefaultPosition, wxDefaultSize, 0 );
	gSizer1->Add( m_alignBR, 0, wxALL, 5 );
	
	
	sbSizer8->Add( gSizer1, 1, wxEXPAND, 5 );
	
	
	bSizer58->Add( sbSizer8, 0, wxEXPAND|wxALL, 5 );
	
	wxStaticBoxSizer* sbSizer19;
	sbSizer19 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxT("Black square brightness") ), wxHORIZONTAL );
	
	m_staticText13 = new wxStaticText( this, wxID_ANY, wxT("White"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText13->Wrap( -1 );
	sbSizer19->Add( m_staticText13, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
	
	m_printBlackSquareBrightness = new wxSlider( this, wxID_ANY, 0, 0, 255, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_INVERSE );
	sbSizer19->Add( m_printBlackSquareBrightness, 1, wxTOP|wxALIGN_CENTER_VERTICAL, 3 );
	
	m_staticText14 = new wxStaticText( this, wxID_ANY, wxT("Black"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText14->Wrap( -1 );
	sbSizer19->Add( m_staticText14, 0, wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
	
	m_panel8 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxSUNKEN_BORDER );
	wxBoxSizer* bSizer21;
	bSizer21 = new wxBoxSizer( wxVERTICAL );
	
	m_printBlackSquarePreview = new wxPanel( m_panel8, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER );
	m_printBlackSquarePreview->SetBackgroundColour( wxColour( 0, 0, 0 ) );
	m_printBlackSquarePreview->SetMinSize( wxSize( 30,30 ) );
	
	bSizer21->Add( m_printBlackSquarePreview, 1, wxEXPAND|wxALL, 5 );
	
	
	m_panel8->SetSizer( bSizer21 );
	m_panel8->Layout();
	bSizer21->Fit( m_panel8 );
	sbSizer19->Add( m_panel8, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
	
	
	bSizer58->Add( sbSizer19, 1, wxALL|wxEXPAND, 5 );
	
	
	bSizer371->Add( bSizer58, 0, wxEXPAND|wxALL, 5 );
	
	
	this->SetSizer( bSizer371 );
	this->Layout();
	bSizer371->Fit( this );
	
	// Connect Events
	m_printCustomFonts->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( wxFB_PrintPanel::OnPrintCustomFonts ), NULL, this );
	m_printBlackSquareBrightness->Connect( wxEVT_SCROLL_TOP, wxScrollEventHandler( wxFB_PrintPanel::OnBlackSquareBrightness ), NULL, this );
	m_printBlackSquareBrightness->Connect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( wxFB_PrintPanel::OnBlackSquareBrightness ), NULL, this );
	m_printBlackSquareBrightness->Connect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( wxFB_PrintPanel::OnBlackSquareBrightness ), NULL, this );
	m_printBlackSquareBrightness->Connect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( wxFB_PrintPanel::OnBlackSquareBrightness ), NULL, this );
	m_printBlackSquareBrightness->Connect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( wxFB_PrintPanel::OnBlackSquareBrightness ), NULL, this );
	m_printBlackSquareBrightness->Connect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( wxFB_PrintPanel::OnBlackSquareBrightness ), NULL, this );
	m_printBlackSquareBrightness->Connect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( wxFB_PrintPanel::OnBlackSquareBrightness ), NULL, this );
	m_printBlackSquareBrightness->Connect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( wxFB_PrintPanel::OnBlackSquareBrightness ), NULL, this );
	m_printBlackSquareBrightness->Connect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( wxFB_PrintPanel::OnBlackSquareBrightness ), NULL, this );
}
Ejemplo n.º 25
0
ImagePreview::ImagePreview( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
	_pathway_viz = NULL;
	
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	
	wxBoxSizer* bSizer1;
	bSizer1 = new wxBoxSizer( wxVERTICAL );
	
	m_panel1 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER|wxTAB_TRAVERSAL|wxVSCROLL|wxHSCROLL );
	wxBoxSizer* bSizer4;
	bSizer4 = new wxBoxSizer( wxHORIZONTAL );
	
	m_screen = new wxStaticBitmap( m_panel1, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
	m_screen->SetMinSize( wxSize( 400,-1 ) );
	
	bSizer4->Add( m_screen, 1, wxALL|wxEXPAND, 5 );
	
	m_panel1->SetSizer( bSizer4 );
	m_panel1->Layout();
	bSizer4->Fit( m_panel1 );
	bSizer1->Add( m_panel1, 1, wxEXPAND | wxALL, 5 );
	
	wxBoxSizer* bSizer3;
	bSizer3 = new wxBoxSizer( wxHORIZONTAL );
	
	
	bSizer3->Add( 0, 0, 1, wxEXPAND, 5 );
	
	m_staticText1 = new wxStaticText( this, wxID_ANY, wxT("Lines"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText1->Wrap( -1 );
	bSizer3->Add( m_staticText1, 0, wxALL, 5 );
	
	m_slider1 = new wxSlider( this, wxID_ANY, 0, 0, 1, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL );
	m_slider1->SetMinSize( wxSize( 150,-1 ) );
	
	bSizer3->Add( m_slider1, 0, wxALL, 5 );
	
	m_staticText2 = new wxStaticText( this, wxID_ANY, wxT("Tubes"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText2->Wrap( -1 );
	bSizer3->Add( m_staticText2, 0, wxALL, 5 );
	
	
	bSizer3->Add( 0, 0, 1, wxEXPAND, 5 );
	
	bSizer1->Add( bSizer3, 0, wxEXPAND, 5 );
	
	wxBoxSizer* bSizer2;
	bSizer2 = new wxBoxSizer( wxHORIZONTAL );
	
	
	bSizer2->Add( 0, 0, 1, wxEXPAND, 5 );
	
	m_button1 = new wxButton( this, wxID_ANY, wxT("Refresh"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer2->Add( m_button1, 0, wxALL, 5 );
	
	m_button2 = new wxButton( this, wxID_ANY, wxT("Save"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer2->Add( m_button2, 0, wxALL, 5 );
	
	m_button3 = new wxButton( this, wxID_ANY, wxT("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer2->Add( m_button3, 0, wxALL, 5 );
	
	
	bSizer2->Add( 0, 0, 1, wxEXPAND, 5 );
	
	bSizer1->Add( bSizer2, 0, wxEXPAND, 5 );
	
	this->SetSizer( bSizer1 );
	this->Layout();
	
	// Connect Events
	this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( ImagePreview::OnClose ) );
	this->Connect( wxEVT_SIZE, wxSizeEventHandler( ImagePreview::OnSize ) );
	m_slider1->Connect( wxEVT_SCROLL_TOP, wxScrollEventHandler( ImagePreview::OnQualityChanged ), NULL, this );
	m_slider1->Connect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( ImagePreview::OnQualityChanged ), NULL, this );
	m_slider1->Connect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( ImagePreview::OnQualityChanged ), NULL, this );
	m_slider1->Connect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( ImagePreview::OnQualityChanged ), NULL, this );
	m_slider1->Connect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( ImagePreview::OnQualityChanged ), NULL, this );
	m_slider1->Connect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( ImagePreview::OnQualityChanged ), NULL, this );
	m_slider1->Connect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( ImagePreview::OnQualityChanged ), NULL, this );
	m_slider1->Connect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( ImagePreview::OnQualityChanged ), NULL, this );
	m_slider1->Connect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( ImagePreview::OnQualityChanged ), NULL, this );
	m_button1->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ImagePreview::OnRefresh ), NULL, this );
	m_button2->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ImagePreview::OnSave ), NULL, this );
	m_button3->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ImagePreview::OnCancel ), NULL, this );
}
Ejemplo n.º 26
0
bool wxDynamicSashWindowLeaf::Create()
{
    m_hscroll = new wxScrollBar();
    m_vscroll = new wxScrollBar();
    m_viewport = new wxWindow();

    wxDynamicSashWindowImpl *add_child_target = m_impl->m_add_child_target;
    m_impl->m_add_child_target = NULL;

    bool success = m_hscroll->Create(m_impl->m_container, wxID_ANY,
                                     wxDefaultPosition, wxDefaultSize,
                                     wxSB_HORIZONTAL);
    if ( success )
        success = m_vscroll->Create(m_impl->m_container, wxID_ANY,
                                    wxDefaultPosition, wxDefaultSize,
                                    wxSB_VERTICAL);
    if ( success )
        success = m_viewport->Create(m_impl->m_container, wxID_ANY);
    if ( !success )
        return false;

    m_impl->m_add_child_target = add_child_target;

    wxCursor cursor(wxCURSOR_ARROW);
    m_hscroll->SetCursor(cursor);
    m_vscroll->SetCursor(cursor);
    m_viewport->SetCursor(cursor);

    // the viewport must resize its child when it is itself resized, but it's
    // more convenient to do it in our own method instead of deriving a new
    // class just for this: this is why we pass this as last Connect() argument
    m_viewport->Connect(wxEVT_SIZE,
                        wxSizeEventHandler(wxDynamicSashWindowLeaf::OnViewSize),
                        NULL, this);

    Connect(wxEVT_DYNAMIC_SASH_REPARENT,
            wxEventHandler(wxDynamicSashWindowLeaf::OnReparent));

    if (m_impl->m_window->GetWindowStyle() & wxDS_MANAGE_SCROLLBARS)
    {
        m_hscroll->SetEventHandler(this);
        m_vscroll->SetEventHandler(this);

        Connect(wxEVT_SET_FOCUS,
                wxFocusEventHandler(wxDynamicSashWindowLeaf::OnFocus));
        Connect(wxEVT_SCROLL_TOP,
                wxScrollEventHandler(wxDynamicSashWindowLeaf::OnScroll));
        Connect(wxEVT_SCROLL_BOTTOM,
                wxScrollEventHandler(wxDynamicSashWindowLeaf::OnScroll));
        Connect(wxEVT_SCROLL_LINEUP,
                wxScrollEventHandler(wxDynamicSashWindowLeaf::OnScroll));
        Connect(wxEVT_SCROLL_LINEDOWN,
                wxScrollEventHandler(wxDynamicSashWindowLeaf::OnScroll));
        Connect(wxEVT_SCROLL_PAGEUP,
                wxScrollEventHandler(wxDynamicSashWindowLeaf::OnScroll));
        Connect(wxEVT_SCROLL_PAGEDOWN,
                wxScrollEventHandler(wxDynamicSashWindowLeaf::OnScroll));
        Connect(wxEVT_SCROLL_THUMBTRACK,
                wxScrollEventHandler(wxDynamicSashWindowLeaf::OnScroll));
        Connect(wxEVT_SCROLL_THUMBRELEASE,
                wxScrollEventHandler(wxDynamicSashWindowLeaf::OnScroll));
    }

    wxLayoutConstraints *layout = new wxLayoutConstraints();
    if (!layout)
        return false;

    wxSize size = m_hscroll->GetBestSize();

    layout->left.SameAs(m_impl->m_container, wxLeft, 10);
    layout->right.LeftOf(m_vscroll);
    layout->bottom.SameAs(m_impl->m_container, wxBottom, 3);
    layout->height.Absolute(size.GetHeight());
    m_hscroll->SetConstraints(layout);

    layout = new wxLayoutConstraints();
    if (!layout)
        return false;

    size = m_vscroll->GetBestSize();

    layout->top.SameAs(m_impl->m_container, wxTop, 10);
    layout->bottom.Above(m_hscroll);
    layout->right.SameAs(m_impl->m_container, wxRight, 3);
    layout->width.Absolute(size.GetWidth());
    m_vscroll->SetConstraints(layout);

    layout = new wxLayoutConstraints();
    if (!layout)
        return false;
    layout->left.SameAs(m_impl->m_container, wxLeft, 3);
    layout->right.LeftOf(m_vscroll);
    layout->top.SameAs(m_impl->m_container, wxTop, 3);
    layout->bottom.Above(m_hscroll);
    m_viewport->SetConstraints(layout);

    m_impl->m_container->Layout();

    return true;
}
Ejemplo n.º 27
0
GlobalPoseSensorPanelBase::GlobalPoseSensorPanelBase( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
{
	wxBoxSizer* bSizer23;
	bSizer23 = new wxBoxSizer( wxVERTICAL );
	
	wxBoxSizer* bSizer231;
	bSizer231 = new wxBoxSizer( wxVERTICAL );
	
	wxFlexGridSizer* fgSizer4;
	fgSizer4 = new wxFlexGridSizer( 0, 2, 0, 0 );
	fgSizer4->AddGrowableCol( 0 );
	fgSizer4->AddGrowableRow( 0 );
	fgSizer4->SetFlexibleDirection( wxBOTH );
	fgSizer4->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	mScanNumberLabel = new wxStaticText( this, wxID_ANY, wxT("Pose Data"), wxDefaultPosition, wxDefaultSize, 0 );
	mScanNumberLabel->Wrap( -1 );
	fgSizer4->Add( mScanNumberLabel, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
	
	bSizer231->Add( fgSizer4, 0, wxEXPAND, 5 );
	
	wxFlexGridSizer* bSizer251;
	bSizer251 = new wxFlexGridSizer( 0, 2, 0, 0 );
	bSizer251->AddGrowableCol( 0 );
	bSizer251->AddGrowableRow( 0 );
	bSizer251->SetFlexibleDirection( wxBOTH );
	bSizer251->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	mpImageSizer = new wxBoxSizer( wxVERTICAL );
	
	bSizer251->Add( mpImageSizer, 1, wxEXPAND, 5 );
	
	bSizer231->Add( bSizer251, 1, wxEXPAND, 5 );
	
	bSizer23->Add( bSizer231, 1, wxEXPAND, 5 );
	
	wxBoxSizer* bSizer24;
	bSizer24 = new wxBoxSizer( wxHORIZONTAL );
	
	mRefreshButton = new wxButton( this, wxID_ANY, wxT("Refresh List"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer24->Add( mRefreshButton, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	m_staticText21 = new wxStaticText( this, wxID_ANY, wxT("Component:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText21->Wrap( -1 );
	bSizer24->Add( m_staticText21, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	wxArrayString mComponentChoiceChoices;
	mComponentChoice = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, mComponentChoiceChoices, 0 );
	mComponentChoice->SetSelection( 0 );
	bSizer24->Add( mComponentChoice, 1, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	mConnectButton = new wxButton( this, wxID_ANY, wxT("Connect"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer24->Add( mConnectButton, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	m_staticText20 = new wxStaticText( this, wxID_ANY, wxT("Zoom:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText20->Wrap( -1 );
	bSizer24->Add( m_staticText20, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	mZoomSlider = new wxSlider( this, wxID_ANY, 50, 10, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS );
	bSizer24->Add( mZoomSlider, 1, wxALL, 5 );
	
	bSizer23->Add( bSizer24, 0, wxEXPAND, 5 );
	
	this->SetSizer( bSizer23 );
	this->Layout();
	
	// Connect Events
	this->Connect( wxEVT_SET_FOCUS, wxFocusEventHandler( GlobalPoseSensorPanelBase::OnSetFocus ) );
	this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( GlobalPoseSensorPanelBase::OnUpdateUI ) );
	mRefreshButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalPoseSensorPanelBase::OnRefreshList ), NULL, this );
	mConnectButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GlobalPoseSensorPanelBase::OnConnect ), NULL, this );
	mZoomSlider->Connect( wxEVT_SCROLL_TOP, wxScrollEventHandler( GlobalPoseSensorPanelBase::OnZoomScroll ), NULL, this );
	mZoomSlider->Connect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( GlobalPoseSensorPanelBase::OnZoomScroll ), NULL, this );
	mZoomSlider->Connect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( GlobalPoseSensorPanelBase::OnZoomScroll ), NULL, this );
	mZoomSlider->Connect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( GlobalPoseSensorPanelBase::OnZoomScroll ), NULL, this );
	mZoomSlider->Connect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( GlobalPoseSensorPanelBase::OnZoomScroll ), NULL, this );
	mZoomSlider->Connect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( GlobalPoseSensorPanelBase::OnZoomScroll ), NULL, this );
	mZoomSlider->Connect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( GlobalPoseSensorPanelBase::OnZoomScroll ), NULL, this );
	mZoomSlider->Connect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( GlobalPoseSensorPanelBase::OnZoomScroll ), NULL, this );
	mZoomSlider->Connect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( GlobalPoseSensorPanelBase::OnZoomScroll ), NULL, this );
}
Ejemplo n.º 28
0
GUIFrame::GUIFrame(wxWindow* parent, wxWindowID id, const wxString& title,
		const wxPoint& pos, const wxSize& size, long style) :
		wxFrame(parent, id, title, pos, size, style) {
	this->SetSizeHints(wxDefaultSize, wxDefaultSize);

	wxBoxSizer* bSizer1;
	bSizer1 = new wxBoxSizer(wxHORIZONTAL);

	wxBoxSizer* bSizer11;
	bSizer11 = new wxBoxSizer(wxVERTICAL);

	wxBoxSizer* bSizer111;
	bSizer111 = new wxBoxSizer(wxVERTICAL);

	wxImage::AddHandler(new wxJPEGHandler);
	ImageField = new wxStaticBitmap(this, wxID_ANY, wxNullBitmap,
			wxDefaultPosition, wxSize(-1, -1), 0);
	bSizer111->Add(ImageField, 0, wxTOP | wxRIGHT | wxLEFT, 5);

	bSizer11->Add(bSizer111, 0, wxALIGN_CENTER_VERTICAL | wxEXPAND, 5);

	wxBoxSizer* bSizer112;
	bSizer112 = new wxBoxSizer(wxVERTICAL);

	MessageLabel = new wxStaticText(this, wxID_ANY, wxT("Message: press start"),
			wxDefaultPosition, wxDefaultSize, 0);
	MessageLabel->Wrap(-1);
	bSizer112->Add(MessageLabel, 0, wxALIGN_CENTER_VERTICAL | wxEXPAND | wxALL,
			5);

	bSizer11->Add(bSizer112, 1, wxEXPAND, 5);

	bSizer1->Add(bSizer11, 1, wxEXPAND, 5);

	wxBoxSizer* bSizer12;
	bSizer12 = new wxBoxSizer(wxVERTICAL);

	bSizer121 = new wxBoxSizer(wxVERTICAL);

	wxScrolledWindow* OptionScrollWindow = new wxScrolledWindow(this, wxID_ANY,
			wxDefaultPosition, wxDefaultSize, wxHSCROLL | wxVSCROLL);
	OptionScrollWindow->SetScrollRate(0, 30);
	wxBoxSizer* bSizer1211;
	bSizer1211 = new wxBoxSizer(wxVERTICAL);

	wxBoxSizer* bSizer121101;
	bSizer121101 = new wxBoxSizer(wxHORIZONTAL);

	AmountOfObjectsLabel = new wxStaticText(OptionScrollWindow, wxID_ANY,
			wxT("Amount Of Object"), wxDefaultPosition, wxDefaultSize, 0);
	AmountOfObjectsLabel->Wrap(-1);
	bSizer121101->Add(AmountOfObjectsLabel, 0, wxALL | wxALIGN_CENTER_VERTICAL,
			5);

	AmountOfObjectsTxtField = new wxTextCtrl(OptionScrollWindow, wxID_ANY,
			wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
	bSizer121101->Add(AmountOfObjectsTxtField, 0,
			wxALL | wxALIGN_CENTER_VERTICAL, 5);

	bSizer1211->Add(bSizer121101, 0, wxEXPAND, 5);

	wxBoxSizer* bSizer121102;
	bSizer121102 = new wxBoxSizer(wxHORIZONTAL);

	wxStaticText* m_staticText29 = new wxStaticText(OptionScrollWindow,
			wxID_ANY, wxT("Box Color:"), wxDefaultPosition, wxDefaultSize, 0);
	m_staticText29->Wrap(-1);
	bSizer121102->Add(m_staticText29, 0, wxALL | wxALIGN_CENTER_VERTICAL, 5);

	ColorSlider = new wxSlider(OptionScrollWindow, wxID_ANY, 50, 0, 255,
			wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL);
	bSizer121102->Add(ColorSlider, 1, wxALL, 5);

	bSizer1211->Add(bSizer121102, 0, wxEXPAND, 5);

	bSizer1211->Add(
			new wxStaticLine(OptionScrollWindow, wxID_ANY, wxDefaultPosition,
					wxSize(-1, 1), wxLI_HORIZONTAL), 0, wxALL | wxEXPAND, 5);

	wxBoxSizer* bSizer121103;
	bSizer121103 = new wxBoxSizer(wxHORIZONTAL);

	BackgroundTextField = new wxStaticText(OptionScrollWindow, wxID_ANY,
			wxT("Path to seperated\nfore- background:"), wxDefaultPosition,
			wxDefaultSize, 0);
	BackgroundTextField->Wrap(-1);
	bSizer121103->Add(BackgroundTextField, 0, wxALL | wxALIGN_CENTER_VERTICAL,
			5);

	filePicker = new wxFilePickerCtrl(OptionScrollWindow, wxID_ANY,
			wxEmptyString, wxT("Select a file"), wxT("*.PNG"),
			wxDefaultPosition, wxDefaultSize, wxFLP_DEFAULT_STYLE);
	bSizer121103->Add(filePicker, 1, wxALL | wxALIGN_CENTER_VERTICAL, 5);

	bSizer1211->Add(bSizer121103, 0, wxEXPAND, 5);

	BackgroundComboBox = new wxComboBox(OptionScrollWindow, wxID_ANY,
			wxT("Background"), wxDefaultPosition, wxSize(-1, -1), 0, NULL,
			wxCB_READONLY);
	bSizer1211->Add(BackgroundComboBox, 0, wxALL | wxEXPAND, 5);

	LightingComboBox = new wxComboBox(OptionScrollWindow, wxID_ANY,
			wxT("Lighting"), wxDefaultPosition, wxSize(-1, -1), 0, NULL, 0);
	bSizer1211->Add(LightingComboBox, 0, wxALL | wxEXPAND, 5);

	PerspectiveComboBox = new wxComboBox(OptionScrollWindow, wxID_ANY,
			wxT("Perspective"), wxDefaultPosition, wxSize(-1, -1), 0, NULL,
			0);
	bSizer1211->Add(PerspectiveComboBox, 0, wxALL | wxEXPAND, 5);

	bSizer1211->Add(
			new wxStaticLine(OptionScrollWindow, wxID_ANY, wxDefaultPosition,
					wxSize(-1, 1), wxLI_HORIZONTAL), 0, wxEXPAND | wxALL, 5);

	wxBoxSizer* bSizer121104;
	bSizer121104 = new wxBoxSizer(wxHORIZONTAL);

	ZoomBox_radioBtn = new wxRadioButton(OptionScrollWindow, wxID_ANY,
			wxT("Zoom box"), wxDefaultPosition, wxDefaultSize, 0);
	bSizer121104->Add(ZoomBox_radioBtn, 1, wxALL | wxALIGN_CENTER_VERTICAL, 5);

	ZoomCheckBox = new wxCheckBox(OptionScrollWindow, wxID_ANY, wxT("On"),
			wxDefaultPosition, wxDefaultSize, 0);
	bSizer121104->Add(ZoomCheckBox, 0, wxALL, 5);

	bSizer1211->Add(bSizer121104, 0, wxEXPAND, 5);

	wxBoxSizer* bSizer121105;
	bSizer121105 = new wxBoxSizer(wxHORIZONTAL);

	ZoomButton = new wxButton(OptionScrollWindow, wxID_ANY, wxT("Zoom"),
			wxDefaultPosition, wxDefaultSize, 0);
	bSizer121105->Add(ZoomButton, 0, wxALL | wxALIGN_CENTER_VERTICAL, 5);

	wxBoxSizer* bSizer1211051;
	bSizer1211051 = new wxBoxSizer(wxVERTICAL);

	bSizer121105->Add(bSizer1211051, 1, wxEXPAND, 5);

	OriginalImageButton = new wxButton(OptionScrollWindow, wxID_ANY,
			wxT("Original"), wxDefaultPosition, wxDefaultSize, 0);
	bSizer121105->Add(OriginalImageButton, 0, wxALL | wxALIGN_CENTER_VERTICAL,
			5);

	bSizer1211->Add(bSizer121105, 0, wxEXPAND, 5);

	bSizer1211->Add(
			new wxStaticLine(OptionScrollWindow, wxID_ANY, wxDefaultPosition,
					wxSize(-1, 1), wxLI_HORIZONTAL), 0, wxEXPAND | wxALL, 5);

	ObjectComboBox = new wxComboBox(OptionScrollWindow, wxID_ANY, wxT("Object"),
			wxDefaultPosition, wxSize(-1, -1), 0, NULL, 0);
	bSizer1211->Add(ObjectComboBox, 0,
			wxALL | wxALIGN_CENTER_VERTICAL | wxEXPAND, 5);

	wxBoxSizer* bSizer121106;
	bSizer121106 = new wxBoxSizer(wxHORIZONTAL);

	SurroundBox_radioBtn = new wxRadioButton(OptionScrollWindow, wxID_ANY,
			wxT("Surround box"), wxDefaultPosition, wxDefaultSize, 0);
	bSizer121106->Add(SurroundBox_radioBtn, 1, wxALL | wxALIGN_CENTER_VERTICAL,
			5);

	CrateButton = new wxButton(OptionScrollWindow, wxID_ANY, wxT("Crate"),
			wxDefaultPosition, wxDefaultSize, 0);
	bSizer121106->Add(CrateButton, 0, wxALL | wxALIGN_CENTER_VERTICAL, 5);

	bSizer1211->Add(bSizer121106, 0, wxEXPAND, 5);

	wxBoxSizer* bSizer121107;
	bSizer121107 = new wxBoxSizer(wxHORIZONTAL);

	LUC_RadioBtn = new wxRadioButton(OptionScrollWindow, wxID_ANY,
			wxT("Left Upper Corner"), wxDefaultPosition, wxDefaultSize, 0);
	bSizer121107->Add(LUC_RadioBtn, 1, wxALL | wxALIGN_CENTER_VERTICAL, 5);

	LUC_Label = new wxStaticText(OptionScrollWindow, wxID_ANY,
			wxT("(000, 000)"), wxDefaultPosition, wxDefaultSize, 0);
	LUC_Label->Wrap(-1);
	bSizer121107->Add(LUC_Label, 0, wxALL | wxALIGN_CENTER_VERTICAL, 5);

	bSizer1211->Add(bSizer121107, 0, wxEXPAND, 5);

	wxBoxSizer* bSizer121108;
	bSizer121108 = new wxBoxSizer(wxHORIZONTAL);

	RLC_RadioBtn = new wxRadioButton(OptionScrollWindow, wxID_ANY,
			wxT("Right Lower Corner"), wxDefaultPosition, wxDefaultSize, 0);
	bSizer121108->Add(RLC_RadioBtn, 1, wxALL | wxALIGN_CENTER_VERTICAL, 5);

	RLC_Label = new wxStaticText(OptionScrollWindow, wxID_ANY,
			wxT("(000, 000)"), wxDefaultPosition, wxDefaultSize, 0);
	RLC_Label->Wrap(-1);
	bSizer121108->Add(RLC_Label, 0, wxALL | wxALIGN_CENTER_VERTICAL, 5);

	bSizer1211->Add(bSizer121108, 0, wxEXPAND, 5);

	wxBoxSizer* bSizer121109;
	bSizer121109 = new wxBoxSizer(wxHORIZONTAL);

	CenterLine_radioBtn = new wxRadioButton(OptionScrollWindow, wxID_ANY,
			wxT("Center line"), wxDefaultPosition, wxDefaultSize, 0);
	bSizer121109->Add(CenterLine_radioBtn, 1, wxALL, 5);

	NoRotationCheckBox = new wxCheckBox(OptionScrollWindow, wxID_ANY,
			wxT("No Rotation"), wxDefaultPosition, wxDefaultSize, 0);
	bSizer121109->Add(NoRotationCheckBox, 0, wxALL, 5);

	bSizer1211->Add(bSizer121109, 0, wxEXPAND, 5);

	wxBoxSizer* bSizer121110;
	bSizer121110 = new wxBoxSizer(wxHORIZONTAL);

	CenterTop_RadioBtn = new wxRadioButton(OptionScrollWindow, wxID_ANY,
			wxT("Center Top"), wxDefaultPosition, wxDefaultSize, 0);
	bSizer121110->Add(CenterTop_RadioBtn, 1, wxALL | wxALIGN_CENTER_VERTICAL,
			5);

	CenterTop_Label = new wxStaticText(OptionScrollWindow, wxID_ANY,
			wxT("(000, 000)"), wxDefaultPosition, wxDefaultSize, 0);
	CenterTop_Label->Wrap(-1);
	bSizer121110->Add(CenterTop_Label, 0, wxALL | wxALIGN_CENTER_VERTICAL, 5);

	bSizer1211->Add(bSizer121110, 0, wxEXPAND, 5);

	wxBoxSizer* bSizer121111;
	bSizer121111 = new wxBoxSizer(wxHORIZONTAL);

	CenterBottom_RadioBtn = new wxRadioButton(OptionScrollWindow, wxID_ANY,
			wxT("Center Bottom"), wxDefaultPosition, wxDefaultSize, 0);
	bSizer121111->Add(CenterBottom_RadioBtn, 1, wxALL | wxALIGN_CENTER_VERTICAL,
			5);

	CenterBottom_Label = new wxStaticText(OptionScrollWindow, wxID_ANY,
			wxT("(000, 000)"), wxDefaultPosition, wxDefaultSize, 0);
	CenterBottom_Label->Wrap(-1);
	bSizer121111->Add(CenterBottom_Label, 0, wxALL | wxALIGN_CENTER_VERTICAL,
			5);

	bSizer1211->Add(bSizer121111, 0, wxEXPAND, 5);

	bSizer1211->Add(
			new wxStaticLine(OptionScrollWindow, wxID_ANY, wxDefaultPosition,
					wxSize(-1, 1), wxLI_HORIZONTAL), 0, wxEXPAND | wxALL, 5);

	wxBoxSizer* bSizer121112;
	bSizer121112 = new wxBoxSizer(wxHORIZONTAL);

	Rotation_Label = new wxStaticText(OptionScrollWindow, wxID_ANY,
			wxT("Rotation (degrees)"), wxDefaultPosition, wxDefaultSize, 0);
	Rotation_Label->Wrap(-1);
	bSizer121112->Add(Rotation_Label, 1, wxALL | wxALIGN_CENTER_VERTICAL, 5);

	RotationValue_label = new wxStaticText(OptionScrollWindow, wxID_ANY,
			wxT("360"), wxDefaultPosition, wxDefaultSize, 0);
	RotationValue_label->Wrap(-1);
	bSizer121112->Add(RotationValue_label, 0, wxALL | wxALIGN_CENTER_VERTICAL,
			5);

	bSizer1211->Add(bSizer121112, 0, wxEXPAND, 5);

	wxBoxSizer* bSizer121113;
	bSizer121113 = new wxBoxSizer(wxHORIZONTAL);

	CenterPoint_label = new wxStaticText(OptionScrollWindow, wxID_ANY,
			wxT("Center point"), wxDefaultPosition, wxDefaultSize, 0);
	CenterPoint_label->Wrap(-1);
	bSizer121113->Add(CenterPoint_label, 1, wxALL | wxALIGN_CENTER_VERTICAL, 5);

	CenterPointValue_label = new wxStaticText(OptionScrollWindow, wxID_ANY,
			wxT("(000,000)"), wxDefaultPosition, wxDefaultSize, 0);
	CenterPointValue_label->Wrap(-1);
	bSizer121113->Add(CenterPointValue_label, 0,
			wxALL | wxALIGN_CENTER_VERTICAL, 5);

	bSizer1211->Add(bSizer121113, 0, wxEXPAND, 5);

	bSizer1211->Add(
			new wxStaticLine(OptionScrollWindow, wxID_ANY, wxDefaultPosition,
					wxSize(-1, 1), wxLI_HORIZONTAL), 0, wxEXPAND | wxALL, 5);

	wxBoxSizer* bSizer121114;
	bSizer121114 = new wxBoxSizer(wxHORIZONTAL);
	bSizer121114->SetMinSize( -1, 30);

	NextObjectButton = new wxButton(OptionScrollWindow, wxID_ANY,
			wxT("Next Object"), wxDefaultPosition, wxDefaultSize, 0);
	bSizer121114->Add(NextObjectButton, 0, wxALL | wxALIGN_CENTER_VERTICAL, 5);


	wxBoxSizer* bSizer1211141;
	bSizer1211141 = new wxBoxSizer(wxVERTICAL);

	bSizer121114->Add(bSizer1211141, 1, wxEXPAND, 5);

	SkipButton = new wxButton(OptionScrollWindow, wxID_ANY, wxT("Skip"),
			wxDefaultPosition, wxDefaultSize, 0);
	bSizer121114->Add(SkipButton, 0, wxALL | wxALIGN_CENTER_VERTICAL, 5);

	bSizer1211->Add(bSizer121114, 0, wxEXPAND, 5);

	wxBoxSizer* bSizer121115;
	bSizer121115 = new wxBoxSizer(wxHORIZONTAL);

	ResetButton = new wxButton(OptionScrollWindow, wxID_ANY, wxT("Reset image"),
			wxDefaultPosition, wxDefaultSize, 0);
	bSizer121115->Add(ResetButton, 0, wxALL, 5);

	wxBoxSizer* bSizer1211151;
	bSizer1211151 = new wxBoxSizer(wxVERTICAL);

	bSizer121115->Add(bSizer1211151, 1, wxEXPAND, 5);

	DoneButton = new wxButton(OptionScrollWindow, wxID_ANY, wxT("Done"),
			wxDefaultPosition, wxDefaultSize, 0);
	bSizer121115->Add(DoneButton, 0, wxALL, 5);

	bSizer1211->Add(bSizer121115, 0, wxEXPAND, 5);

	OptionScrollWindow->SetSizer(bSizer1211);
	OptionScrollWindow->Layout();
	bSizer1211->Fit(OptionScrollWindow);
	bSizer121->Add(OptionScrollWindow, 1, wxEXPAND | wxALL, 5);

	bSizer12->Add(bSizer121, 1, wxEXPAND, 5);

	bSizer1->Add(bSizer12, 0, wxEXPAND, 5);

	this->SetSizer(bSizer1);
	this->Layout();
	bSizer1->Fit(this);

	// Connect Events
	this->Connect(wxEVT_SIZE, wxSizeEventHandler( GUIFrame::OnSizeChange ));
	ImageField->Connect(wxEVT_LEAVE_WINDOW,
			wxMouseEventHandler( GUIFrame::OnLeftImageField ), NULL, this);
	ImageField->Connect(wxEVT_LEFT_DOWN,
			wxMouseEventHandler( GUIFrame::OnLeftMousePressed ), NULL, this);
	ImageField->Connect(wxEVT_LEFT_UP,
			wxMouseEventHandler( GUIFrame::OnLeftMouseRelease ), NULL, this);
	ImageField->Connect(wxEVT_MOTION,
			wxMouseEventHandler( GUIFrame::OnImageMotion ), NULL, this);
	ColorSlider->Connect(wxEVT_SCROLL_TOP,
			wxScrollEventHandler( GUIFrame::OnColorSlider ), NULL, this);
	ColorSlider->Connect(wxEVT_SCROLL_BOTTOM,
			wxScrollEventHandler( GUIFrame::OnColorSlider ), NULL, this);
	ColorSlider->Connect(wxEVT_SCROLL_LINEUP,
			wxScrollEventHandler( GUIFrame::OnColorSlider ), NULL, this);
	ColorSlider->Connect(wxEVT_SCROLL_LINEDOWN,
			wxScrollEventHandler( GUIFrame::OnColorSlider ), NULL, this);
	ColorSlider->Connect(wxEVT_SCROLL_PAGEUP,
			wxScrollEventHandler( GUIFrame::OnColorSlider ), NULL, this);
	ColorSlider->Connect(wxEVT_SCROLL_PAGEDOWN,
			wxScrollEventHandler( GUIFrame::OnColorSlider ), NULL, this);
	ColorSlider->Connect(wxEVT_SCROLL_THUMBTRACK,
			wxScrollEventHandler( GUIFrame::OnColorSlider ), NULL, this);
	ColorSlider->Connect(wxEVT_SCROLL_THUMBRELEASE,
			wxScrollEventHandler( GUIFrame::OnColorSlider ), NULL, this);
	ColorSlider->Connect(wxEVT_SCROLL_CHANGED,
			wxScrollEventHandler( GUIFrame::OnColorSlider ), NULL, this);
	ColorSlider->Connect(wxEVT_SCROLL_CHANGED,
			wxScrollEventHandler( GUIFrame::OnColorSlider ), NULL, this);
	ZoomButton->Connect(wxEVT_COMMAND_BUTTON_CLICKED,
			wxCommandEventHandler( GUIFrame::OnZoom ), NULL, this);
	OriginalImageButton->Connect(wxEVT_COMMAND_BUTTON_CLICKED,
			wxCommandEventHandler( GUIFrame::OnOriginal ), NULL, this);
	ObjectComboBox->Connect(wxEVT_COMMAND_TEXT_UPDATED,
			wxCommandEventHandler( GUIFrame::OnComboSelect ), NULL, this);
	CrateButton->Connect(wxEVT_COMMAND_BUTTON_CLICKED,
			wxCommandEventHandler( GUIFrame::OnCrateButton ), NULL, this);
	NoRotationCheckBox->Connect(wxEVT_LEFT_DOWN,
			wxMouseEventHandler( GUIFrame::NoRotation ), NULL, this);
	NextObjectButton->Connect(wxEVT_COMMAND_BUTTON_CLICKED,
			wxCommandEventHandler( GUIFrame::OnNextObjectButton ), NULL, this);
	SkipButton->Connect(wxEVT_LEFT_DOWN,
			wxMouseEventHandler( GUIFrame::OnSkip ), NULL, this);
	ResetButton->Connect(wxEVT_COMMAND_BUTTON_CLICKED,
			wxCommandEventHandler( GUIFrame::OnReset ), NULL, this);
	DoneButton->Connect(wxEVT_COMMAND_BUTTON_CLICKED,
			wxCommandEventHandler( GUIFrame::OnDoneButton ), NULL, this);
	ZoomBox_radioBtn->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( GUIFrame::OnZoomChange ), NULL, this );
	ZoomCheckBox->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( GUIFrame::OnZoomChange ), NULL, this );
}
Ejemplo n.º 29
0
GRIBUIDialogBase::GRIBUIDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	
	wxFlexGridSizer* fgSizer1;
	fgSizer1 = new wxFlexGridSizer( 0, 1, 0, 0 );
	fgSizer1->AddGrowableRow( 2 );
	fgSizer1->SetFlexibleDirection( wxVERTICAL );
	fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_ALL );
	
	wxFlexGridSizer* fgSizer51;
	fgSizer51 = new wxFlexGridSizer( 1, 7, 0, 0 );
	fgSizer51->AddGrowableCol( 1 );
	fgSizer51->SetFlexibleDirection( wxHORIZONTAL );
	fgSizer51->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_NONE );
	
	m_bpPrev = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
	m_bpPrev->SetToolTip( wxT("Previous") );
	
	fgSizer51->Add( m_bpPrev, 0, wxALL, 5 );
	
	m_cRecordForecast = new wxComboBox( this, wxID_ANY, wxT("Combo!"), wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); 
	fgSizer51->Add( m_cRecordForecast, 0, wxALL|wxEXPAND, 5 );
	
	m_bpNext = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
	m_bpNext->SetToolTip( wxT("Next") );
	
	fgSizer51->Add( m_bpNext, 0, wxALL, 5 );
	
	m_bpNow = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
	m_bpNow->SetToolTip( wxT("Now") );
	
	fgSizer51->Add( m_bpNow, 0, wxALL, 5 );
	
	m_bpOpenFile = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
	m_bpOpenFile->SetToolTip( wxT("Open File") );
	
	fgSizer51->Add( m_bpOpenFile, 0, wxALL, 5 );
	
	m_bpSettings = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
	m_bpSettings->SetToolTip( wxT("Settings") );
	
	fgSizer51->Add( m_bpSettings, 0, wxALL, 5 );
	
	m_bpRequest = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
	m_bpRequest->SetToolTip( wxT("Request") );
	
	fgSizer51->Add( m_bpRequest, 0, wxALL, 5 );
	
	
	fgSizer1->Add( fgSizer51, 1, wxEXPAND, 5 );
	
	m_fgTimelineControls = new wxFlexGridSizer( 1, 0, 0, 0 );
	m_fgTimelineControls->AddGrowableCol( 1 );
	m_fgTimelineControls->SetFlexibleDirection( wxBOTH );
	m_fgTimelineControls->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	m_tbPlayStop = new wxToggleButton( this, ID_PLAYSTOP, wxT("Play"), wxDefaultPosition, wxDefaultSize, 0 );
	m_fgTimelineControls->Add( m_tbPlayStop, 0, wxALL, 5 );
	
	m_sTimeline = new wxSlider( this, ID_TIMELINE, 1, 0, 10, wxDefaultPosition, wxSize( -1,-1 ), wxSL_HORIZONTAL );
	m_fgTimelineControls->Add( m_sTimeline, 0, wxEXPAND, 5 );
	
	
	fgSizer1->Add( m_fgTimelineControls, 1, wxEXPAND, 5 );
	
	wxStaticBoxSizer* sbSizer2;
	sbSizer2 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxT("GRIB Data at Cursor") ), wxVERTICAL );
	
	m_fgTrackingControls = new wxFlexGridSizer( 0, 6, 0, 0 );
	m_fgTrackingControls->SetFlexibleDirection( wxBOTH );
	m_fgTrackingControls->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	m_cbWind = new wxCheckBox( this, ID_CB_WIND_SPEED, wxT("Wind"), wxDefaultPosition, wxDefaultSize, 0 );
	m_fgTrackingControls->Add( m_cbWind, 0, wxALL, 5 );
	
	m_tcWindSpeed = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 60,-1 ), wxTE_READONLY );
	m_tcWindSpeed->SetMaxLength( 3 ); 
	m_fgTrackingControls->Add( m_tcWindSpeed, 0, wxALL, 5 );
	
	m_tcWindDirection = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 60,-1 ), wxTE_READONLY );
	m_tcWindDirection->SetMaxLength( 3 ); 
	m_fgTrackingControls->Add( m_tcWindDirection, 0, wxALL, 5 );
	
	m_cbWindScat = new wxCheckBox( this, wxID_ANY, wxT("Wind Scat"), wxDefaultPosition, wxDefaultSize, 0 );
	m_fgTrackingControls->Add( m_cbWindScat, 0, wxALL, 5 );
	
	m_tcWindScatSpeed = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 60,-1 ), 0 );
	m_fgTrackingControls->Add( m_tcWindScatSpeed, 0, wxALL, 5 );
	
	m_tcWindScatDirection = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 60,-1 ), 0 );
	m_fgTrackingControls->Add( m_tcWindScatDirection, 0, wxALL, 5 );
	
	m_cbWave = new wxCheckBox( this, ID_CB_SIG_WAVE_HEIGHT, wxT("Wave"), wxDefaultPosition, wxDefaultSize, 0 );
	m_fgTrackingControls->Add( m_cbWave, 0, wxALL, 5 );
	
	m_tcWaveHeight = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 60,-1 ), wxTE_READONLY );
	m_tcWaveHeight->SetMaxLength( 5 ); 
	m_fgTrackingControls->Add( m_tcWaveHeight, 0, wxALL, 5 );
	
	m_tcWaveDirection = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 60,-1 ), wxTE_READONLY );
	m_tcWaveDirection->SetMaxLength( 3 ); 
	m_fgTrackingControls->Add( m_tcWaveDirection, 0, wxALL, 5 );
	
	m_cbCurrent = new wxCheckBox( this, ID_CB_CURRENT_VELOCITY, wxT("Current"), wxDefaultPosition, wxDefaultSize, 0 );
	m_fgTrackingControls->Add( m_cbCurrent, 0, wxALL, 5 );
	
	m_tcCurrentVelocity = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 60,-1 ), wxTE_READONLY );
	m_tcCurrentVelocity->SetMaxLength( 5 ); 
	m_fgTrackingControls->Add( m_tcCurrentVelocity, 0, wxALL, 5 );
	
	m_tcCurrentDirection = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 60,-1 ), wxTE_READONLY );
	m_tcCurrentDirection->SetMaxLength( 5 ); 
	m_fgTrackingControls->Add( m_tcCurrentDirection, 0, wxALL, 5 );
	
	m_cbWindGust = new wxCheckBox( this, wxID_ANY, wxT("Wind Gust"), wxDefaultPosition, wxDefaultSize, 0 );
	m_fgTrackingControls->Add( m_cbWindGust, 0, wxALL, 5 );
	
	m_tcWindGust = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 60,-1 ), wxTE_READONLY );
	m_fgTrackingControls->Add( m_tcWindGust, 0, wxALL, 5 );
	
	
	m_fgTrackingControls->Add( 0, 0, 1, wxEXPAND, 5 );
	
	m_cbPressure = new wxCheckBox( this, ID_CB_PRESSURE, wxT("Pressure"), wxDefaultPosition, wxDefaultSize, 0 );
	m_fgTrackingControls->Add( m_cbPressure, 0, wxALL, 5 );
	
	m_tcPressure = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 60,-1 ), wxTE_READONLY );
	m_tcPressure->SetMaxLength( 5 ); 
	m_fgTrackingControls->Add( m_tcPressure, 0, wxALL, 5 );
	
	
	m_fgTrackingControls->Add( 0, 0, 1, wxEXPAND, 5 );
	
	m_cbPrecipitation = new wxCheckBox( this, wxID_ANY, wxT("Precipitation"), wxDefaultPosition, wxDefaultSize, 0 );
	m_fgTrackingControls->Add( m_cbPrecipitation, 0, wxALL, 5 );
	
	m_tcPrecipitation = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 60,-1 ), wxTE_READONLY );
	m_fgTrackingControls->Add( m_tcPrecipitation, 0, wxALL, 5 );
	
	
	m_fgTrackingControls->Add( 0, 0, 1, wxEXPAND, 5 );
	
	m_cbCloud = new wxCheckBox( this, wxID_ANY, wxT("Cloud"), wxDefaultPosition, wxDefaultSize, 0 );
	m_fgTrackingControls->Add( m_cbCloud, 0, wxALL, 5 );
	
	m_tcCloud = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 60,-1 ), wxTE_READONLY );
	m_fgTrackingControls->Add( m_tcCloud, 0, wxALL, 5 );
	
	
	m_fgTrackingControls->Add( 0, 0, 1, wxEXPAND, 5 );
	
	m_cbAirTemperature = new wxCheckBox( this, wxID_ANY, wxT("Air Temp"), wxDefaultPosition, wxDefaultSize, 0 );
	m_fgTrackingControls->Add( m_cbAirTemperature, 0, wxALL, 5 );
	
	m_tcAirTemperature = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 60,-1 ), wxTE_READONLY );
	m_fgTrackingControls->Add( m_tcAirTemperature, 0, wxALL, 5 );
	
	
	m_fgTrackingControls->Add( 0, 0, 1, wxEXPAND, 5 );
	
	m_cbSeaTemperature = new wxCheckBox( this, ID_CB_SEA_TEMPERATURE, wxT("Sea Temp"), wxDefaultPosition, wxDefaultSize, 0 );
	m_fgTrackingControls->Add( m_cbSeaTemperature, 0, wxALL, 5 );
	
	m_tcSeaTemperature = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 60,-1 ), wxTE_READONLY );
	m_tcSeaTemperature->SetMaxLength( 5 ); 
	m_fgTrackingControls->Add( m_tcSeaTemperature, 0, wxALL, 5 );
	
	
	sbSizer2->Add( m_fgTrackingControls, 1, wxEXPAND, 5 );
	
	
	fgSizer1->Add( sbSizer2, 1, wxFIXED_MINSIZE, 5 );
	
	
	this->SetSizer( fgSizer1 );
	this->Layout();
	fgSizer1->Fit( this );
	
	this->Centre( wxBOTH );
	
	// Connect Events
	this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( GRIBUIDialogBase::OnClose ) );
	this->Connect( wxEVT_SIZE, wxSizeEventHandler( GRIBUIDialogBase::OnSize ) );
	m_bpPrev->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GRIBUIDialogBase::OnPrev ), NULL, this );
	m_cRecordForecast->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( GRIBUIDialogBase::OnRecordForecast ), NULL, this );
	m_bpNext->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GRIBUIDialogBase::OnNext ), NULL, this );
	m_bpNow->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GRIBUIDialogBase::OnNow ), NULL, this );
	m_bpOpenFile->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GRIBUIDialogBase::OnOpenFile ), NULL, this );
	m_bpSettings->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GRIBUIDialogBase::OnSettings ), NULL, this );
	m_bpRequest->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GRIBUIDialogBase::OnRequest ), NULL, this );
	m_tbPlayStop->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( GRIBUIDialogBase::OnPlayStop ), NULL, this );
	m_sTimeline->Connect( wxEVT_SCROLL_TOP, wxScrollEventHandler( GRIBUIDialogBase::OnTimeline ), NULL, this );
	m_sTimeline->Connect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( GRIBUIDialogBase::OnTimeline ), NULL, this );
	m_sTimeline->Connect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( GRIBUIDialogBase::OnTimeline ), NULL, this );
	m_sTimeline->Connect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( GRIBUIDialogBase::OnTimeline ), NULL, this );
	m_sTimeline->Connect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( GRIBUIDialogBase::OnTimeline ), NULL, this );
	m_sTimeline->Connect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( GRIBUIDialogBase::OnTimeline ), NULL, this );
	m_sTimeline->Connect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( GRIBUIDialogBase::OnTimeline ), NULL, this );
	m_sTimeline->Connect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( GRIBUIDialogBase::OnTimeline ), NULL, this );
	m_sTimeline->Connect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( GRIBUIDialogBase::OnTimeline ), NULL, this );
	m_cbWind->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( GRIBUIDialogBase::OnCBAny ), NULL, this );
	m_cbWindScat->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( GRIBUIDialogBase::OnCBAny ), NULL, this );
	m_cbWave->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( GRIBUIDialogBase::OnCBAny ), NULL, this );
	m_cbCurrent->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( GRIBUIDialogBase::OnCBAny ), NULL, this );
	m_cbWindGust->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( GRIBUIDialogBase::OnCBAny ), NULL, this );
	m_cbPressure->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( GRIBUIDialogBase::OnCBAny ), NULL, this );
	m_cbPrecipitation->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( GRIBUIDialogBase::OnCBAny ), NULL, this );
	m_cbCloud->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( GRIBUIDialogBase::OnCBAny ), NULL, this );
	m_cbAirTemperature->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( GRIBUIDialogBase::OnCBAny ), NULL, this );
	m_cbSeaTemperature->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( GRIBUIDialogBase::OnCBAny ), NULL, this );
}
DIALOG_DISPLAY_OPTIONS_BASE::DIALOG_DISPLAY_OPTIONS_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	
	wxBoxSizer* bDialogSizer;
	bDialogSizer = new wxBoxSizer( wxVERTICAL );
	
	m_UpperSizer = new wxBoxSizer( wxHORIZONTAL );
	
	wxBoxSizer* bLeftSizer;
	bLeftSizer = new wxBoxSizer( wxVERTICAL );
	
	wxString m_PolarDisplayChoices[] = { _("Cartesian coordinates"), _("Polar coordinates") };
	int m_PolarDisplayNChoices = sizeof( m_PolarDisplayChoices ) / sizeof( wxString );
	m_PolarDisplay = new wxRadioBox( this, wxID_ANY, _("Coordinates"), wxDefaultPosition, wxDefaultSize, m_PolarDisplayNChoices, m_PolarDisplayChoices, 1, wxRA_SPECIFY_COLS );
	m_PolarDisplay->SetSelection( 0 );
	bLeftSizer->Add( m_PolarDisplay, 0, wxALL|wxEXPAND, 5 );
	
	wxString m_BoxUnitsChoices[] = { _("Inches"), _("Millimeters") };
	int m_BoxUnitsNChoices = sizeof( m_BoxUnitsChoices ) / sizeof( wxString );
	m_BoxUnits = new wxRadioBox( this, wxID_ANY, _("Units"), wxDefaultPosition, wxDefaultSize, m_BoxUnitsNChoices, m_BoxUnitsChoices, 1, wxRA_SPECIFY_COLS );
	m_BoxUnits->SetSelection( 0 );
	bLeftSizer->Add( m_BoxUnits, 0, wxALL|wxEXPAND, 5 );
	
	wxString m_OptDisplayFlashedItemsChoices[] = { _("Sketch"), _("Filled") };
	int m_OptDisplayFlashedItemsNChoices = sizeof( m_OptDisplayFlashedItemsChoices ) / sizeof( wxString );
	m_OptDisplayFlashedItems = new wxRadioBox( this, wxID_ANY, _("Flashed items"), wxDefaultPosition, wxDefaultSize, m_OptDisplayFlashedItemsNChoices, m_OptDisplayFlashedItemsChoices, 1, wxRA_SPECIFY_COLS );
	m_OptDisplayFlashedItems->SetSelection( 1 );
	bLeftSizer->Add( m_OptDisplayFlashedItems, 0, wxALL|wxEXPAND, 5 );
	
	wxString m_OptDisplayLinesChoices[] = { _("Sketch"), _("Filled") };
	int m_OptDisplayLinesNChoices = sizeof( m_OptDisplayLinesChoices ) / sizeof( wxString );
	m_OptDisplayLines = new wxRadioBox( this, wxID_ANY, _("Lines"), wxDefaultPosition, wxDefaultSize, m_OptDisplayLinesNChoices, m_OptDisplayLinesChoices, 1, wxRA_SPECIFY_COLS );
	m_OptDisplayLines->SetSelection( 1 );
	bLeftSizer->Add( m_OptDisplayLines, 0, wxALL|wxEXPAND, 5 );
	
	wxString m_OptDisplayPolygonsChoices[] = { _("Sketch"), _("Filled") };
	int m_OptDisplayPolygonsNChoices = sizeof( m_OptDisplayPolygonsChoices ) / sizeof( wxString );
	m_OptDisplayPolygons = new wxRadioBox( this, wxID_ANY, _("Polygons"), wxDefaultPosition, wxDefaultSize, m_OptDisplayPolygonsNChoices, m_OptDisplayPolygonsChoices, 1, wxRA_SPECIFY_COLS );
	m_OptDisplayPolygons->SetSelection( 1 );
	bLeftSizer->Add( m_OptDisplayPolygons, 0, wxALL|wxEXPAND, 5 );
	
	m_OptDisplayDCodes = new wxCheckBox( this, wxID_ANY, _("Show D codes"), wxDefaultPosition, wxDefaultSize, 0 );
	m_OptDisplayDCodes->SetValue(true); 
	bLeftSizer->Add( m_OptDisplayDCodes, 0, wxALL, 5 );
	
	
	m_UpperSizer->Add( bLeftSizer, 0, wxEXPAND|wxLEFT|wxRIGHT, 5 );
	
	wxBoxSizer* bRightSizer;
	bRightSizer = new wxBoxSizer( wxVERTICAL );
	
	wxString m_ShowPageLimitsChoices[] = { _("Full size without limits"), _("Full size"), _("Size A4"), _("Size A3"), _("Size A2"), _("Size A"), _("Size B"), _("Size C") };
	int m_ShowPageLimitsNChoices = sizeof( m_ShowPageLimitsChoices ) / sizeof( wxString );
	m_ShowPageLimits = new wxRadioBox( this, wxID_ANY, _("Page"), wxDefaultPosition, wxDefaultSize, m_ShowPageLimitsNChoices, m_ShowPageLimitsChoices, 1, wxRA_SPECIFY_COLS );
	m_ShowPageLimits->SetSelection( 0 );
	bRightSizer->Add( m_ShowPageLimits, 0, wxALL|wxEXPAND, 5 );
	
	wxStaticBoxSizer* bLeftBottomSizer;
	bLeftBottomSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Pan and Zoom") ), wxVERTICAL );
	
	m_OptZoomNoCenter = new wxCheckBox( bLeftBottomSizer->GetStaticBox(), wxID_ANY, _("Do not center and warp cursor on zoom"), wxDefaultPosition, wxDefaultSize, 0 );
	m_OptZoomNoCenter->SetToolTip( _("Keep the cursor at its current location when zooming") );
	
	bLeftBottomSizer->Add( m_OptZoomNoCenter, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
	
	m_OptMousewheelPan = new wxCheckBox( bLeftBottomSizer->GetStaticBox(), wxID_ANY, _("Use touchpad to pan"), wxDefaultPosition, wxDefaultSize, 0 );
	m_OptMousewheelPan->SetToolTip( _("Use touchpad to pan canvas") );
	
	bLeftBottomSizer->Add( m_OptMousewheelPan, 0, wxALL, 5 );
	
	
	bRightSizer->Add( bLeftBottomSizer, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
	
	wxStaticBoxSizer* sbSizer2;
	sbSizer2 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("User Interface:") ), wxVERTICAL );
	
	wxFlexGridSizer* fgSizer1;
	fgSizer1 = new wxFlexGridSizer( 0, 3, 0, 0 );
	fgSizer1->AddGrowableCol( 1 );
	fgSizer1->SetFlexibleDirection( wxBOTH );
	fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	m_staticText1 = new wxStaticText( sbSizer2->GetStaticBox(), wxID_ANY, _("Icon scale:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText1->Wrap( -1 );
	fgSizer1->Add( m_staticText1, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
	
	m_scaleSlider = new STEPPED_SLIDER( sbSizer2->GetStaticBox(), wxID_ANY, 50, 50, 275, wxDefaultPosition, wxDefaultSize, wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_LABELS );
	fgSizer1->Add( m_scaleSlider, 0, wxALL|wxEXPAND, 3 );
	
	m_staticText2 = new wxStaticText( sbSizer2->GetStaticBox(), wxID_ANY, _("%"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText2->Wrap( -1 );
	fgSizer1->Add( m_staticText2, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
	
	
	fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
	
	m_scaleAuto = new wxCheckBox( sbSizer2->GetStaticBox(), wxID_ANY, _("Auto"), wxDefaultPosition, wxDefaultSize, 0 );
	fgSizer1->Add( m_scaleAuto, 0, wxALL, 5 );
	
	
	fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
	
	
	sbSizer2->Add( fgSizer1, 1, wxALL|wxEXPAND, 5 );
	
	
	bRightSizer->Add( sbSizer2, 1, wxALL|wxEXPAND, 5 );
	
	
	m_UpperSizer->Add( bRightSizer, 0, wxEXPAND|wxLEFT|wxRIGHT, 5 );
	
	
	bDialogSizer->Add( m_UpperSizer, 1, wxEXPAND, 5 );
	
	m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
	bDialogSizer->Add( m_staticline1, 0, wxEXPAND|wxLEFT|wxRIGHT, 5 );
	
	m_sdbSizer1 = new wxStdDialogButtonSizer();
	m_sdbSizer1OK = new wxButton( this, wxID_OK );
	m_sdbSizer1->AddButton( m_sdbSizer1OK );
	m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
	m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
	m_sdbSizer1->Realize();
	
	bDialogSizer->Add( m_sdbSizer1, 0, wxEXPAND|wxALL, 5 );
	
	
	this->SetSizer( bDialogSizer );
	this->Layout();
	bDialogSizer->Fit( this );
	
	// Connect Events
	m_scaleSlider->Connect( wxEVT_SCROLL_TOP, wxScrollEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleSlider ), NULL, this );
	m_scaleSlider->Connect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleSlider ), NULL, this );
	m_scaleSlider->Connect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleSlider ), NULL, this );
	m_scaleSlider->Connect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleSlider ), NULL, this );
	m_scaleSlider->Connect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleSlider ), NULL, this );
	m_scaleSlider->Connect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleSlider ), NULL, this );
	m_scaleSlider->Connect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleSlider ), NULL, this );
	m_scaleSlider->Connect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleSlider ), NULL, this );
	m_scaleSlider->Connect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleSlider ), NULL, this );
	m_scaleAuto->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleAuto ), NULL, this );
	m_sdbSizer1Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnCancelButtonClick ), NULL, this );
	m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnOKBUttonClick ), NULL, this );
}