BioGTK  6.5.0
A .NET library & program for annotating, editing various microscopy imaging formats using Bioformats supported images. Including whole slide, pyramidal, and series.
Loading...
Searching...
No Matches
BioGTK.ComboPicker Class Reference
Inheritance diagram for BioGTK.ComboPicker:

Static Public Member Functions

static ComboPicker Create (string[] sts)
 
static ComboPicker Create (string l, string[] sts)
 
static ComboPicker Create (Type ems)
 

Protected Member Functions

 ComboPicker (Builder builder, IntPtr handle, Type ems)
 
 ComboPicker (Builder builder, IntPtr handle, string[] sts)
 
 ComboPicker (Builder builder, IntPtr handle, string l, string[] sts)
 

Properties

int SelectedIndex [get]
 

Detailed Description

Definition at line 11 of file ComboPicker.cs.

Constructor & Destructor Documentation

◆ ComboPicker() [1/3]

BioGTK.ComboPicker.ComboPicker ( Builder builder,
IntPtr handle,
Type ems )
protected

Definition at line 59 of file ComboPicker.cs.

59 : base(handle)
60 {
61 _builder = builder;
62 builder.Autoconnect(this);
63 okBut.ButtonPressEvent += OkBut_ButtonPressEvent;
64 cancelBut.ButtonPressEvent += CancelBut_ButtonPressEvent;
65 ens = ems;
66 List<string> sts = new List<string>();
67 Array ar = Enum.GetValues(ems);
68 foreach (Enum s in ar)
69 {
70 sts.Add(s.ToString());
71 }
72 var states = new ListStore(typeof(string));
73 //We add button states to buttonState box.
74 foreach (string val in sts)
75 {
76 states.AppendValues(val);
77 }
78 // Set the model for the ComboBox
79 comboBox.Model = states;
80 // Set the text column to display
81 var renderer2 = new CellRendererText();
82 comboBox.PackStart(renderer2, false);
83 comboBox.AddAttribute(renderer2, "text", 0);
84 comboBox.Active = 0;
85 App.ApplyStyles(this);
86 }

◆ ComboPicker() [2/3]

BioGTK.ComboPicker.ComboPicker ( Builder builder,
IntPtr handle,
string[] sts )
protected

Definition at line 88 of file ComboPicker.cs.

88 : base(handle)
89 {
90 _builder = builder;
91 builder.Autoconnect(this);
92 okBut.ButtonPressEvent += OkBut_ButtonPressEvent;
93 cancelBut.ButtonPressEvent += CancelBut_ButtonPressEvent;
94 var states = new ListStore(typeof(string));
95 //We add button states to buttonState box.
96 foreach (string val in sts)
97 {
98 states.AppendValues(val);
99 }
100 // Set the model for the ComboBox
101 comboBox.Model = states;
102 // Set the text column to display
103 var renderer2 = new CellRendererText();
104 comboBox.PackStart(renderer2, false);
105 comboBox.AddAttribute(renderer2, "text", 0);
106 comboBox.Active = 0;
107 App.ApplyStyles(this);
108 }

◆ ComboPicker() [3/3]

BioGTK.ComboPicker.ComboPicker ( Builder builder,
IntPtr handle,
string l,
string[] sts )
protected

Definition at line 110 of file ComboPicker.cs.

110 : base(handle)
111 {
112 _builder = builder;
113 builder.Autoconnect(this);
114 okBut.ButtonPressEvent += OkBut_ButtonPressEvent;
115 cancelBut.ButtonPressEvent += CancelBut_ButtonPressEvent;
116 var states = new ListStore(typeof(string));
117 //We add button states to buttonState box.
118 foreach (string val in sts)
119 {
120 states.AppendValues(val);
121 }
122 // Set the model for the ComboBox
123 comboBox.Model = states;
124 // Set the text column to display
125 var renderer2 = new CellRendererText();
126 comboBox.PackStart(renderer2, false);
127 comboBox.AddAttribute(renderer2, "text", 0);
128 comboBox.Active = 0;
129 App.ApplyStyles(this);
130 }

Member Function Documentation

◆ Create() [1/3]

static ComboPicker BioGTK.ComboPicker.Create ( string l,
string[] sts )
static

It creates a new ComboPicker object, which is a Gtk.Window, and returns it

Returns
A new instance of the ComboPicker class.

Definition at line 44 of file ComboPicker.cs.

45 {
46 Builder builder = new Builder(new FileStream(System.IO.Path.GetDirectoryName(Environment.ProcessPath) + "/" + "Glade/ComboPicker.glade", FileMode.Open));
47 return new ComboPicker(builder, builder.GetObject("comboPicker").Handle,l, sts);
48 }

◆ Create() [2/3]

static ComboPicker BioGTK.ComboPicker.Create ( string[] sts)
static

It creates a new ComboPicker object, which is a Gtk.Window, and returns it

Returns
A new instance of the ComboPicker class.

Definition at line 35 of file ComboPicker.cs.

36 {
37 Builder builder = new Builder(new FileStream(System.IO.Path.GetDirectoryName(Environment.ProcessPath) + "/" + "Glade/ComboPicker.glade", FileMode.Open));
38 return new ComboPicker(builder, builder.GetObject("comboPicker").Handle, sts);
39 }

◆ Create() [3/3]

static ComboPicker BioGTK.ComboPicker.Create ( Type ems)
static

It creates a new ComboPicker object, which is a Gtk.Window, and returns it

Returns
A new instance of the ComboPicker class.

Definition at line 53 of file ComboPicker.cs.

54 {
55 Builder builder = new Builder(new FileStream(System.IO.Path.GetDirectoryName(Environment.ProcessPath) + "/" + "Glade/ComboPicker.glade", FileMode.Open));
56 return new ComboPicker(builder, builder.GetObject("comboPicker").Handle, ems);
57 }

Property Documentation

◆ SelectedIndex

int BioGTK.ComboPicker.SelectedIndex
get

Definition at line 149 of file ComboPicker.cs.

150 {
151 get { return comboBox.Active; }
152 }

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