Back to index

easystroke  0.5.5.1
Public Member Functions | Private Attributes
Feedback Class Reference

List of all members.

Public Member Functions

 Feedback (RStroke s, Glib::ustring t, int x, int y)

Private Attributes

boost::shared_ptr< Gtk::Window > icon
boost::shared_ptr< Gtk::Window > text

Detailed Description

Definition at line 56 of file stats.cc.


Constructor & Destructor Documentation

Feedback::Feedback ( RStroke  s,
Glib::ustring  t,
int  x,
int  y 
) [inline]

Definition at line 60 of file stats.cc.

                                                        {
              x += (prefs.left_handed.get() ? 1 : -1)*3*STROKE_SIZE / 2;
              int w,h;
              if (s) {
                     icon.reset(new Gtk::Window(Gtk::WINDOW_POPUP));
                     icon->set_type_hint(Gdk::WINDOW_TYPE_HINT_TOOLTIP);
                     icon->set_name("gtk-tooltip");
                     WIDGET(Gtk::Image, image, s->draw(STROKE_SIZE));
                     icon->set_accept_focus(false);
                     icon->add(image);
                     image.show();
                     icon->get_size(w,h);
                     icon->move(x - w/2, y - h/2);
                     y += h/2;
              }

              if (t != "") {
                     text.reset(new Gtk::Window(Gtk::WINDOW_POPUP));
                     text->set_type_hint(Gdk::WINDOW_TYPE_HINT_TOOLTIP);
                     text->set_name("gtk-tooltip");
                     text->set_accept_focus(false);
                     text->set_border_width(2);
                     WIDGET(Gtk::Label, label, t);
                     text->add(label);
                     label.show();
                     text->get_size(w,h);
                     text->move(x - w/2, y + h/2);
              }
              if (text) {
                     text->show();
                     text->get_window()->input_shape_combine_region(Gdk::Region(), 0, 0);
              }
              if (icon) {
                     icon->show();
                     icon->get_window()->input_shape_combine_region(Gdk::Region(), 0, 0);
              }
       }

Here is the call graph for this function:


Member Data Documentation

boost::shared_ptr<Gtk::Window> Feedback::icon [private]

Definition at line 57 of file stats.cc.

boost::shared_ptr<Gtk::Window> Feedback::text [private]

Definition at line 58 of file stats.cc.


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