KiCad PCB EDA Suite
Loading...
Searching...
No Matches
KIGFX::GAL_DISPLAY_OPTIONS Class Reference

#include <gal_display_options.h>

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

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< 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 86 of file gal_display_options.h.

Constructor & Destructor Documentation

◆ GAL_DISPLAY_OPTIONS()

◆ ~GAL_DISPLAY_OPTIONS()

virtual KIGFX::GAL_DISPLAY_OPTIONS::~GAL_DISPLAY_OPTIONS ( )
inlinevirtual

Definition at line 91 of file gal_display_options.h.

Member Function Documentation

◆ add_observer()

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

Definition at line 216 of file observable.cpp.

References allocate_impl(), and impl_.

◆ allocate_impl()

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

Definition at line 188 of file observable.cpp.

References impl_.

Referenced by add_observer().

◆ allocate_shared_impl()

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

Definition at line 195 of file observable.cpp.

References impl_.

Referenced by get_shared_impl().

◆ deallocate_impl()

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

Definition at line 204 of file observable.cpp.

References impl_.

Referenced by on_observers_empty().

◆ 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

Definition at line 209 of file observable.cpp.

References allocate_shared_impl(), and impl_.

Referenced by OBSERVABLE_BASE().

◆ GetCursorMode()

CROSS_HAIR_MODE KIGFX::GAL_DISPLAY_OPTIONS::GetCursorMode ( ) const
inline

Definition at line 122 of file gal_display_options.h.

References m_crossHairMode.

Referenced by EDITOR_CONDITIONS::cursorFunc().

◆ leave_iteration()

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

◆ Notify()

void UTIL::OBSERVABLE< GAL_DISPLAY_OPTIONS_OBSERVER >::Notify ( void(GAL_DISPLAY_OPTIONS_OBSERVER::* Ptr )(Args1...),
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.

Referenced by KIGFX::GAL_DISPLAY_OPTIONS::NotifyChanged().

◆ NotifyChanged()

◆ NotifyIgnore()

void UTIL::OBSERVABLE< GAL_DISPLAY_OPTIONS_OBSERVER >::NotifyIgnore ( void(GAL_DISPLAY_OPTIONS_OBSERVER::* Ptr )(Args1...),
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 deallocate_impl().

◆ remove_observer()

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

Definition at line 223 of file observable.cpp.

References impl_.

◆ SetCursorMode()

void KIGFX::GAL_DISPLAY_OPTIONS::SetCursorMode ( CROSS_HAIR_MODE aMode)
inline

◆ size()

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

Definition at line 249 of file observable.cpp.

References 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.

Member Data Documentation

◆ antialiasing_mode

GAL_ANTIALIASING_MODE KIGFX::GAL_DISPLAY_OPTIONS::antialiasing_mode

◆ impl_

◆ m_axesEnabled

◆ m_crossHairMode

CROSS_HAIR_MODE KIGFX::GAL_DISPLAY_OPTIONS::m_crossHairMode

◆ m_forceDisplayCursor

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().

◆ m_gridLineWidth

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().

◆ m_gridMinSpacing

double KIGFX::GAL_DISPLAY_OPTIONS::m_gridMinSpacing

◆ m_gridSnapping

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().

◆ m_gridStyle

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().

◆ m_scaleFactor

double KIGFX::GAL_DISPLAY_OPTIONS::m_scaleFactor

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