Skip to content

DIWNE::StyleOverride

Style interface implementation that overrides certain style variables of an underlying StyleBase of a particular NodeEditor. More...

#include "DIWNE/Core/Style/StyleOverride.h"

Inherits from DIWNE::Style

Public Functions

Name
StyleOverride() =default
StyleOverride(NodeEditor * editor)
virtual boolboolean(Style::Var key) const override
virtual const ImVec4 &color(Style::Var key) const override
virtual floatdecimal(Style::Var key) const override
template <typename T &gt; <br>const T &get(Style::Var key) const
virtual intinteger(Style::Var key) const override
voidsetEditor(NodeEditor * editor)
template <typename T ,typename std::enable_if< std::is_pointer< T >::value, bool >::type =true&gt; <br>voidsetOverride(Style::Var key, T ptr)
template <typename T ,typename std::enable_if<!std::is_pointer< T >::value, bool >::type =true&gt; <br>voidsetOverride(Style::Var key, T value)
virtual ImVec2size(Style::Var key) const override

Additional inherited members

Public Types inherited from DIWNE::Style

Name
enum shortVar { GRID_COLOR, GRID_DOTS_COLOR, NODE_BG, NODE_HEADER_BG, NODE_FG, NODE_HEADER_FG, NODE_ROUNDING, NODE_PADDING, MOUSE_DRAG_THRESHOLD, SELECTION_ROUNDING, SELECTED_BORDER_WIDTH, SELECTED_BORDER_COLOR, HOVER_BORDER_WIDTH, HOVER_BORDER_COLOR, LINK_COLOR, LINK_COLOR_SELECTED, LINK_UNPLUGGED_ALPHA, LINK_WIDTH, LINK_SELECTED_WIDTH, LINK_BORDER_WIDTH, LINK_BORDER_COLOR, PIN_SPACING, PIN_LABEL_SPACING, PIN_ENABLE_DRAG_LABEL, PIN_ENABLE_HOVER_BG, PIN_BG_SPACING, PIN_BG_COLOR, PIN_BG_ROUNDING, PIN_HOVER_COLOR_SHIFT, PIN_DRAG_ASSIST_RADIUS, PIN_SOCKET_OFFSET, PIN_SOCKET_BORDER_WIDTH, PIN_SOCKET_BORDER_COLOR, PIN_SOCKET_BORDER_ROUNDING, PIN_SOCKET_BG, PIN_SOCKET_THICKNESS, PIN_SOCKET_CONNECTED_GAP, PIN_SOCKET_ROUNDING, PIN_SOCKET_INNER_ROUNDING, PIN_SQUARE_OFFSET, PIN_SQUARE_BORDER_WIDTH, PIN_SQUARE_BORDER_COLOR, PIN_SQUARE_ROUNDING, PIN_SQUARE_HOVER_ENLARGE, PIN_CIRCLE_OFFSET, PIN_CIRCLE_BORDER_WIDTH, PIN_CIRCLE_BORDER_COLOR, PIN_DIM_ENABLED, PIN_DIM_ALPHA, SELECTION_RECT_FULL_COLOR, SELECTION_RECT_TOUCH_COLOR, SELECTION_RECT_ALPHA, DROP_ZONE_BG, DROP_INDICATOR_COLOR, DROP_ZONE_DROP_GAP, DROP_ZONE_MARGIN, STYLE_VAR_COUNT}<br>Style variables keys enum, they can be accessed by the get(key) method.

Public Functions inherited from DIWNE::Style

Name
virtual~Style() =default

Detailed Description

cpp
class DIWNE::StyleOverride;
class DIWNE::StyleOverride;

Style interface implementation that overrides certain style variables of an underlying StyleBase of a particular NodeEditor.

If this object does not contain an entry for a style variable, it falls back to the base style. Modifications are stored in a hash map. This object can be set to multiple DiwneObject's which will then return it in their DiwneObject::style() methods, instead of the NodeEditor base style.

DPI scaling it performed at runtime and inferred from the base style.

Public Functions Documentation

function StyleOverride

cpp
StyleOverride() =default
StyleOverride() =default

function StyleOverride

cpp
inline StyleOverride(
    NodeEditor * editor
)
inline StyleOverride(
    NodeEditor * editor
)

function boolean

cpp
virtual bool boolean(
    Style::Var key
) const override
virtual bool boolean(
    Style::Var key
) const override

Reimplements: DIWNE::Style::boolean

function color

cpp
virtual const ImVec4 & color(
    Style::Var key
) const override
virtual const ImVec4 & color(
    Style::Var key
) const override

Reimplements: DIWNE::Style::color

function decimal

cpp
virtual float decimal(
    Style::Var key
) const override
virtual float decimal(
    Style::Var key
) const override

Reimplements: DIWNE::Style::decimal

function get

cpp
template <typename T >
inline const T & get(
    Style::Var key
) const
template <typename T >
inline const T & get(
    Style::Var key
) const

function integer

cpp
virtual int integer(
    Style::Var key
) const override
virtual int integer(
    Style::Var key
) const override

Reimplements: DIWNE::Style::integer

function setEditor

cpp
inline void setEditor(
    NodeEditor * editor
)
inline void setEditor(
    NodeEditor * editor
)

function setOverride

cpp
template <typename T ,
typename std::enable_if< std::is_pointer< T >::value, bool >::type  =true>
inline void setOverride(
    Style::Var key,
    T ptr
)
template <typename T ,
typename std::enable_if< std::is_pointer< T >::value, bool >::type  =true>
inline void setOverride(
    Style::Var key,
    T ptr
)

function setOverride

cpp
template <typename T ,
typename std::enable_if<!std::is_pointer< T >::value, bool >::type  =true>
inline void setOverride(
    Style::Var key,
    T value
)
template <typename T ,
typename std::enable_if<!std::is_pointer< T >::value, bool >::type  =true>
inline void setOverride(
    Style::Var key,
    T value
)

function size

cpp
virtual ImVec2 size(
    Style::Var key
) const override
virtual ImVec2 size(
    Style::Var key
) const override

Reimplements: DIWNE::Style::size


Updated on 2025-05-31 at 12:55:31 +0000