Commit f0dc5434 authored by jean-pierre charras's avatar jean-pierre charras
Browse files

All: new middle mouse pan feature, from lajos kamocsay (and jp charras for some enhancements).

If enable in preference menu, allow the pan with drag mouse with middle button down.
both unlimited and limited pan is allowed.
parent 0df37933
Loading
Loading
Loading
Loading
+127 −12
Original line number Original line Diff line number Diff line
@@ -43,6 +43,11 @@


#define CLIP_BOX_PADDING 2
#define CLIP_BOX_PADDING 2


// keys to store options in config:
#define ENBL_MIDDLE_BUTT_PAN_KEY wxT( "MiddleButtonPAN" )
#define MIDDLE_BUTT_PAN_LIMITED_KEY wxT( "MiddleBtnPANLimited" )
#define ENBL_AUTO_PAN_KEY wxT( "AutoPAN" )

/* Definitions for enabling and disabling debugging features in drawpanel.cpp.
/* Definitions for enabling and disabling debugging features in drawpanel.cpp.
 * Please don't forget to turn these off before making any commits to Launchpad.
 * Please don't forget to turn these off before making any commits to Launchpad.
 */
 */
@@ -96,6 +101,8 @@ EDA_DRAW_PANEL::EDA_DRAW_PANEL( EDA_DRAW_FRAME* parent, int id,
    m_ClipBox.SetY( 0 );
    m_ClipBox.SetY( 0 );
    m_canStartBlock = -1;       // Command block can start if >= 0
    m_canStartBlock = -1;       // Command block can start if >= 0
    m_abortRequest = false;
    m_abortRequest = false;
    m_enableMiddleButtonPan = false;
    m_panScrollbarLimits = false;
    m_enableAutoPan = true;
    m_enableAutoPan = true;
    m_ignoreMouseEvents = false;
    m_ignoreMouseEvents = false;


@@ -103,7 +110,11 @@ EDA_DRAW_PANEL::EDA_DRAW_PANEL( EDA_DRAW_FRAME* parent, int id,
    m_endMouseCaptureCallback = NULL;
    m_endMouseCaptureCallback = NULL;


    if( wxGetApp().GetSettings() )
    if( wxGetApp().GetSettings() )
        wxGetApp().GetSettings()->Read( wxT( "AutoPAN" ), &m_enableAutoPan, true );
    {
        wxGetApp().GetSettings()->Read( ENBL_MIDDLE_BUTT_PAN_KEY, &m_enableMiddleButtonPan, false );
        wxGetApp().GetSettings()->Read( MIDDLE_BUTT_PAN_LIMITED_KEY, &m_panScrollbarLimits, false );
        wxGetApp().GetSettings()->Read( ENBL_AUTO_PAN_KEY, &m_enableAutoPan, true );
    }


    m_requestAutoPan = false;
    m_requestAutoPan = false;
    m_enableBlockCommands = false;
    m_enableBlockCommands = false;
@@ -123,10 +134,11 @@ EDA_DRAW_PANEL::EDA_DRAW_PANEL( EDA_DRAW_FRAME* parent, int id,


EDA_DRAW_PANEL::~EDA_DRAW_PANEL()
EDA_DRAW_PANEL::~EDA_DRAW_PANEL()
{
{
    wxGetApp().GetSettings()->Write( wxT( "AutoPAN" ), m_enableAutoPan );
    wxGetApp().GetSettings()->Write( ENBL_MIDDLE_BUTT_PAN_KEY, m_enableMiddleButtonPan );
    wxGetApp().GetSettings()->Write( MIDDLE_BUTT_PAN_LIMITED_KEY, m_panScrollbarLimits );
    wxGetApp().GetSettings()->Write( ENBL_AUTO_PAN_KEY, m_enableAutoPan );
}
}



EDA_DRAW_FRAME* EDA_DRAW_PANEL::GetParent()
EDA_DRAW_FRAME* EDA_DRAW_PANEL::GetParent()
{
{
    return ( EDA_DRAW_FRAME* ) wxWindow::GetParent();
    return ( EDA_DRAW_FRAME* ) wxWindow::GetParent();
@@ -317,18 +329,24 @@ void EDA_DRAW_PANEL::OnScroll( wxScrollWinEvent& event )
    int dir;
    int dir;
    int x, y;
    int x, y;
    int ppux, ppuy;
    int ppux, ppuy;
    int csizeX, csizeY;
    int unitsX, unitsY;
    int unitsX, unitsY;
    int maxX, maxY;
    int maxX, maxY;


    GetViewStart( &x, &y );
    GetViewStart( &x, &y );
    GetScrollPixelsPerUnit( &ppux, &ppuy );
    GetScrollPixelsPerUnit( &ppux, &ppuy );
    GetClientSize( &csizeX, &csizeY );
    GetVirtualSize( &unitsX, &unitsY );
    GetVirtualSize( &unitsX, &unitsY );
    maxX = unitsX;

    maxY = unitsY;
    csizeX /= ppux;
    csizeY /= ppuy;


    unitsX /= ppux;
    unitsX /= ppux;
    unitsY /= ppuy;
    unitsY /= ppuy;


    maxX = unitsX - csizeX;
    maxY = unitsY - csizeY;

    dir = event.GetOrientation();   // wxHORIZONTAL or wxVERTICAL
    dir = event.GetOrientation();   // wxHORIZONTAL or wxVERTICAL


    if( id == wxEVT_SCROLLWIN_LINEUP )
    if( id == wxEVT_SCROLLWIN_LINEUP )
@@ -381,7 +399,7 @@ void EDA_DRAW_PANEL::OnScroll( wxScrollWinEvent& event )
                wxT( "Setting scroll bars ppuX=%d, ppuY=%d, unitsX=%d, unitsY=%d, posX=%d, posY=%d" ),
                wxT( "Setting scroll bars ppuX=%d, ppuY=%d, unitsX=%d, unitsY=%d, posX=%d, posY=%d" ),
                ppux, ppuy, unitsX, unitsY, x, y );
                ppux, ppuy, unitsX, unitsY, x, y );


    Scroll( x/ppux, y/ppuy );
    Scroll( x, y );
    event.Skip();
    event.Skip();
}
}


@@ -958,8 +976,104 @@ void EDA_DRAW_PANEL::OnMouseEvent( wxMouseEvent& event )
        ignoreNextLeftButtonRelease = false;
        ignoreNextLeftButtonRelease = false;
    }
    }


    if( event.ButtonUp( wxMOUSE_BTN_MIDDLE )
    if( event.ButtonDown( wxMOUSE_BTN_MIDDLE ) && m_enableMiddleButtonPan )
      && (screen->m_BlockLocate.GetState() == STATE_NO_BLOCK) )
    {
        if( m_panScrollbarLimits )
        {
            int ppux, ppuy;
            GetScrollPixelsPerUnit( &ppux, &ppuy );
            GetViewStart( &m_PanStartCenter.x, &m_PanStartCenter.y );
            m_PanStartCenter.x *= ppux;
            m_PanStartCenter.y *= ppuy;
        }
        else
            m_PanStartCenter = GetParent()->GetScreen()->GetScrollCenterPosition();

        m_PanStartEventPosition = event.GetPosition();

        INSTALL_UNBUFFERED_DC( dc, this );
        CrossHairOff( &dc );
    }

    if( event.ButtonUp( wxMOUSE_BTN_MIDDLE ) && m_enableMiddleButtonPan )
    {
        INSTALL_UNBUFFERED_DC( dc, this );
        CrossHairOn( &dc );
    }

    if( event.MiddleIsDown() && m_enableMiddleButtonPan )
    {
        wxPoint currentPosition = event.GetPosition();
        if( m_panScrollbarLimits )
        {
            int x, y;
            int ppux, ppuy;
            int maxX, maxY;
            int vsizeX, vsizeY;
            int csizeX, csizeY;

            GetScrollPixelsPerUnit( &ppux, &ppuy );
            GetVirtualSize( &vsizeX, &vsizeY );
            GetClientSize( &csizeX, &csizeY );

            maxX = vsizeX - csizeX;
            maxY = vsizeY - csizeY;

            x = m_PanStartCenter.x + m_PanStartEventPosition.x - currentPosition.x;
            y = m_PanStartCenter.y + m_PanStartEventPosition.y - currentPosition.y;

            bool shouldMoveCursor = false;

            if( x < 0 )
            {
                currentPosition.x += x;
                x = 0;
                shouldMoveCursor = true;
            }

            if( y < 0 )
            {
                currentPosition.y += y;
                y = 0;
                shouldMoveCursor = true;
            }

            if( x > maxX )
            {
                currentPosition.x += ( x - maxX );
                x = maxX;
                shouldMoveCursor = true;
            }

            if( y > maxY )
            {
                currentPosition.y += ( y - maxY );
                y = maxY;
                shouldMoveCursor = true;
            }

            if ( shouldMoveCursor )
                WarpPointer( currentPosition.x, currentPosition.y );

            Scroll( x/ppux, y/ppuy );

            Refresh();
            Update();
        }
        else
        {
            double scale = GetParent()->GetScreen()->GetScalingFactor();
            int x = m_PanStartCenter.x +
                    wxRound( (double) ( m_PanStartEventPosition.x - currentPosition.x ) / scale );
            int y = m_PanStartCenter.y +
                    wxRound( (double) ( m_PanStartEventPosition.y - currentPosition.y ) / scale );

            GetParent()->RedrawScreen( wxPoint( x, y ), false );
        }
    }

    if( event.ButtonUp( wxMOUSE_BTN_MIDDLE ) && !m_enableMiddleButtonPan &&
        (screen->m_BlockLocate.GetState() == STATE_NO_BLOCK) )
    {
    {
        // The middle button has been released, with no block command:
        // The middle button has been released, with no block command:
        // We use it for a zoom center at cursor position command
        // We use it for a zoom center at cursor position command
@@ -1010,7 +1124,7 @@ void EDA_DRAW_PANEL::OnMouseEvent( wxMouseEvent& event )
            screen->m_BlockLocate.SetOrigin( m_CursorStartPos );
            screen->m_BlockLocate.SetOrigin( m_CursorStartPos );
        }
        }


        if( event.LeftDown() || event.MiddleDown() )
        if( event.LeftDown() || ( !m_enableMiddleButtonPan && event.MiddleDown() ) )
        {
        {
            if( screen->m_BlockLocate.GetState() == STATE_BLOCK_MOVE )
            if( screen->m_BlockLocate.GetState() == STATE_BLOCK_MOVE )
            {
            {
@@ -1020,7 +1134,7 @@ void EDA_DRAW_PANEL::OnMouseEvent( wxMouseEvent& event )
            }
            }
        }
        }
        else if( ( m_canStartBlock >= 0 )
        else if( ( m_canStartBlock >= 0 )
                && ( event.LeftIsDown() || event.MiddleIsDown() )
                && ( event.LeftIsDown() || ( !m_enableMiddleButtonPan && event.MiddleIsDown() ) )
                && !IsMouseCaptured() )
                && !IsMouseCaptured() )
        {
        {
            // Mouse is dragging: if no block in progress,  start a block command.
            // Mouse is dragging: if no block in progress,  start a block command.
@@ -1029,7 +1143,7 @@ void EDA_DRAW_PANEL::OnMouseEvent( wxMouseEvent& event )
                //  Start a block command
                //  Start a block command
                int cmd_type = kbstat;
                int cmd_type = kbstat;


                if( event.MiddleIsDown() )
                if( !m_enableMiddleButtonPan && event.MiddleIsDown() )
                    cmd_type |= MOUSE_MIDDLE;
                    cmd_type |= MOUSE_MIDDLE;


                /* A block command is started if the drag is enough.  A small
                /* A block command is started if the drag is enough.  A small
@@ -1055,7 +1169,8 @@ void EDA_DRAW_PANEL::OnMouseEvent( wxMouseEvent& event )
            }
            }
        }
        }


        if( event.ButtonUp( wxMOUSE_BTN_LEFT ) || event.ButtonUp( wxMOUSE_BTN_MIDDLE ) )
        if( event.ButtonUp( wxMOUSE_BTN_LEFT ) ||
            ( !m_enableMiddleButtonPan && event.ButtonUp( wxMOUSE_BTN_MIDDLE ) ) )
        {
        {
            /* Release the mouse button: end of block.
            /* Release the mouse button: end of block.
             * The command can finish (DELETE) or have a next command (MOVE,
             * The command can finish (DELETE) or have a next command (MOVE,
+5 −0
Original line number Original line Diff line number Diff line
@@ -54,6 +54,9 @@ void DIALOG_FOOTPRINTS_DISPLAY_OPTIONS::initDialog()
    m_TextDisplayOption->SetSelection( m_Parent->m_DisplayModText );
    m_TextDisplayOption->SetSelection( m_Parent->m_DisplayModText );
    m_IsShowPadFill->SetValue( m_Parent->m_DisplayPadFill );
    m_IsShowPadFill->SetValue( m_Parent->m_DisplayPadFill );
    m_IsShowPadNum->SetValue( m_Parent->m_DisplayPadNum );
    m_IsShowPadNum->SetValue( m_Parent->m_DisplayPadNum );
    m_IsMiddleButtonPan->SetValue( m_Parent->GetCanvas()->GetEnableMiddleButtonPan() );
    m_IsMiddleButtonPanLimited->SetValue( m_Parent->GetCanvas()->GetMiddleButtonPanLimited() );
    m_IsMiddleButtonPanLimited->Enable( m_IsMiddleButtonPan->GetValue() );
}
}




@@ -68,6 +71,8 @@ void DIALOG_FOOTPRINTS_DISPLAY_OPTIONS::UpdateObjectSettings( void )
    m_Parent->m_DisplayModText = m_TextDisplayOption->GetSelection();
    m_Parent->m_DisplayModText = m_TextDisplayOption->GetSelection();
    m_Parent->m_DisplayPadNum  = m_IsShowPadNum->GetValue();
    m_Parent->m_DisplayPadNum  = m_IsShowPadNum->GetValue();
    m_Parent->m_DisplayPadFill = m_IsShowPadFill->GetValue();
    m_Parent->m_DisplayPadFill = m_IsShowPadFill->GetValue();
    m_Parent->GetCanvas()->SetEnableMiddleButtonPan( m_IsMiddleButtonPan->GetValue() );
    m_Parent->GetCanvas()->SetMiddleButtonPanLimited( m_IsMiddleButtonPanLimited->GetValue() );
    m_Parent->GetCanvas()->Refresh();
    m_Parent->GetCanvas()->Refresh();
}
}


+37 −12
Original line number Original line Diff line number Diff line
////////////////////////////////////////////
/**
// Name:        dialog_display_options.h
 * @file  dialog_display_options.h
// Licence:     GPL
 */
////////////////////////////////////////////


#ifndef _DIALOG_DISPLAY_OPTIONS_H_
#ifndef _DIALOG_DISPLAY_OPTIONS_H_
#define _DIALOG_DISPLAY_OPTIONS_H_
#define _DIALOG_DISPLAY_OPTIONS_H_


/*
 * This program source code file is part of KiCad, a free EDA CAD application.
 *
 * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, you may find one here:
 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * or you may search the http://www.gnu.org website for the version 2 license,
 * or you may write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 */

#include <dialog_display_options_base.h>
#include <dialog_display_options_base.h>


////////////////////////////////////////////
/* Class DIALOG_FOOTPRINTS_DISPLAY_OPTIONS
/// Class DIALOG_FOOTPRINTS_DISPLAY_OPTIONS
 *  derived from DIALOG_FOOTPRINTS_DISPLAY_OPTIONS_BASE,
//  derived from DIALOG_FOOTPRINTS_DISPLAY_OPTIONS_BASE,
 *  created by wxformBuilder
//  created by wxformBuilder
*/
////////////////////////////////////////////


class DIALOG_FOOTPRINTS_DISPLAY_OPTIONS :
class DIALOG_FOOTPRINTS_DISPLAY_OPTIONS :
    public DIALOG_FOOTPRINTS_DISPLAY_OPTIONS_BASE
    public DIALOG_FOOTPRINTS_DISPLAY_OPTIONS_BASE
@@ -28,9 +49,13 @@ public:
private:
private:
    void initDialog( );
    void initDialog( );
    void UpdateObjectSettings( void );
    void UpdateObjectSettings( void );
    virtual void OnApplyClick( wxCommandEvent& event );
    void OnApplyClick( wxCommandEvent& event );
    virtual void OnCancelClick( wxCommandEvent& event );
    void OnCancelClick( wxCommandEvent& event );
    virtual void OnOkClick( wxCommandEvent& event );
    void OnOkClick( wxCommandEvent& event );
    void OnMiddleBtnPanEnbl( wxCommandEvent& event )
    {
        m_IsMiddleButtonPanLimited->Enable( m_IsMiddleButtonPan->GetValue() );
    }
};
};


#endif      // _DIALOG_DISPLAY_OPTIONS_H_
#endif      // _DIALOG_DISPLAY_OPTIONS_H_
+38 −9
Original line number Original line Diff line number Diff line
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 16 2008)
// C++ code generated with wxFormBuilder (version Mar 17 2012)
// http://www.wxformbuilder.org/
// http://www.wxformbuilder.org/
//
//
// PLEASE DO "NOT" EDIT THIS FILE!
// PLEASE DO "NOT" EDIT THIS FILE!
@@ -19,30 +19,54 @@ DIALOG_FOOTPRINTS_DISPLAY_OPTIONS_BASE::DIALOG_FOOTPRINTS_DISPLAY_OPTIONS_BASE(
	wxBoxSizer* bUpperSizer;
	wxBoxSizer* bUpperSizer;
	bUpperSizer = new wxBoxSizer( wxHORIZONTAL );
	bUpperSizer = new wxBoxSizer( wxHORIZONTAL );
	
	
	wxBoxSizer* bSizerLeft;
	bSizerLeft = new wxBoxSizer( wxVERTICAL );
	
	wxString m_EdgesDisplayOptionChoices[] = { _("Line"), _("Filled"), _("Sketch") };
	wxString m_EdgesDisplayOptionChoices[] = { _("Line"), _("Filled"), _("Sketch") };
	int m_EdgesDisplayOptionNChoices = sizeof( m_EdgesDisplayOptionChoices ) / sizeof( wxString );
	int m_EdgesDisplayOptionNChoices = sizeof( m_EdgesDisplayOptionChoices ) / sizeof( wxString );
	m_EdgesDisplayOption = new wxRadioBox( this, ID_EDGE_SELECT, _("Edges:"), wxDefaultPosition, wxDefaultSize, m_EdgesDisplayOptionNChoices, m_EdgesDisplayOptionChoices, 1, wxRA_SPECIFY_COLS );
	m_EdgesDisplayOption = new wxRadioBox( this, ID_EDGE_SELECT, _("Edges:"), wxDefaultPosition, wxDefaultSize, m_EdgesDisplayOptionNChoices, m_EdgesDisplayOptionChoices, 1, wxRA_SPECIFY_COLS );
	m_EdgesDisplayOption->SetSelection( 0 );
	m_EdgesDisplayOption->SetSelection( 0 );
	bUpperSizer->Add( m_EdgesDisplayOption, 1, wxALL|wxEXPAND, 5 );
	bSizerLeft->Add( m_EdgesDisplayOption, 1, wxALL|wxEXPAND, 5 );
	
	
	wxString m_TextDisplayOptionChoices[] = { _("Line"), _("Filled"), _("Sketch") };
	wxString m_TextDisplayOptionChoices[] = { _("Line"), _("Filled"), _("Sketch") };
	int m_TextDisplayOptionNChoices = sizeof( m_TextDisplayOptionChoices ) / sizeof( wxString );
	int m_TextDisplayOptionNChoices = sizeof( m_TextDisplayOptionChoices ) / sizeof( wxString );
	m_TextDisplayOption = new wxRadioBox( this, ID_TEXT_SELECT, _("Texts:"), wxDefaultPosition, wxDefaultSize, m_TextDisplayOptionNChoices, m_TextDisplayOptionChoices, 1, wxRA_SPECIFY_COLS );
	m_TextDisplayOption = new wxRadioBox( this, ID_TEXT_SELECT, _("Texts:"), wxDefaultPosition, wxDefaultSize, m_TextDisplayOptionNChoices, m_TextDisplayOptionChoices, 1, wxRA_SPECIFY_COLS );
	m_TextDisplayOption->SetSelection( 0 );
	m_TextDisplayOption->SetSelection( 0 );
	bUpperSizer->Add( m_TextDisplayOption, 1, wxALL|wxEXPAND, 5 );
	bSizerLeft->Add( m_TextDisplayOption, 1, wxALL|wxEXPAND, 5 );
	
	
	wxStaticBoxSizer* sbSizer1;
	sbSizer1 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Pads:") ), wxVERTICAL );
	
	
	m_IsShowPadFill = new wxCheckBox( this, ID_PADFILL_OPT, _("Fill &pad"), wxDefaultPosition, wxDefaultSize, 0 );
	bUpperSizer->Add( bSizerLeft, 1, wxEXPAND, 5 );
	
	wxBoxSizer* bSizerRight;
	bSizerRight = new wxBoxSizer( wxVERTICAL );
	
	wxStaticBoxSizer* sbSizerPads;
	sbSizerPads = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Pads:") ), wxVERTICAL );
	
	
	sbSizer1->Add( m_IsShowPadFill, 0, wxALL|wxEXPAND, 5 );
	m_IsShowPadFill = new wxCheckBox( this, ID_PADFILL_OPT, _("Fill &pad"), wxDefaultPosition, wxDefaultSize, 0 );
	sbSizerPads->Add( m_IsShowPadFill, 0, wxALL|wxEXPAND, 5 );
	
	
	m_IsShowPadNum = new wxCheckBox( this, wxID_ANY, _("Show pad &number"), wxDefaultPosition, wxDefaultSize, 0 );
	m_IsShowPadNum = new wxCheckBox( this, wxID_ANY, _("Show pad &number"), wxDefaultPosition, wxDefaultSize, 0 );
	sbSizerPads->Add( m_IsShowPadNum, 0, wxALL|wxEXPAND, 5 );
	
	
	bSizerRight->Add( sbSizerPads, 1, wxEXPAND|wxALL, 5 );
	
	wxStaticBoxSizer* sbSizerViewOpt;
	sbSizerViewOpt = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("View:") ), wxVERTICAL );
	
	
	sbSizer1->Add( m_IsShowPadNum, 0, wxALL|wxEXPAND, 5 );
	m_IsMiddleButtonPan = new wxCheckBox( this, wxID_ANY, _("Middle Button PAN Enabled"), wxDefaultPosition, wxDefaultSize, 0 );
	sbSizerViewOpt->Add( m_IsMiddleButtonPan, 0, wxALL|wxEXPAND, 5 );
	
	m_IsMiddleButtonPanLimited = new wxCheckBox( this, wxID_ANY, _("Middle Button PAN Limited"), wxDefaultPosition, wxDefaultSize, 0 );
	sbSizerViewOpt->Add( m_IsMiddleButtonPanLimited, 0, wxALL, 5 );
	
	
	bSizerRight->Add( sbSizerViewOpt, 1, wxALL|wxEXPAND, 5 );
	
	
	bUpperSizer->Add( bSizerRight, 1, wxEXPAND, 5 );
	
	
	bUpperSizer->Add( sbSizer1, 1, wxEXPAND|wxALL, 5 );
	
	
	bSizerMain->Add( bUpperSizer, 1, wxEXPAND, 5 );
	bSizerMain->Add( bUpperSizer, 1, wxEXPAND, 5 );
	
	
