1 // This file is a part of Simple Launcher
3 // Copyright (C) 2006, 2007, Mikhail Sobolev
5 // Simple Launcher is free software; you can redistribute it and/or modify it
6 // under the terms of the GNU General Public License version 2 as published by
7 // the Free Software Foundation.
9 // This program is distributed in the hope that it will be useful, but WITHOUT
10 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 // You should have received a copy of the GNU General Public License along with
15 // this program; if not, write to the Free Software Foundation, Inc., 51
16 // Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 #ifndef __SLA_LIST_H__
19 #define __SLA_LIST_H__
21 #include <gtk/gtkliststore.h>
22 #include <gtk/gtktreeview.h>
23 #include <gtk/gtkbutton.h>
24 #include <gtk/gtkcellrenderertoggle.h>
26 #include "launcher-item.h"
30 SLAList(int, LauncherItems&);
33 GtkWidget *getWidget() { return myWidget; }
36 static void _renderText(GtkTreeViewColumn *column, GtkCellRenderer *cell, GtkTreeModel *model, GtkTreeIter *iter, gpointer self);
37 static void _renderBool(GtkTreeViewColumn *column, GtkCellRenderer *cell, GtkTreeModel *model, GtkTreeIter *iter, gpointer self);
38 static void _moveUp(GtkButton *, void *);
39 static void _moveDown(GtkButton *, void *);
40 static void _toggleBool(GtkCellRendererToggle *, const gchar *, void *);
42 void renderText(GtkTreeViewColumn *column, GtkCellRenderer *cell, GtkTreeModel *model, GtkTreeIter *iter);
43 void renderBool(GtkTreeViewColumn *column, GtkCellRenderer *cell, GtkTreeModel *model, GtkTreeIter *iter);
44 void moveUp(GtkButton *);
45 void moveDown(GtkButton *);
46 void toggleBool(GtkCellRendererToggle *, const gchar *);
48 void swap(GtkTreeIter& a, GtkTreeIter& b);
52 GtkListStore *myStore;
54 GtkTreeSelection *mySelection;
56 LauncherItems& myItems;