本文整理汇总了C#中Gtk.IterNext方法的典型用法代码示例。如果您正苦于以下问题:C# Gtk.IterNext方法的具体用法?C# Gtk.IterNext怎么用?C# Gtk.IterNext使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gtk
的用法示例。
在下文中一共展示了Gtk.IterNext方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: IsPackageInStore
private bool IsPackageInStore (Gtk.ListStore store, string pname, string pversion, int pname_col, int pversion_col)
{
Gtk.TreeIter search_iter;
bool has_elem = store.GetIterFirst (out search_iter);
if (has_elem) {
while (true) {
string name = (string)store.GetValue (search_iter, pname_col);
string version = (string)store.GetValue (search_iter, pversion_col);
if (name == pname && version == pversion)
return true;
if (!store.IterNext (ref search_iter))
break;
}
}
return false;
}
示例2: TreeviewSelectRowWithID
//selects a row that has an uniqueID (usually at col 0)
public static bool TreeviewSelectRowWithID(Gtk.TreeView tv, Gtk.TreeStore store, int colNum, int id, bool scrollToRow)
{
if(id <= 0)
return false;
int rowNum = getRowNumOfThisID(store, colNum, id);
if(rowNum == -1)
return false;
//set the selected
int count = 0;
TreeIter iter;
bool iterOk = store.GetIterFirst(out iter);
while(iterOk) {
if(count == rowNum) {
//1 select row
tv.Selection.SelectIter(iter);
//2 scroll to that row
if(scrollToRow) {
TreePath path = store.GetPath (iter);
LogB.Debug(path.ToString());
tv.ScrollToCell (path, tv.Columns[0], true, 0, 0);
}
return true;
}
count ++;
store.IterNext(ref iter);
}
return false;
}
示例3: getRowNumOfThisID
//finds the row number (starting at 0) of a cell (usually an uniqueID in col 0)
private static int getRowNumOfThisID(Gtk.TreeStore store, int colNum, int searchedID)
{
TreeIter iter;
int count = 0;
bool iterOk = store.GetIterFirst(out iter);
while(iterOk) {
int thisID = Convert.ToInt32((string) store.GetValue (iter, colNum));
if(thisID == searchedID)
return count;
count ++;
iterOk = store.IterNext(ref iter);
}
return -1;
}
示例4: getTreeViewNeuromuscular
ArrayList getTreeViewNeuromuscular(Gtk.ListStore ls)
{
TreeIter iter = new TreeIter();
ls.GetIterFirst ( out iter ) ;
ArrayList array = new ArrayList();
do {
EncoderNeuromuscularData nm = (EncoderNeuromuscularData) ls.GetValue (iter, 0);
array.Add(nm);
} while (ls.IterNext (ref iter));
return array;
}
示例5: getTreeViewCurves
// ---------helpful methods -----------
ArrayList getTreeViewCurves(Gtk.ListStore ls)
{
TreeIter iter = new TreeIter();
ls.GetIterFirst ( out iter ) ;
ArrayList array = new ArrayList();
do {
EncoderCurve ec = (EncoderCurve) ls.GetValue (iter, 0);
array.Add(ec);
} while (ls.IterNext (ref iter));
return array;
}
示例6: getEntryListForModel
private List<String> getEntryListForModel(Gtk.ListStore model)
{
List<String> outList = new List<string>();
Gtk.TreeIter iter;
model.GetIterFirst(out iter);
if(iter.Equals(null))
return null;
do
{
outList.Add(model.GetValue (iter, 0).ToString());
}while(model.IterNext(ref iter));
return outList;
}
示例7: TreeMapItem
public TreeMapItem(Gtk.TreeModel m,
ref Gtk.TreeIter iter,
bool horiz,
int textColumn,
int weightColumn)
{
if (m == null)
throw new ArgumentNullException ("m");
if (iter.Equals (Gtk.TreeIter.Zero))
throw new ArgumentException ("iter");
if (textColumn < 0)
throw new ArgumentException ("textColumn");
if (weightColumn < 0)
throw new ArgumentException ("weightColumn");
Path = m.GetPath (iter);
Title = (string)m.GetValue (iter, textColumn);
Weight = (double)m.GetValue (iter, weightColumn);
X = 0;
Y = 0;
Width = 0;
Height = 0;
Children = null;
Horiz = horiz;
Gtk.TreeIter citer;
double c_total = 0.0;
if (m.IterChildren (out citer, iter)) {
do {
AddChild (new TreeMapItem (m, ref citer, !horiz, textColumn, weightColumn));
} while (m.IterNext (ref citer));
// Get total weight
Children.ForEach (delegate (TreeMapItem i) {
c_total += Math.Abs (i.Weight);
});
this.ChildrenWeight = c_total;
}
}
示例8: RebuildAddTaskMenu
private void RebuildAddTaskMenu(Gtk.TreeModel categoriesModel)
{
Gtk.Menu menu = new Menu ();
Gtk.TreeIter iter;
if (categoriesModel.GetIterFirst (out iter)) {
do {
ICategory category =
categoriesModel.GetValue (iter, 0) as ICategory;
if (category is AllCategory)
continue; // Skip this one
CategoryMenuItem item = new CategoryMenuItem (category);
item.Activated += OnNewTaskByCategory;
item.ShowAll ();
menu.Add (item);
} while (categoriesModel.IterNext (ref iter));
}
addTaskButton.Menu = menu;
}