本文整理汇总了C++中GTK_ORIENTABLE函数的典型用法代码示例。如果您正苦于以下问题:C++ GTK_ORIENTABLE函数的具体用法?C++ GTK_ORIENTABLE怎么用?C++ GTK_ORIENTABLE使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GTK_ORIENTABLE函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: photos_edit_palette_row_constructed
static void
photos_edit_palette_row_constructed (GObject *object)
{
PhotosEditPaletteRow *self = PHOTOS_EDIT_PALETTE_ROW (object);
GtkWidget *grid0;
GtkWidget *grid1;
GtkWidget *image;
GtkWidget *label;
GtkWidget *tool_widget;
const gchar *icon_name;
const gchar *name;
gchar *name_markup;
G_OBJECT_CLASS (photos_edit_palette_row_parent_class)->constructed (object);
self->row_revealer = gtk_revealer_new();
gtk_revealer_set_transition_type (GTK_REVEALER (self->row_revealer), GTK_REVEALER_TRANSITION_TYPE_SLIDE_DOWN);
gtk_container_add (GTK_CONTAINER (self), self->row_revealer);
grid0 = gtk_grid_new ();
gtk_widget_set_margin_bottom (grid0, 6);
gtk_widget_set_margin_start (grid0, 18);
gtk_widget_set_margin_end (grid0, 18);
gtk_widget_set_margin_top (grid0, 6);
gtk_orientable_set_orientation (GTK_ORIENTABLE (grid0), GTK_ORIENTATION_VERTICAL);
gtk_container_add (GTK_CONTAINER (self->row_revealer), grid0);
grid1 = gtk_grid_new ();
gtk_orientable_set_orientation (GTK_ORIENTABLE (grid1), GTK_ORIENTATION_HORIZONTAL);
gtk_grid_set_column_spacing (GTK_GRID (grid1), 12);
gtk_container_add (GTK_CONTAINER (grid0), grid1);
icon_name = photos_tool_get_icon_name (self->tool);
image = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_BUTTON);
gtk_container_add (GTK_CONTAINER (grid1), image);
name = photos_tool_get_name (self->tool);
label = gtk_label_new (NULL);
name_markup = g_strdup_printf ("<b>%s</b>", name);
gtk_label_set_markup (GTK_LABEL (label), name_markup);
gtk_container_add (GTK_CONTAINER (grid1), label);
self->details_revealer = gtk_revealer_new ();
gtk_revealer_set_transition_type (GTK_REVEALER (self->details_revealer),
GTK_REVEALER_TRANSITION_TYPE_SLIDE_DOWN);
gtk_container_add (GTK_CONTAINER (grid0), self->details_revealer);
tool_widget = photos_tool_get_widget (self->tool);
gtk_widget_set_margin_bottom (tool_widget, 12);
gtk_widget_set_margin_top (tool_widget, 12);
gtk_container_add (GTK_CONTAINER (self->details_revealer), tool_widget);
gtk_size_group_add_widget (self->size_group, tool_widget);
g_signal_connect_swapped (self->tool, "hide-requested", G_CALLBACK (photos_edit_palette_row_hide_details), self);
gtk_widget_show_all (GTK_WIDGET (self));
g_free (name_markup);
g_clear_object (&self->size_group); /* We will not need it any more */
}
开发者ID:iamneha,项目名称:gnome-photos,代码行数:60,代码来源:photos-edit-palette-row.c
示例2: gtkProgressBarMapMethod
static int gtkProgressBarMapMethod(Ihandle* ih)
{
ih->handle = gtk_progress_bar_new();
if (!ih->handle)
return IUP_ERROR;
/* add to the parent, all GTK controls must call this. */
iupgtkAddToParent(ih);
gtk_widget_realize(ih->handle);
if (iupStrEqualNoCase(iupAttribGetStr(ih, "ORIENTATION"), "VERTICAL"))
{
#if GTK_CHECK_VERSION(3, 0, 0)
gtk_orientable_set_orientation(GTK_ORIENTABLE(ih->handle), GTK_ORIENTATION_VERTICAL);
gtk_progress_bar_set_inverted(GTK_PROGRESS_BAR(ih->handle), TRUE);
#else
gtk_progress_bar_set_orientation(GTK_PROGRESS_BAR(ih->handle), GTK_PROGRESS_BOTTOM_TO_TOP);
#endif
if (ih->userheight < ih->userwidth)
{
int tmp = ih->userheight;
ih->userheight = ih->userwidth;
ih->userwidth = tmp;
}
}
else
{
#if GTK_CHECK_VERSION(3, 0, 0)
gtk_orientable_set_orientation(GTK_ORIENTABLE(ih->handle), GTK_ORIENTATION_HORIZONTAL);
#else
gtk_progress_bar_set_orientation((GtkProgressBar*)ih->handle, GTK_PROGRESS_LEFT_TO_RIGHT);
#endif
}
if (iupAttribGetBoolean(ih, "MARQUEE"))
{
#if GTK_CHECK_VERSION(3, 0, 0)
gtk_progress_bar_pulse(GTK_PROGRESS_BAR(ih->handle));
#else
gtk_progress_set_activity_mode((GtkProgress*)ih->handle, TRUE);
#endif
ih->data->marquee = 1;
ih->data->timer = IupTimer();
IupSetCallback(ih->data->timer, "ACTION_CB", (Icallback)gtkProgressBarTimeCb);
IupSetAttribute(ih->data->timer, "TIME", "100");
iupAttribSet(ih->data->timer, "_IUP_PROGRESSBAR", (char*)ih);
gtk_progress_bar_set_pulse_step((GtkProgressBar*)ih->handle, 0.02);
}
else
ih->data->marquee = 0;
return IUP_NOERROR;
}
开发者ID:DavidPhillipOster,项目名称:IupCocoa,代码行数:58,代码来源:iupgtk_progressbar.c
示例3: orientation_member
static int orientation_member(lua_State *L)
{
lua_box box;
luaA_to(L,lua_box,&box,1);
dt_lua_orientation_t orientation;
if(lua_gettop(L) > 2) {
luaA_to(L,dt_lua_orientation_t,&orientation,3);
gtk_orientable_set_orientation(GTK_ORIENTABLE(box->widget),orientation);
return 0;
}
orientation = gtk_orientable_get_orientation(GTK_ORIENTABLE(box->widget));
luaA_push(L,dt_lua_orientation_t,&orientation);
return 1;
}
开发者ID:CarVac,项目名称:darktable,代码行数:14,代码来源:box.c
示例4: gtk_scale_button_set_orientation_private
static void
gtk_scale_button_set_orientation_private (GtkScaleButton *button,
GtkOrientation orientation)
{
GtkScaleButtonPrivate *priv = button->priv;
if (orientation != priv->orientation)
{
priv->orientation = orientation;
gtk_orientable_set_orientation (GTK_ORIENTABLE (priv->box),
orientation);
gtk_container_child_set (GTK_CONTAINER (priv->box),
button->plus_button,
"pack-type",
orientation == GTK_ORIENTATION_VERTICAL ?
GTK_PACK_START : GTK_PACK_END,
NULL);
gtk_container_child_set (GTK_CONTAINER (priv->box),
button->minus_button,
"pack-type",
orientation == GTK_ORIENTATION_VERTICAL ?
GTK_PACK_END : GTK_PACK_START,
NULL);
gtk_orientable_set_orientation (GTK_ORIENTABLE (priv->scale),
orientation);
if (orientation == GTK_ORIENTATION_VERTICAL)
{
gtk_widget_set_size_request (GTK_WIDGET (priv->scale),
-1, SCALE_SIZE);
gtk_range_set_inverted (GTK_RANGE (priv->scale), TRUE);
}
else
{
gtk_widget_set_size_request (GTK_WIDGET (priv->scale),
SCALE_SIZE, -1);
gtk_range_set_inverted (GTK_RANGE (priv->scale), FALSE);
}
/* FIXME: without this, the popup window appears as a square
* after changing the orientation
*/
gtk_window_resize (GTK_WINDOW (priv->dock), 1, 1);
g_object_notify (G_OBJECT (button), "orientation");
}
}
开发者ID:Krlos0208,项目名称:Sintetizador_Voz,代码行数:49,代码来源:gtkscalebutton.c
示例5: test_iconview_object_new
/* test that g_object_new keeps the provided area */
static void
test_iconview_object_new (void)
{
GtkWidget *view;
GtkCellArea *area;
area = gtk_cell_area_box_new ();
gtk_orientable_set_orientation (GTK_ORIENTABLE (area), GTK_ORIENTATION_HORIZONTAL);
view = g_object_new (GTK_TYPE_ICON_VIEW, "cell-area", area, NULL);
g_assert (gtk_cell_layout_get_area (GTK_CELL_LAYOUT (view)) == area);
g_assert (gtk_orientable_get_orientation (GTK_ORIENTABLE (area)) == gtk_icon_view_get_item_orientation (GTK_ICON_VIEW (view)));
g_object_ref_sink (view);
g_object_unref (view);
}
开发者ID:nacho,项目名称:gtk-,代码行数:16,代码来源:cellarea.c
示例6: objects_index_init
static void
objects_index_init (ObjectsIndex *index, G_GNUC_UNUSED ObjectsIndexClass *klass)
{
index->priv = g_new0 (ObjectsIndexPrivate, 1);
gtk_orientable_set_orientation (GTK_ORIENTABLE (index), GTK_ORIENTATION_VERTICAL);
}
开发者ID:zzeroo,项目名称:libgda,代码行数:7,代码来源:objects-index.c
示例7: ide_omni_search_display_init
static void
ide_omni_search_display_init (IdeOmniSearchDisplay *self)
{
self->providers = g_ptr_array_new_with_free_func (provider_entry_destroy);
gtk_orientable_set_orientation (GTK_ORIENTABLE (self), GTK_ORIENTATION_VERTICAL);
}
开发者ID:bhurtelashish,项目名称:gnome-builder,代码行数:7,代码来源:ide-omni-search-display.c
示例8: create_stat_win
void create_stat_win()
{
gwin_stat = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_has_resize_grip(GTK_WINDOW(gwin_stat), FALSE);
#if WIN32
set_no_focus(gwin_stat);
#endif
gtk_container_set_border_width (GTK_CONTAINER (gwin_stat), 0);
gtk_widget_realize (gwin_stat);
#if UNIX
GdkWindow *gdkwin0 = gtk_widget_get_window(gwin_stat);
set_no_focus(gwin_stat);
#else
win32_init_win(gwin_stat);
#endif
GtkWidget *vbox = gtk_vbox_new (FALSE, 0);
gtk_orientable_set_orientation(GTK_ORIENTABLE(vbox), GTK_ORIENTATION_VERTICAL);
gtk_container_add (GTK_CONTAINER (gwin_stat), vbox);
label_disp = gtk_label_new(NULL);
gtk_box_pack_start (GTK_BOX (vbox), label_disp, TRUE, TRUE, 0);
gtk_widget_show_all(gwin_stat);
timeout_handle = g_timeout_add(3000, timeout_update_stat, NULL);
}
开发者ID:mangoicestar,项目名称:gcin-debian,代码行数:29,代码来源:statistic.cpp
示例9: box_init
static void box_init(lua_State* L)
{
lua_box box;
luaA_to(L,lua_box,&box,-1);
gtk_orientable_set_orientation(GTK_ORIENTABLE(box->widget),GTK_ORIENTATION_VERTICAL);
gtk_box_set_spacing(GTK_BOX(box->widget), DT_PIXEL_APPLY_DPI(5));
}
开发者ID:CarVac,项目名称:darktable,代码行数:7,代码来源:box.c
示例10: table_preferences_init
static void
table_preferences_init (TablePreferences *tpreferences, G_GNUC_UNUSED TablePreferencesClass *klass)
{
tpreferences->priv = g_new0 (TablePreferencesPrivate, 1);
gtk_orientable_set_orientation (GTK_ORIENTABLE (tpreferences), GTK_ORIENTATION_VERTICAL);
}
开发者ID:UIKit0,项目名称:libgda,代码行数:7,代码来源:table-preferences.c
示例11: gucharmap_charmap_get_orientation
/**
* gucharmap_charmap_get_orientation:
* @charmap:
*
* Deprecated: 2.25.0
*/
GtkOrientation
gucharmap_charmap_get_orientation (GucharmapCharmap *charmap)
{
g_return_val_if_fail (GUCHARMAP_IS_CHARMAP (charmap), GTK_ORIENTATION_HORIZONTAL);
return gtk_orientable_get_orientation (GTK_ORIENTABLE (charmap));
}
开发者ID:Distrotech,项目名称:gucharmap,代码行数:13,代码来源:gucharmap-charmap.c
示例12: gdict_speller_init
static void
gdict_speller_init (GdictSpeller *speller)
{
GdictSpellerPrivate *priv;
speller->priv = priv = gdict_speller_get_instance_private (speller);
gtk_orientable_set_orientation (GTK_ORIENTABLE (speller), GTK_ORIENTATION_VERTICAL);
priv->database = NULL;
priv->strategy = NULL;
priv->word = NULL;
priv->results = -1;
priv->context = NULL;
priv->store = gtk_list_store_new (MATCH_N_COLUMNS,
G_TYPE_INT, /* MatchType */
G_TYPE_STRING, /* db_name */
G_TYPE_STRING /* word */);
priv->start_id = 0;
priv->end_id = 0;
priv->match_id = 0;
priv->error_id = 0;
}
开发者ID:mate-desktop,项目名称:mate-utils,代码行数:26,代码来源:gdict-speller.c
示例13: fcitx_ui_widget_init
static void
fcitx_ui_widget_init(FcitxUIWidget* self)
{
gtk_orientable_set_orientation(GTK_ORIENTABLE(self), GTK_ORIENTATION_VERTICAL);
self->label = gtk_label_new(_("Cannot load currently used user interface info"));
gtk_box_pack_start(GTK_BOX(self), self->label, TRUE, TRUE, 0);
}
开发者ID:areslp,项目名称:fcitx-configtool,代码行数:7,代码来源:ui_widget.c
示例14: file_modify_box_new
GtkWidget *
file_modify_box_new ()
{
GtkWidget *widget = GTK_WIDGET (g_object_new (file_modify_box_get_type (), NULL));
gtk_orientable_set_orientation (GTK_ORIENTABLE (widget), GTK_ORIENTATION_HORIZONTAL);
return widget;
}
开发者ID:abhijangda,项目名称:gIDLE,代码行数:7,代码来源:file_modify_box.c
示例15: orient_toggled
static void
orient_toggled (GtkToggleButton *button, gpointer user_data)
{
GList *orientables = (GList *) user_data, *ptr;
gboolean state = gtk_toggle_button_get_active (button);
GtkOrientation orientation;
if (state)
{
orientation = GTK_ORIENTATION_VERTICAL;
gtk_button_set_label (GTK_BUTTON (button), "Vertical");
}
else
{
orientation = GTK_ORIENTATION_HORIZONTAL;
gtk_button_set_label (GTK_BUTTON (button), "Horizontal");
}
for (ptr = orientables; ptr; ptr = ptr->next)
{
GtkOrientable *orientable = GTK_ORIENTABLE (ptr->data);
gtk_orientable_set_orientation (orientable, orientation);
}
}
开发者ID:Aridna,项目名称:gtk2,代码行数:25,代码来源:testorientable.c
示例16: downloadmanager_setup
void
downloadmanager_setup(void)
{
dm.win = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_set_type_hint(GTK_WINDOW(dm.win), GDK_WINDOW_TYPE_HINT_DIALOG);
gtk_window_set_default_size(GTK_WINDOW(dm.win), 500, 250);
gtk_window_set_title(GTK_WINDOW(dm.win), __NAME__" - Download Manager");
g_signal_connect(G_OBJECT(dm.win), "delete-event",
G_CALLBACK(gtk_widget_hide_on_delete), NULL);
g_signal_connect(G_OBJECT(dm.win), "key-press-event",
G_CALLBACK(key_downloadmanager), NULL);
dm.toolbar = gtk_toolbar_new();
gtk_orientable_set_orientation(GTK_ORIENTABLE(dm.toolbar),
GTK_ORIENTATION_VERTICAL);
gtk_toolbar_set_style(GTK_TOOLBAR(dm.toolbar), GTK_TOOLBAR_BOTH_HORIZ);
gtk_toolbar_set_show_arrow(GTK_TOOLBAR(dm.toolbar), FALSE);
dm.scroll = gtk_scrolled_window_new(NULL, NULL);
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(dm.scroll),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
gtk_container_add(GTK_CONTAINER(dm.scroll), dm.toolbar);
gtk_container_add(GTK_CONTAINER(dm.win), dm.scroll);
}
开发者ID:kublaj,项目名称:lariza,代码行数:25,代码来源:browser.c
示例17: action_task_view_cb
static void
action_task_view_cb (GtkRadioAction *action,
GtkRadioAction *current,
ETaskShellView *task_shell_view)
{
ETaskShellContent *task_shell_content;
GtkOrientable *orientable;
GtkOrientation orientation;
task_shell_content = task_shell_view->priv->task_shell_content;
orientable = GTK_ORIENTABLE (task_shell_content);
switch (gtk_radio_action_get_current_value (action)) {
case 0:
orientation = GTK_ORIENTATION_VERTICAL;
break;
case 1:
orientation = GTK_ORIENTATION_HORIZONTAL;
break;
default:
g_return_if_reached ();
}
gtk_orientable_set_orientation (orientable, orientation);
}
开发者ID:lantw44,项目名称:gsoc2013-evolution,代码行数:25,代码来源:e-task-shell-view-actions.c
示例18: create_toolbar
static void create_toolbar() {
browser->toolbar = gtk_toolbar_new();
#ifndef GTK_ORIENTABLE
gtk_toolbar_set_orientation(GTK_TOOLBAR (browser->toolbar), GTK_ORIENTATION_HORIZONTAL);
#else
gtk_orientable_set_orientation(GTK_ORIENTABLE (browser->toolbar), GTK_ORIENTATION_HORIZONTAL);
#endif
gtk_toolbar_set_style(GTK_TOOLBAR (browser->toolbar), GTK_TOOLBAR_BOTH_HORIZ);
GtkToolItem* item;
/* the back button */
item = gtk_tool_button_new_from_stock(GTK_STOCK_GO_BACK);
g_signal_connect (G_OBJECT (item), "clicked", G_CALLBACK (go_back_cb), (gpointer) browser);
gtk_toolbar_insert(GTK_TOOLBAR (browser->toolbar), item, -1);
/* The forward button */
item = gtk_tool_button_new_from_stock(GTK_STOCK_GO_FORWARD);
g_signal_connect (G_OBJECT (item), "clicked", G_CALLBACK (go_forward_cb), (gpointer) browser);
gtk_toolbar_insert(GTK_TOOLBAR (browser->toolbar), item, -1);
/* The URL entry */
item = gtk_tool_item_new();
gtk_tool_item_set_expand(item, TRUE);
browser->uri_entry = gtk_entry_new();
gtk_container_add(GTK_CONTAINER (item), browser->uri_entry);
g_signal_connect (G_OBJECT (browser->uri_entry), "activate", G_CALLBACK (activate_uri_entry_cb), (gpointer)browser);
gtk_toolbar_insert(GTK_TOOLBAR (browser->toolbar), item, -1);
/* The go button */
item = gtk_tool_button_new_from_stock(GTK_STOCK_OK);
g_signal_connect_swapped (G_OBJECT (item), "clicked", G_CALLBACK (activate_uri_entry_cb), (gpointer)browser->uri_entry);
gtk_toolbar_insert(GTK_TOOLBAR (browser->toolbar), item, -1);
}
开发者ID:zeejuncode,项目名称:gtkpod,代码行数:34,代码来源:coverweb.c
示例19: gtk_level_bar_init
static void
gtk_level_bar_init (GtkLevelBar *self)
{
GtkStyleContext *context;
self->priv = gtk_level_bar_get_instance_private (self);
context = gtk_widget_get_style_context (GTK_WIDGET (self));
gtk_style_context_add_class (context, GTK_STYLE_CLASS_LEVEL_BAR);
self->priv->cur_value = 0.0;
self->priv->min_value = 0.0;
self->priv->max_value = 1.0;
gtk_level_bar_ensure_offset (self, GTK_LEVEL_BAR_OFFSET_LOW, 0.25);
gtk_level_bar_ensure_offset (self, GTK_LEVEL_BAR_OFFSET_HIGH, 0.75);
gtk_level_bar_update_level_style_classes (self);
self->priv->bar_mode = GTK_LEVEL_BAR_MODE_CONTINUOUS;
gtk_level_bar_update_mode_style_classes (self);
/* set initial orientation and style classes */
self->priv->orientation = GTK_ORIENTATION_HORIZONTAL;
_gtk_orientable_set_style_classes (GTK_ORIENTABLE (self));
self->priv->inverted = FALSE;
gtk_widget_set_has_window (GTK_WIDGET (self), FALSE);
}
开发者ID:3dfxmadscientist,项目名称:gtk,代码行数:29,代码来源:gtklevelbar.c
示例20: gnc_item_edit_init
/*
* Instance initialization
*/
static void
gnc_item_edit_init (GncItemEdit *item_edit)
{
/* Set invalid values so that we know when we have been fully
initialized */
gtk_orientable_set_orientation (GTK_ORIENTABLE(item_edit),
GTK_ORIENTATION_HORIZONTAL);
item_edit->sheet = NULL;
item_edit->editor = NULL;
item_edit->is_popup = FALSE;
item_edit->show_popup = FALSE;
item_edit->popup_toggle.ebox = NULL;
item_edit->popup_toggle.tbutton = NULL;
item_edit->popup_toggle.arrow_down = TRUE;
item_edit->popup_toggle.signals_connected = FALSE;
item_edit->popup_item = NULL;
item_edit->popup_get_height = NULL;
item_edit->popup_autosize = NULL;
item_edit->popup_set_focus = NULL;
item_edit->popup_post_show = NULL;
item_edit->popup_user_data = NULL;
item_edit->style = NULL;
gnc_virtual_location_init(&item_edit->virt_loc);
}
开发者ID:carrot-garden,项目名称:money_gnucash,代码行数:33,代码来源:gnucash-item-edit.c
注:本文中的GTK_ORIENTABLE函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论