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

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

Initialize stuff when the object is realized. Before realization (i.e. in the constructor), we can't call get_window() or anything because the Gdk::Window doesn't yet exist

Reimplemented in gcs::Widgets::TextSwatch.

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

References m_background, m_black, m_borderGC, m_borderWidth, and m_minSize.

            // We need to call the base on_realize()

            // Now we can allocate any additional resources we need
            Glib::RefPtr<Gdk::Window> window = get_window();
            // set the size of the swatch.
            set_size_request(m_minSize, m_minSize);
            m_borderGC = Gdk::GC::create(window);
            m_borderGC->set_line_attributes(m_borderWidth, Gdk::LINE_SOLID,
                    Gdk::CAP_BUTT, Gdk::JOIN_MITER);
            add_events(Gdk::BUTTON_PRESS_MASK | Gdk::ENTER_NOTIFY_MASK |
            pTooltips->set_tip(*this, m_background->get_hexstring());

Generated by  Doxygen 1.6.0   Back to index