LibreOffice Module vcl (master) 1
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | Friends | List of all members
weld::ComboBox Class Referenceabstract

A widget used to choose from a list of items. More...

#include <weld.hxx>

Inheritance diagram for weld::ComboBox:
[legend]
Collaboration diagram for weld::ComboBox:
[legend]

Public Types

typedef std::tuple< vcl::RenderContext &, const tools::Rectangle &, bool, const OUString & > render_args
 

Public Member Functions

virtual void insert (int pos, const OUString &rStr, const OUString *pId, const OUString *pIconName, VirtualDevice *pImageSurface)=0
 
virtual void insert_vector (const std::vector< weld::ComboBoxEntry > &rItems, bool bKeepExisting)=0
 
void insert_text (int pos, const OUString &rStr)
 
void append_text (const OUString &rStr)
 
void append (const OUString &rId, const OUString &rStr)
 
void append (const OUString &rId, const OUString &rStr, const OUString &rImage)
 
void append (const OUString &rId, const OUString &rStr, VirtualDevice &rImage)
 
void append (int pos, const OUString &rId, const OUString &rStr)
 
virtual void insert_separator (int pos, const OUString &rId)=0
 
void append_separator (const OUString &rId)
 
virtual int get_count () const =0
 
virtual void make_sorted ()=0
 
virtual void clear ()=0
 
virtual int get_active () const =0
 
virtual void set_active (int pos)=0
 
virtual void remove (int pos)=0
 
virtual OUString get_active_text () const =0
 
void set_active_text (const OUString &rStr)
 
virtual OUString get_text (int pos) const =0
 
virtual int find_text (const OUString &rStr) const =0
 
void remove_text (const OUString &rText)
 
virtual OUString get_active_id () const =0
 
virtual void set_active_id (const OUString &rStr)=0
 
virtual OUString get_id (int pos) const =0
 
virtual void set_id (int row, const OUString &rId)=0
 
virtual int find_id (const OUString &rId) const =0
 
void remove_id (const OUString &rId)
 
void connect_changed (const Link< ComboBox &, void > &rLink)
 
virtual bool changed_by_direct_pick () const =0
 
virtual void connect_popup_toggled (const Link< ComboBox &, void > &rLink)
 
virtual bool has_entry () const =0
 
virtual void set_entry_message_type (EntryMessageType eType)=0
 
virtual void set_entry_text (const OUString &rStr)=0
 
virtual void set_entry_width_chars (int nChars)=0
 
virtual void set_entry_max_length (int nChars)=0
 
virtual void select_entry_region (int nStartPos, int nEndPos)=0
 
virtual bool get_entry_selection_bounds (int &rStartPos, int &rEndPos)=0
 
virtual void set_entry_completion (bool bEnable, bool bCaseSensitive=false)=0
 
virtual void set_entry_placeholder_text (const OUString &rText)=0
 
virtual void set_entry_editable (bool bEditable)=0
 
virtual void cut_entry_clipboard ()=0
 
virtual void copy_entry_clipboard ()=0
 
virtual void paste_entry_clipboard ()=0
 
virtual void set_font (const vcl::Font &rFont)=0
 
virtual void set_entry_font (const vcl::Font &rFont)=0
 
virtual vcl::Font get_entry_font ()=0
 
virtual bool get_popup_shown () const =0
 
void connect_entry_insert_text (const Link< OUString &, bool > &rLink)
 
void connect_entry_activate (const Link< ComboBox &, bool > &rLink)
 
void save_value ()
 
void save_values_by_id (const OUString &rId)
 
OUString const & get_saved_value () const
 
OUString const & get_saved_values (int pos) const
 
bool get_value_changed_from_saved () const
 
bool get_values_changed_from_saved () const
 
void removeSavedValues ()
 
void connect_custom_get_size (const Link< vcl::RenderContext &, Size > &rLink)
 
void connect_custom_render (const Link< render_args, void > &rLink)
 
virtual void set_custom_renderer (bool bOn)=0
 
virtual VclPtr< VirtualDevicecreate_render_virtual_device () const =0
 
virtual void set_item_menu (const OString &rIdent, weld::Menu *pMenu)=0
 
virtual int get_menu_button_width () const =0
 
virtual int get_max_mru_count () const =0
 
virtual void set_max_mru_count (int nCount)=0
 
virtual OUString get_mru_entries () const =0
 
virtual void set_mru_entries (const OUString &rEntries)=0
 
- Public Member Functions inherited from weld::Widget
virtual void set_sensitive (bool sensitive)=0
 
virtual bool get_sensitive () const =0
 