@@ -57,12 +81,15 @@ DIALOG_FOOTPRINTS_DISPLAY_OPTIONS_BASE::DIALOG_FOOTPRINTS_DISPLAY_OPTIONS_BASE(
	m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
	m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
	m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
	m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
	m_sdbSizer1->Realize();
	m_sdbSizer1->Realize();
	
	bSizerMain->Add( m_sdbSizer1, 0, wxEXPAND|wxALL, 5 );
	bSizerMain->Add( m_sdbSizer1, 0, wxEXPAND|wxALL, 5 );
	
	
	
	this->SetSizer( bSizerMain );
	this->SetSizer( bSizerMain );
	this->Layout();
	this->Layout();
	
	
	// Connect Events
	// Connect Events
	m_IsMiddleButtonPan->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINTS_DISPLAY_OPTIONS_BASE::OnMiddleBtnPanEnbl ), NULL, this );
	m_sdbSizer1Apply->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINTS_DISPLAY_OPTIONS_BASE::OnApplyClick ), NULL, this );
	m_sdbSizer1Apply->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINTS_DISPLAY_OPTIONS_BASE::OnApplyClick ), NULL, this );
	m_sdbSizer1Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINTS_DISPLAY_OPTIONS_BASE::OnCancelClick ), NULL, this );
	m_sdbSizer1Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINTS_DISPLAY_OPTIONS_BASE::OnCancelClick ), NULL, this );
	m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINTS_DISPLAY_OPTIONS_BASE::OnOkClick ), NULL, this );
	m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINTS_DISPLAY_OPTIONS_BASE::OnOkClick ), NULL, this );
