KiCad PCB EDA Suite
|
#include <gal_display_options.h>
Public Member Functions | |
GAL_DISPLAY_OPTIONS () | |
virtual | ~GAL_DISPLAY_OPTIONS () |
void | SetCursorMode (CROSS_HAIR_MODE aMode) |
CROSS_HAIR_MODE | GetCursorMode () const |
void | NotifyChanged () |
void | SubscribeUnmanaged (GAL_DISPLAY_OPTIONS_OBSERVER *aObserver) |
Add a subscription without RAII link. | |
LINK | Subscribe (GAL_DISPLAY_OPTIONS_OBSERVER *aObserver) |
Add a subscription returning an RAII link. | |
void | Unsubscribe (GAL_DISPLAY_OPTIONS_OBSERVER *aObserver) |
Cancel the subscription of a subscriber. | |
void | Notify (void(GAL_DISPLAY_OPTIONS_OBSERVER::*Ptr)(Args1...), Args2 &&... aArgs) |
Notify event to all subscribed observers. | |
void | NotifyIgnore (void(GAL_DISPLAY_OPTIONS_OBSERVER::*Ptr)(Args1...), GAL_DISPLAY_OPTIONS_OBSERVER *aIgnore, Args2 &&... aArgs) |
Notify event to all subscribed observers but one to be ignore. | |
size_t | size () const |
Public Attributes | |
GAL_ANTIALIASING_MODE | antialiasing_mode |
The grid style to draw the grid in. | |
KIGFX::GRID_STYLE | m_gridStyle |
Snapping options for the grid. | |
GRID_SNAPPING | m_gridSnapping |
Thickness to render grid lines/dots. | |
double | m_gridLineWidth |
Minimum pixel distance between displayed grid lines. | |
double | m_gridMinSpacing |
Whether or not to draw the coordinate system axes. | |
bool | m_axesEnabled |
Crosshair drawing mode. | |
CROSS_HAIR_MODE | m_crossHairMode |
Force cursor display. | |
bool | m_forceDisplayCursor |
The pixel scale factor (>1 for hi-DPI scaled displays) | |
double | m_scaleFactor |
Protected Member Functions | |
void | on_observers_empty () |
void | enter_iteration () |
void | leave_iteration () |
void | add_observer (void *observer) |
void | remove_observer (void *observer) |
Protected Attributes | |
std::shared_ptr< IMPL > | impl_ |
Private Member Functions | |
void | allocate_impl () |
void | allocate_shared_impl () |
void | deallocate_impl () |
std::shared_ptr< IMPL > | get_shared_impl () |
Definition at line 86 of file gal_display_options.h.
GAL_DISPLAY_OPTIONS::GAL_DISPLAY_OPTIONS | ( | ) |
Definition at line 46 of file gal_display_options.cpp.
References KIGFX::AA_NONE, KIGFX::ALWAYS, antialiasing_mode, KIGFX::DOTS, m_axesEnabled, m_crossHairMode, m_forceDisplayCursor, m_gridLineWidth, m_gridMinSpacing, m_gridSnapping, m_gridStyle, m_scaleFactor, and KIGFX::SMALL_CROSS.
Referenced by GAL_DISPLAY_OPTIONS_IMPL::GAL_DISPLAY_OPTIONS_IMPL().
|
inlinevirtual |
Definition at line 91 of file gal_display_options.h.
|
protectedinherited |
Definition at line 216 of file observable.cpp.
References allocate_impl(), and impl_.
|
privateinherited |
|
privateinherited |
|
privateinherited |
Definition at line 204 of file observable.cpp.
References impl_.
Referenced by on_observers_empty().
|
protectedinherited |
Definition at line 230 of file observable.cpp.
References impl_.
Referenced by UTIL::OBSERVABLE< ObserverInterface >::Notify(), and UTIL::OBSERVABLE< ObserverInterface >::NotifyIgnore().
|
privateinherited |
Definition at line 209 of file observable.cpp.
References allocate_shared_impl(), and impl_.
Referenced by OBSERVABLE_BASE().
|
inline |
Definition at line 122 of file gal_display_options.h.
References m_crossHairMode.
Referenced by EDITOR_CONDITIONS::cursorFunc().
|
protectedinherited |
Definition at line 237 of file observable.cpp.
References impl_.
Referenced by UTIL::OBSERVABLE< ObserverInterface >::Notify(), and UTIL::OBSERVABLE< ObserverInterface >::NotifyIgnore().
|
inlineinherited |
Notify event to all subscribed observers.
Ptr | is a pointer to method of the observer interface. |
aArgs | is a list of arguments to each notification call, will be perfectly forwarded. |
Definition at line 182 of file observable.h.
Referenced by KIGFX::GAL_DISPLAY_OPTIONS::NotifyChanged().
void GAL_DISPLAY_OPTIONS::NotifyChanged | ( | ) |
Definition at line 60 of file gal_display_options.cpp.
References UTIL::OBSERVABLE< GAL_DISPLAY_OPTIONS_OBSERVER >::Notify(), KIGFX::GAL_DISPLAY_OPTIONS_OBSERVER::OnGalDisplayOptionsChanged(), and traceGalDispOpts.
Referenced by COMMON_TOOLS::Cursor45Crosshairs(), COMMON_TOOLS::CursorFullCrosshairs(), COMMON_TOOLS::CursorSmallCrosshairs(), GAL_DISPLAY_OPTIONS_IMPL::ReadCommonConfig(), GAL_DISPLAY_OPTIONS_IMPL::ReadWindowSettings(), SYMBOL_VIEWER_FRAME::SYMBOL_VIEWER_FRAME(), and GAL_DISPLAY_OPTIONS_IMPL::UpdateScaleFactor().
|
inlineinherited |
Notify event to all subscribed observers but one to be ignore.
Ptr | is a pointer to method of the observer interface. |
aIgnore | is an observer to ignore during this notification. |
aArgs | is a list of arguments to each notification call, will be perfectly forwarded. |
Definition at line 218 of file observable.h.
|
protectedinherited |
Definition at line 258 of file observable.cpp.
References deallocate_impl().
|
protectedinherited |
Definition at line 223 of file observable.cpp.
References impl_.
|
inline |
Definition at line 120 of file gal_display_options.h.
References m_crossHairMode.
Referenced by COMMON_TOOLS::Cursor45Crosshairs(), COMMON_TOOLS::CursorFullCrosshairs(), and COMMON_TOOLS::CursorSmallCrosshairs().
|
inherited |
Definition at line 249 of file observable.cpp.
References impl_.
|
inlineinherited |
Add a subscription returning an RAII link.
aObserver | observer to subscribe |
Definition at line 157 of file observable.h.
|
inlineinherited |
Add a subscription without RAII link.
aObserver | Observer to subscribe. |
Definition at line 146 of file observable.h.
|
inlineinherited |
Cancel the subscription of a subscriber.
This can be called during notification calls.
aObserver | observer to remove from the subscription list. |
Definition at line 170 of file observable.h.
GAL_ANTIALIASING_MODE KIGFX::GAL_DISPLAY_OPTIONS::antialiasing_mode |
The grid style to draw the grid in.
Definition at line 94 of file gal_display_options.h.
Referenced by GAL_DISPLAY_OPTIONS(), SCH_PRINTOUT::PrintPage(), GAL_DISPLAY_OPTIONS_IMPL::ReadCommonConfig(), and KIGFX::CAIRO_GAL::updatedGalDisplayOptions().
|
protectedinherited |
Definition at line 93 of file observable.h.
Referenced by add_observer(), allocate_impl(), allocate_shared_impl(), deallocate_impl(), enter_iteration(), get_shared_impl(), leave_iteration(), UTIL::OBSERVABLE< ObserverInterface >::Notify(), UTIL::OBSERVABLE< ObserverInterface >::NotifyIgnore(), OBSERVABLE_BASE(), remove_observer(), size(), and UTIL::OBSERVABLE< ObserverInterface >::Subscribe().
bool KIGFX::GAL_DISPLAY_OPTIONS::m_axesEnabled |
Crosshair drawing mode.
Definition at line 109 of file gal_display_options.h.
Referenced by GAL_DISPLAY_OPTIONS(), GAL_DISPLAY_OPTIONS_IMPL::ReadWindowSettings(), FOOTPRINT_EDIT_FRAME::SaveSettings(), FOOTPRINT_VIEWER_FRAME::SaveSettings(), SYMBOL_EDIT_FRAME::SaveSettings(), SYMBOL_EDIT_FRAME::SYMBOL_EDIT_FRAME(), SYMBOL_VIEWER_FRAME::SYMBOL_VIEWER_FRAME(), and GAL_DISPLAY_OPTIONS_IMPL::WriteConfig().
CROSS_HAIR_MODE KIGFX::GAL_DISPLAY_OPTIONS::m_crossHairMode |
Force cursor display.
Definition at line 112 of file gal_display_options.h.
Referenced by GAL_DISPLAY_OPTIONS(), GetCursorMode(), GAL_DISPLAY_OPTIONS_IMPL::ReadWindowSettings(), SetCursorMode(), and GAL_DISPLAY_OPTIONS_IMPL::WriteConfig().
bool KIGFX::GAL_DISPLAY_OPTIONS::m_forceDisplayCursor |
The pixel scale factor (>1 for hi-DPI scaled displays)
Definition at line 115 of file gal_display_options.h.
Referenced by GAL_DISPLAY_OPTIONS(), DIALOG_PAD_PROPERTIES::prepareCanvas(), GAL_DISPLAY_OPTIONS_IMPL::ReadWindowSettings(), and GAL_DISPLAY_OPTIONS_IMPL::WriteConfig().
double KIGFX::GAL_DISPLAY_OPTIONS::m_gridLineWidth |
Minimum pixel distance between displayed grid lines.
Definition at line 103 of file gal_display_options.h.
Referenced by GAL_DISPLAY_OPTIONS(), GAL_DISPLAY_OPTIONS_IMPL::ReadWindowSettings(), and GAL_DISPLAY_OPTIONS_IMPL::WriteConfig().
double KIGFX::GAL_DISPLAY_OPTIONS::m_gridMinSpacing |
Whether or not to draw the coordinate system axes.
Definition at line 106 of file gal_display_options.h.
Referenced by GAL_DISPLAY_OPTIONS(), GAL_DISPLAY_OPTIONS_IMPL::ReadWindowSettings(), SYMBOL_VIEWER_FRAME::SYMBOL_VIEWER_FRAME(), and GAL_DISPLAY_OPTIONS_IMPL::WriteConfig().
GRID_SNAPPING KIGFX::GAL_DISPLAY_OPTIONS::m_gridSnapping |
Thickness to render grid lines/dots.
Definition at line 100 of file gal_display_options.h.
Referenced by GAL_DISPLAY_OPTIONS(), GAL_DISPLAY_OPTIONS_IMPL::ReadWindowSettings(), and GAL_DISPLAY_OPTIONS_IMPL::WriteConfig().
KIGFX::GRID_STYLE KIGFX::GAL_DISPLAY_OPTIONS::m_gridStyle |
Snapping options for the grid.
Definition at line 97 of file gal_display_options.h.
Referenced by GAL_DISPLAY_OPTIONS(), GAL_DISPLAY_OPTIONS_IMPL::ReadWindowSettings(), and GAL_DISPLAY_OPTIONS_IMPL::WriteConfig().
double KIGFX::GAL_DISPLAY_OPTIONS::m_scaleFactor |
Definition at line 118 of file gal_display_options.h.
Referenced by GAL_DISPLAY_OPTIONS(), and GAL_DISPLAY_OPTIONS_IMPL::UpdateScaleFactor().