2003-10-30 Daniel Kornhauser Eisenberg <dkor@alum.mit.edu>
* sample/GtkDemo/DemoApplicationWindow.cs : New sample, Unfinished, 5% Done
* sample/GtkDemo/DemoButtonBox.cs : New sample,
* sample/GtkDemo/DemoColorSelection.cs : New sample,
* sample/GtkDemo/DemoDialog.cs : New sample,
* sample/GtkDemo/DemoDrawingArea.cs : New sample,
* sample/GtkDemo/DemoEditableCells.cs : New sample, Needs clean up
* sample/GtkDemo/DemoImages.cs : New sample, Unfinished, 75% Done
* sample/GtkDemo/DemoItemFactory.cs : New sample, Unfinished, 5% Done
* sample/GtkDemo/DemoListStore.cs : New sample,
* sample/GtkDemo/DemoMain.cs : New sample, Unifnished, 60% Done
* sample/GtkDemo/DemoMenus.cs : New sample,
* sample/GtkDemo/DemoPanes.cs : New sample,
* sample/GtkDemo/DemoPixbuf.cs : New sample, Needs clean up
* sample/GtkDemo/DemoSizeGroup.cs : New sample,
* sample/GtkDemo/DemoStockBrowser.cs : New sample, Unfinished, 20% Done
* sample/GtkDemo/DemoTextView.cs : New sample, Unfinished, 99% Done
* sample/GtkDemo/DemoTreeStore.cs : New sample, Unfinished, 95% Done
* sample/GtkDemo/images : Several Images for the samples
* sample/GtkDemo/Makefile : Very simple Makefile
* sample/GtkDemo/README : Mentions explicitely unfinished state of port
svn path=/trunk/gtk-sharp/; revision=19489
2003-10-30 23:57:41 +00:00
|
|
|
//
|
|
|
|
// DemoTreeItem.cs, port of tree_store.c from gtk-demo
|
|
|
|
//
|
|
|
|
// Author: Daniel Kornhauser <dkor@alum.mit.edu>
|
|
|
|
//
|
|
|
|
// Copyright (C) 2003, Ximian Inc.
|
|
|
|
|
|
|
|
/* Tree View/Tree Store
|
|
|
|
*
|
|
|
|
* The Gtk.TreeStore is used to store data in tree form, to be
|
|
|
|
* used later on by a Gtk.TreeView to display it. This demo builds
|
|
|
|
* a simple Gtk.TreeStore and displays it. If you're new to the
|
|
|
|
* Gtk.TreeView widgets and associates, look into the Gtk.ListStore
|
|
|
|
* example first.
|
|
|
|
*/
|
|
|
|
|
|
|
|
using System;
|
|
|
|
using System.Collections;
|
|
|
|
|
|
|
|
using Gtk;
|
|
|
|
using GLib;
|
|
|
|
|
|
|
|
namespace GtkDemo
|
|
|
|
{
|
2004-12-12 22:11:44 +00:00
|
|
|
[Demo ("TreeStore", "DemoTreeStore.cs", "Tree View")]
|
2004-08-07 17:06:29 +00:00
|
|
|
public class DemoTreeStore : Gtk.Window
|
2003-10-30 Daniel Kornhauser Eisenberg <dkor@alum.mit.edu>
* sample/GtkDemo/DemoApplicationWindow.cs : New sample, Unfinished, 5% Done
* sample/GtkDemo/DemoButtonBox.cs : New sample,
* sample/GtkDemo/DemoColorSelection.cs : New sample,
* sample/GtkDemo/DemoDialog.cs : New sample,
* sample/GtkDemo/DemoDrawingArea.cs : New sample,
* sample/GtkDemo/DemoEditableCells.cs : New sample, Needs clean up
* sample/GtkDemo/DemoImages.cs : New sample, Unfinished, 75% Done
* sample/GtkDemo/DemoItemFactory.cs : New sample, Unfinished, 5% Done
* sample/GtkDemo/DemoListStore.cs : New sample,
* sample/GtkDemo/DemoMain.cs : New sample, Unifnished, 60% Done
* sample/GtkDemo/DemoMenus.cs : New sample,
* sample/GtkDemo/DemoPanes.cs : New sample,
* sample/GtkDemo/DemoPixbuf.cs : New sample, Needs clean up
* sample/GtkDemo/DemoSizeGroup.cs : New sample,
* sample/GtkDemo/DemoStockBrowser.cs : New sample, Unfinished, 20% Done
* sample/GtkDemo/DemoTextView.cs : New sample, Unfinished, 99% Done
* sample/GtkDemo/DemoTreeStore.cs : New sample, Unfinished, 95% Done
* sample/GtkDemo/images : Several Images for the samples
* sample/GtkDemo/Makefile : Very simple Makefile
* sample/GtkDemo/README : Mentions explicitely unfinished state of port
svn path=/trunk/gtk-sharp/; revision=19489
2003-10-30 23:57:41 +00:00
|
|
|
{
|
|
|
|
private TreeStore store;
|
2004-08-07 17:06:29 +00:00
|
|
|
|
|
|
|
public DemoTreeStore () : base ("TreeStore Demo")
|
2003-10-30 Daniel Kornhauser Eisenberg <dkor@alum.mit.edu>
* sample/GtkDemo/DemoApplicationWindow.cs : New sample, Unfinished, 5% Done
* sample/GtkDemo/DemoButtonBox.cs : New sample,
* sample/GtkDemo/DemoColorSelection.cs : New sample,
* sample/GtkDemo/DemoDialog.cs : New sample,
* sample/GtkDemo/DemoDrawingArea.cs : New sample,
* sample/GtkDemo/DemoEditableCells.cs : New sample, Needs clean up
* sample/GtkDemo/DemoImages.cs : New sample, Unfinished, 75% Done
* sample/GtkDemo/DemoItemFactory.cs : New sample, Unfinished, 5% Done
* sample/GtkDemo/DemoListStore.cs : New sample,
* sample/GtkDemo/DemoMain.cs : New sample, Unifnished, 60% Done
* sample/GtkDemo/DemoMenus.cs : New sample,
* sample/GtkDemo/DemoPanes.cs : New sample,
* sample/GtkDemo/DemoPixbuf.cs : New sample, Needs clean up
* sample/GtkDemo/DemoSizeGroup.cs : New sample,
* sample/GtkDemo/DemoStockBrowser.cs : New sample, Unfinished, 20% Done
* sample/GtkDemo/DemoTextView.cs : New sample, Unfinished, 99% Done
* sample/GtkDemo/DemoTreeStore.cs : New sample, Unfinished, 95% Done
* sample/GtkDemo/images : Several Images for the samples
* sample/GtkDemo/Makefile : Very simple Makefile
* sample/GtkDemo/README : Mentions explicitely unfinished state of port
svn path=/trunk/gtk-sharp/; revision=19489
2003-10-30 23:57:41 +00:00
|
|
|
{
|
2004-08-07 17:06:29 +00:00
|
|
|
this.DeleteEvent += new DeleteEventHandler (WindowDelete);
|
2003-10-30 Daniel Kornhauser Eisenberg <dkor@alum.mit.edu>
* sample/GtkDemo/DemoApplicationWindow.cs : New sample, Unfinished, 5% Done
* sample/GtkDemo/DemoButtonBox.cs : New sample,
* sample/GtkDemo/DemoColorSelection.cs : New sample,
* sample/GtkDemo/DemoDialog.cs : New sample,
* sample/GtkDemo/DemoDrawingArea.cs : New sample,
* sample/GtkDemo/DemoEditableCells.cs : New sample, Needs clean up
* sample/GtkDemo/DemoImages.cs : New sample, Unfinished, 75% Done
* sample/GtkDemo/DemoItemFactory.cs : New sample, Unfinished, 5% Done
* sample/GtkDemo/DemoListStore.cs : New sample,
* sample/GtkDemo/DemoMain.cs : New sample, Unifnished, 60% Done
* sample/GtkDemo/DemoMenus.cs : New sample,
* sample/GtkDemo/DemoPanes.cs : New sample,
* sample/GtkDemo/DemoPixbuf.cs : New sample, Needs clean up
* sample/GtkDemo/DemoSizeGroup.cs : New sample,
* sample/GtkDemo/DemoStockBrowser.cs : New sample, Unfinished, 20% Done
* sample/GtkDemo/DemoTextView.cs : New sample, Unfinished, 99% Done
* sample/GtkDemo/DemoTreeStore.cs : New sample, Unfinished, 95% Done
* sample/GtkDemo/images : Several Images for the samples
* sample/GtkDemo/Makefile : Very simple Makefile
* sample/GtkDemo/README : Mentions explicitely unfinished state of port
svn path=/trunk/gtk-sharp/; revision=19489
2003-10-30 23:57:41 +00:00
|
|
|
|
|
|
|
VBox vbox = new VBox (false, 8);
|
|
|
|
vbox.BorderWidth = 8;
|
2004-08-07 17:06:29 +00:00
|
|
|
this.Add (vbox);
|
2003-10-30 Daniel Kornhauser Eisenberg <dkor@alum.mit.edu>
* sample/GtkDemo/DemoApplicationWindow.cs : New sample, Unfinished, 5% Done
* sample/GtkDemo/DemoButtonBox.cs : New sample,
* sample/GtkDemo/DemoColorSelection.cs : New sample,
* sample/GtkDemo/DemoDialog.cs : New sample,
* sample/GtkDemo/DemoDrawingArea.cs : New sample,
* sample/GtkDemo/DemoEditableCells.cs : New sample, Needs clean up
* sample/GtkDemo/DemoImages.cs : New sample, Unfinished, 75% Done
* sample/GtkDemo/DemoItemFactory.cs : New sample, Unfinished, 5% Done
* sample/GtkDemo/DemoListStore.cs : New sample,
* sample/GtkDemo/DemoMain.cs : New sample, Unifnished, 60% Done
* sample/GtkDemo/DemoMenus.cs : New sample,
* sample/GtkDemo/DemoPanes.cs : New sample,
* sample/GtkDemo/DemoPixbuf.cs : New sample, Needs clean up
* sample/GtkDemo/DemoSizeGroup.cs : New sample,
* sample/GtkDemo/DemoStockBrowser.cs : New sample, Unfinished, 20% Done
* sample/GtkDemo/DemoTextView.cs : New sample, Unfinished, 99% Done
* sample/GtkDemo/DemoTreeStore.cs : New sample, Unfinished, 95% Done
* sample/GtkDemo/images : Several Images for the samples
* sample/GtkDemo/Makefile : Very simple Makefile
* sample/GtkDemo/README : Mentions explicitely unfinished state of port
svn path=/trunk/gtk-sharp/; revision=19489
2003-10-30 23:57:41 +00:00
|
|
|
|
2004-08-07 17:06:29 +00:00
|
|
|
vbox.PackStart (new Label ("Jonathan's Holiday Card Planning Sheet"), false, false, 0);
|
2003-10-30 Daniel Kornhauser Eisenberg <dkor@alum.mit.edu>
* sample/GtkDemo/DemoApplicationWindow.cs : New sample, Unfinished, 5% Done
* sample/GtkDemo/DemoButtonBox.cs : New sample,
* sample/GtkDemo/DemoColorSelection.cs : New sample,
* sample/GtkDemo/DemoDialog.cs : New sample,
* sample/GtkDemo/DemoDrawingArea.cs : New sample,
* sample/GtkDemo/DemoEditableCells.cs : New sample, Needs clean up
* sample/GtkDemo/DemoImages.cs : New sample, Unfinished, 75% Done
* sample/GtkDemo/DemoItemFactory.cs : New sample, Unfinished, 5% Done
* sample/GtkDemo/DemoListStore.cs : New sample,
* sample/GtkDemo/DemoMain.cs : New sample, Unifnished, 60% Done
* sample/GtkDemo/DemoMenus.cs : New sample,
* sample/GtkDemo/DemoPanes.cs : New sample,
* sample/GtkDemo/DemoPixbuf.cs : New sample, Needs clean up
* sample/GtkDemo/DemoSizeGroup.cs : New sample,
* sample/GtkDemo/DemoStockBrowser.cs : New sample, Unfinished, 20% Done
* sample/GtkDemo/DemoTextView.cs : New sample, Unfinished, 99% Done
* sample/GtkDemo/DemoTreeStore.cs : New sample, Unfinished, 95% Done
* sample/GtkDemo/images : Several Images for the samples
* sample/GtkDemo/Makefile : Very simple Makefile
* sample/GtkDemo/README : Mentions explicitely unfinished state of port
svn path=/trunk/gtk-sharp/; revision=19489
2003-10-30 23:57:41 +00:00
|
|
|
|
|
|
|
ScrolledWindow scrolledWindow = new ScrolledWindow ();
|
|
|
|
scrolledWindow.ShadowType = ShadowType.EtchedIn;
|
|
|
|
scrolledWindow.SetPolicy (PolicyType.Automatic, PolicyType.Automatic);
|
|
|
|
vbox.PackStart (scrolledWindow, true, true, 0);
|
|
|
|
|
|
|
|
// create model
|
2004-08-07 17:06:29 +00:00
|
|
|
CreateModel ();
|
2003-10-30 Daniel Kornhauser Eisenberg <dkor@alum.mit.edu>
* sample/GtkDemo/DemoApplicationWindow.cs : New sample, Unfinished, 5% Done
* sample/GtkDemo/DemoButtonBox.cs : New sample,
* sample/GtkDemo/DemoColorSelection.cs : New sample,
* sample/GtkDemo/DemoDialog.cs : New sample,
* sample/GtkDemo/DemoDrawingArea.cs : New sample,
* sample/GtkDemo/DemoEditableCells.cs : New sample, Needs clean up
* sample/GtkDemo/DemoImages.cs : New sample, Unfinished, 75% Done
* sample/GtkDemo/DemoItemFactory.cs : New sample, Unfinished, 5% Done
* sample/GtkDemo/DemoListStore.cs : New sample,
* sample/GtkDemo/DemoMain.cs : New sample, Unifnished, 60% Done
* sample/GtkDemo/DemoMenus.cs : New sample,
* sample/GtkDemo/DemoPanes.cs : New sample,
* sample/GtkDemo/DemoPixbuf.cs : New sample, Needs clean up
* sample/GtkDemo/DemoSizeGroup.cs : New sample,
* sample/GtkDemo/DemoStockBrowser.cs : New sample, Unfinished, 20% Done
* sample/GtkDemo/DemoTextView.cs : New sample, Unfinished, 99% Done
* sample/GtkDemo/DemoTreeStore.cs : New sample, Unfinished, 95% Done
* sample/GtkDemo/images : Several Images for the samples
* sample/GtkDemo/Makefile : Very simple Makefile
* sample/GtkDemo/README : Mentions explicitely unfinished state of port
svn path=/trunk/gtk-sharp/; revision=19489
2003-10-30 23:57:41 +00:00
|
|
|
|
|
|
|
// create tree view
|
|
|
|
TreeView treeView = new TreeView (store);
|
|
|
|
treeView.RulesHint = true;
|
|
|
|
TreeSelection treeSelection = treeView.Selection;
|
|
|
|
treeSelection.Mode = SelectionMode.Multiple;
|
|
|
|
AddColumns (treeView);
|
|
|
|
scrolledWindow.Add (treeView);
|
|
|
|
|
2003-11-03 04:40:17 +00:00
|
|
|
// expand all rows after the treeview widget has been realized
|
|
|
|
for (int i = 0; i < 12; i++)
|
|
|
|
{
|
|
|
|
treeView.ExpandRow (new TreePath (i.ToString ()), false);
|
|
|
|
}
|
2003-10-30 Daniel Kornhauser Eisenberg <dkor@alum.mit.edu>
* sample/GtkDemo/DemoApplicationWindow.cs : New sample, Unfinished, 5% Done
* sample/GtkDemo/DemoButtonBox.cs : New sample,
* sample/GtkDemo/DemoColorSelection.cs : New sample,
* sample/GtkDemo/DemoDialog.cs : New sample,
* sample/GtkDemo/DemoDrawingArea.cs : New sample,
* sample/GtkDemo/DemoEditableCells.cs : New sample, Needs clean up
* sample/GtkDemo/DemoImages.cs : New sample, Unfinished, 75% Done
* sample/GtkDemo/DemoItemFactory.cs : New sample, Unfinished, 5% Done
* sample/GtkDemo/DemoListStore.cs : New sample,
* sample/GtkDemo/DemoMain.cs : New sample, Unifnished, 60% Done
* sample/GtkDemo/DemoMenus.cs : New sample,
* sample/GtkDemo/DemoPanes.cs : New sample,
* sample/GtkDemo/DemoPixbuf.cs : New sample, Needs clean up
* sample/GtkDemo/DemoSizeGroup.cs : New sample,
* sample/GtkDemo/DemoStockBrowser.cs : New sample, Unfinished, 20% Done
* sample/GtkDemo/DemoTextView.cs : New sample, Unfinished, 99% Done
* sample/GtkDemo/DemoTreeStore.cs : New sample, Unfinished, 95% Done
* sample/GtkDemo/images : Several Images for the samples
* sample/GtkDemo/Makefile : Very simple Makefile
* sample/GtkDemo/README : Mentions explicitely unfinished state of port
svn path=/trunk/gtk-sharp/; revision=19489
2003-10-30 23:57:41 +00:00
|
|
|
|
2004-08-07 17:06:29 +00:00
|
|
|
this.SetDefaultSize (650, 400);
|
|
|
|
this.ShowAll ();
|
2003-10-30 Daniel Kornhauser Eisenberg <dkor@alum.mit.edu>
* sample/GtkDemo/DemoApplicationWindow.cs : New sample, Unfinished, 5% Done
* sample/GtkDemo/DemoButtonBox.cs : New sample,
* sample/GtkDemo/DemoColorSelection.cs : New sample,
* sample/GtkDemo/DemoDialog.cs : New sample,
* sample/GtkDemo/DemoDrawingArea.cs : New sample,
* sample/GtkDemo/DemoEditableCells.cs : New sample, Needs clean up
* sample/GtkDemo/DemoImages.cs : New sample, Unfinished, 75% Done
* sample/GtkDemo/DemoItemFactory.cs : New sample, Unfinished, 5% Done
* sample/GtkDemo/DemoListStore.cs : New sample,
* sample/GtkDemo/DemoMain.cs : New sample, Unifnished, 60% Done
* sample/GtkDemo/DemoMenus.cs : New sample,
* sample/GtkDemo/DemoPanes.cs : New sample,
* sample/GtkDemo/DemoPixbuf.cs : New sample, Needs clean up
* sample/GtkDemo/DemoSizeGroup.cs : New sample,
* sample/GtkDemo/DemoStockBrowser.cs : New sample, Unfinished, 20% Done
* sample/GtkDemo/DemoTextView.cs : New sample, Unfinished, 99% Done
* sample/GtkDemo/DemoTreeStore.cs : New sample, Unfinished, 95% Done
* sample/GtkDemo/images : Several Images for the samples
* sample/GtkDemo/Makefile : Very simple Makefile
* sample/GtkDemo/README : Mentions explicitely unfinished state of port
svn path=/trunk/gtk-sharp/; revision=19489
2003-10-30 23:57:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
private void ItemToggled (object o, ToggledArgs args)
|
|
|
|
{
|
|
|
|
GLib.Object cellRendererToggle = (GLib.Object) o;
|
2003-11-02 20:57:15 +00:00
|
|
|
int column = (int) cellRendererToggle.Data["column"];
|
|
|
|
|
|
|
|
Gtk.TreeIter iter;
|
2004-08-07 17:06:29 +00:00
|
|
|
if (store.GetIterFromString (out iter, args.Path))
|
2003-11-02 20:57:15 +00:00
|
|
|
{
|
2004-08-07 17:06:29 +00:00
|
|
|
bool val = (bool) store.GetValue (iter, column);
|
|
|
|
Console.WriteLine ("toggled {0} with value {1}", args.Path, !val);
|
|
|
|
store.SetValue (iter, column, !val);
|
2003-11-02 20:57:15 +00:00
|
|
|
}
|
2003-10-30 Daniel Kornhauser Eisenberg <dkor@alum.mit.edu>
* sample/GtkDemo/DemoApplicationWindow.cs : New sample, Unfinished, 5% Done
* sample/GtkDemo/DemoButtonBox.cs : New sample,
* sample/GtkDemo/DemoColorSelection.cs : New sample,
* sample/GtkDemo/DemoDialog.cs : New sample,
* sample/GtkDemo/DemoDrawingArea.cs : New sample,
* sample/GtkDemo/DemoEditableCells.cs : New sample, Needs clean up
* sample/GtkDemo/DemoImages.cs : New sample, Unfinished, 75% Done
* sample/GtkDemo/DemoItemFactory.cs : New sample, Unfinished, 5% Done
* sample/GtkDemo/DemoListStore.cs : New sample,
* sample/GtkDemo/DemoMain.cs : New sample, Unifnished, 60% Done
* sample/GtkDemo/DemoMenus.cs : New sample,
* sample/GtkDemo/DemoPanes.cs : New sample,
* sample/GtkDemo/DemoPixbuf.cs : New sample, Needs clean up
* sample/GtkDemo/DemoSizeGroup.cs : New sample,
* sample/GtkDemo/DemoStockBrowser.cs : New sample, Unfinished, 20% Done
* sample/GtkDemo/DemoTextView.cs : New sample, Unfinished, 99% Done
* sample/GtkDemo/DemoTreeStore.cs : New sample, Unfinished, 95% Done
* sample/GtkDemo/images : Several Images for the samples
* sample/GtkDemo/Makefile : Very simple Makefile
* sample/GtkDemo/README : Mentions explicitely unfinished state of port
svn path=/trunk/gtk-sharp/; revision=19489
2003-10-30 23:57:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
private void AddColumns (TreeView treeView)
|
|
|
|
{
|
|
|
|
// column for holiday names
|
|
|
|
CellRendererText rendererText = new CellRendererText ();
|
|
|
|
rendererText.Xalign = 0.0f;
|
|
|
|
GLib.Object ugly = (GLib.Object) rendererText;
|
|
|
|
ugly.Data ["column"] = Column.HolidayName;
|
2004-08-07 17:06:29 +00:00
|
|
|
TreeViewColumn column = new TreeViewColumn ("Holiday", rendererText,
|
2003-10-30 Daniel Kornhauser Eisenberg <dkor@alum.mit.edu>
* sample/GtkDemo/DemoApplicationWindow.cs : New sample, Unfinished, 5% Done
* sample/GtkDemo/DemoButtonBox.cs : New sample,
* sample/GtkDemo/DemoColorSelection.cs : New sample,
* sample/GtkDemo/DemoDialog.cs : New sample,
* sample/GtkDemo/DemoDrawingArea.cs : New sample,
* sample/GtkDemo/DemoEditableCells.cs : New sample, Needs clean up
* sample/GtkDemo/DemoImages.cs : New sample, Unfinished, 75% Done
* sample/GtkDemo/DemoItemFactory.cs : New sample, Unfinished, 5% Done
* sample/GtkDemo/DemoListStore.cs : New sample,
* sample/GtkDemo/DemoMain.cs : New sample, Unifnished, 60% Done
* sample/GtkDemo/DemoMenus.cs : New sample,
* sample/GtkDemo/DemoPanes.cs : New sample,
* sample/GtkDemo/DemoPixbuf.cs : New sample, Needs clean up
* sample/GtkDemo/DemoSizeGroup.cs : New sample,
* sample/GtkDemo/DemoStockBrowser.cs : New sample, Unfinished, 20% Done
* sample/GtkDemo/DemoTextView.cs : New sample, Unfinished, 99% Done
* sample/GtkDemo/DemoTreeStore.cs : New sample, Unfinished, 95% Done
* sample/GtkDemo/images : Several Images for the samples
* sample/GtkDemo/Makefile : Very simple Makefile
* sample/GtkDemo/README : Mentions explicitely unfinished state of port
svn path=/trunk/gtk-sharp/; revision=19489
2003-10-30 23:57:41 +00:00
|
|
|
"text", Column.HolidayName);
|
2004-08-07 17:06:29 +00:00
|
|
|
treeView.InsertColumn (column, (int) Column.HolidayName);
|
2003-10-30 Daniel Kornhauser Eisenberg <dkor@alum.mit.edu>
* sample/GtkDemo/DemoApplicationWindow.cs : New sample, Unfinished, 5% Done
* sample/GtkDemo/DemoButtonBox.cs : New sample,
* sample/GtkDemo/DemoColorSelection.cs : New sample,
* sample/GtkDemo/DemoDialog.cs : New sample,
* sample/GtkDemo/DemoDrawingArea.cs : New sample,
* sample/GtkDemo/DemoEditableCells.cs : New sample, Needs clean up
* sample/GtkDemo/DemoImages.cs : New sample, Unfinished, 75% Done
* sample/GtkDemo/DemoItemFactory.cs : New sample, Unfinished, 5% Done
* sample/GtkDemo/DemoListStore.cs : New sample,
* sample/GtkDemo/DemoMain.cs : New sample, Unifnished, 60% Done
* sample/GtkDemo/DemoMenus.cs : New sample,
* sample/GtkDemo/DemoPanes.cs : New sample,
* sample/GtkDemo/DemoPixbuf.cs : New sample, Needs clean up
* sample/GtkDemo/DemoSizeGroup.cs : New sample,
* sample/GtkDemo/DemoStockBrowser.cs : New sample, Unfinished, 20% Done
* sample/GtkDemo/DemoTextView.cs : New sample, Unfinished, 99% Done
* sample/GtkDemo/DemoTreeStore.cs : New sample, Unfinished, 95% Done
* sample/GtkDemo/images : Several Images for the samples
* sample/GtkDemo/Makefile : Very simple Makefile
* sample/GtkDemo/README : Mentions explicitely unfinished state of port
svn path=/trunk/gtk-sharp/; revision=19489
2003-10-30 23:57:41 +00:00
|
|
|
|
|
|
|
// alex column
|
|
|
|
CellRendererToggle rendererToggle = new CellRendererToggle ();
|
|
|
|
rendererToggle.Xalign = 0.0f;
|
|
|
|
ugly = (GLib.Object) rendererToggle;
|
|
|
|
ugly.Data ["column"] = Column.Alex;
|
|
|
|
rendererToggle.Toggled += new ToggledHandler (ItemToggled);
|
|
|
|
rendererToggle.Visible = true;
|
|
|
|
rendererToggle.Activatable = true;
|
|
|
|
rendererToggle.Active = true;
|
2004-08-07 17:06:29 +00:00
|
|
|
column = new TreeViewColumn ("Alex", rendererToggle, "active", (int) Column.Alex);
|
2003-10-30 Daniel Kornhauser Eisenberg <dkor@alum.mit.edu>
* sample/GtkDemo/DemoApplicationWindow.cs : New sample, Unfinished, 5% Done
* sample/GtkDemo/DemoButtonBox.cs : New sample,
* sample/GtkDemo/DemoColorSelection.cs : New sample,
* sample/GtkDemo/DemoDialog.cs : New sample,
* sample/GtkDemo/DemoDrawingArea.cs : New sample,
* sample/GtkDemo/DemoEditableCells.cs : New sample, Needs clean up
* sample/GtkDemo/DemoImages.cs : New sample, Unfinished, 75% Done
* sample/GtkDemo/DemoItemFactory.cs : New sample, Unfinished, 5% Done
* sample/GtkDemo/DemoListStore.cs : New sample,
* sample/GtkDemo/DemoMain.cs : New sample, Unifnished, 60% Done
* sample/GtkDemo/DemoMenus.cs : New sample,
* sample/GtkDemo/DemoPanes.cs : New sample,
* sample/GtkDemo/DemoPixbuf.cs : New sample, Needs clean up
* sample/GtkDemo/DemoSizeGroup.cs : New sample,
* sample/GtkDemo/DemoStockBrowser.cs : New sample, Unfinished, 20% Done
* sample/GtkDemo/DemoTextView.cs : New sample, Unfinished, 99% Done
* sample/GtkDemo/DemoTreeStore.cs : New sample, Unfinished, 95% Done
* sample/GtkDemo/images : Several Images for the samples
* sample/GtkDemo/Makefile : Very simple Makefile
* sample/GtkDemo/README : Mentions explicitely unfinished state of port
svn path=/trunk/gtk-sharp/; revision=19489
2003-10-30 23:57:41 +00:00
|
|
|
column.Sizing = TreeViewColumnSizing.Fixed;
|
|
|
|
column.FixedWidth = 50;
|
|
|
|
column.Clickable = true;
|
2004-08-07 17:06:29 +00:00
|
|
|
treeView.InsertColumn (column, (int) Column.Alex);
|
2003-10-30 Daniel Kornhauser Eisenberg <dkor@alum.mit.edu>
* sample/GtkDemo/DemoApplicationWindow.cs : New sample, Unfinished, 5% Done
* sample/GtkDemo/DemoButtonBox.cs : New sample,
* sample/GtkDemo/DemoColorSelection.cs : New sample,
* sample/GtkDemo/DemoDialog.cs : New sample,
* sample/GtkDemo/DemoDrawingArea.cs : New sample,
* sample/GtkDemo/DemoEditableCells.cs : New sample, Needs clean up
* sample/GtkDemo/DemoImages.cs : New sample, Unfinished, 75% Done
* sample/GtkDemo/DemoItemFactory.cs : New sample, Unfinished, 5% Done
* sample/GtkDemo/DemoListStore.cs : New sample,
* sample/GtkDemo/DemoMain.cs : New sample, Unifnished, 60% Done
* sample/GtkDemo/DemoMenus.cs : New sample,
* sample/GtkDemo/DemoPanes.cs : New sample,
* sample/GtkDemo/DemoPixbuf.cs : New sample, Needs clean up
* sample/GtkDemo/DemoSizeGroup.cs : New sample,
* sample/GtkDemo/DemoStockBrowser.cs : New sample, Unfinished, 20% Done
* sample/GtkDemo/DemoTextView.cs : New sample, Unfinished, 99% Done
* sample/GtkDemo/DemoTreeStore.cs : New sample, Unfinished, 95% Done
* sample/GtkDemo/images : Several Images for the samples
* sample/GtkDemo/Makefile : Very simple Makefile
* sample/GtkDemo/README : Mentions explicitely unfinished state of port
svn path=/trunk/gtk-sharp/; revision=19489
2003-10-30 23:57:41 +00:00
|
|
|
|
|
|
|
// havoc column
|
|
|
|
rendererToggle = new CellRendererToggle ();
|
|
|
|
rendererToggle.Xalign = 0.0f;
|
|
|
|
ugly = (GLib.Object) rendererToggle;
|
|
|
|
ugly.Data ["column"] = Column.Havoc;
|
|
|
|
rendererToggle.Toggled += new ToggledHandler (ItemToggled);
|
2004-08-07 17:06:29 +00:00
|
|
|
column = new TreeViewColumn ("Havoc", rendererToggle, "active", (int) Column.Havoc);
|
2003-10-30 Daniel Kornhauser Eisenberg <dkor@alum.mit.edu>
* sample/GtkDemo/DemoApplicationWindow.cs : New sample, Unfinished, 5% Done
* sample/GtkDemo/DemoButtonBox.cs : New sample,
* sample/GtkDemo/DemoColorSelection.cs : New sample,
* sample/GtkDemo/DemoDialog.cs : New sample,
* sample/GtkDemo/DemoDrawingArea.cs : New sample,
* sample/GtkDemo/DemoEditableCells.cs : New sample, Needs clean up
* sample/GtkDemo/DemoImages.cs : New sample, Unfinished, 75% Done
* sample/GtkDemo/DemoItemFactory.cs : New sample, Unfinished, 5% Done
* sample/GtkDemo/DemoListStore.cs : New sample,
* sample/GtkDemo/DemoMain.cs : New sample, Unifnished, 60% Done
* sample/GtkDemo/DemoMenus.cs : New sample,
* sample/GtkDemo/DemoPanes.cs : New sample,
* sample/GtkDemo/DemoPixbuf.cs : New sample, Needs clean up
* sample/GtkDemo/DemoSizeGroup.cs : New sample,
* sample/GtkDemo/DemoStockBrowser.cs : New sample, Unfinished, 20% Done
* sample/GtkDemo/DemoTextView.cs : New sample, Unfinished, 99% Done
* sample/GtkDemo/DemoTreeStore.cs : New sample, Unfinished, 95% Done
* sample/GtkDemo/images : Several Images for the samples
* sample/GtkDemo/Makefile : Very simple Makefile
* sample/GtkDemo/README : Mentions explicitely unfinished state of port
svn path=/trunk/gtk-sharp/; revision=19489
2003-10-30 23:57:41 +00:00
|
|
|
column.Visible = true;
|
|
|
|
rendererToggle.Activatable = true;
|
|
|
|
rendererToggle.Active = true;
|
2004-08-07 17:06:29 +00:00
|
|
|
treeView.InsertColumn (column, (int) Column.Havoc);
|
2003-10-30 Daniel Kornhauser Eisenberg <dkor@alum.mit.edu>
* sample/GtkDemo/DemoApplicationWindow.cs : New sample, Unfinished, 5% Done
* sample/GtkDemo/DemoButtonBox.cs : New sample,
* sample/GtkDemo/DemoColorSelection.cs : New sample,
* sample/GtkDemo/DemoDialog.cs : New sample,
* sample/GtkDemo/DemoDrawingArea.cs : New sample,
* sample/GtkDemo/DemoEditableCells.cs : New sample, Needs clean up
* sample/GtkDemo/DemoImages.cs : New sample, Unfinished, 75% Done
* sample/GtkDemo/DemoItemFactory.cs : New sample, Unfinished, 5% Done
* sample/GtkDemo/DemoListStore.cs : New sample,
* sample/GtkDemo/DemoMain.cs : New sample, Unifnished, 60% Done
* sample/GtkDemo/DemoMenus.cs : New sample,
* sample/GtkDemo/DemoPanes.cs : New sample,
* sample/GtkDemo/DemoPixbuf.cs : New sample, Needs clean up
* sample/GtkDemo/DemoSizeGroup.cs : New sample,
* sample/GtkDemo/DemoStockBrowser.cs : New sample, Unfinished, 20% Done
* sample/GtkDemo/DemoTextView.cs : New sample, Unfinished, 99% Done
* sample/GtkDemo/DemoTreeStore.cs : New sample, Unfinished, 95% Done
* sample/GtkDemo/images : Several Images for the samples
* sample/GtkDemo/Makefile : Very simple Makefile
* sample/GtkDemo/README : Mentions explicitely unfinished state of port
svn path=/trunk/gtk-sharp/; revision=19489
2003-10-30 23:57:41 +00:00
|
|
|
column.Sizing = TreeViewColumnSizing.Fixed;
|
|
|
|
column.FixedWidth = 50;
|
|
|
|
column.Clickable = true;
|
|
|
|
|
|
|
|
// tim column
|
|
|
|
rendererToggle = new CellRendererToggle ();
|
|
|
|
rendererToggle.Xalign = 0.0f;
|
|
|
|
ugly = (GLib.Object) rendererToggle;
|
|
|
|
ugly.Data ["column"] = Column.Tim;
|
|
|
|
rendererToggle.Toggled += new ToggledHandler (ItemToggled);
|
2004-08-07 17:06:29 +00:00
|
|
|
column = new TreeViewColumn ("Tim", rendererToggle, "active", (int) Column.Tim);
|
2003-10-30 Daniel Kornhauser Eisenberg <dkor@alum.mit.edu>
* sample/GtkDemo/DemoApplicationWindow.cs : New sample, Unfinished, 5% Done
* sample/GtkDemo/DemoButtonBox.cs : New sample,
* sample/GtkDemo/DemoColorSelection.cs : New sample,
* sample/GtkDemo/DemoDialog.cs : New sample,
* sample/GtkDemo/DemoDrawingArea.cs : New sample,
* sample/GtkDemo/DemoEditableCells.cs : New sample, Needs clean up
* sample/GtkDemo/DemoImages.cs : New sample, Unfinished, 75% Done
* sample/GtkDemo/DemoItemFactory.cs : New sample, Unfinished, 5% Done
* sample/GtkDemo/DemoListStore.cs : New sample,
* sample/GtkDemo/DemoMain.cs : New sample, Unifnished, 60% Done
* sample/GtkDemo/DemoMenus.cs : New sample,
* sample/GtkDemo/DemoPanes.cs : New sample,
* sample/GtkDemo/DemoPixbuf.cs : New sample, Needs clean up
* sample/GtkDemo/DemoSizeGroup.cs : New sample,
* sample/GtkDemo/DemoStockBrowser.cs : New sample, Unfinished, 20% Done
* sample/GtkDemo/DemoTextView.cs : New sample, Unfinished, 99% Done
* sample/GtkDemo/DemoTreeStore.cs : New sample, Unfinished, 95% Done
* sample/GtkDemo/images : Several Images for the samples
* sample/GtkDemo/Makefile : Very simple Makefile
* sample/GtkDemo/README : Mentions explicitely unfinished state of port
svn path=/trunk/gtk-sharp/; revision=19489
2003-10-30 23:57:41 +00:00
|
|
|
column.Visible = true;
|
|
|
|
rendererToggle.Activatable = true;
|
|
|
|
rendererToggle.Active = true;
|
2004-08-07 17:06:29 +00:00
|
|
|
treeView.InsertColumn (column, (int) Column.Tim);
|
2003-10-30 Daniel Kornhauser Eisenberg <dkor@alum.mit.edu>
* sample/GtkDemo/DemoApplicationWindow.cs : New sample, Unfinished, 5% Done
* sample/GtkDemo/DemoButtonBox.cs : New sample,
* sample/GtkDemo/DemoColorSelection.cs : New sample,
* sample/GtkDemo/DemoDialog.cs : New sample,
* sample/GtkDemo/DemoDrawingArea.cs : New sample,
* sample/GtkDemo/DemoEditableCells.cs : New sample, Needs clean up
* sample/GtkDemo/DemoImages.cs : New sample, Unfinished, 75% Done
* sample/GtkDemo/DemoItemFactory.cs : New sample, Unfinished, 5% Done
* sample/GtkDemo/DemoListStore.cs : New sample,
* sample/GtkDemo/DemoMain.cs : New sample, Unifnished, 60% Done
* sample/GtkDemo/DemoMenus.cs : New sample,
* sample/GtkDemo/DemoPanes.cs : New sample,
* sample/GtkDemo/DemoPixbuf.cs : New sample, Needs clean up
* sample/GtkDemo/DemoSizeGroup.cs : New sample,
* sample/GtkDemo/DemoStockBrowser.cs : New sample, Unfinished, 20% Done
* sample/GtkDemo/DemoTextView.cs : New sample, Unfinished, 99% Done
* sample/GtkDemo/DemoTreeStore.cs : New sample, Unfinished, 95% Done
* sample/GtkDemo/images : Several Images for the samples
* sample/GtkDemo/Makefile : Very simple Makefile
* sample/GtkDemo/README : Mentions explicitely unfinished state of port
svn path=/trunk/gtk-sharp/; revision=19489
2003-10-30 23:57:41 +00:00
|
|
|
column.Sizing = TreeViewColumnSizing.Fixed;
|
|
|
|
column.FixedWidth = 50;
|
|
|
|
column.Clickable = true;
|
|
|
|
|
|
|
|
// owen column
|
|
|
|
rendererToggle = new CellRendererToggle ();
|
|
|
|
rendererToggle.Xalign = 0.0f;
|
|
|
|
ugly = (GLib.Object) rendererToggle;
|
|
|
|
ugly.Data ["column"] = Column.Owen;
|
|
|
|
rendererToggle.Toggled += new ToggledHandler (ItemToggled);
|
2004-08-07 17:06:29 +00:00
|
|
|
column = new TreeViewColumn ("Owen", rendererToggle, "active", (int) Column.Owen);
|
2003-10-30 Daniel Kornhauser Eisenberg <dkor@alum.mit.edu>
* sample/GtkDemo/DemoApplicationWindow.cs : New sample, Unfinished, 5% Done
* sample/GtkDemo/DemoButtonBox.cs : New sample,
* sample/GtkDemo/DemoColorSelection.cs : New sample,
* sample/GtkDemo/DemoDialog.cs : New sample,
* sample/GtkDemo/DemoDrawingArea.cs : New sample,
* sample/GtkDemo/DemoEditableCells.cs : New sample, Needs clean up
* sample/GtkDemo/DemoImages.cs : New sample, Unfinished, 75% Done
* sample/GtkDemo/DemoItemFactory.cs : New sample, Unfinished, 5% Done
* sample/GtkDemo/DemoListStore.cs : New sample,
* sample/GtkDemo/DemoMain.cs : New sample, Unifnished, 60% Done
* sample/GtkDemo/DemoMenus.cs : New sample,
* sample/GtkDemo/DemoPanes.cs : New sample,
* sample/GtkDemo/DemoPixbuf.cs : New sample, Needs clean up
* sample/GtkDemo/DemoSizeGroup.cs : New sample,
* sample/GtkDemo/DemoStockBrowser.cs : New sample, Unfinished, 20% Done
* sample/GtkDemo/DemoTextView.cs : New sample, Unfinished, 99% Done
* sample/GtkDemo/DemoTreeStore.cs : New sample, Unfinished, 95% Done
* sample/GtkDemo/images : Several Images for the samples
* sample/GtkDemo/Makefile : Very simple Makefile
* sample/GtkDemo/README : Mentions explicitely unfinished state of port
svn path=/trunk/gtk-sharp/; revision=19489
2003-10-30 23:57:41 +00:00
|
|
|
column.Visible = true;
|
|
|
|
rendererToggle.Activatable = true;
|
|
|
|
rendererToggle.Active = true;
|
2004-08-07 17:06:29 +00:00
|
|
|
treeView.InsertColumn (column, (int) Column.Owen);
|
2003-10-30 Daniel Kornhauser Eisenberg <dkor@alum.mit.edu>
* sample/GtkDemo/DemoApplicationWindow.cs : New sample, Unfinished, 5% Done
* sample/GtkDemo/DemoButtonBox.cs : New sample,
* sample/GtkDemo/DemoColorSelection.cs : New sample,
* sample/GtkDemo/DemoDialog.cs : New sample,
* sample/GtkDemo/DemoDrawingArea.cs : New sample,
* sample/GtkDemo/DemoEditableCells.cs : New sample, Needs clean up
* sample/GtkDemo/DemoImages.cs : New sample, Unfinished, 75% Done
* sample/GtkDemo/DemoItemFactory.cs : New sample, Unfinished, 5% Done
* sample/GtkDemo/DemoListStore.cs : New sample,
* sample/GtkDemo/DemoMain.cs : New sample, Unifnished, 60% Done
* sample/GtkDemo/DemoMenus.cs : New sample,
* sample/GtkDemo/DemoPanes.cs : New sample,
* sample/GtkDemo/DemoPixbuf.cs : New sample, Needs clean up
* sample/GtkDemo/DemoSizeGroup.cs : New sample,
* sample/GtkDemo/DemoStockBrowser.cs : New sample, Unfinished, 20% Done
* sample/GtkDemo/DemoTextView.cs : New sample, Unfinished, 99% Done
* sample/GtkDemo/DemoTreeStore.cs : New sample, Unfinished, 95% Done
* sample/GtkDemo/images : Several Images for the samples
* sample/GtkDemo/Makefile : Very simple Makefile
* sample/GtkDemo/README : Mentions explicitely unfinished state of port
svn path=/trunk/gtk-sharp/; revision=19489
2003-10-30 23:57:41 +00:00
|
|
|
column.Sizing = TreeViewColumnSizing.Fixed;
|
|
|
|
column.FixedWidth = 50;
|
|
|
|
column.Clickable = true;
|
|
|
|
|
|
|
|
// dave column
|
|
|
|
rendererToggle = new CellRendererToggle ();
|
|
|
|
rendererToggle.Xalign = 0.0f;
|
|
|
|
ugly = (GLib.Object) rendererToggle;
|
|
|
|
ugly.Data ["column"] = Column.Dave;
|
|
|
|
rendererToggle.Toggled += new ToggledHandler (ItemToggled);
|
2004-08-07 17:06:29 +00:00
|
|
|
column = new TreeViewColumn ("Dave", rendererToggle, "active", (int) Column.Dave);
|
2003-10-30 Daniel Kornhauser Eisenberg <dkor@alum.mit.edu>
* sample/GtkDemo/DemoApplicationWindow.cs : New sample, Unfinished, 5% Done
* sample/GtkDemo/DemoButtonBox.cs : New sample,
* sample/GtkDemo/DemoColorSelection.cs : New sample,
* sample/GtkDemo/DemoDialog.cs : New sample,
* sample/GtkDemo/DemoDrawingArea.cs : New sample,
* sample/GtkDemo/DemoEditableCells.cs : New sample, Needs clean up
* sample/GtkDemo/DemoImages.cs : New sample, Unfinished, 75% Done
* sample/GtkDemo/DemoItemFactory.cs : New sample, Unfinished, 5% Done
* sample/GtkDemo/DemoListStore.cs : New sample,
* sample/GtkDemo/DemoMain.cs : New sample, Unifnished, 60% Done
* sample/GtkDemo/DemoMenus.cs : New sample,
* sample/GtkDemo/DemoPanes.cs : New sample,
* sample/GtkDemo/DemoPixbuf.cs : New sample, Needs clean up
* sample/GtkDemo/DemoSizeGroup.cs : New sample,
* sample/GtkDemo/DemoStockBrowser.cs : New sample, Unfinished, 20% Done
* sample/GtkDemo/DemoTextView.cs : New sample, Unfinished, 99% Done
* sample/GtkDemo/DemoTreeStore.cs : New sample, Unfinished, 95% Done
* sample/GtkDemo/images : Several Images for the samples
* sample/GtkDemo/Makefile : Very simple Makefile
* sample/GtkDemo/README : Mentions explicitely unfinished state of port
svn path=/trunk/gtk-sharp/; revision=19489
2003-10-30 23:57:41 +00:00
|
|
|
column.Visible = true;
|
|
|
|
rendererToggle.Activatable = true;
|
|
|
|
rendererToggle.Active = true;
|
2004-08-07 17:06:29 +00:00
|
|
|
treeView.InsertColumn (column, (int) Column.Dave);
|
2003-10-30 Daniel Kornhauser Eisenberg <dkor@alum.mit.edu>
* sample/GtkDemo/DemoApplicationWindow.cs : New sample, Unfinished, 5% Done
* sample/GtkDemo/DemoButtonBox.cs : New sample,
* sample/GtkDemo/DemoColorSelection.cs : New sample,
* sample/GtkDemo/DemoDialog.cs : New sample,
* sample/GtkDemo/DemoDrawingArea.cs : New sample,
* sample/GtkDemo/DemoEditableCells.cs : New sample, Needs clean up
* sample/GtkDemo/DemoImages.cs : New sample, Unfinished, 75% Done
* sample/GtkDemo/DemoItemFactory.cs : New sample, Unfinished, 5% Done
* sample/GtkDemo/DemoListStore.cs : New sample,
* sample/GtkDemo/DemoMain.cs : New sample, Unifnished, 60% Done
* sample/GtkDemo/DemoMenus.cs : New sample,
* sample/GtkDemo/DemoPanes.cs : New sample,
* sample/GtkDemo/DemoPixbuf.cs : New sample, Needs clean up
* sample/GtkDemo/DemoSizeGroup.cs : New sample,
* sample/GtkDemo/DemoStockBrowser.cs : New sample, Unfinished, 20% Done
* sample/GtkDemo/DemoTextView.cs : New sample, Unfinished, 99% Done
* sample/GtkDemo/DemoTreeStore.cs : New sample, Unfinished, 95% Done
* sample/GtkDemo/images : Several Images for the samples
* sample/GtkDemo/Makefile : Very simple Makefile
* sample/GtkDemo/README : Mentions explicitely unfinished state of port
svn path=/trunk/gtk-sharp/; revision=19489
2003-10-30 23:57:41 +00:00
|
|
|
column.Sizing = TreeViewColumnSizing.Fixed;
|
|
|
|
column.FixedWidth = 50;
|
|
|
|
column.Clickable = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
private void WindowDelete (object o, DeleteEventArgs args)
|
|
|
|
{
|
2004-08-07 17:06:29 +00:00
|
|
|
this.Hide ();
|
|
|
|
this.Destroy ();
|
|
|
|
args.RetVal = true;
|
2003-10-30 Daniel Kornhauser Eisenberg <dkor@alum.mit.edu>
* sample/GtkDemo/DemoApplicationWindow.cs : New sample, Unfinished, 5% Done
* sample/GtkDemo/DemoButtonBox.cs : New sample,
* sample/GtkDemo/DemoColorSelection.cs : New sample,
* sample/GtkDemo/DemoDialog.cs : New sample,
* sample/GtkDemo/DemoDrawingArea.cs : New sample,
* sample/GtkDemo/DemoEditableCells.cs : New sample, Needs clean up
* sample/GtkDemo/DemoImages.cs : New sample, Unfinished, 75% Done
* sample/GtkDemo/DemoItemFactory.cs : New sample, Unfinished, 5% Done
* sample/GtkDemo/DemoListStore.cs : New sample,
* sample/GtkDemo/DemoMain.cs : New sample, Unifnished, 60% Done
* sample/GtkDemo/DemoMenus.cs : New sample,
* sample/GtkDemo/DemoPanes.cs : New sample,
* sample/GtkDemo/DemoPixbuf.cs : New sample, Needs clean up
* sample/GtkDemo/DemoSizeGroup.cs : New sample,
* sample/GtkDemo/DemoStockBrowser.cs : New sample, Unfinished, 20% Done
* sample/GtkDemo/DemoTextView.cs : New sample, Unfinished, 99% Done
* sample/GtkDemo/DemoTreeStore.cs : New sample, Unfinished, 95% Done
* sample/GtkDemo/images : Several Images for the samples
* sample/GtkDemo/Makefile : Very simple Makefile
* sample/GtkDemo/README : Mentions explicitely unfinished state of port
svn path=/trunk/gtk-sharp/; revision=19489
2003-10-30 23:57:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
private void CreateModel ()
|
|
|
|
{
|
|
|
|
// create tree store
|
|
|
|
store = new TreeStore (
|
|
|
|
typeof(string),
|
|
|
|
typeof(bool),
|
|
|
|
typeof(bool),
|
|
|
|
typeof(bool),
|
|
|
|
typeof(bool),
|
|
|
|
typeof(bool),
|
|
|
|
typeof(bool),
|
|
|
|
typeof(bool));
|
|
|
|
|
|
|
|
// add data to the tree store
|
|
|
|
|
|
|
|
foreach (MyTreeItem month in toplevel)
|
|
|
|
{
|
|
|
|
TreeIter iter = store.AppendValues (month.Label,
|
|
|
|
false,
|
|
|
|
false,
|
|
|
|
false,
|
|
|
|
false,
|
|
|
|
false,
|
|
|
|
false,
|
|
|
|
false);
|
|
|
|
|
2004-08-07 17:06:29 +00:00
|
|
|
foreach (MyTreeItem hollyday in month.Children)
|
|
|
|
{
|
|
|
|
store.AppendValues (iter,
|
|
|
|
hollyday.Label,
|
|
|
|
hollyday.Alex,
|
|
|
|
hollyday.Havoc,
|
|
|
|
hollyday.Tim,
|
|
|
|
hollyday.Owen,
|
|
|
|
hollyday.Dave,
|
|
|
|
true);
|
|
|
|
}
|
2003-10-30 Daniel Kornhauser Eisenberg <dkor@alum.mit.edu>
* sample/GtkDemo/DemoApplicationWindow.cs : New sample, Unfinished, 5% Done
* sample/GtkDemo/DemoButtonBox.cs : New sample,
* sample/GtkDemo/DemoColorSelection.cs : New sample,
* sample/GtkDemo/DemoDialog.cs : New sample,
* sample/GtkDemo/DemoDrawingArea.cs : New sample,
* sample/GtkDemo/DemoEditableCells.cs : New sample, Needs clean up
* sample/GtkDemo/DemoImages.cs : New sample, Unfinished, 75% Done
* sample/GtkDemo/DemoItemFactory.cs : New sample, Unfinished, 5% Done
* sample/GtkDemo/DemoListStore.cs : New sample,
* sample/GtkDemo/DemoMain.cs : New sample, Unifnished, 60% Done
* sample/GtkDemo/DemoMenus.cs : New sample,
* sample/GtkDemo/DemoPanes.cs : New sample,
* sample/GtkDemo/DemoPixbuf.cs : New sample, Needs clean up
* sample/GtkDemo/DemoSizeGroup.cs : New sample,
* sample/GtkDemo/DemoStockBrowser.cs : New sample, Unfinished, 20% Done
* sample/GtkDemo/DemoTextView.cs : New sample, Unfinished, 99% Done
* sample/GtkDemo/DemoTreeStore.cs : New sample, Unfinished, 95% Done
* sample/GtkDemo/images : Several Images for the samples
* sample/GtkDemo/Makefile : Very simple Makefile
* sample/GtkDemo/README : Mentions explicitely unfinished state of port
svn path=/trunk/gtk-sharp/; revision=19489
2003-10-30 23:57:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// tree data
|
|
|
|
private static MyTreeItem[] january =
|
|
|
|
{
|
|
|
|
new MyTreeItem ("New Years Day", true, true, true, true, false, true, null ),
|
|
|
|
new MyTreeItem ("Presidential Inauguration", false, true, false, true, false, false, null ),
|
|
|
|
new MyTreeItem ("Martin Luther King Jr. day", false, true, false, true, false, false, null )
|
|
|
|
};
|
|
|
|
|
|
|
|
private static MyTreeItem[] february =
|
|
|
|
{
|
|
|
|
new MyTreeItem ( "Presidents' Day", false, true, false, true, false, false, null ),
|
|
|
|
new MyTreeItem ( "Groundhog Day", false, false, false, false, false, false, null ),
|
|
|
|
new MyTreeItem ( "Valentine's Day", false, false, false, false, true, true, null )
|
|
|
|
};
|
|
|
|
|
|
|
|
private static MyTreeItem[] march =
|
|
|
|
{
|
|
|
|
new MyTreeItem ( "National Tree Planting Day", false, false, false, false, false, false, null ),
|
|
|
|
new MyTreeItem ( "St Patrick's Day", false, false, false, false, false, true, null )
|
|
|
|
};
|
|
|
|
|
|
|
|
private static MyTreeItem[] april =
|
|
|
|
{
|
|
|
|
new MyTreeItem ( "April Fools' Day", false, false, false, false, false, true, null ),
|
|
|
|
new MyTreeItem ( "Army Day", false, false, false, false, false, false, null ),
|
|
|
|
new MyTreeItem ( "Earth Day", false, false, false, false, false, true, null ),
|
|
|
|
new MyTreeItem ( "Administrative Professionals' Day", false, false, false, false, false, false, null )
|
|
|
|
};
|
|
|
|
|
|
|
|
private static MyTreeItem[] may =
|
|
|
|
{
|
|
|
|
new MyTreeItem ( "Nurses' Day", false, false, false, false, false, false, null ),
|
|
|
|
new MyTreeItem ( "National Day of Prayer", false, false, false, false, false, false, null ),
|
|
|
|
new MyTreeItem ( "Mothers' Day", false, false, false, false, false, true, null ),
|
|
|
|
new MyTreeItem ( "Armed Forces Day", false, false, false, false, false, false, null ),
|
|
|
|
new MyTreeItem ( "Memorial Day", true, true, true, true, false, true, null )
|
|
|
|
};
|
|
|
|
|
|
|
|
private static MyTreeItem[] june =
|
|
|
|
{
|
|
|
|
new MyTreeItem ( "June Fathers' Day", false, false, false, false, false, true, null ),
|
|
|
|
new MyTreeItem ( "Juneteenth (Liberation of Slaves)", false, false, false, false, false, false, null ),
|
|
|
|
new MyTreeItem ( "Flag Day", false, true, false, true, false, false, null )
|
|
|
|
};
|
|
|
|
|
|
|
|
private static MyTreeItem[] july =
|
|
|
|
{
|
|
|
|
new MyTreeItem ( "Parents' Day", false, false, false, false, false, true, null ),
|
|
|
|
new MyTreeItem ( "Independence Day", false, true, false, true, false, false, null )
|
|
|
|
};
|
|
|
|
|
|
|
|
private static MyTreeItem[] august =
|
|
|
|
{
|
|
|
|
new MyTreeItem ( "Air Force Day", false, false, false, false, false, false, null ),
|
|
|
|
new MyTreeItem ( "Coast Guard Day", false, false, false, false, false, false, null ),
|
|
|
|
new MyTreeItem ( "Friendship Day", false, false, false, false, false, false, null )
|
|
|
|
};
|
|
|
|
|
|
|
|
private static MyTreeItem[] september =
|
|
|
|
{
|
|
|
|
new MyTreeItem ( "Grandparents' Day", false, false, false, false, false, true, null ),
|
|
|
|
new MyTreeItem ( "Citizenship Day or Constitution Day", false, false, false, false, false, false, null ),
|
|
|
|
new MyTreeItem ( "Labor Day", true, true, true, true, false, true, null )
|
|
|
|
};
|
|
|
|
|
|
|
|
private static MyTreeItem[] october =
|
|
|
|
{
|
|
|
|
new MyTreeItem ( "National Children's Day", false, false, false, false, false, false, null ),
|
|
|
|
new MyTreeItem ( "Bosses' Day", false, false, false, false, false, false, null ),
|
|
|
|
new MyTreeItem ( "Sweetest Day", false, false, false, false, false, false, null ),
|
|
|
|
new MyTreeItem ( "Mother-in-Law's Day", false, false, false, false, false, false, null ),
|
|
|
|
new MyTreeItem ( "Navy Day", false, false, false, false, false, false, null ),
|
|
|
|
new MyTreeItem ( "Columbus Day", false, true, false, true, false, false, null ),
|
|
|
|
new MyTreeItem ( "Halloween", false, false, false, false, false, true, null )
|
|
|
|
};
|
|
|
|
|
|
|
|
private static MyTreeItem[] november =
|
|
|
|
{
|
|
|
|
new MyTreeItem ( "Marine Corps Day", false, false, false, false, false, false, null ),
|
|
|
|
new MyTreeItem ( "Veterans' Day", true, true, true, true, false, true, null ),
|
|
|
|
new MyTreeItem ( "Thanksgiving", false, true, false, true, false, false, null )
|
|
|
|
};
|
|
|
|
|
|
|
|
private static MyTreeItem[] december =
|
|
|
|
{
|
|
|
|
new MyTreeItem ( "Pearl Harbor Remembrance Day", false, false, false, false, false, false, null ),
|
|
|
|
new MyTreeItem ( "Christmas", true, true, true, true, false, true, null ),
|
|
|
|
new MyTreeItem ( "Kwanzaa", false, false, false, false, false, false, null )
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
private static MyTreeItem[] toplevel =
|
|
|
|
{
|
|
|
|
new MyTreeItem ("January", false, false, false, false, false, false, january),
|
|
|
|
new MyTreeItem ("February", false, false, false, false, false, false, february),
|
|
|
|
new MyTreeItem ("March", false, false, false, false, false, false, march),
|
|
|
|
new MyTreeItem ("April", false, false, false, false, false, false, april),
|
|
|
|
new MyTreeItem ("May", false, false, false, false, false, false, may),
|
|
|
|
new MyTreeItem ("June", false, false, false, false, false, false, june),
|
|
|
|
new MyTreeItem ("July", false, false, false, false, false, false, july),
|
|
|
|
new MyTreeItem ("August", false, false, false, false, false, false, august),
|
|
|
|
new MyTreeItem ("September", false, false, false, false, false, false, september),
|
|
|
|
new MyTreeItem ("October", false, false, false, false, false, false, october),
|
|
|
|
new MyTreeItem ("November", false, false, false, false, false, false, november),
|
|
|
|
new MyTreeItem ("December", false, false, false, false, false, false, december)
|
|
|
|
};
|
|
|
|
|
|
|
|
// TreeItem structure
|
|
|
|
public class MyTreeItem
|
|
|
|
{
|
|
|
|
public string Label;
|
|
|
|
public bool Alex;
|
|
|
|
public bool Havoc;
|
|
|
|
public bool Tim;
|
|
|
|
public bool Owen;
|
|
|
|
public bool Dave;
|
|
|
|
public bool World_holiday; /* shared by the European hackers */
|
|
|
|
public MyTreeItem[] Children;
|
|
|
|
|
|
|
|
public MyTreeItem (
|
|
|
|
string label,
|
|
|
|
bool alex,
|
|
|
|
bool havoc,
|
|
|
|
bool tim,
|
|
|
|
bool owen,
|
|
|
|
bool dave,
|
|
|
|
bool world_holiday,
|
|
|
|
MyTreeItem[] children)
|
|
|
|
{
|
|
|
|
Label = label;
|
|
|
|
Alex = alex;
|
|
|
|
Havoc = havoc;
|
|
|
|
Tim = tim;
|
|
|
|
Owen = owen;
|
|
|
|
Dave = dave;
|
|
|
|
World_holiday = world_holiday;
|
|
|
|
Children = children;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
// columns
|
|
|
|
public enum Column
|
|
|
|
{
|
|
|
|
HolidayName,
|
|
|
|
Alex,
|
|
|
|
Havoc,
|
|
|
|
Tim,
|
|
|
|
Owen,
|
|
|
|
Dave,
|
|
|
|
Visible,
|
|
|
|
World,
|
|
|
|
Num,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|