This repository has been archived by the owner on May 19, 2019. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vlastni liststore, treestore pro zjednoduseni pristupu k hodnotam
- Loading branch information
Pavel Lang
committed
Mar 7, 2010
1 parent
ec8565a
commit 6090f0f
Showing
13 changed files
with
202 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
using System; | ||
using Gtk; | ||
using GLib; | ||
|
||
namespace LPS.ToolScript | ||
{ | ||
public class ListStore : Gtk.ListStore | ||
{ | ||
[Obsolete] | ||
protected ListStore(GType gtype) | ||
: base (gtype) | ||
{ | ||
} | ||
|
||
public ListStore(IntPtr raw) | ||
: base (raw) | ||
{ | ||
} | ||
|
||
protected ListStore() | ||
: base () | ||
{ | ||
} | ||
|
||
public ListStore(params GLib.GType[] types) | ||
: base (types) | ||
{ | ||
} | ||
|
||
public ListStore(params Type[] types) | ||
: base (types) | ||
{ | ||
} | ||
|
||
public TreeIter GetIter(TreeView view, TreePath path) | ||
{ | ||
TreeIter iter; | ||
if(!GetIter(out iter, path)) | ||
throw new InvalidOperationException("Cesta ve stromu není platná"); | ||
return iter; | ||
} | ||
|
||
public object GetValue(TreeView view, TreePath path, long index) | ||
{ | ||
return this.GetValue(GetIter(view, path), (int)index); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
using System; | ||
using GLib; | ||
using Gtk; | ||
|
||
namespace LPS.ToolScript | ||
{ | ||
public class TreeStore : Gtk.TreeStore | ||
{ | ||
[Obsolete] | ||
protected TreeStore(GType gtype) | ||
: base (gtype) | ||
{ | ||
} | ||
|
||
public TreeStore(IntPtr raw) | ||
: base (raw) | ||
{ | ||
} | ||
|
||
protected TreeStore() | ||
: base () | ||
{ | ||
} | ||
|
||
public TreeStore(params GLib.GType[] types) | ||
: base (types) | ||
{ | ||
} | ||
|
||
public TreeStore(params Type[] types) | ||
: base (types) | ||
{ | ||
} | ||
|
||
public TreeIter GetIter(TreeView view, TreePath path) | ||
{ | ||
TreeIter iter; | ||
if(!GetIter(out iter, path)) | ||
throw new InvalidOperationException("Cesta ve stromu není platná"); | ||
return iter; | ||
} | ||
|
||
public object GetValue(TreeView view, TreePath path, long index) | ||
{ | ||
return this.GetValue(GetIter(view, path), (int)index); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters