summaryrefslogtreecommitdiffstats
path: root/os-plugins/plugins/vmchooser/src/vmchooser/SWindow.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'os-plugins/plugins/vmchooser/src/vmchooser/SWindow.cxx')
-rw-r--r--os-plugins/plugins/vmchooser/src/vmchooser/SWindow.cxx65
1 files changed, 65 insertions, 0 deletions
diff --git a/os-plugins/plugins/vmchooser/src/vmchooser/SWindow.cxx b/os-plugins/plugins/vmchooser/src/vmchooser/SWindow.cxx
new file mode 100644
index 00000000..d37fb01e
--- /dev/null
+++ b/os-plugins/plugins/vmchooser/src/vmchooser/SWindow.cxx
@@ -0,0 +1,65 @@
+
+#include "inc/SWindow.h"
+#include <iostream>
+
+using namespace fltk;
+using namespace std;
+
+void SWindow::cb_return()
+{
+ // TODO start something
+ cout << " Pressed Button!" << endl;
+}
+
+
+void SWindow::cb_select()
+{
+ if (sel.item_is_parent() )
+ {
+ sel.set_item_opened(true);
+ }
+}
+
+
+void SWindow::cb_info()
+{
+}
+
+void SWindow::set_lin_entries(DataEntry** ent)
+{
+ this->lin_ent = ent;
+ lin_entgroup = (ItemGroup*) sel.add_group("------- LINUX DESKTOP ------");
+ for (int i=0; ent[i] != NULL; i++)
+ {
+ sel.add_leaf(ent[i]->short_description.c_str() , lin_entgroup, (void*)ent[i] );
+ }
+
+ lin_entgroup->end();
+}
+
+void SWindow::set_entries(DataEntry** ent)
+{
+ this->ent = ent;
+
+ entgroup = (ItemGroup*)sel.add_group("-------- VMWARE ----------");
+ for (int i=0; ent[i] != NULL; i++)
+ {
+ sel.add_leaf(ent[i]->short_description.c_str(), lin_entgroup, (void*)ent[i] );
+ }
+ for (int c=0; c < 5; c++)
+ {
+ sel.add_leaf("Blubber 1", entgroup);
+ }
+ entgroup->end();
+}
+
+
+void SWindow::free_entries()
+{
+ for (int i=0; ent[i] != NULL; i++)
+ {
+ free(ent[i]);
+ }
+ free(ent);
+}
+