Logo Search packages:      
Sourcecode: agave version File versions  Download package

void gcs::Widgets::ColorSwatch::redraw ( void   )  [protected, virtual]

Redraws the swatch. This function is often called after changing the color or text of a swatch so that it will display the latest values

Reimplemented in gcs::Widgets::TextSwatch.

Definition at line 131 of file gcs-colorswatch.cc.

References m_background, m_borderGC, and m_borderWidth.

Referenced by gcs::Widgets::TextSwatch::redraw(), and set_color().

            Glib::RefPtr<Gdk::Window> win = get_window();
            int winWidth, winHeight;
            win->get_size(winWidth, winHeight);
            /* First draw an outline around the edge (in black, i guess) */
            if (m_borderWidth > 0)
                win->draw_rectangle(m_borderGC, false, m_borderWidth/2, m_borderWidth/2,
                        winWidth - m_borderWidth, winHeight - m_borderWidth);

Generated by  Doxygen 1.6.0   Back to index