v_sim.UiColorCombobox¶
- Subclasses:
 None
Methods¶
- Inherited:
 Gtk.ComboBox (40), Gtk.Bin (1), Gtk.Container (35), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10), Gtk.CellEditable (3), Gtk.CellLayout (9)
- Structs:
 Gtk.ContainerClass (5), Gtk.WidgetClass (12), GObject.ObjectClass (5)
class  | 
  | 
class  | 
  | 
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
Virtual Methods¶
Properties¶
Name  | 
Type  | 
Flags  | 
Short Description  | 
|---|---|---|---|
r/w  | 
color of the current selection  | 
||
r/w  | 
material of the current selection  | 
Style Properties¶
- Inherited:
 
Signals¶
- Inherited:
 Gtk.ComboBox (5), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1), Gtk.CellEditable (2)
Name  | 
Short Description  | 
|---|---|
This signal is emitted when a new valid colour is selected, either an existing one or newly created one.  | 
|
This signal is emitted when the range of a colour is modified.  | 
|
This signal is emitted when the range of a material is modified.  | 
Fields¶
Class Details¶
- class v_sim.UiColorCombobox(**kwargs)¶
 - Bases:
 - Abstract:
 No
- Structure:
 
Private structure to store informations of a
v_sim.UiColorComboboxobject.New in version 3.1.
- classmethod new(hasAlphaChannel)¶
 - Parameters:
 hasAlphaChannel (
bool) – a boolean.- Returns:
 a newly created
v_sim.UiColorComboboxwidget.- Return type:
 
A
v_sim.UiColorComboboxwidget is like aGtk.ComboBoxwidget, but it is already filled with the colors stores in the structures adhoc in visu_tools.h. Using this widget is a convienient way to share colors between all part of V_Sim and to give a consistent look of all color selection. If the argument hasAlphaChannel isFalse, the widget display all colors but without their alpha channel, assuming it to be fully opaque.New in version 3.1.
- classmethod newWithRanges(hasAlphaChannel)¶
 - Parameters:
 hasAlphaChannel (
bool) – a boolean.- Returns:
 a newly created
v_sim.UiColorComboboxwidget.- Return type:
 
Create a color combo and several ranges.
New in version 3.3.
- getPixbufFromColor(color)¶
 - Parameters:
 color (
v_sim.Color) – av_sim.Colorobject.- Returns:
 a pixbuf pointer corresponding to the little image shown on the self.
- Return type:
 
The self has little pixbufs to represent the color. User methods can use these pixbufs but should considered them read-only.
New in version 3.1.
- getRangeColor()¶
 - 
If the self uses ranges (see
v_sim.UiColorCombobox.newWithRanges()), this method is used to get the values from the color ranges.New in version 3.2.
 
- getRangeMaterial()¶
 - Returns:
 a newly created array of size
v_sim.MaterialIds.N_VALUES(seev_sim.MaterialIds). UseGLib.free() to delete it.- Return type:
 [
float]
If the self uses ranges (see
v_sim.UiColorCombobox.newWithRanges()), this method is used to get the values from the material ranges.New in version 3.3.
- getRangeWidgets()¶
 - Returns:
 a widget owned by color.
- Return type:
 
Retrieve the wiodget using to represent the ranges, or
Noneif the object has no ranges.New in version 3.3.
- getSelection()¶
 - Returns:
 a pointer to the selected
v_sim.Colorobject (orNone). This object is read-only.- Return type:
 
The user can access to the selected
v_sim.Colorobject using this method.New in version 3.1.
- setExpanded(value)¶
 - Parameters:
 value (
bool) – a boolean value.
Set the expanded state of the ranges. This is usable only if the colorComboBox has been created with ranges.
New in version 3.3.
- setPrintValues(value)¶
 - Parameters:
 value (
bool) – a boolean.
Print or not the RGB values.
New in version 3.4.
- setRangeColor(rgba, raiseSignal)¶
 - Parameters:
 
Change the values for the ranges that control the color. If the color exists in the list, it is also selected. This is possible only if the self has been created with
v_sim.UiColorCombobox.newWithRanges().New in version 3.3.
- setRangeMaterial(material, raiseSignal)¶
 - Parameters:
 material (
float) –v_sim.MaterialIds.N_VALUES(seev_sim.MaterialIds) floating point values ;raiseSignal (
bool) – ifTruea material-value-changed can be raised.
Change the values for the ranges that control the light (emission, diffuse…). This is possible only if the self has been created with
v_sim.UiColorCombobox.newWithRanges().New in version 3.3.
- setSelection(color)¶
 - Parameters:
 color (
v_sim.Color) – av_sim.Colorobject.- Returns:
 Trueif the color already exists in the model.- Return type:
 
Use this method to set the ComboBox on the given color. This emits a ‘color-channel’ signal if the color is changed, which means, a previous color has been modified, or a new color is selected.
New in version 3.1.
Signal Details¶
- v_sim.UiColorCombobox.signals.color_selected(ui_color_combobox, color)¶
 - Signal Name:
 color-selected- Flags:
 - Parameters:
 ui_color_combobox (
v_sim.UiColorCombobox) – The object which received the signalcolor (
objectorNone) – the newly selectedv_sim.Color.
This signal is emitted when a new valid colour is selected, either an existing one or newly created one.
New in version 3.1.
- v_sim.UiColorCombobox.signals.color_value_changed(ui_color_combobox, RGBA)¶
 - Signal Name:
 color-value-changed- Flags:
 - Parameters:
 ui_color_combobox (
v_sim.UiColorCombobox) – The object which received the signalRGBA (
int) – the modified channel.
This signal is emitted when the range of a colour is modified.
New in version 3.3.
- v_sim.UiColorCombobox.signals.material_value_changed(ui_color_combobox, mat)¶
 - Signal Name:
 material-value-changed- Flags:
 - Parameters:
 ui_color_combobox (
v_sim.UiColorCombobox) – The object which received the signalmat (
int) – the modified material channel (seev_sim.MaterialIds).
This signal is emitted when the range of a material is modified.
New in version 3.3.
Property Details¶
- v_sim.UiColorCombobox.props.color¶
 - Name:
 color- Type:
 - Default Value:
 - Flags:
 
color of the current selection