virtual void show ()=0
 
virtual void hide ()=0
 
virtual void set_visible (bool visible)
 
virtual bool get_visible () const =0
 
virtual bool is_visible () const =0
 
virtual void set_can_focus (bool bCanFocus)=0
 
virtual void grab_focus ()=0
 
virtual bool has_focus () const =0
 
virtual bool has_child_focus () const =0
 
virtual bool is_active () const =0
 
virtual void set_size_request (int nWidth, int nHeight)=0
 
virtual Size get_size_request () const =0
 
virtual Size get_preferred_size () const =0
 
virtual float get_approximate_digit_width () const =0
 
virtual int get_text_height () const =0
 
virtual Size get_pixel_size (const OUString &rText) const =0
 
virtual OString get_buildable_name () const =0
 
virtual void set_buildable_name (const OString &rName)=0
 
virtual OString get_help_id () const =0
 
virtual void set_help_id (const OString &rName)=0
 
virtual void set_grid_left_attach (int nAttach)=0
 
virtual int get_grid_left_attach () const =0
 
virtual void set_grid_width (int nCols)=0
 
virtual void set_grid_top_attach (int nAttach)=0
 
virtual int get_grid_top_attach () const =0
 
virtual void set_hexpand (bool bExpand)=0
 
virtual bool get_hexpand () const =0
 
virtual void set_vexpand (bool bExpand)=0
 
virtual bool get_vexpand () const =0
 
virtual void set_margin_top (int nMargin)=0
 
virtual void set_margin_bottom (int nMargin)=0
 
virtual void set_margin_start (int nMargin)=0
 
virtual void set_margin_end (int nMargin)=0
 
virtual int get_margin_top () const =0
 
virtual int get_margin_bottom () const =0
 
virtual int get_margin_start () const =0
 
virtual int get_margin_end () const =0
 
virtual bool get_extents_relative_to (const Widget &rRelative, int &x, int &y, int &width, int &height) const =0
 
virtual void set_accessible_name (const OUString &rName)=0
 
virtual void set_accessible_description (const OUString &rDescription)=0
 
virtual OUString get_accessible_name () const =0
 
virtual OUString get_accessible_description () const =0
 
virtual void set_accessible_relation_labeled_by (weld::Widget *pLabel)=0
 
virtual void set_tooltip_text (const OUString &rTip)=0
 
virtual OUString get_tooltip_text () const =0
 
virtual void set_cursor_data (void *pData)=0
 
virtual void connect_focus_in (const Link< Widget &, void > &rLink)
 
virtual void connect_focus_out (const Link< Widget &, void > &rLink)
 
virtual void connect_mnemonic_activate (const Link< Widget &, bool > &rLink)
 
virtual void connect_size_allocate (const Link< const Size &, void > &rLink)
 
virtual void connect_key_press (const Link< const KeyEvent &, bool > &rLink)
 
virtual void connect_key_release (const Link< const KeyEvent &, bool > &rLink)
 
virtual void connect_mouse_press (const Link< const MouseEvent &, bool > &rLink)
 
virtual void connect_mouse_move (const Link< const MouseEvent &, bool > &rLink)
 
virtual void connect_mouse_release (const Link< const MouseEvent &, bool > &rLink)
 
virtual void grab_add ()=0
 
virtual bool has_grab () const =0
 
virtual void grab_remove ()=0
 
virtual vcl::Font get_font ()=0
 
virtual bool get_direction () const =0
 
virtual void set_direction (bool bRTL)=0
 
virtual void freeze ()=0
 
virtual void thaw ()=0
 
virtual void set_busy_cursor (bool bBusy)=0
 
virtual void queue_resize ()=0
 
virtual std::unique_ptr< Containerweld_parent () const =0
 
virtual void help_hierarchy_foreach (const std::function< bool(const OString &)> &func)=0
 
virtual OUString strip_mnemonic (const OUString &rLabel) const =0
 
virtual VclPtr< VirtualDevicecreate_virtual_device () const =0
 
virtual void call_attention_to ()=0
 
virtual void set_stack_background ()=0
 
virtual void set_highlight_background ()=0
 
virtual void set_title_background ()=0
 
virtual void set_toolbar_background ()=0
 
virtual void set_background (const Color &rBackColor)=0
 
virtual css::uno::Reference< css::datatransfer::dnd::XDropTarget > get_drop_target ()=0
 
virtual css::uno::Reference< css::datatransfer::clipboard::XClipboard > get_clipboard () const =0
 
virtual void connect_get_property_tree (const Link< tools::JsonWriter &, void > &rLink)=0
 
virtual void get_property_tree (tools::JsonWriter &rJsonWriter)=0
 
virtual void draw (OutputDevice &rOutput, const Point &rPos, const Size &rSizePixel)=0
 
virtual ~Widget ()
 

Protected Member Functions

void signal_changed ()
 
virtual void signal_popup_toggled ()
 
void signal_custom_render (vcl::RenderContext &rDevice, const tools::Rectangle &rRect, bool bSelected, const OUString &rId)
 
Size signal_custom_get_size (vcl::RenderContext &rDevice)
 

Protected Attributes

Link< ComboBox &, void > m_aChangeHdl
 
Link< ComboBox &, void > m_aPopupToggledHdl
 
Link< ComboBox &, bool > m_aEntryActivateHdl
 
Link< OUString &, bool > m_aEntryInsertTextHdl
 
Link< render_args, void > m_aRenderHdl
 
Link< vcl::RenderContext &, Sizem_aGetSizeHdl
 
- Protected Attributes inherited from weld::Widget
Link< Widget &, void > m_aFocusInHdl
 
Link< Widget &, void > m_aFocusOutHdl
 
Link< Widget &, bool > m_aMnemonicActivateHdl
 
Link< const Size &, void > m_aSizeAllocateHdl
 
Link< const KeyEvent &, bool > m_aKeyPressHdl
 
Link< const KeyEvent &, bool > m_aKeyReleaseHdl
 
Link< const MouseEvent &, bool > m_aMousePressHdl
 
Link< const MouseEvent &, bool > m_aMouseMotionHdl
 
Link< const MouseEvent &, bool > m_aMouseReleaseHdl
 

Private Attributes

OUString m_sSavedValue
 
std::vector< OUString > m_aSavedValues
 

Friends

class ::LOKTrigger
 

Detailed Description

A widget used to choose from a list of items.

Definition at line 697 of file weld.hxx.

Member Typedef Documentation

◆ render_args

typedef std::tuple<vcl::RenderContext&, const tools::Rectangle&, bool, const OUString&> weld::ComboBox::render_args

Definition at line 706 of file weld.hxx.

Member Function Documentation

◆ append() [1/4]

void weld::ComboBox::append ( const OUString &  rId,
const OUString &  rStr 
)
inline

Definition at line 741 of file weld.hxx.

◆ append() [2/4]

void weld::ComboBox::append ( const OUString &  rId,
const OUString &  rStr,
const OUString &  rImage 
)
inline

Definition at line 745 of file weld.hxx.

◆ append() [3/4]

void weld::ComboBox::append ( const OUString &  rId,
const OUString &  rStr,
VirtualDevice rImage 
)
inline

Definition at line 749 of file weld.hxx.

◆ append() [4/4]

void weld::ComboBox::append ( int  pos,
const OUString &  rId,
const OUString &  rStr 
)
inline

Definition at line 753 of file weld.hxx.

References pos.

◆ append_separator()

void weld::ComboBox::append_separator ( const OUString &  rId)
inline

Definition at line 758 of file weld.hxx.

◆ append_text()

void weld::ComboBox::append_text ( const OUString &  rStr)
inline

Definition at line 740 of file weld.hxx.

◆ changed_by_direct_pick()

virtual bool weld::ComboBox::changed_by_direct_pick ( ) const
pure virtual

◆ clear()

virtual void weld::ComboBox::clear ( )
pure virtual

◆ connect_changed()

void weld::ComboBox::connect_changed ( const Link< ComboBox &, void > &  rLink)
inline

Definition at line 791 of file weld.hxx.

◆ connect_custom_get_size()

void weld::ComboBox::connect_custom_get_size ( const Link< vcl::RenderContext &, Size > &  rLink)
inline

Definition at line 852 of file weld.hxx.

◆ connect_custom_render()

void weld::ComboBox::connect_custom_render ( const Link< render_args, void > &  rLink)
inline

Definition at line 856 of file weld.hxx.

◆ connect_entry_activate()

void weld::ComboBox::connect_entry_activate ( const Link< ComboBox &, bool > &  rLink)
inline

Definition at line 830 of file weld.hxx.

◆ connect_entry_insert_text()

void weld::ComboBox::connect_entry_insert_text ( const Link< OUString &, bool > &  rLink)
inline

Definition at line 824 of file weld.hxx.

◆ connect_popup_toggled()

virtual void weld::ComboBox::connect_popup_toggled ( const Link< ComboBox &, void > &  rLink)
inlinevirtual

Definition at line 795 of file weld.hxx.