@@ -71,7 +98,9 @@ DIALOG_FOOTPRINTS_DISPLAY_OPTIONS_BASE::DIALOG_FOOTPRINTS_DISPLAY_OPTIONS_BASE(
DIALOG_FOOTPRINTS_DISPLAY_OPTIONS_BASE::~DIALOG_FOOTPRINTS_DISPLAY_OPTIONS_BASE()
DIALOG_FOOTPRINTS_DISPLAY_OPTIONS_BASE::~DIALOG_FOOTPRINTS_DISPLAY_OPTIONS_BASE()
{
{
	// Disconnect Events
	// Disconnect Events
	m_IsMiddleButtonPan->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINTS_DISPLAY_OPTIONS_BASE::OnMiddleBtnPanEnbl ), NULL, this );
	m_sdbSizer1Apply->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINTS_DISPLAY_OPTIONS_BASE::OnApplyClick ), NULL, this );
	m_sdbSizer1Apply->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINTS_DISPLAY_OPTIONS_BASE::OnApplyClick ), NULL, this );
	m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINTS_DISPLAY_OPTIONS_BASE::OnCancelClick ), NULL, this );
	m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINTS_DISPLAY_OPTIONS_BASE::OnCancelClick ), NULL, this );
	m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINTS_DISPLAY_OPTIONS_BASE::OnOkClick ), NULL, this );
	m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINTS_DISPLAY_OPTIONS_BASE::OnOkClick ), NULL, this );
	
}
}
+574 −132

File changed.

Preview size limit exceeded, changes collapsed.

Loading