OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::GUI::Line Class Reference

Represents option lines. More...

#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/GUI/OptionsGroup.hpp>

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

Public Member Functions

std::string & get_first_option_key ()
void append_option (const Option &option)
void append_widget (const widget_t widget)
 Line (wxString label, wxString tooltip)
 Line ()
void set_label (const wxString &new_label)
bool is_separator () const
bool has_only_option (const std::string &opt_key) const
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 set_edit_bitmap (const ScalableBitmap *bmp)
bool set_edit_tooltip (const wxString &tip)
bool has_undo_ui () const
const ScalableBitmap * undo_bitmap () const
const wxString * undo_tooltip () const
const ScalableBitmap * 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 ()
bool has_edit_ui () const
const wxBitmap * edit_bitmap () const
const wxString * edit_tooltip () const

Public Attributes

wxString label
wxString label_en
wxString label_tooltip
std::string label_path
bool undo_to_sys {false}
bool toggle_visible {true}
size_t full_width {0}
widget_t widget {nullptr}
std::function< wxWindow *(wxWindow *)> near_label_widget { nullptr }
wxWindow * near_label_widget_win {nullptr}
wxStaticText * label_widget {nullptr}
wxSizer * widget_sizer {nullptr}
wxSizer * extra_widget_sizer {nullptr}
wxWindow * extra_widget_win {nullptr}

Private Attributes

bool m_is_separator { false }
std::vector< Option > m_options
std::vector< widget_t > m_extra_widgets
 {std::vector<Option>()};
UndoValueUI m_undo_ui
EditValueUI m_edit_ui

Detailed Description

Represents option lines.

Constructor & Destructor Documentation

◆ Line() [1/2]

Slic3r::GUI::Line::Line ( wxString label,
wxString tooltip )
inline
91 :
92 label(_(label)), label_en(label), label_tooltip(_(tooltip)) {}
#define _(s)
Definition 3mf.cpp:306
wxString label_tooltip
Definition OptionsGroup.hpp:65
wxString label
Definition OptionsGroup.hpp:63
wxString label_en
Definition OptionsGroup.hpp:64

References _, label, label_en, and label_tooltip.

◆ Line() [2/2]

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

References m_is_separator.

Member Function Documentation

◆ append_option()

void Slic3r::GUI::Line::append_option ( const Option & option)
inline
84 {
85 m_options.push_back(option);
86 }
std::vector< Option > m_options
Definition OptionsGroup.hpp:113

References m_options.

Referenced by Slic3r::GUI::TabFilament::build(), Slic3r::GUI::TabPrint::build(), Slic3r::GUI::TabPrinter::build_fff(), Slic3r::GUI::TabPrinter::build_kinematics_page(), and Slic3r::GUI::OptionsGroup::create_single_option_line().

Here is the caller graph for this function:

◆ append_widget()

void Slic3r::GUI::Line::append_widget ( const widget_t widget)
inline
87 {
88 m_extra_widgets.push_back(widget);
89 }
std::vector< widget_t > m_extra_widgets
{std::vector<Option>()};
Definition OptionsGroup.hpp:114
widget_t widget
Definition OptionsGroup.hpp:71

References m_extra_widgets, and widget.

Referenced by 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
170{ return m_undo_ui.blink; }
UndoValueUI m_undo_ui
Definition Field.hpp:120

References m_undo_ui.

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

Here is the caller graph for this function:

◆ edit_bitmap()

const wxBitmap * Slic3r::GUI::UndoValueUIManager::edit_bitmap ( ) const
inlineinherited
175{ return &m_edit_ui.bitmap->bmp(); }
EditValueUI m_edit_ui
Definition Field.hpp:144

References m_edit_ui.

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

Here is the caller graph for this function:

◆ edit_tooltip()

const wxString * Slic3r::GUI::UndoValueUIManager::edit_tooltip ( ) const
inlineinherited
176{ return &m_edit_ui.tooltip; }

References m_edit_ui.

◆ get_blink_ptr()

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

