Back to index

easystroke  0.5.5.1
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes
Actions::AppsStore Class Reference
Collaboration diagram for Actions::AppsStore:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 AppsStore (const Gtk::TreeModelColumnRecord &columns, Actions *p)

Static Public Member Functions

static Glib::RefPtr< AppsStorecreate (const Gtk::TreeModelColumnRecord &columns, Actions *parent)

Protected Member Functions

bool row_drop_possible_vfunc (const Gtk::TreeModel::Path &dest, const Gtk::SelectionData &selection) const
bool drag_data_received_vfunc (const Gtk::TreeModel::Path &dest, const Gtk::SelectionData &selection)

Private Attributes

Actionsparent

Detailed Description

Definition at line 102 of file actions.h.


Constructor & Destructor Documentation

Actions::AppsStore::AppsStore ( const Gtk::TreeModelColumnRecord &  columns,
Actions p 
) [inline]

Definition at line 105 of file actions.h.

: Gtk::TreeStore(columns), parent(p) {}

Here is the caller graph for this function:


Member Function Documentation

static Glib::RefPtr<AppsStore> Actions::AppsStore::create ( const Gtk::TreeModelColumnRecord &  columns,
Actions parent 
) [inline, static]

Definition at line 106 of file actions.h.

                                                                                                            {
                     return Glib::RefPtr<AppsStore>(new AppsStore(columns, parent));
              }

Here is the call graph for this function:

Here is the caller graph for this function:

bool Actions::AppsStore::drag_data_received_vfunc ( const Gtk::TreeModel::Path &  dest,
const Gtk::SelectionData &  selection 
) [protected]

Definition at line 388 of file actions.cc.

                                                                                                               {
       Gtk::TreePath src;
       Glib::RefPtr<TreeModel> model;
       if (!Gtk::TreeModel::Path::get_from_selection_data(selection, model, src))
              return false;
       if (model != parent->tm)
              return false;
       Unique *src_id = (*parent->tm->get_iter(src))[parent->cols.id];
       Gtk::TreeIter dest_iter = parent->apps_model->get_iter(dest);
       ActionListDiff *actions = dest_iter ? (*dest_iter)[parent->ca.actions] : (ActionListDiff *)NULL;
       if (!actions || actions == parent->action_list)
              return false;
       Glib::RefPtr<Gtk::TreeSelection> sel = parent->tv.get_selection();
       if (sel->count_selected_rows() <= 1) {
              RStrokeInfo si = parent->action_list->get_info(src_id);
              parent->action_list->remove(src_id);
              actions->add(*si);
       } else {
              std::vector<Gtk::TreePath> paths = sel->get_selected_rows();
              for (std::vector<Gtk::TreePath>::iterator i = paths.begin(); i != paths.end(); ++i) {
                     Unique *id = (*parent->tm->get_iter(*i))[parent->cols.id];
                     RStrokeInfo si = parent->action_list->get_info(id);
                     parent->action_list->remove(id);
                     actions->add(*si);
              }
       }
       parent->update_action_list();
       update_actions();
       return true;
}

Here is the call graph for this function:

bool Actions::AppsStore::row_drop_possible_vfunc ( const Gtk::TreeModel::Path &  dest,
const Gtk::SelectionData &  selection 
) const [protected]

Definition at line 362 of file actions.cc.

                                                       {
       static bool expecting = false;
       static Gtk::TreePath expected;
       if (expecting && expected != dest)
              expecting = false;
       if (!expecting) {
              if (dest.get_depth() < 2 || dest.back() != 0)
                     return false;
              expected = dest;
              expected.up();
              expecting = true;
              return false;
       }
       expecting = false;
       Gtk::TreePath src;
       Glib::RefPtr<TreeModel> model;
       if (!Gtk::TreeModel::Path::get_from_selection_data(selection, model, src))
              return false;
       if (model != parent->tm)
              return false;
       Gtk::TreeIter dest_iter = parent->apps_model->get_iter(dest);
       ActionListDiff *actions = dest_iter ? (*dest_iter)[parent->ca.actions] : (ActionListDiff *)NULL;
       return actions && actions != parent->action_list;
}

Member Data Documentation

Definition at line 103 of file actions.h.


The documentation for this class was generated from the following files: