GnuCash c935c2f+
Loading...
Searching...
No Matches
Public Member Functions
GncGtkTextUIItem Class Reference
Inheritance diagram for GncGtkTextUIItem:
GncOptionGtkUIItem GncOptionUIItem

Public Member Functions

 GncGtkTextUIItem (GtkWidget *widget)
 
void set_ui_item_from_option (GncOption &option) noexcept override
 
void set_option_from_ui_item (GncOption &option) noexcept override
 
- Public Member Functions inherited from GncOptionGtkUIItem
 GncOptionGtkUIItem (GtkWidget *widget, GncOptionUIType type)
 
 GncOptionGtkUIItem (const GncOptionGtkUIItem &item)
 
 GncOptionGtkUIItem (GncOptionGtkUIItem &&)=default
 
virtual void set_selectable (bool) const noexcept override
 Control wether the widget is sensitive.
 
void clear_ui_item () override
 Clear the data from the widget.
 
void set_widget (GtkWidget *widget)
 
virtual GtkWidget * get_widget () const
 
virtual SCM get_widget_scm_value (const GncOption &) const
 
- Public Member Functions inherited from GncOptionUIItem
 GncOptionUIItem (GncOptionUIType type)
 
GncOptionUIType get_ui_type () const noexcept
 
virtual void set_dirty (bool status) noexcept
 
virtual bool get_dirty () const noexcept
 

Detailed Description

Definition at line 243 of file gnc-option-gtk-ui.cpp.

Constructor & Destructor Documentation

◆ GncGtkTextUIItem()

GncGtkTextUIItem::GncGtkTextUIItem ( GtkWidget *  widget)
inline

Definition at line 246 of file gnc-option-gtk-ui.cpp.

246 :
247 GncOptionGtkUIItem{widget, GncOptionUIType::TEXT} {}
class GncOptionGtkUIItem Gtk-specific Interface class for Option Widget

Member Function Documentation

◆ set_option_from_ui_item()

void GncGtkTextUIItem::set_option_from_ui_item ( GncOption option)
inlineoverridevirtualnoexcept

Implements GncOptionUIItem.

Definition at line 253 of file gnc-option-gtk-ui.cpp.

254 {
255 auto widget{GTK_TEXT_VIEW(get_widget())};
256 auto str{xxxgtk_textview_get_text(widget)};
257 option.set_value(std::string{str});
258 g_free (str);
259 }

◆ set_ui_item_from_option()

void GncGtkTextUIItem::set_ui_item_from_option ( GncOption option)
inlineoverridevirtualnoexcept

Implements GncOptionUIItem.

Definition at line 248 of file gnc-option-gtk-ui.cpp.

249 {
250 auto widget{GTK_TEXT_VIEW(get_widget())};
251 xxxgtk_textview_set_text(widget, option.get_value<std::string>().c_str());
252 }

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