mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 18:23:15 +02:00
* Add item clarification context menu to EESchema when multiple unresolved items are found at the current cross hair position. * Add collector class SCH_COLLECTOR for supporting multiple item hit testing. * Removed bit wise masked filtering from schematic item hit testing. * Removed all old hit testing functions and methods scattered about the EESchema source code. * Move terminal point test function into SCH_SCREEN object. * Fixed bug in terminal point test when terminating a bus to a label. * Define the < operator for sorting schematic items. * Add area calculation method to EDA_Rect item. * Add method for returning an item's bitmap for menu display purposes. * Add method for returning an item's menu text for menu display purposes. * Changed EDA_ITEMS container from boost::ptr_vector to std::vector. * Factor coordinate string conversion code from EDA_DRAW_FRAME to function CoordinateToString().
104 lines
2.5 KiB
C++
104 lines
2.5 KiB
C++
/////////////////////////////////////////////////////////////////////////////
|
|
// Name: dialog_display_options.cpp
|
|
// Licence: GPL
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
#include "fctsys.h"
|
|
|
|
#include "wxstruct.h"
|
|
#include "common.h"
|
|
#include "cvpcb.h"
|
|
#include "class_drawpanel.h"
|
|
#include "footprint_info.h"
|
|
#include "cvstruct.h"
|
|
#include "class_DisplayFootprintsFrame.h"
|
|
|
|
#include "dialog_display_options.h"
|
|
|
|
|
|
void DISPLAY_FOOTPRINTS_FRAME::InstallOptionsDisplay( wxCommandEvent& event )
|
|
{
|
|
DIALOG_FOOTPRINTS_DISPLAY_OPTIONS* OptionWindow =
|
|
new DIALOG_FOOTPRINTS_DISPLAY_OPTIONS( this );
|
|
|
|
OptionWindow->ShowModal();
|
|
OptionWindow->Destroy();
|
|
}
|
|
|
|
|
|
DIALOG_FOOTPRINTS_DISPLAY_OPTIONS::DIALOG_FOOTPRINTS_DISPLAY_OPTIONS( PCB_BASE_FRAME* parent )
|
|
: DIALOG_FOOTPRINTS_DISPLAY_OPTIONS_BASE( parent )
|
|
{
|
|
m_Parent = parent;
|
|
|
|
initDialog();
|
|
m_sdbSizer1OK->SetDefault();
|
|
GetSizer()->SetSizeHints( this );
|
|
Centre();
|
|
}
|
|
|
|
DIALOG_FOOTPRINTS_DISPLAY_OPTIONS::~DIALOG_FOOTPRINTS_DISPLAY_OPTIONS( )
|
|
{
|
|
}
|
|
|
|
|
|
/*!
|
|
* Control creation for DIALOG_FOOTPRINTS_DISPLAY_OPTIONS
|
|
*/
|
|
|
|
void DIALOG_FOOTPRINTS_DISPLAY_OPTIONS::initDialog()
|
|
{
|
|
/* mandatory to use escape key as cancel under wxGTK. */
|
|
SetFocus();
|
|
|
|
m_EdgesDisplayOption->SetSelection( m_Parent->m_DisplayModEdge );
|
|
m_TextDisplayOption->SetSelection( m_Parent->m_DisplayModText );
|
|
m_IsShowPadFill->SetValue( m_Parent->m_DisplayPadFill );
|
|
m_IsShowPadNum->SetValue( m_Parent->m_DisplayPadNum );
|
|
}
|
|
|
|
|
|
|
|
/*!
|
|
* Update settings related to edges, text strings, and pads
|
|
*/
|
|
|
|
void DIALOG_FOOTPRINTS_DISPLAY_OPTIONS::UpdateObjectSettings( void )
|
|
{
|
|
m_Parent->m_DisplayModEdge = m_EdgesDisplayOption->GetSelection();
|
|
m_Parent->m_DisplayModText = m_TextDisplayOption->GetSelection();
|
|
m_Parent->m_DisplayPadNum = m_IsShowPadNum->GetValue();
|
|
m_Parent->m_DisplayPadFill = m_IsShowPadFill->GetValue();
|
|
m_Parent->DrawPanel->Refresh();
|
|
}
|
|
|
|
|
|
/*!
|
|
* wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK
|
|
*/
|
|
|
|
void DIALOG_FOOTPRINTS_DISPLAY_OPTIONS::OnOkClick( wxCommandEvent& event )
|
|
{
|
|
UpdateObjectSettings();
|
|
EndModal( 1 );
|
|
}
|
|
|
|
|
|
/*!
|
|
* wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL
|
|
*/
|
|
|
|
void DIALOG_FOOTPRINTS_DISPLAY_OPTIONS::OnCancelClick( wxCommandEvent& event )
|
|
{
|
|
EndModal( -1 );
|
|
}
|
|
|
|
|
|
/*!
|
|
* wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_APPLY
|
|
*/
|
|
|
|
void DIALOG_FOOTPRINTS_DISPLAY_OPTIONS::OnApplyClick( wxCommandEvent& event )
|
|
{
|
|
UpdateObjectSettings();
|
|
}
|