References 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
109{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_first_option_key()

std::string & Slic3r::GUI::Line::get_first_option_key ( )
inline
80 {
81 return m_options[0].opt_id;
82 }

References m_options.

◆ get_options()

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

References m_options.

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

Here is the caller graph for this function:

◆ has_edit_ui()

bool Slic3r::GUI::UndoValueUIManager::has_edit_ui ( ) const
inlineinherited
174{ return !m_edit_ui.tooltip.IsEmpty(); }

References m_edit_ui.

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

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
107{ 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
160{ return m_undo_ui.undo_bitmap != nullptr; }

References m_undo_ui.

Referenced by Slic3r::GUI::OG_CustomCtrl::get_pos().

Here is the caller graph for this function:

◆ is_separator()

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

References m_is_separator.

Referenced by Slic3r::GUI::OptionsGroup::activate_line().

Here is the caller graph for this function:

◆ label_color()

const wxColour * Slic3r::GUI::UndoValueUIManager::label_color ( ) const
inlineinherited
165{ return m_undo_ui.label_color; }

References m_undo_ui.

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

Here is the caller graph for this function:

◆ set_edit_bitmap()

bool Slic3r::GUI::UndoValueUIManager::set_edit_bitmap ( const ScalableBitmap * bmp)
inlineinherited
156{ return m_edit_ui.set_bitmap(bmp); }

References m_edit_ui.

Referenced by Slic3r::GUI::Tab::decorate().

Here is the caller graph for this function:

◆ set_edit_tooltip()

bool Slic3r::GUI::UndoValueUIManager::set_edit_tooltip ( const wxString & tip)
inlineinherited
157{ return m_edit_ui.set_tooltip(tip); }

References m_edit_ui.

◆ set_label()

void Slic3r::GUI::Line::set_label ( const wxString & new_label)
inline
97 {
98 label = _(new_label);
99 label_en = new_label;
100 if (label_widget != nullptr) {
101 label_widget->SetLabel(label + (label.IsEmpty() ? "" : ": "));
102 label_widget->Refresh();
103 }
104 }
wxStaticText * label_widget
Definition OptionsGroup.hpp:74

References _, label, label_en, and label_widget.

◆ set_label_colour()

bool Slic3r::GUI::UndoValueUIManager::set_label_colour ( const wxColour * clr)
inlineinherited
152{ return m_undo_ui.set_label_colour(clr); }

References m_undo_ui.

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

Here is the caller graph for this function:

◆ set_undo_bitmap()

bool Slic3r::GUI::UndoValueUIManager::set_undo_bitmap ( const ScalableBitmap * bmp)
inlineinherited
150{ return m_undo_ui.set_undo_bitmap(bmp); }

References m_undo_ui.

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

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
151{ return m_undo_ui.set_undo_to_sys_bitmap(bmp); }

References m_undo_ui.

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

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
154{ return m_undo_ui.set_undo_to_sys_tooltip(tip); }

References m_undo_ui.

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

Here is the caller graph for this function:

◆ set_undo_tooltip()

bool Slic3r::GUI::UndoValueUIManager::set_undo_tooltip ( const wxString * tip)
inlineinherited
153{ return m_undo_ui.set_undo_tooltip(tip); }

References m_undo_ui.

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

Here is the caller graph for this function:

◆ undo_bitmap()

const ScalableBitmap * Slic3r::GUI::UndoValueUIManager::undo_bitmap ( ) const
inlineinherited
161{ return m_undo_ui.undo_bitmap; }

References m_undo_ui.

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

Here is the caller graph for this function:

◆ undo_to_sys_bitmap()

const ScalableBitmap * Slic3r::GUI::UndoValueUIManager::undo_to_sys_bitmap ( ) const
inlineinherited
163{ return m_undo_ui.undo_to_sys_bitmap; }

References m_undo_ui.

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

Here is the caller graph for this function:

◆ undo_to_sys_tooltip()

const wxString * Slic3r::GUI::UndoValueUIManager::undo_to_sys_tooltip ( ) const
inlineinherited
164{ return m_undo_ui.undo_to_sys_tooltip; }

References m_undo_ui.

◆ undo_tooltip()

const wxString * Slic3r::GUI::UndoValueUIManager::undo_tooltip ( ) const
inlineinherited
162{ return m_undo_ui.undo_tooltip; }

References m_undo_ui.

Member Data Documentation

◆ extra_widget_sizer

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

◆ extra_widget_win

wxWindow* Slic3r::GUI::Line::extra_widget_win {nullptr}
78{nullptr};

◆ full_width

◆ label

◆ label_en

wxString Slic3r::GUI::Line::label_en

◆ label_path

◆ label_tooltip

wxString Slic3r::GUI::Line::label_tooltip

◆ label_widget

wxStaticText* Slic3r::GUI::Line::label_widget {nullptr}
74{nullptr};

Referenced by Slic3r::GUI::OptionsGroup::activate_line(), and set_label().

◆ m_edit_ui

EditValueUI Slic3r::GUI::UndoValueUIManager::m_edit_ui
privateinherited

◆ 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
61{ false };

Referenced by Line(), and 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}

◆ toggle_visible

◆ undo_to_sys

bool Slic3r::GUI::Line::undo_to_sys {false}
67{false}; // BBS: object config

◆ widget

◆ widget_sizer

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

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