CFx SDK Documentation 2026 SP0
Loading...
Searching...
No Matches
FxUIComboBox.h
Go to the documentation of this file.
1//
2// (C) Copyright 2005-2025 by Graebert GmbH.
3//
4// Permission to use, copy, modify, and distribute this software in
5// object code form for any purpose and without fee is hereby granted,
6// provided that the above copyright notice appears in all copies and
7// that both that copyright notice and the limited warranty and
8// restricted rights notice below appear in all supporting
9// documentation.
10//
11// GRAEBERT PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
12// GRAEBERT SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
13// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. GRAEBERT GMBH
14// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
15// UNINTERRUPTED OR ERROR FREE.
16
17
18#pragma once
19
20#include "FxUIBaseView.h"
21#include "FxUIEnum.h"
22#include "../Core/FxUIIcon.h"
23#include "../Core/FxUIVariant.h"
24
25#if defined( XENON )
26namespace Wt
27{
28 class WValidator;
29}
30
31using CFxUIValidator = Wt::WValidator;
32#else
33class QValidator;
34using CFxUIValidator = QValidator;
35#endif
36
41{
42public:
57
60
63
67 void clear();
68
76 void addItem( const CFxUIString & text, const CFxUIVariant & userData = CFxUIVariant() );
77
78
88 void addItem( const CFxUIIcon & icon, const CFxUIString & text, const CFxUIVariant & userData = CFxUIVariant() );
89
97 void insertItems( int index, const CFxUIStringList & list );
98
110 void insertItem( int index, const CFxUIString & text, const CFxUIVariant & userData = CFxUIVariant() );
111
125 void insertItem( int index, const CFxUIIcon & icon, const CFxUIString & text, const CFxUIVariant & userData = CFxUIVariant() );
126
132 void removeItem( int index );
133
141
149 void setItemText(int index, const CFxUIString & text);
150
158 void setItemIcon( int index, const CFxUIIcon & icon );
159
165 void setEditText(const CFxUIString & text);
166
172 int count() const;
173
179
189
191
202
211
217 void setCurrentText( const CFxUIString& text );
218
225
228 FxUIMatchFlag flags = static_cast<FxUIMatchFlag>( FxUIMatchFlag ::MatchExactly |
229 FxUIMatchFlag ::MatchCaseSensitive ) ) const;
230 int findText( const CFxUIString& text,
231 FxUIMatchFlag flags = static_cast<FxUIMatchFlag>( FxUIMatchFlag ::MatchExactly |
232 FxUIMatchFlag ::MatchCaseSensitive ) ) const;
233
239 void setCurrentIndex( int iIndex );
240
246 int currentIndex() const;
247
248 void setHideEmptyText( bool );
249
255 bool isEditable() const;
256
262 void setEditable( bool );
263
270
277
284
290 void setMaxVisibleItems( int Value );
291
296
301
306
311
316
317 //...
318};
319
#define COMMONUI_API
QValidator CFxUIValidator
FxUIMatchFlag
Definition FxUIEnum.h:59
@ UserRole
Definition FxUIEnum.h:49
CFxStringArray CFxUIStringList
CFxString CFxUIString
int currentIndex() const
int findData(const CFxUIVariant &data, int role=FxUIItemDataRole::UserRole, FxUIMatchFlag flags=static_cast< FxUIMatchFlag >(FxUIMatchFlag ::MatchExactly|FxUIMatchFlag ::MatchCaseSensitive)) const
CFxUISignal< void(int)> & activated()
void setEditText(const CFxUIString &text)
void setEditable(bool)
void setInsertPolicy(CFxUIComboBox::InsertPolicy)
int count() const
void clearEditText()
CFxUIVariant itemData(int index, int role=FxUIItemDataRole::UserRole) const
CFxUISignal< void(int)> & currentIndexChanged()
void setHideEmptyText(bool)
void setItemData(int index, const CFxUIVariant &data, int role=FxUIItemDataRole::UserRole)
void setValidator(const CFxUIValidator *)
CFxUISignal< void(const CFxUIString &)> & currentStringChanged()
CFxUISignal< void(void)> & editingFinished()
int findText(const CFxUIString &text, FxUIMatchFlag flags=static_cast< FxUIMatchFlag >(FxUIMatchFlag ::MatchExactly|FxUIMatchFlag ::MatchCaseSensitive)) const
void removeItem(int index)
void setCurrentIndex(int iIndex)
void insertItem(int index, const CFxUIIcon &icon, const CFxUIString &text, const CFxUIVariant &userData=CFxUIVariant())
void setCurrentText(const CFxUIString &text)
void insertItems(int index, const CFxUIStringList &list)
void setIconSize(CFxUISize size)
void setItemIcon(int index, const CFxUIIcon &icon)
CFxUIString itemText(int index) const
CFxUIString currentText() const
void setItemText(int index, const CFxUIString &text)
void setMaxVisibleItems(int Value)
void insertItem(int index, const CFxUIString &text, const CFxUIVariant &userData=CFxUIVariant())
CFxUISignal< void(const CFxUIString &)> & editTextChanged()
@ InsertAfterCurrent
The string is inserted after the current item in the combobox.
@ InsertAtTop
The string will be inserted as the first item in the combobox.
@ InsertAlphabetically
The string is inserted in the alphabetic order in the combobox.
@ InsertAtBottom
The string will be inserted after the last item in the combobox.
@ InsertAtCurrent
The current item will be replaced by the string.
@ InsertBeforeCurrent
The string is inserted before the current item in the combobox.
@ NoInsert
The string will not be inserted into the combobox.
bool isEditable() const
void addItem(const CFxUIString &text, const CFxUIVariant &userData=CFxUIVariant())
void addItem(const CFxUIIcon &icon, const CFxUIString &text, const CFxUIVariant &userData=CFxUIVariant())
GLsizeiptr size
Definition gles2_ext.h:182
typedef void(APIENTRYP PFNGLACTIVETEXTUREPROC)(GLenum texture)
GLint GLenum GLsizei GLsizei GLint GLsizei const void * data
Definition gles2_ext.h:110
GLuint index
Definition gles2_ext.h:265
Definition FxString.h:30