KiCad PCB EDA Suite
Loading...
Searching...
No Matches
GAL_DISPLAY_OPTIONS_IMPL Class Reference

#include <gal_display_options_common.h>

Inheritance diagram for GAL_DISPLAY_OPTIONS_IMPL:
KIGFX::GAL_DISPLAY_OPTIONS UTIL::OBSERVABLE< GAL_DISPLAY_OPTIONS_OBSERVER > UTIL::DETAIL::OBSERVABLE_BASE

Public Member Functions

 GAL_DISPLAY_OPTIONS_IMPL ()
 
void ReadWindowSettings (WINDOW_SETTINGS &aCfg)
 Read GAL config options from application-level config.
 
void ReadCommonConfig (COMMON_SETTINGS &aCommonSettings, wxWindow *aWindow)
 Read GAL config options from the common config store.
 
void ReadConfig (COMMON_SETTINGS &aCommonConfig, WINDOW_SETTINGS &aWindowConfig, wxWindow *aWindow)
 Read application and common configs.
 
void WriteConfig (WINDOW_SETTINGS &aCfg)
 
void UpdateScaleFactor ()
 
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(ObserverInterface::*Ptr)(Args1...), Args2 &&... aArgs)
 Notify event to all subscribed observers.
 
void NotifyIgnore (void(ObserverInterface::*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

DPI_SCALING_COMMON m_dpi
 
OPENGL_ANTIALIASING_MODE gl_antialiasing_mode
 
CAIRO_ANTIALIASING_MODE cairo_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
 Fullscreen crosshair or small cross.
 
bool m_fullscreenCursor
 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< IMPLimpl_
 

Private Member Functions

void allocate_impl ()
 
void allocate_shared_impl ()
 
void deallocate_impl ()
 
std::shared_ptr< IMPLget_shared_impl ()
 

Detailed Description

Definition at line 36 of file gal_display_options_common.h.

Constructor & Destructor Documentation

◆ GAL_DISPLAY_OPTIONS_IMPL()

GAL_DISPLAY_OPTIONS_IMPL::GAL_DISPLAY_OPTIONS_IMPL ( )

Definition at line 57 of file gal_display_options_common.cpp.

Member Function Documentation

◆ add_observer()

void UTIL::DETAIL::OBSERVABLE_BASE::add_observer ( void *  observer)
protectedinherited

◆ allocate_impl()

void UTIL::DETAIL::OBSERVABLE_BASE::allocate_impl ( )
privateinherited

◆ allocate_shared_impl()

void UTIL::DETAIL::OBSERVABLE_BASE::allocate_shared_impl ( )
privateinherited

◆ deallocate_impl()

void UTIL::DETAIL::OBSERVABLE_BASE::deallocate_impl ( )
privateinherited

◆ enter_iteration()

void UTIL::DETAIL::OBSERVABLE_BASE::enter_iteration ( )
protectedinherited

◆ get_shared_impl()

std::shared_ptr< OBSERVABLE_BASE::IMPL > UTIL::DETAIL::OBSERVABLE_BASE::get_shared_impl ( )
privateinherited

◆ leave_iteration()

void UTIL::DETAIL::OBSERVABLE_BASE::leave_iteration ( )
protectedinherited

◆ Notify()

void UTIL::OBSERVABLE< GAL_DISPLAY_OPTIONS_OBSERVER >::Notify ( void(ObserverInterface::*)(Args1...)  Ptr,
Args2 &&...  aArgs 
)
inlineinherited

Notify event to all subscribed observers.

Parameters
Ptris a pointer to method of the observer interface.
aArgsis a list of arguments to each notification call, will be perfectly forwarded.

Definition at line 182 of file observable.h.

◆ NotifyChanged()

◆ NotifyIgnore()

void UTIL::OBSERVABLE< GAL_DISPLAY_OPTIONS_OBSERVER >::NotifyIgnore ( void(ObserverInterface::*)(Args1...)  Ptr,
GAL_DISPLAY_OPTIONS_OBSERVER *  aIgnore,
Args2 &&...  aArgs 
)
inlineinherited

Notify event to all subscribed observers but one to be ignore.

Parameters
Ptris a pointer to method of the observer interface.
aIgnoreis an observer to ignore during this notification.
aArgsis a list of arguments to each notification call, will be perfectly forwarded.

Definition at line 218 of file observable.h.

◆ on_observers_empty()

void UTIL::DETAIL::OBSERVABLE_BASE::on_observers_empty ( )
protectedinherited

Definition at line 258 of file observable.cpp.

References UTIL::DETAIL::OBSERVABLE_BASE::deallocate_impl().

◆ ReadCommonConfig()

void GAL_DISPLAY_OPTIONS_IMPL::ReadCommonConfig ( COMMON_SETTINGS aCommonSettings,
wxWindow *  aWindow 
)

◆ ReadConfig()

void GAL_DISPLAY_OPTIONS_IMPL::ReadConfig ( COMMON_SETTINGS aCommonConfig,
WINDOW_SETTINGS aWindowConfig,
wxWindow *  aWindow 
)

Read application and common configs.

Parameters
aCommonConfigthe common config store
aCfgthe application config base
aBaseNamethe application's GAL options key prefix
aWindowthe wx parent window (used for DPI scaling)

Definition at line 98 of file gal_display_options_common.cpp.

References ReadCommonConfig(), ReadWindowSettings(), and traceGalDispOpts.

Referenced by DESIGN_BLOCK_PREVIEW_WIDGET::DESIGN_BLOCK_PREVIEW_WIDGET(), EDA_DRAW_FRAME::LoadSettings(), PANEL_EESCHEMA_COLOR_SETTINGS::PANEL_EESCHEMA_COLOR_SETTINGS(), and SYMBOL_PREVIEW_WIDGET::SYMBOL_PREVIEW_WIDGET().

◆ ReadWindowSettings()

◆ remove_observer()

void UTIL::DETAIL::OBSERVABLE_BASE::remove_observer ( void *  observer)
protectedinherited

Definition at line 223 of file observable.cpp.

References UTIL::DETAIL::OBSERVABLE_BASE::impl_.

◆ size()

size_t UTIL::DETAIL::OBSERVABLE_BASE::size ( ) const
inherited

Definition at line 249 of file observable.cpp.

References UTIL::DETAIL::OBSERVABLE_BASE::impl_.

◆ Subscribe()

LINK UTIL::OBSERVABLE< GAL_DISPLAY_OPTIONS_OBSERVER >::Subscribe ( GAL_DISPLAY_OPTIONS_OBSERVER *  aObserver)
inlineinherited

Add a subscription returning an RAII link.

Parameters
aObserverobserver to subscribe
Returns
RAII link controlling the lifetime of the subscription

Definition at line 157 of file observable.h.

◆ SubscribeUnmanaged()

void UTIL::OBSERVABLE< GAL_DISPLAY_OPTIONS_OBSERVER >::SubscribeUnmanaged ( GAL_DISPLAY_OPTIONS_OBSERVER *  aObserver)
inlineinherited

Add a subscription without RAII link.

Parameters
aObserverObserver to subscribe.

Definition at line 146 of file observable.h.

◆ Unsubscribe()

void UTIL::OBSERVABLE< GAL_DISPLAY_OPTIONS_OBSERVER >::Unsubscribe ( GAL_DISPLAY_OPTIONS_OBSERVER *  aObserver)
inlineinherited

Cancel the subscription of a subscriber.

This can be called during notification calls.

Parameters
aObserverobserver to remove from the subscription list.

Definition at line 170 of file observable.h.

◆ UpdateScaleFactor()

◆ WriteConfig()

Member Data Documentation

◆ cairo_antialiasing_mode

CAIRO_ANTIALIASING_MODE KIGFX::GAL_DISPLAY_OPTIONS::cairo_antialiasing_mode
inherited

◆ gl_antialiasing_mode

OPENGL_ANTIALIASING_MODE KIGFX::GAL_DISPLAY_OPTIONS::gl_antialiasing_mode
inherited

◆ impl_

◆ m_axesEnabled

◆ m_dpi

DPI_SCALING_COMMON GAL_DISPLAY_OPTIONS_IMPL::m_dpi

Definition at line 68 of file gal_display_options_common.h.

Referenced by ReadCommonConfig(), and UpdateScaleFactor().

◆ m_forceDisplayCursor

◆ m_fullscreenCursor

bool KIGFX::GAL_DISPLAY_OPTIONS::m_fullscreenCursor
inherited

◆ m_gridLineWidth

double KIGFX::GAL_DISPLAY_OPTIONS::m_gridLineWidth
inherited

Minimum pixel distance between displayed grid lines.

Definition at line 101 of file gal_display_options.h.

Referenced by ReadWindowSettings(), KIGFX::GAL::updatedGalDisplayOptions(), and WriteConfig().

◆ m_gridMinSpacing

double KIGFX::GAL_DISPLAY_OPTIONS::m_gridMinSpacing
inherited

◆ m_gridSnapping

GRID_SNAPPING KIGFX::GAL_DISPLAY_OPTIONS::m_gridSnapping
inherited

Thickness to render grid lines/dots.

Definition at line 98 of file gal_display_options.h.

Referenced by ReadWindowSettings(), and WriteConfig().

◆ m_gridStyle

KIGFX::GRID_STYLE KIGFX::GAL_DISPLAY_OPTIONS::m_gridStyle
inherited

Snapping options for the grid.

Definition at line 95 of file gal_display_options.h.

Referenced by ReadWindowSettings(), KIGFX::GAL::updatedGalDisplayOptions(), and WriteConfig().

◆ m_scaleFactor


The documentation for this class was generated from the following files: