Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
Slic3r::GUI::Line Class Reference

Represents option lines. More...

#include <src/slic3r/GUI/OptionsGroup.hpp>

+ Inheritance diagram for Slic3r::GUI::Line:
+ Collaboration diagram for Slic3r::GUI::Line:

Public Member Functions

void append_option (const Option &option)
 
void append_widget (const widget_t widget)
 
 Line (wxString label, wxString tooltip)
 
 Line ()
 
 Line (const std::string &opt_key, const wxString &label, const wxString &tooltip)
 
bool is_separator () const
 
bool has_only_option (const std::string &opt_key) const
 
void clear ()
 
const std::vector< widget_t > & get_extra_widgets () const
 
const std::vector< Option > & get_options () const
 
bool set_undo_bitmap (const ScalableBitmap *bmp)
 
bool set_undo_to_sys_bitmap (const ScalableBitmap *bmp)
 
bool set_label_colour (const wxColour *clr)
 
bool set_undo_tooltip (const wxString *tip)
 
bool set_undo_to_sys_tooltip (const wxString *tip)
 
bool has_undo_ui () const
 
const wxBitmapBundle & undo_bitmap () const
 
const wxString * undo_tooltip () const
 
const wxBitmapBundle & undo_to_sys_bitmap () const
 
const wxString * undo_to_sys_tooltip () const
 
const wxColour * label_color () const
 
const bool blink () const
 
bool * get_blink_ptr ()
 

Public Attributes

wxString label
 
wxString label_tooltip
 
std::string label_path
 
size_t full_width {0}
 
widget_t widget {nullptr}
 
std::function< wxWindow *(wxWindow *)> near_label_widget { nullptr }
 
wxWindow * near_label_widget_win {nullptr}
 
wxSizer * widget_sizer {nullptr}
 
wxSizer * extra_widget_sizer {nullptr}
 

Private Attributes

bool m_is_separator { false }
 
std::vector< Optionm_options
 
std::vector< widget_tm_extra_widgets
 {std::vector<Option>()};
 
UndoValueUI m_undo_ui
 

Detailed Description

Represents option lines.

Constructor & Destructor Documentation

◆ Line() [1/3]

Slic3r::GUI::Line::Line ( wxString  label,
wxString  tooltip 
)
inline
76 :
77 label(_(label)), label_tooltip(_(tooltip)) {}
wxString label_tooltip
Definition OptionsGroup.hpp:60
wxString label
Definition OptionsGroup.hpp:59
#define _(msgid)
Definition getopt.c:87

◆ Line() [2/3]

Slic3r::GUI::Line::Line ( )
inline
78: m_is_separator(true) {}
bool m_is_separator
Definition OptionsGroup.hpp:57

◆ Line() [3/3]

Slic3r::GUI::Line::Line ( const std::string &  opt_key,
const wxString &  label,
const wxString &  tooltip 
)
inline
80 :
81 label(_(label)), label_tooltip(_(tooltip))
82 {
83 m_options.push_back(Option({ opt_key, coNone }, opt_key));
84 }
std::vector< Option > m_options
Definition OptionsGroup.hpp:94
@ coNone
Definition Config.hpp:162

References Slic3r::coNone, and m_options.

Member Function Documentation

◆ append_option()

void Slic3r::GUI::Line::append_option ( const Option option)
inline
70 {
71 m_options.push_back(option);
72 }
Definition getopt.h:102

References m_options.

Referenced by Slic3r::GUI::FreqChangedParams::FreqChangedParams(), Slic3r::GUI::TabFilament::build(), Slic3r::GUI::TabPrinter::build_extruder_pages(), and Slic3r::GUI::TabPrinter::build_sla().

+ Here is the caller graph for this function:

◆ append_widget()

void Slic3r::GUI::Line::append_widget ( const widget_t  widget)
inline
73 {
74 m_extra_widgets.push_back(widget);
75 }
std::vector< widget_t > m_extra_widgets
{std::vector<Option>()};
Definition OptionsGroup.hpp:95
widget_t widget
Definition OptionsGroup.hpp:64

References m_extra_widgets, and widget.

Referenced by Slic3r::GUI::FreqChangedParams::FreqChangedParams(), Slic3r::GUI::TabPrinter::build_extruder_pages(), Slic3r::GUI::Tab::build_preset_description_line(), and Slic3r::GUI::PhysicalPrinterDialog::build_printhost_settings().

+ Here is the caller graph for this function:

◆ blink()

const bool Slic3r::GUI::UndoValueUIManager::blink ( ) const
inlineinherited
115{ return m_undo_ui.blink; }
UndoValueUI m_undo_ui
Definition Field.hpp:96

References Slic3r::GUI::UndoValueUIManager::UndoValueUI::blink, and Slic3r::GUI::UndoValueUIManager::m_undo_ui.

Referenced by Slic3r::GUI::OG_CustomCtrl::CtrlLine::render().

+ Here is the caller graph for this function:

◆ clear()

void Slic3r::GUI::Line::clear ( )
136{
138 near_label_widget_win = nullptr;
139
140 if (widget_sizer) {
141 widget_sizer->Clear(true);
142 delete widget_sizer;
143 widget_sizer = nullptr;
144 }
145
146 if (extra_widget_sizer) {
147 extra_widget_sizer->Clear(true);
148 delete extra_widget_sizer;
149 extra_widget_sizer = nullptr;
150 }
151}
wxWindow * near_label_widget_win
Definition OptionsGroup.hpp:66
wxSizer * widget_sizer
Definition OptionsGroup.hpp:67
wxSizer * extra_widget_sizer
Definition OptionsGroup.hpp:68

References extra_widget_sizer, near_label_widget_win, and widget_sizer.

◆ get_blink_ptr()

bool * Slic3r::GUI::UndoValueUIManager::get_blink_ptr ( )
inlineinherited
116{ return &m_undo_ui.blink; }

References Slic3r::GUI::UndoValueUIManager::UndoValueUI::blink, and Slic3r::GUI::UndoValueUIManager::m_undo_ui.

Referenced by Slic3r::GUI::ConfigOptionsGroup::get_custom_ctrl_with_blinking_ptr().

+ Here is the caller graph for this function:

◆ get_extra_widgets()

const std::vector< widget_t > & Slic3r::GUI::Line::get_extra_widgets ( ) const
inline
90{return m_extra_widgets;}

References m_extra_widgets.

Referenced by Slic3r::GUI::OptionsGroup::activate_line(), Slic3r::GUI::OptionsGroup::append_line(), and Slic3r::GUI::OG_CustomCtrl::get_pos().

+ Here is the caller graph for this function:

◆ get_options()

const std::vector< Option > & Slic3r::GUI::Line::get_options ( ) const
inline
91{ return m_options; }

References m_options.

Referenced by Slic3r::GUI::OG_CustomCtrl::CtrlLine::CtrlLine(), Slic3r::GUI::OptionsGroup::activate_line(), Slic3r::GUI::OptionsGroup::append_line(), Slic3r::Search::OptionsSearcher::append_preferences_option(), and Slic3r::GUI::OG_CustomCtrl::get_pos().

+ Here is the caller graph for this function:

◆ has_only_option()

bool Slic3r::GUI::Line::has_only_option ( const std::string &  opt_key) const
inline
87{ return m_options.size() == 1 && m_options[0].opt_id == opt_key; }

References m_options.

◆ has_undo_ui()

bool Slic3r::GUI::UndoValueUIManager::has_undo_ui ( ) const
inlineinherited
109{ return m_undo_ui.undo_bitmap != nullptr; }
const ScalableBitmap * undo_bitmap
Definition Field.hpp:46

References Slic3r::GUI::UndoValueUIManager::m_undo_ui, and Slic3r::GUI::UndoValueUIManager::UndoValueUI::undo_bitmap.

Referenced by Slic3r::GUI::OG_CustomCtrl::get_pos(), and Slic3r::GUI::OG_CustomCtrl::CtrlLine::render().

+ Here is the caller graph for this function:

◆ is_separator()

bool Slic3r::GUI::Line::is_separator ( ) const
inline
86{ return m_is_separator; }

References m_is_separator.

Referenced by Slic3r::GUI::OptionsGroup::activate_line(), and Slic3r::GUI::OG_CustomCtrl::CtrlLine::is_separator().

+ Here is the caller graph for this function:

◆ label_color()

const wxColour * Slic3r::GUI::UndoValueUIManager::label_color ( ) const
inlineinherited
114{ return m_undo_ui.label_color; }
const wxColour * label_color
Definition Field.hpp:52

References Slic3r::GUI::UndoValueUIManager::UndoValueUI::label_color, and Slic3r::GUI::UndoValueUIManager::m_undo_ui.

Referenced by Slic3r::GUI::OG_CustomCtrl::CtrlLine::render().

+ Here is the caller graph for this function:

◆ set_label_colour()

bool Slic3r::GUI::UndoValueUIManager::set_label_colour ( const wxColour *  clr)
inlineinherited
104{ return m_undo_ui.set_label_colour(clr); }
bool set_label_colour(const wxColour *clr)
Definition Field.hpp:72

References Slic3r::GUI::UndoValueUIManager::m_undo_ui, and Slic3r::GUI::UndoValueUIManager::UndoValueUI::set_label_colour().

Referenced by Slic3r::GUI::Tab::create_line_with_widget(), Slic3r::GUI::Tab::decorate(), and Slic3r::GUI::Tab::update_label_colours().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ set_undo_bitmap()

bool Slic3r::GUI::UndoValueUIManager::set_undo_bitmap ( const ScalableBitmap bmp)
inlineinherited
102{ return m_undo_ui.set_undo_bitmap(bmp); }
bool set_undo_bitmap(const ScalableBitmap *bmp)
Definition Field.hpp:56

References Slic3r::GUI::UndoValueUIManager::m_undo_ui, and Slic3r::GUI::UndoValueUIManager::UndoValueUI::set_undo_bitmap().

Referenced by Slic3r::GUI::Tab::create_line_with_widget(), and Slic3r::GUI::Tab::decorate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ set_undo_to_sys_bitmap()

bool Slic3r::GUI::UndoValueUIManager::set_undo_to_sys_bitmap ( const ScalableBitmap bmp)
inlineinherited
103{ return m_undo_ui.set_undo_to_sys_bitmap(bmp); }
bool set_undo_to_sys_bitmap(const ScalableBitmap *bmp)
Definition Field.hpp:64

References Slic3r::GUI::UndoValueUIManager::m_undo_ui, and Slic3r::GUI::UndoValueUIManager::UndoValueUI::set_undo_to_sys_bitmap().

Referenced by Slic3r::GUI::Tab::create_line_with_widget(), and Slic3r::GUI::Tab::decorate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ set_undo_to_sys_tooltip()

bool Slic3r::GUI::UndoValueUIManager::set_undo_to_sys_tooltip ( const wxString *  tip)
inlineinherited
106{ return m_undo_ui.set_undo_to_sys_tooltip(tip); }
bool set_undo_to_sys_tooltip(const wxString *tip)
Definition Field.hpp:87

References Slic3r::GUI::UndoValueUIManager::m_undo_ui, and Slic3r::GUI::UndoValueUIManager::UndoValueUI::set_undo_to_sys_tooltip().

Referenced by Slic3r::GUI::Tab::create_line_with_widget(), and Slic3r::GUI::Tab::decorate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ set_undo_tooltip()

bool Slic3r::GUI::UndoValueUIManager::set_undo_tooltip ( const wxString *  tip)
inlineinherited
105{ return m_undo_ui.set_undo_tooltip(tip); }
bool set_undo_tooltip(const wxString *tip)
Definition Field.hpp:79

References Slic3r::GUI::UndoValueUIManager::m_undo_ui, and Slic3r::GUI::UndoValueUIManager::UndoValueUI::set_undo_tooltip().

Referenced by Slic3r::GUI::Tab::create_line_with_widget(), and Slic3r::GUI::Tab::decorate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ undo_bitmap()

const wxBitmapBundle & Slic3r::GUI::UndoValueUIManager::undo_bitmap ( ) const
inlineinherited
110{ return m_undo_ui.undo_bitmap->bmp(); }
const wxBitmapBundle & bmp() const
Definition wxExtensions.hpp:148

References ScalableBitmap::bmp(), Slic3r::GUI::UndoValueUIManager::m_undo_ui, and Slic3r::GUI::UndoValueUIManager::UndoValueUI::undo_bitmap.

Referenced by Slic3r::GUI::OG_CustomCtrl::CtrlLine::render().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ undo_to_sys_bitmap()

const wxBitmapBundle & Slic3r::GUI::UndoValueUIManager::undo_to_sys_bitmap ( ) const
inlineinherited
112{ return m_undo_ui.undo_to_sys_bitmap->bmp(); }
const ScalableBitmap * undo_to_sys_bitmap
Definition Field.hpp:49

References ScalableBitmap::bmp(), Slic3r::GUI::UndoValueUIManager::m_undo_ui, and Slic3r::GUI::UndoValueUIManager::UndoValueUI::undo_to_sys_bitmap.

Referenced by Slic3r::GUI::OG_CustomCtrl::CtrlLine::render().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ undo_to_sys_tooltip()

const wxString * Slic3r::GUI::UndoValueUIManager::undo_to_sys_tooltip ( ) const
inlineinherited

◆ undo_tooltip()

const wxString * Slic3r::GUI::UndoValueUIManager::undo_tooltip ( ) const
inlineinherited

Member Data Documentation

◆ extra_widget_sizer

wxSizer* Slic3r::GUI::Line::extra_widget_sizer {nullptr}

◆ full_width

◆ label

◆ label_path

std::string Slic3r::GUI::Line::label_path

◆ label_tooltip

wxString Slic3r::GUI::Line::label_tooltip

◆ m_extra_widgets

std::vector<widget_t> Slic3r::GUI::Line::m_extra_widgets
private

{std::vector<Option>()};

Referenced by append_widget(), and get_extra_widgets().

◆ m_is_separator

bool Slic3r::GUI::Line::m_is_separator { false }
private

Referenced by is_separator().

◆ m_options

std::vector<Option> Slic3r::GUI::Line::m_options
private

◆ m_undo_ui

◆ near_label_widget

std::function<wxWindow*(wxWindow*)> Slic3r::GUI::Line::near_label_widget { nullptr }

◆ near_label_widget_win

wxWindow* Slic3r::GUI::Line::near_label_widget_win {nullptr}

◆ widget

◆ widget_sizer

wxSizer* Slic3r::GUI::Line::widget_sizer {nullptr}

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