Referenced by SalInstanceComboBox< vcl_type >::connect_popup_toggled().

◆ copy_entry_clipboard()

virtual void weld::ComboBox::copy_entry_clipboard ( )
pure virtual

◆ create_render_virtual_device()

virtual VclPtr< VirtualDevice > weld::ComboBox::create_render_virtual_device ( ) const
pure virtual

◆ cut_entry_clipboard()

virtual void weld::ComboBox::cut_entry_clipboard ( )
pure virtual

◆ find_id()

virtual int weld::ComboBox::find_id ( const OUString &  rId) const
pure virtual

◆ find_text()

virtual int weld::ComboBox::find_text ( const OUString &  rStr) const
pure virtual

◆ get_active()

virtual int weld::ComboBox::get_active ( ) const
pure virtual

◆ get_active_id()

virtual OUString weld::ComboBox::get_active_id ( ) const
pure virtual

◆ get_active_text()

virtual OUString weld::ComboBox::get_active_text ( ) const
pure virtual

◆ get_count()

virtual int weld::ComboBox::get_count ( ) const
pure virtual

◆ get_entry_font()

virtual vcl::Font weld::ComboBox::get_entry_font ( )
pure virtual

◆ get_entry_selection_bounds()

virtual bool weld::ComboBox::get_entry_selection_bounds ( int rStartPos,
int rEndPos 
)
pure virtual

◆ get_id()

virtual OUString weld::ComboBox::get_id ( int  pos) const
pure virtual

◆ get_max_mru_count()

virtual int weld::ComboBox::get_max_mru_count ( ) const
pure virtual

◆ get_menu_button_width()

virtual int weld::ComboBox::get_menu_button_width ( ) const
pure virtual

◆ get_mru_entries()

virtual OUString weld::ComboBox::get_mru_entries ( ) const
pure virtual

◆ get_popup_shown()

virtual bool weld::ComboBox::get_popup_shown ( ) const
pure virtual

◆ get_saved_value()

OUString const & weld::ComboBox::get_saved_value ( ) const
inline

Definition at line 839 of file weld.hxx.

◆ get_saved_values()

OUString const & weld::ComboBox::get_saved_values ( int  pos) const
inline

Definition at line 840 of file weld.hxx.

References pos.

◆ get_text()

virtual OUString weld::ComboBox::get_text ( int  pos) const
pure virtual

◆ get_value_changed_from_saved()

bool weld::ComboBox::get_value_changed_from_saved ( ) const
inline

Definition at line 841 of file weld.hxx.

◆ get_values_changed_from_saved()

bool weld::ComboBox::get_values_changed_from_saved ( ) const
inline

Definition at line 842 of file weld.hxx.

◆ has_entry()

virtual bool weld::ComboBox::has_entry ( ) const
pure virtual

◆ insert()

virtual void weld::ComboBox::insert ( int  pos,
const OUString &  rStr,
const OUString *  pId,
const OUString *  pIconName,
VirtualDevice pImageSurface 
)
pure virtual

◆ insert_separator()

virtual void weld::ComboBox::insert_separator ( int  pos,
const OUString &  rId 
)
pure virtual

◆ insert_text()

void weld::ComboBox::insert_text ( int  pos,
const OUString &  rStr 
)
inline

Definition at line 736 of file weld.hxx.

References pos.

◆ insert_vector()

virtual void weld::ComboBox::insert_vector ( const std::vector< weld::ComboBoxEntry > &  rItems,
bool  bKeepExisting 
)
pure virtual

◆ make_sorted()

virtual void weld::ComboBox::make_sorted ( )
pure virtual

◆ paste_entry_clipboard()

virtual void weld::ComboBox::paste_entry_clipboard ( )
pure virtual

◆ remove()

virtual void weld::ComboBox::remove ( int  pos)
pure virtual

◆ remove_id()

void weld::ComboBox::remove_id ( const OUString &  rId)
inline

Definition at line 782 of file weld.hxx.

References remove().

◆ remove_text()

void weld::ComboBox::remove_text ( const OUString &  rText)
inline

Definition at line 774 of file weld.hxx.

References remove().

◆ removeSavedValues()

void weld::ComboBox::removeSavedValues ( )
inline

Definition at line 849 of file weld.hxx.

◆ save_value()

void weld::ComboBox::save_value ( )
inline

Definition at line 832 of file weld.hxx.

◆ save_values_by_id()

void weld::ComboBox::save_values_by_id ( const OUString &  rId)
inline

Definition at line 834 of file weld.hxx.

◆ select_entry_region()

virtual void weld::ComboBox::select_entry_region ( int  nStartPos,
int  nEndPos 
)
pure virtual

◆ set_active()

virtual void weld::ComboBox::set_active ( int  pos)
pure virtual

◆ set_active_id()

virtual void weld::ComboBox::set_active_id ( const OUString &  rStr)
pure virtual

◆ set_active_text()

void weld::ComboBox::set_active_text ( const OUString &  rStr)
inline

Definition at line 771 of file weld.hxx.

◆ set_custom_renderer()

virtual void weld::ComboBox::set_custom_renderer ( bool  bOn)
pure virtual

◆ set_entry_completion()

virtual void weld::ComboBox::set_entry_completion ( bool  bEnable,
bool  bCaseSensitive = false 
)
pure virtual

◆ set_entry_editable()

virtual void weld::ComboBox::set_entry_editable ( bool  bEditable)
pure virtual

◆ set_entry_font()

virtual void weld::ComboBox::set_entry_font ( const vcl::Font rFont)
pure virtual

◆ set_entry_max_length()

virtual void weld::ComboBox::set_entry_max_length ( int  nChars)
pure virtual

◆ set_entry_message_type()

virtual void weld::ComboBox::set_entry_message_type ( EntryMessageType  eType)
pure virtual

◆ set_entry_placeholder_text()

virtual void weld::ComboBox::set_entry_placeholder_text ( const OUString &  rText)
pure virtual

◆ set_entry_text()

virtual void weld::ComboBox::set_entry_text ( const OUString &  rStr)
pure virtual

◆ set_entry_width_chars()

virtual void weld::ComboBox::set_entry_width_chars ( int  nChars)
pure virtual

◆ set_font()

virtual void weld::ComboBox::set_font ( const vcl::Font rFont)
pure virtual

◆ set_id()

virtual void weld::ComboBox::set_id ( int  row,
const OUString &  rId 
)
pure virtual

◆ set_item_menu()

virtual void weld::ComboBox::set_item_menu ( const OString &  rIdent,
weld::Menu pMenu 
)
pure virtual

◆ set_max_mru_count()

virtual void weld::ComboBox::set_max_mru_count ( int  nCount)
pure virtual

◆ set_mru_entries()

virtual void weld::ComboBox::set_mru_entries ( const OUString &  rEntries)
pure virtual

◆ signal_changed()

void weld::ComboBox::signal_changed ( )
inlineprotected

Definition at line 716 of file weld.hxx.

References Link< typename Arg, typename Ret >::Call().

Referenced by LOKTrigger::trigger_changed().

◆ signal_custom_get_size()

Size weld::ComboBox::signal_custom_get_size ( vcl::RenderContext rDevice)
inlineprotected

◆ signal_custom_render()

void weld::ComboBox::signal_custom_render ( vcl::RenderContext rDevice,
const tools::Rectangle rRect,
bool  bSelected,
const OUString &  rId 
)
inlineprotected

◆ signal_popup_toggled()

virtual void weld::ComboBox::signal_popup_toggled ( )
inlineprotectedvirtual

Friends And Related Function Documentation

◆ ::LOKTrigger

friend class ::LOKTrigger
friend

Definition at line 714 of file weld.hxx.

Member Data Documentation

◆ m_aChangeHdl

Link<ComboBox&, void> weld::ComboBox::m_aChangeHdl
protected

Definition at line 709 of file weld.hxx.

◆ m_aEntryActivateHdl

Link<ComboBox&, bool> weld::ComboBox::m_aEntryActivateHdl
protected

Definition at line 711 of file weld.hxx.

◆ m_aEntryInsertTextHdl

Link<OUString&, bool> weld::ComboBox::m_aEntryInsertTextHdl
protected

Definition at line 712 of file weld.hxx.

◆ m_aGetSizeHdl

Link<vcl::RenderContext&, Size> weld::ComboBox::m_aGetSizeHdl
protected

Definition at line 727 of file weld.hxx.

◆ m_aPopupToggledHdl

Link<ComboBox&, void> weld::ComboBox::m_aPopupToggledHdl
protected

Definition at line 710 of file weld.hxx.

◆ m_aRenderHdl

Link<render_args, void> weld::ComboBox::m_aRenderHdl
protected

Definition at line 720 of file weld.hxx.

◆ m_aSavedValues

std::vector<OUString> weld::ComboBox::m_aSavedValues
private

Definition at line 701 of file weld.hxx.

◆ m_sSavedValue

OUString weld::ComboBox::m_sSavedValue
private

Definition at line 700 of file weld.hxx.


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