本文整理汇总了C++中gtk::Image类的典型用法代码示例。如果您正苦于以下问题:C++ Image类的具体用法?C++ Image怎么用?C++ Image使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Image类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: drawReminderIcon
void ItemView::drawReminderIcon(const Cairo::RefPtr<Cairo::Context>& cr, const int width, const int height)
{
cr->save();
//draw reminder icon
cr->set_antialias(Cairo::ANTIALIAS_NONE);
if (data.isReminder())
{
Gtk::Image* image = Resources::res->imgReminderIcon;
if (getColorMode() == COLOR_ALARM)
image = Resources::res->imgReminderOnIcon;
const Glib::RefPtr<Gdk::Pixbuf> icon = image->get_pixbuf();
const int iconLeft = (TIME_WIDTH * 0.5) - (icon->get_width() * 0.5);
const int iconTop = (height - icon->get_height()) - (PADDING * 3);
Gdk::Cairo::set_source_pixbuf(cr, icon, iconLeft, iconTop);
cr->rectangle(iconLeft, iconTop, icon->get_width(), icon->get_height());
cr->fill();
}
cr->restore();
}
开发者ID:pzagawa,项目名称:myagenda,代码行数:27,代码来源:NoteItemView.cpp
示例2: manage
WindowLevelToolButton::WindowLevelToolButton() {
Gtk::HBox* hbox = manage(new Gtk::HBox);
Gtk::Image* image = manage(new Gtk::Image);
Glib::RefPtr<Gdk::Pixbuf> p = Aeskulap::IconFactory::load_from_file("cursor_windowlevel.png");
if(p) {
image->set(p);
}
image->show();
//image->set_padding(6, 0);
m_invert = manage(new Gtk::ToggleToolButton(*image));
m_invert->set_size_request(32, 32);
m_invert->set_tooltip(m_tooltips, gettext("Invert windowlevel"));
m_invert->show();
m_invert->signal_toggled().connect(sigc::mem_fun(*this, &WindowLevelToolButton::on_invert));
Gtk::VBox* vbox = manage(new Gtk::VBox);
vbox->pack_start(*m_invert, true, false);
vbox->show();
hbox->pack_start(*vbox, Gtk::PACK_SHRINK);
vbox = manage(new Gtk::VBox);
vbox->show();
m_combo = manage(new Gtk::ComboBoxText);
m_combo->set_size_request(-1, 32);
m_combo->show();
m_combo->signal_changed().connect(sigc::mem_fun(*this, &WindowLevelToolButton::on_changed));
vbox->pack_start(*m_combo, true, false);
hbox->pack_start(*vbox, Gtk::PACK_SHRINK);
vbox = manage(new Gtk::VBox);
vbox->show();
image = manage(new Gtk::Image(Gtk::Stock::ADD, Gtk::ICON_SIZE_SMALL_TOOLBAR));
image->show();
Gtk::ToolButton* btn = manage(new Gtk::ToolButton(*image));
btn->set_size_request(32, 32);
btn->set_tooltip(m_tooltips, gettext("Add new windowlevel preset"));
btn->show();
btn->signal_clicked().connect(sigc::mem_fun(*this, &WindowLevelToolButton::on_add));
vbox->pack_start(*btn, true, false);
hbox->pack_start(*vbox, true,false);
hbox->show();
add(*hbox);
update();
m_widgetlist.insert(this);
}
开发者ID:151706061,项目名称:aeskulap,代码行数:58,代码来源:awindowleveltoolbutton.cpp
示例3: falla
void *procesar_boton(void *nada){ // Hilo que se ejecutará cuando se pulse el botón OK Go!. Simula un inicio de sesión que una vez fallará y otra vez no
Gtk::Label *etiq; // Estos son los objetos que queremos manejar. En la ventana hay más, pero no les hacemos nada, asique no necesitamos declarar punteros a ellos. Esta es la etiqueta que muestra el Cargando...
Gtk::Spinner *spin; // Esto es un dibujito que gira mientras carga
Gtk::Image *image; // Esta es la imagen que aparece cuando se inicia sesión (tanto si falla(muestra una X de error) como si no(muestra un tick verde)
Gtk::RadioButton *radio; // Este es un botón de los de la izquierda, donde seleccionas si inicias sesion, creas usuario o borras usuario
Gtk::Entry *entrada; // Esta es la cajeta de entrada de texto como por ejemplo, donde pones el nombre de usuario y la contraseña
builder->get_widget("label3", etiq); // Como el builder crea la ventana, él nos dará las referencias a los objetos definidos arriba
builder->get_widget("spinner1", spin);
builder->get_widget("image1", image);
image->set_visible(false); // Hacemos que las imagenes no se vean. Mientras está cargando no se muestran. Esta es la imagen de cuando se inicia sesión correctamente
builder->get_widget("image2", image); // Reusamos el puntero para referenciar a la otra imagen. Esta se muestra cuando el inicio sesion falla
image->set_visible(false);
builder->get_widget("radiobutton1",radio);// Como esto se ejecuta cuando se pulsa el botón OK Go!, se supone que estamos procesando el inicio de sesión. Es habitual bloquearlo todo para que no se pueda cambiar de opción mientras se inicia sesion (En realidad es por estética, porque al programa se la trae floja lo que hagas) :)
radio->set_sensitive(false);
builder->get_widget("radiobutton2",radio);
radio->set_sensitive(false);
builder->get_widget("radiobutton3",radio);
radio->set_sensitive(false);
builder->get_widget("entry1", entrada);
entrada->set_sensitive(false);
builder->get_widget("entry2", entrada);
entrada->set_sensitive(false);
spin->set_visible(true); // Como estamos cargando, mostramos el iconito este girando. (Este es el mismo que se muestra cuando buscas archivos en ubuntu)
etiq->set_label("Conectando..."); // Hacemos que la etiqueta muestre Conectando...
sleep(1); // Simulamos que la conexion se establece
etiq->set_label("Obteniendo datos del servidor"); // Se supone que estamos conectados y ahora intercambiamos datos con el servidor
sleep(2); // Simulamos el intercambio de datos
spin->set_visible(false); // Ya se ha procesado el inicio de sesion y ya no debemos ver el iconico girando, porque eso es sólo cuando carga
if(i%2){ // Si es impar, el inicio de sesion es correcto
builder->get_widget("image1", image); // Obtenemos la imagen1, la del tick verde
etiq->set_label("Login correcto"); // Cambiamos el texto de la etiqueta (una etiqueta sólo hace eso: mostrar texto)
} else {
etiq->set_label("Login incorrecto"); // Si es par, el inicio de sesion es incorrecto. No tenemos que obtener la imagen porque el puntero ya apunta a la imagen correcta
}
image->set_visible(true); // Sea cual sea la imagen escogida, se muestra
builder->get_widget("radiobutton1",radio); // Y se desbloquea todo esperando a que el usuario cambie algo y vuelva a pulsar otro botón
radio->set_sensitive(true);
builder->get_widget("radiobutton2",radio);
radio->set_sensitive(true);
builder->get_widget("radiobutton3",radio);
radio->set_sensitive(true);
builder->get_widget("entry1", entrada);
entrada->set_sensitive(true);
builder->get_widget("entry2", entrada);
entrada->set_sensitive(true);
i++; // Esto alterna entre simular un inicio de sesion correcto (i impar) y uno incorrecto (i par)
}
开发者ID:gDanix,项目名称:hello-world,代码行数:57,代码来源:main.cpp
示例4: insertReturn
void ArtistsWidget::insertReturn() {
Gtk::TreeModel::Row row = *(treeModel->append());
// row[columns.artist] = "Home";
row[columns.isArtist] = -1;
Gtk::Image i;
//i.set_from_icon_name("gtk-media-pause", Gtk::IconSize::from_name("GTK_ICON_SIZE_BUTTON"));
i.set("ui/arrowleft.png");
row[columns.image] = i.get_pixbuf();
}
开发者ID:tomwagner,项目名称:IntelligentMPDClient,代码行数:9,代码来源:guiartistswidget.cpp
示例5: run_set_estado
bool Controls::run_set_estado(Glib::ustring valor){
if (estado != valor){
estado = valor;
Gtk::Image *img = dynamic_cast<Gtk::Image*> (pla->get_icon_widget());
if (estado == "playing"){
img->set(pixbufplay);
pla->set_tooltip_text("Pausar");}
else{
img->set(pixbufpause);
pla->set_tooltip_text("Reproducir");}}
return false;}
开发者ID:fdanesse,项目名称:JAMediaSuite,代码行数:11,代码来源:Controls.cpp
示例6: swap_icons
//------------------------------------------------------------------------------
static void swap_icons(Gtk::ToggleButton *btn) {
Gtk::Image *img = 0;
if (btn->get_active())
img = cast<Gtk::Image *>(btn->get_data("alt_icon"));
else
img = cast<Gtk::Image *>(btn->get_data("icon"));
img->show();
btn->set_image(*img);
}
开发者ID:pk-codebox-evo,项目名称:mysql-workbench,代码行数:12,代码来源:lf_toolbar.cpp
示例7:
//------------------------------------------------------------------------------
void mforms::gtk::ToolBarImpl::set_item_icon(mforms::ToolBarItem *item, const std::string &image_path) {
Gtk::Button *btn = cast<Gtk::Button *>(item->get_data_ptr());
if (btn) {
static ImageCache *images = ImageCache::get_instance();
Gtk::Image *img = new Gtk::Image(images->image_from_path(image_path));
if (img) {
btn->set_image(*img);
btn->set_data("icon", img, free_icon);
img->show();
}
}
}
开发者ID:pk-codebox-evo,项目名称:mysql-workbench,代码行数:13,代码来源:lf_toolbar.cpp
示例8: manage
void
ToggleDucksDial::init_label_button(Gtk::ToggleToolButton &button, Gtk::IconSize iconsize, const char *stockid, const char *label, const char *tooltip)
{
Gtk::Image *icon = manage(new Gtk::Image(Gtk::StockID(stockid), iconsize));
icon->set_padding(0, 0);
icon->show();
button.set_label(label);
button.set_tooltip_text(tooltip);
button.set_icon_widget(*icon);
button.show();
}
开发者ID:ChillyCider,项目名称:synfig-reloaded,代码行数:12,代码来源:toggleducksdial.cpp
示例9: manage
Gtk::RadioButton * dv_selector_widget::create_radio_button(
Gtk::RadioButtonGroup & group,
const Glib::RefPtr<Gdk::Pixbuf> & pixbuf)
{
Gtk::Image * image = manage(new Gtk::Image(pixbuf));
image->show();
Gtk::RadioButton * button = manage(new Gtk::RadioButton(group));
button->set_image(*image);
button->set_mode(/*draw_indicator=*/false);
return button;
}
开发者ID:MaZderMind,项目名称:dvswitch-voc,代码行数:13,代码来源:dv_selector_widget.cpp
示例10:
SelectionSetToolmenu::SelectionSetToolmenu() :
Gtk::ToolItem(),
_listStore(Gtk::ListStore::create(_columns)),
_clearSetsButton(NULL),
_entry(Gtk::manage(new Gtk::ComboBoxEntry(_listStore, _columns.name)))
{
// Hbox containing all our items
Gtk::HBox* hbox = Gtk::manage(new Gtk::HBox(false, 3));
add(*hbox);
// Pack Label
hbox->pack_start(
*Gtk::manage(new gtkutil::LeftAlignedLabel(_("Selection Set: "))),
false, false, 0);
// Pack Combo Box
hbox->pack_start(*_entry, true, true, 0);
// Add tooltip
_entry->set_tooltip_markup(_(ENTRY_TOOLTIP));
// Add clear button
{
Gtk::Image* image = Gtk::manage(new Gtk::Image(GlobalUIManager().getLocalPixbufWithMask("delete.png")));
image->show();
_clearSetsButton = Gtk::manage(new Gtk::ToolButton(*image, _("Clear Selection Sets")));
// Set tooltip
_clearSetsButton->set_tooltip_text(_("Clear Selection Sets"));
// Connect event
_clearSetsButton->signal_clicked().connect(sigc::mem_fun(*this, &SelectionSetToolmenu::onDeleteAllSetsClicked));
hbox->pack_start(*_clearSetsButton, false, false, 0);
}
// Connect the signals
Gtk::Entry* childEntry = _entry->get_entry();
childEntry->signal_activate().connect(sigc::mem_fun(*this, &SelectionSetToolmenu::onEntryActivated));
_entry->signal_changed().connect(sigc::mem_fun(*this, &SelectionSetToolmenu::onSelectionChanged));
// Populate the list
update();
// Add self as observer
GlobalSelectionSetManager().addObserver(*this);
show_all();
}
开发者ID:OpenTechEngine,项目名称:DarkRadiant,代码行数:51,代码来源:SelectionSetToolmenu.cpp
示例11: manage
Gtk::ToggleButton *
ToggleDucksDial::create_label_button(Gtk::IconSize iconsize, const char *stockid,
const char * tooltip)
{
Gtk::ToggleButton *tbutton = manage(new class Gtk::ToggleButton());
Gtk::Image *icon = manage(new Gtk::Image(Gtk::StockID(stockid), iconsize));
tbutton->set_tooltip_text(tooltip);
tbutton->add(*icon);
icon->set_padding(0, 0);
icon->show();
tbutton->set_relief(Gtk::RELIEF_NONE);
tbutton->show();
return tbutton;
}
开发者ID:ZurbaXI,项目名称:synfig,代码行数:15,代码来源:toggleducksdial.cpp
示例12: if
ControlItem::ControlItem(Gtk::Widget* icon, double x, double y, double width,
double height, bool moving, bool overlaps) {
rect_ = Goocanvas::Rect::create(x, y, width, height);
if (moving) {
rect_->set_property("fill_color_rgba", LIGHT_BLUE);
} else if (overlaps) {
rect_->set_property("fill_color_rgba", LIGHT_RED);
} else {
rect_->set_property("fill_color_rgba", LIGHT_GREEN);
}
add_child(rect_);
Gtk::Image* image = dynamic_cast<Gtk::Image*>(icon);
Glib::RefPtr<Goocanvas::Image> item = Goocanvas::Image::create(image->get_pixbuf(), x, y);
add_child(item);
}
开发者ID:tinchou,项目名称:bluesjackrabbit,代码行数:16,代码来源:ControlItem.cpp
示例13: PluginEditorBase
DbMySQLViewEditor::DbMySQLViewEditor(grt::Module *m, bec::GRTManager *grtm, const grt::BaseListRef &args)
: PluginEditorBase(m ,grtm, args, "modules/data/editor_view.glade")
, _be(new MySQLViewEditorBE(grtm, db_mysql_ViewRef::cast_from(args[0])))
{
xml()->get_widget("mysql_view_editor_notebook", _editor_notebook);
Gtk::Image *image;
xml()->get_widget("view_editor_image", image);
image->set(ImageCache::get_instance()->image_from_filename("db.View.editor.48x48.png", false));
xml()->get_widget("view_editor_image2", image);
image->set(ImageCache::get_instance()->image_from_filename("db.View.editor.48x48.png", false));
_be->set_refresh_ui_slot(sigc::mem_fun(this, &DbMySQLViewEditor::refresh_form_data));
_editor_notebook->reparent(*this);
_editor_notebook->show();
Gtk::VBox *ddl_win;
xml()->get_widget("editor_placeholder", ddl_win);
embed_code_editor(_be->get_sql_editor()->get_container(), ddl_win);
_be->load_view_sql();
if (!is_editing_live_object())
{
_privs_page = new DbMySQLEditorPrivPage(_be);
_editor_notebook->append_page(_privs_page->page(), "Privileges");
Gtk::TextView *tview(0);
xml()->get_widget("viewcomment", tview);
tview->get_buffer()->set_text(_be->get_comment());
tview->signal_focus_out_event().connect(sigc::bind(sigc::mem_fun(this, &DbMySQLViewEditor::comment_lost_focus), tview), false);
}
else
{
_editor_notebook->remove_page(1);
_privs_page= NULL;
}
refresh_form_data();
_be->reset_editor_undo_stack();
show_all();
}
开发者ID:abibell,项目名称:mysql-workbench,代码行数:47,代码来源:mysql_view_editor_fe.cpp
示例14: loadArtistsSongs
void ArtistsWidget::loadArtistsSongs(std::string artist) {
selectedArtist = artist;
// set label of tab
artistsLabel->set_text(selectedArtist);
Gtk::TreeModel::Path path;
Gtk::CellRenderer* cell;
artistsView->get_cursor(path, cell);
std::cout << "sel path:" << path.to_string();
// cell->;
// clear treemodel
m_actualSongs.clear();
// start searching for artist
MPD::Client::GetInstance()->StartSearch(1);
MPD::Client::GetInstance()->AddSearch(MPD_TAG_ARTIST, artist);
MPD::Client::GetInstance()->CommitSearch(m_actualSongs);
// sort songs
std::sort(m_actualSongs.begin(), m_actualSongs.end(), actualSongSortCond);
artistsView->unset_model();
treeModel->clear();
// insert return button
insertReturn();
for (int i = 0; i < m_actualSongs.size(); i++) {
Gtk::TreeModel::Row row = *(treeModel->append());
row[columns.artist] = m_actualSongs[i]->GetTitle();
Gtk::Image image;
image.set("ui/icon_smaller.png");
row[columns.image] = image.get_pixbuf();
row[columns.isArtist] = 0;
row[columns.song] = m_actualSongs[i];
}
artistsView->set_model(treeModel);
//scroll to top
artistScrolledWindow->get_vadjustment()->set_value(0);
}
开发者ID:tomwagner,项目名称:IntelligentMPDClient,代码行数:47,代码来源:guiartistswidget.cpp
示例15: createImage
Gtk::Image* DLWindow::createImage(const Glib::RefPtr<Gdk::Pixbuf> &pixBuf)
{
Gtk::Image *result = new Gtk::Image(pixBuf);
result->set_hexpand(true);
result->set_vexpand(true);
result->override_background_color(Gdk::RGBA("white"));
result->set_margin_bottom(1);
result->set_margin_top(1);
result->set_margin_left(1);
result->set_margin_right(1);
result->show();
return result;
}
开发者ID:Gurdil,项目名称:TPLinux_M2C_3-02,代码行数:13,代码来源:DLWindow.cpp
示例16: PluginEditorBase
//------------------------------------------------------------------------------
DbMySQLRoutineGroupEditor::DbMySQLRoutineGroupEditor(grt::Module *m, bec::GRTManager *grtm, const grt::BaseListRef &args)
: PluginEditorBase(m, grtm, args, "modules/data/editor_rg.glade")
, _be(new MySQLRoutineGroupEditorBE(grtm, db_mysql_RoutineGroupRef::cast_from(args[0])))
, _routines_model(model_from_string_list(std::vector<std::string>(), &_routines_columns))
{
xml()->get_widget("mysql_rg_editor_notebook", _editor_notebook);
Gtk::Image *image;
xml()->get_widget("rg_image", image);
image->set(ImageCache::get_instance()->image_from_filename("db.RoutineGroup.editor.48x48.png", false));
_be->set_refresh_ui_slot(sigc::mem_fun(this, &DbMySQLRoutineGroupEditor::refresh_form_data));
_editor_notebook->reparent(*this);
_editor_notebook->show();
bind_entry_and_be_setter("rg_name", this, &DbMySQLRoutineGroupEditor::set_group_name);
Gtk::TextView* tv;
xml()->get_widget("rg_comment", tv);
add_text_change_timer(tv, sigc::mem_fun(this, &DbMySQLRoutineGroupEditor::set_comment));
Gtk::VBox* code_win;
xml()->get_widget("rg_code_holder", code_win);
embed_code_editor(_be->get_sql_editor()->get_container(), code_win);
_be->load_routines_sql();
refresh_form_data();
xml()->get_widget("rg_list", _rg_list);
_rg_list->set_model(_routines_model);
_rg_list->append_column("Routine", _routines_columns->item);
_rg_list->set_headers_visible(false);
_rg_list->signal_row_activated().connect(sigc::mem_fun(this, &DbMySQLRoutineGroupEditor::activate_row));
// Setup DnD
std::vector<Gtk::TargetEntry> targets;
targets.push_back(Gtk::TargetEntry(WB_DBOBJECT_DRAG_TYPE, Gtk::TARGET_SAME_APP));
_rg_list->drag_dest_set(targets, Gtk::DEST_DEFAULT_ALL,Gdk::ACTION_COPY);
_rg_list->signal_drag_data_received().connect(sigc::mem_fun(this, &DbMySQLRoutineGroupEditor::on_routine_drop));
_rg_list->signal_event().connect(sigc::mem_fun(*this, &DbMySQLRoutineGroupEditor::process_event));
show_all();
}
开发者ID:abibell,项目名称:mysql-workbench,代码行数:47,代码来源:mysql_routinegroup_editor_fe.cpp
示例17: LogView
int
NetLogGuiGtkWindow::on_service_added(fawkes::NetworkService *service)
{
if ( ntb_logviewers.get_n_pages() == 0 ) {
lab_no_connection->hide();
//Gtk::Container *thiscon = this;
//thiscon->remove(lab_no_connection);
//add(ntb_logviewers);
ntb_logviewers.show();
}
Gtk::HBox *hbox = Gtk::manage(new Gtk::HBox(false, 4));
Gtk::Button *button = Gtk::manage(new Gtk::Button());
Gtk::Image *image = Gtk::manage(new Gtk::Image(Gtk::Stock::CONNECT, Gtk::ICON_SIZE_BUTTON));
button->add(*image);
button->set_relief(Gtk::RELIEF_NONE);
Gtk::Label *label = Gtk::manage(new Gtk::Label());
label->set_markup(Glib::ustring("<b>") + service->host() + "</b>\n" + service->addr_string());
label->set_line_wrap();
Gtk::Label *invisible = Gtk::manage(new Gtk::Label(Glib::ustring(service->name()) + "::" + service->type() + "::" + service->domain()));
Gtk::ScrolledWindow *scrolled = Gtk::manage(new Gtk::ScrolledWindow());
scrolled->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
LogView *logview =
Gtk::manage(new LogView(service->addr_string().c_str(), service->port()));
//scrolled->add(*logview);
hbox->pack_start(*button);
hbox->pack_start(*label);
hbox->pack_start(*invisible);
button->signal_clicked().connect(sigc::bind(sigc::mem_fun(*this, &NetLogGuiGtkWindow::on_connbut_clicked), image, logview));
logview->get_connection_dispatcher()->signal_connected().connect(sigc::bind(sigc::mem_fun(*this, &NetLogGuiGtkWindow::on_connected), image));
logview->get_connection_dispatcher()->signal_disconnected().connect(sigc::bind(sigc::mem_fun(*this, &NetLogGuiGtkWindow::on_disconnected), image));
scrolled->show();
label->show();
image->show();
button->show();
logview->show();
hbox->show();
int rv = ntb_logviewers.append_page(*logview, *hbox);
return rv;
}
开发者ID:tempbottle,项目名称:fawkes,代码行数:45,代码来源:netloggui.cpp
示例18: SchemaEditor
SchemaEditor(grt::Module *m, bec::GRTManager *grtm, const grt::BaseListRef &args)
: PluginEditorBase(m, grtm, args, "modules/data/editor_schema.glade")
, _be(new MySQLSchemaEditorBE(grtm, db_mysql_SchemaRef::cast_from(args[0])))
{
xml()->get_widget("mysql_schema_editor_notebook", _editor_notebook);
Gtk::Widget *widget;
xml()->get_widget("base_table", widget);
Gtk::Image *image;
xml()->get_widget("image", image);
image->set(ImageCache::get_instance()->image_from_filename("db.Schema.editor.48x48.png", false));
bind_entry_and_be_setter("name_entry", this, &SchemaEditor::set_name);
if (_be->is_editing_live_object() && _be->get_schema()->oldName() != "")
{
Gtk::Entry *entry;
xml()->get_widget("name_entry", entry);
entry->set_sensitive(false);
}
Gtk::Button *btn;
xml()->get_widget("refactor_btn", btn);
btn->set_sensitive(_be->refactor_possible());
btn->signal_clicked().connect(sigc::mem_fun(this, &SchemaEditor::refactor_schema));
Gtk::ComboBox *combo;
xml()->get_widget("collation_combo", combo);
Glib::RefPtr<Gtk::ListStore> store(Glib::RefPtr<Gtk::ListStore>::cast_dynamic(xml()->get_object("collation_store")));
setup_combo_for_string_list(combo);
fill_combo_from_string_list(combo, _be->get_charset_collation_list());
add_option_combo_change_handler(combo, "CHARACTER SET - COLLATE", sigc::mem_fun(this, &SchemaEditor::set_schema_option_by_name));
Gtk::TextView *tview;
xml()->get_widget("text_view", tview);
add_text_change_timer(tview, sigc::mem_fun(this, &SchemaEditor::set_comment));
//!widget->reparent(*this);
add(*_editor_notebook);
_editor_notebook->show();
show_all();
refresh_form_data();
}
开发者ID:abibell,项目名称:mysql-workbench,代码行数:45,代码来源:schema_editor_fe.cpp
示例19:
HGTalkLoginBox::HGTalkLoginBox()
{
Gtk::Image * pImage = Gtk::manage(new Gtk::Image(HGTALK_ICON_128));
pack_start(*pImage, FALSE, TRUE, 0);
pImage->set_size_request(-1, 180);
Gtk::Label * pTemp = Gtk::manage(new Gtk::Label(HGTALK_USERNAME));
pTemp->set_alignment(0.0, 0.5);
pack_start(*pTemp, FALSE, TRUE, 0);
m_pUsername = Gtk::manage(new HGTalkUsernameEntry);
pack_start(*m_pUsername, FALSE, TRUE, 0);
pTemp = Gtk::manage(new Gtk::Label(HGTALK_PASSWORD));
pTemp->set_alignment(0.0, 0.5);
pack_start(*pTemp, FALSE, TRUE, 0);
m_pPassword = Gtk::manage(new HGTalkPasswordEntry);
pack_start(*m_pPassword, FALSE, TRUE, 0);
m_pRemPass =
Gtk::manage(new HGTalkRempassButton);
pack_start(*m_pRemPass, FALSE, TRUE, 0);
Gtk::ButtonBox * pButtonBox =
Gtk::manage(new Gtk::HButtonBox);
pack_start(*pButtonBox, FALSE, TRUE, 0);
Gtk::Button * pButton =
Gtk::manage(new HGTalkLoginButton);
pButtonBox->pack_start(*pButton, FALSE, FALSE, 0);
m_pTip = Gtk::manage(new Gtk::Label());
pack_start(*m_pTip, TRUE, TRUE, 0);
pButtonBox = Gtk::manage(new Gtk::HButtonBox);
pButtonBox->set_layout(Gtk::BUTTONBOX_END);
pack_start(*pButtonBox, FALSE, TRUE, 0);
Gtk::LinkButton * pLinkButton =
Gtk::manage(new HGTalkPreferencesButton);
pButtonBox->pack_start(*pLinkButton, FALSE, FALSE, 0);
pLinkButton = Gtk::manage(new HGTalkAboutButton);
pButtonBox->pack_start(*pLinkButton, FALSE, FALSE, 0);
show_all();
}
开发者ID:kaleka,项目名称:hgtalk,代码行数:44,代码来源:HGTalkLoginBox.cpp
示例20: on_toggled
void Widget_Link::on_toggled()
{
Gtk::Image *icon;
if(get_active())
{
icon= icon_on_;
set_tooltip_text(tooltip_active_);
}
else
{
icon=icon_off_;
set_tooltip_text(tooltip_inactive_);
}
remove();
add(*icon);
icon->show();
}
开发者ID:blackwarthog,项目名称:synfig,代码行数:19,代码来源:widget_link.cpp
注:本文中的gtk::Image类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论