本文整理汇总了C++中GTK_PANED函数的典型用法代码示例。如果您正苦于以下问题:C++ GTK_PANED函数的具体用法?C++ GTK_PANED怎么用?C++ GTK_PANED使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GTK_PANED函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: remmina_ftp_client_load_state
void remmina_ftp_client_load_state(RemminaFTPClient *client, RemminaFile *remminafile)
{
gint pos;
GtkAllocation a;
pos = remmina_file_get_int(remminafile, "ftp_vpanedpos", 0);
if (pos)
{
gtk_widget_get_allocation(client->priv->vpaned, &a);
if (a.height > 0 && pos > a.height - 60)
{
pos = a.height - 60;
}
gtk_paned_set_position(GTK_PANED(client->priv->vpaned), pos);
}
}
开发者ID:repzilon,项目名称:Remmina,代码行数:16,代码来源:remmina_ftp_client.c
示例2: on_paned_mapped
static void
on_paned_mapped (GtkWidget *paned,
GeditCollaborationWindowHelper *helper)
{
GtkAllocation allocation;
gtk_widget_get_allocation (paned, &allocation);
gtk_paned_set_position (GTK_PANED (paned),
allocation.height - 200);
/* run this only once */
g_signal_handlers_disconnect_by_func (paned,
G_CALLBACK (on_paned_mapped),
helper);
}
开发者ID:jessevdk,项目名称:gedit-collaboration,代码行数:16,代码来源:gedit-collaboration-window-helper.c
示例3: g_object_set
void XAttGtk::activate_cmd_scrolled_ca(GtkWidget* w, gpointer data)
{
XAttGtk* xatt = (XAttGtk*)data;
if (xatt->input_open) {
g_object_set(xatt->cmd_scrolledinput, "visible", FALSE, NULL);
int w, h;
gdk_drawable_get_size(xatt->pane->window, &w, &h);
gtk_paned_set_position(GTK_PANED(xatt->pane), h - 50);
xatt->set_prompt("");
xatt->input_open = 0;
xatt->xattnav->set_inputfocus();
}
}
开发者ID:siamect,项目名称:proview,代码行数:16,代码来源:xtt_xatt_gtk.cpp
示例4: g_object_set
void WdaGtk::activate_cmd_scrolled_ca( GtkWidget *w, gpointer data)
{
WdaGtk *wda = (WdaGtk *)data;
if ( wda->input_open) {
g_object_set( wda->cmd_scrolledinput, "visible", FALSE, NULL);
int w, h;
gdk_drawable_get_size( wda->pane->window, &w, &h);
gtk_paned_set_position( GTK_PANED(wda->pane), h - 50);
wda->set_prompt( "");
wda->input_open = 0;
wda->wdanav->set_inputfocus();
}
}
开发者ID:ManfredHerrmann,项目名称:proview,代码行数:17,代码来源:wb_wda_gtk.cpp
示例5: GUI_box_paned_siz
//================================================================
int GUI_box_paned_siz (MemObj *mo, int siz) {
//================================================================
/// GUI_box_paned_siz modify size of primary paned-box
Obj_Unknown *go;
// printf("GUI_box_paned_siz %d\n",si
go = GUI_obj_pos (mo);
if(!go) return 0;
gtk_paned_set_position (GTK_PANED (go->widget), siz);
return 0;
}
开发者ID:NoSuchProcess,项目名称:gcad3d,代码行数:18,代码来源:gtk_container.c
示例6: paned_button_release_event
static gboolean paned_button_release_event(GtkWidget *widget,
GdkEventButton *event,
gpointer user_data)
{
gint panesize;
gchar layout[80];
panesize = gtk_paned_get_position(GTK_PANED(widget));
if (panesize > 15) {
settings.sidebar_notebook_height = panesize;
sprintf(layout, "%d", settings.sidebar_notebook_height);
xml_set_value("Xiphos", "layout",
"sidebar_notebook_height", layout);
}
return FALSE;
}
开发者ID:crosswire,项目名称:xiphos,代码行数:17,代码来源:sidebar.c
示例7: clip_GTK_PANEDPACK2
/* Add a child to the bottom or right pane. */
int
clip_GTK_PANEDPACK2(ClipMachine * cm)
{
C_widget *cpan = _fetch_cw_arg(cm);
C_widget *cwid = _fetch_cwidget(cm,_clip_spar(cm,2));
gboolean resize = _clip_parl(cm,3);
gboolean shrink = _clip_parl(cm,4);
CHECKCWID(cpan,GTK_IS_PANED);
CHECKARG2(2,MAP_t,NUMERIC_t); CHECKCWID(cwid,GTK_IS_WIDGET);
CHECKOPT(3,LOGICAL_t); CHECKOPT(4,LOGICAL_t);
if (_clip_parinfo(cm,3)==UNDEF_t) resize = TRUE;
if (_clip_parinfo(cm,4)==UNDEF_t) shrink = TRUE;
gtk_paned_pack2(GTK_PANED(cpan->widget), cwid->widget, resize, shrink);
return 0;
err:
return 1;
}
开发者ID:amery,项目名称:clip-itk,代码行数:18,代码来源:paned.c
示例8: gtk_text_buffer_get_start_iter
void WAttGtk::activate_cmd_scrolled_ok( GtkWidget *w, gpointer data)
{
WAttGtk *watt = (WAttGtk *)data;
gchar *text, *textutf8;
unsigned char *s;
int sts;
if ( watt->input_open) {
GtkTextIter start_iter, end_iter;
gtk_text_buffer_get_start_iter( watt->cmd_scrolled_buffer, &start_iter);
gtk_text_buffer_get_end_iter( watt->cmd_scrolled_buffer, &end_iter);
textutf8 = gtk_text_buffer_get_text( watt->cmd_scrolled_buffer, &start_iter, &end_iter,
FALSE);
text = g_convert( textutf8, -1, "ISO8859-1", "UTF-8", NULL, NULL, NULL);
g_free( textutf8);
// Replace ctrl characters with space
for ( s = (unsigned char *) text; *s; s++) {
if ( *s < ' ' && *s != 10 && *s != 13)
*s = ' ';
}
sts = ((WAttNav *)watt->wattnav)->set_attr_value( watt->input_node,
watt->input_name, text);
g_object_set( watt->cmd_scrolledinput, "visible", FALSE, NULL);
watt->set_prompt( "");
watt->input_open = 0;
int w, h;
gdk_drawable_get_size( watt->pane->window, &w, &h);
gtk_paned_set_position( GTK_PANED(watt->pane), h - 50);
((WAttNav *)watt->wattnav)->redraw();
((WAttNav *)watt->wattnav)->set_inputfocus();
g_free( text);
if ( watt->pending_close) {
if ( watt->close_cb)
(watt->close_cb)( watt);
else
delete watt;
}
}
}
开发者ID:Strongc,项目名称:proview,代码行数:45,代码来源:wb_watt_gtk.cpp
示例9: xfce_image_list_dialog_init
static void
xfce_image_list_dialog_init(XfceImageListDialog *aXfceImageListDialog)
{
XfceImageListDialogPrivate *priv;
priv = g_new0(XfceImageListDialogPrivate, 1);
aXfceImageListDialog->priv = priv;
priv->listbox = xfce_image_list_box_new ();
priv->image_label = GTK_LABEL (gtk_label_new (""));
gtk_widget_show (GTK_WIDGET (priv->image_label));
priv->image = XFCE_SCALED_IMAGE (xfce_scaled_image_new ());
gtk_widget_set_size_request (GTK_WIDGET (priv->image), 400, 400);
priv->image_box = GTK_BOX (gtk_vbox_new (FALSE, 7));
gtk_container_set_border_width (GTK_CONTAINER (priv->image_box), 5);
gtk_box_pack_start (GTK_BOX (priv->image_box), GTK_WIDGET (priv->image_label), FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (priv->image_box), GTK_WIDGET (priv->image), FALSE, FALSE, 0);
gtk_widget_show_all (GTK_WIDGET (priv->image_box));
gtk_widget_show (GTK_WIDGET (priv->listbox));
priv->paned = GTK_PANED (gtk_hpaned_new ());
gtk_paned_pack1 (priv->paned, GTK_WIDGET (priv->listbox), TRUE, TRUE);
gtk_paned_pack2 (priv->paned, GTK_WIDGET (priv->image_box), TRUE, TRUE);
gtk_widget_show (GTK_WIDGET (priv->paned));
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (aXfceImageListDialog)->vbox), GTK_WIDGET (priv->paned), TRUE, TRUE, 0);
gtk_dialog_add_button (GTK_DIALOG (aXfceImageListDialog), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
priv->ok_button = GTK_BUTTON (gtk_dialog_add_button (GTK_DIALOG (aXfceImageListDialog), GTK_STOCK_OK, GTK_RESPONSE_OK));
gtk_dialog_set_default_response (GTK_DIALOG (aXfceImageListDialog), GTK_RESPONSE_CANCEL);
gtk_widget_set_sensitive (GTK_WIDGET (priv->ok_button), FALSE);
g_signal_connect (G_OBJECT (priv->listbox), "selection-changed", G_CALLBACK (xfce_image_list_dialog_selection_changed_cb), aXfceImageListDialog);
g_signal_connect (G_OBJECT (priv->listbox), "notify::changed", G_CALLBACK (xfce_image_list_dialog_notify_changed_cb), aXfceImageListDialog);
g_signal_connect (G_OBJECT (priv->listbox), "notify::filename", G_CALLBACK (xfce_image_list_dialog_notify_fname_changed_cb), aXfceImageListDialog);
g_signal_connect (G_OBJECT (priv->ok_button), "clicked", G_CALLBACK (xfce_image_list_dialog_ok_button_clicked_cb), aXfceImageListDialog);
}
开发者ID:BackupTheBerlios,项目名称:xfce-goodies-svn,代码行数:45,代码来源:xfce-image-list-dialog.c
示例10: on_window1_size_request
void
on_window1_size_request(GtkWidget * widget,
GtkRequisition * requisition, gpointer user_data)
{
static gint old_h;
gint w, h;
if (widget->window == NULL)
gtk_window_get_default_size(GTK_WINDOW(main_wnd), &w, &h);
else
gdk_window_get_size(widget->window, &w, &h);
if (h == old_h)
return;
old_h = h;
gtk_paned_set_position(GTK_PANED(vpaned), 2 * h / 3);
}
开发者ID:OpenHMR,项目名称:Open-HMR600,代码行数:18,代码来源:gconf.c
示例11: dialog_unmap
static void
dialog_unmap (GtkWidget *window,
GtkWidget *paned)
{
DialogData data;
gtk_window_get_size (GTK_WINDOW (window), &data.width, &data.height);
data.paned_position = gtk_paned_get_position (GTK_PANED (paned));
data.show_index = gtk_widget_get_visible (sidebar);
data.zoom = (view ?
webkit_web_view_get_zoom_level (WEBKIT_WEB_VIEW (view)) : 1.0);
gimp_set_data (GIMP_HELP_BROWSER_DIALOG_DATA, &data, sizeof (data));
gtk_main_quit ();
}
开发者ID:AjayRamanathan,项目名称:gimp,代码行数:18,代码来源:dialog.c
示例12: on_toggle_position
static void
on_toggle_position (GtkWidget * button, gpointer value)
{
GtkWidget *widget;
gboolean value_set;
gint position;
widget = property_get_widget ();
if (widget == NULL)
return;
value_set = GTK_TOGGLE_BUTTON (button)->active ? TRUE : FALSE;
gtk_widget_set_sensitive (GTK_WIDGET (value), value_set);
position = GPOINTER_TO_INT (gtk_object_get_data (GTK_OBJECT (widget),
Position));
gtk_paned_set_position (GTK_PANED (widget),
value_set ? position : -1);
}
开发者ID:AriaAsuka,项目名称:deadbeef,代码行数:19,代码来源:gbhpaned.c
示例13: gb_hpaned_write_source
/*
* Writes the source code needed to create this widget.
* You have to output everything necessary to create the widget here, though
* there are some convenience functions to help.
*/
static void
gb_hpaned_write_source (GtkWidget * widget, GbWidgetWriteSourceData * data)
{
gint position;
if (data->create_widget)
{
source_add (data, " %s = gtk_hpaned_new ();\n", data->wname);
}
gb_widget_write_standard_source (widget, data);
if (GTK_PANED (widget)->position_set)
{
position = GPOINTER_TO_INT (gtk_object_get_data (GTK_OBJECT (widget),
Position));
source_add (data, " gtk_paned_set_position (GTK_PANED (%s), %d);\n",
data->wname, position);
}
}
开发者ID:AriaAsuka,项目名称:deadbeef,代码行数:24,代码来源:gbhpaned.c
示例14: setup_side_pane_width
static void
setup_side_pane_width (NautilusNavigationWindow *window)
{
static gboolean setup_auto_value= TRUE;
g_return_if_fail (window->sidebar != NULL);
if (setup_auto_value) {
setup_auto_value = FALSE;
eel_preferences_add_auto_integer
(NAUTILUS_PREFERENCES_SIDEBAR_WIDTH,
&side_pane_width_auto_value);
}
window->details->side_pane_width = side_pane_width_auto_value;
gtk_paned_set_position (GTK_PANED (window->details->content_paned),
side_pane_width_auto_value);
}
开发者ID:petergtz,项目名称:nautilus,代码行数:19,代码来源:nautilus-navigation-window.c
示例15: gtk_text_buffer_get_start_iter
void WdaGtk::activate_cmd_scrolled_ok( GtkWidget *w, gpointer data)
{
WdaGtk *wda = (WdaGtk *)data;
gchar *textutf8, *text;
unsigned char *s;
int sts;
if ( wda->input_open) {
GtkTextIter start_iter, end_iter;
gtk_text_buffer_get_start_iter( wda->cmd_scrolled_buffer, &start_iter);
gtk_text_buffer_get_end_iter( wda->cmd_scrolled_buffer, &end_iter);
textutf8 = gtk_text_buffer_get_text( wda->cmd_scrolled_buffer, &start_iter, &end_iter,
FALSE);
text = g_convert( textutf8, -1, "ISO8859-1", "UTF-8", NULL, NULL, NULL);
g_free( textutf8);
if ( text) {
// Replace ctrl characters with space
for ( s = (unsigned char *) text; *s; s++) {
if ( *s < ' ' && *s != 10 && *s != 13)
*s = ' ';
}
sts = wda->wdanav->set_attr_value( wda->input_node,
wda->input_name, text);
}
g_object_set( wda->cmd_scrolledinput, "visible", FALSE, NULL);
wda->set_prompt( "");
wda->input_open = 0;
int w, h;
gdk_drawable_get_size( wda->pane->window, &w, &h);
gtk_paned_set_position( GTK_PANED(wda->pane), h - 50);
wda->wdanav->redraw();
wda->wdanav->set_inputfocus();
if ( text)
g_free( text);
else
wda->message( 'E', "Input error, invalid character");
}
}
开发者ID:ManfredHerrmann,项目名称:proview,代码行数:43,代码来源:wb_wda_gtk.cpp
示例16: CreateHPaned
GtkWidget *
CreateHPaned( GtkBox *container, char *property )
{
GtkWidget *hpaned;
long posSlider;
/* the horizontal slider */
hpaned = gtk_hpaned_new ();
gtk_container_set_border_width (GTK_CONTAINER (hpaned), 6);
wPrefGetInteger( HTMLHELPSECTION, SLIDERPREFNAME, &posSlider, SLIDERPOSDEFAULT );
gtk_paned_set_position (GTK_PANED (hpaned), (int)posSlider);
/* pack the horizontal slider into the main window */
gtk_box_pack_start( container, hpaned, TRUE, TRUE, 0 );
gtk_widget_show( hpaned );
return( hpaned );
}
开发者ID:sharkcz,项目名称:xtrkcad,代码行数:19,代码来源:gtkhelp.c
示例17: brasero_file_chooser_find_pane
static void
brasero_file_chooser_find_pane (GtkWidget *child,
gpointer footer)
{
if (GTK_IS_PANED (child)) {
GList *children_vbox;
GList *iter_vbox;
GtkWidget *vbox;
vbox = gtk_paned_get_child2 (GTK_PANED (child));
children_vbox = gtk_container_get_children (GTK_CONTAINER (vbox));
for (iter_vbox = children_vbox; iter_vbox; iter_vbox = iter_vbox->next) {
if (GTK_IS_BOX (iter_vbox->data) &&
gtk_orientable_get_orientation (GTK_ORIENTABLE (iter_vbox->data)) == GTK_ORIENTATION_HORIZONTAL) {
GtkPackType packing;
gtk_box_query_child_packing (GTK_BOX (vbox),
GTK_WIDGET (iter_vbox->data),
NULL,
NULL,
NULL,
&packing);
if (packing == GTK_PACK_START) {
GtkRequisition total_request, footer_request;
gtk_widget_get_preferred_size (GTK_WIDGET (vbox),
&total_request, NULL);
gtk_widget_get_preferred_size (GTK_WIDGET (iter_vbox->data),
&footer_request, NULL);
*((gint *) footer) = total_request.height - footer_request.height;
break;
}
}
}
g_list_free (children_vbox);
}
else if (GTK_IS_CONTAINER (child)) {
gtk_container_foreach (GTK_CONTAINER (child),
brasero_file_chooser_find_pane,
footer);
}
}
开发者ID:Arkoprovo1996,项目名称:brasero,代码行数:43,代码来源:brasero-file-chooser.c
示例18: gimp_session_info_book_from_widget
GimpSessionInfoBook *
gimp_session_info_book_from_widget (GimpDockbook *dockbook)
{
GimpSessionInfoBook *info;
GtkWidget *parent;
GList *children;
GList *list;
g_return_val_if_fail (GIMP_IS_DOCKBOOK (dockbook), NULL);
info = gimp_session_info_book_new ();
parent = gtk_widget_get_parent (GTK_WIDGET (dockbook));
if (GTK_IS_VPANED (parent))
{
GtkPaned *paned = GTK_PANED (parent);
if (GTK_WIDGET (dockbook) == gtk_paned_get_child2 (paned))
info->position = gtk_paned_get_position (paned);
}
info->current_page =
gtk_notebook_get_current_page (GTK_NOTEBOOK (dockbook));
children = gtk_container_get_children (GTK_CONTAINER (dockbook));
for (list = children; list; list = g_list_next (list))
{
GimpSessionInfoDockable *dockable;
dockable = gimp_session_info_dockable_from_widget (list->data);
info->dockables = g_list_prepend (info->dockables, dockable);
}
info->dockables = g_list_reverse (info->dockables);
g_list_free (children);
return info;
}
开发者ID:jdburton,项目名称:gimp-osx,代码行数:42,代码来源:gimpsessioninfo-book.c
示例19: fm_tab_page_init
static void fm_tab_page_init(FmTabPage *page)
{
GtkPaned* paned = GTK_PANED(page);
FmTabLabel* tab_label;
FmFolderView* folder_view;
GList* focus_chain = NULL;
page->side_pane = fm_side_pane_new();
fm_side_pane_set_mode(FM_SIDE_PANE(page->side_pane), app_config->side_pane_mode);
/* TODO: add a close button to side pane */
gtk_paned_add1(paned, page->side_pane);
focus_chain = g_list_prepend(focus_chain, page->side_pane);
page->folder_view = fm_folder_view_new(app_config->view_mode);
folder_view = FM_FOLDER_VIEW(page->folder_view);
fm_folder_view_set_hint_type(folder_view, app_config->hint_type);
fm_folder_view_sort(folder_view, app_config->sort_type, app_config->sort_by);
fm_folder_view_set_selection_mode(folder_view, GTK_SELECTION_MULTIPLE);
page->nav_history = fm_nav_history_new();
gtk_paned_add2(paned, page->folder_view);
focus_chain = g_list_prepend(focus_chain, page->folder_view);
/* We need this to change tab order to focus folder view before left pane. */
gtk_container_set_focus_chain(page, focus_chain);
g_list_free(focus_chain);
gtk_widget_show_all(GTK_WIDGET(page));
/* create tab label */
tab_label = (FmTabLabel*)fm_tab_label_new("");
gtk_label_set_max_width_chars(tab_label->label, app_config->max_tab_chars);
gtk_label_set_ellipsize(tab_label->label, PANGO_ELLIPSIZE_END);
page->tab_label = GTK_WIDGET(tab_label);
g_signal_connect(page->folder_view, "sel-changed",
G_CALLBACK(on_folder_view_sel_changed), page);
g_signal_connect(page->folder_view, "loaded",
G_CALLBACK(on_folder_view_loaded), page);
/* the folder view is already loded, call the "loaded" callback ourself. */
if(fm_folder_view_get_is_loaded(folder_view))
on_folder_view_loaded(folder_view, fm_folder_view_get_cwd(folder_view), page);
}
开发者ID:geekless,项目名称:pcmanfm,代码行数:42,代码来源:tab-page.c
示例20: SetupSave
void SetupSave (void) {
char cfgfile[PATH_MAX];
FILE *cfg_fp;
int n = 0;
char homedir[PATH_MAX];
get_home_dir(homedir);
setlocale(LC_NUMERIC, "C");
snprintf(cfgfile, PATH_MAX, "%s%s.cammill.cfg", homedir, DIR_SEP);
cfg_fp = fopen(cfgfile, "w");
if (cfg_fp == NULL) {
fprintf(stderr, "Can not write Setup: %s\n", cfgfile);
return;
}
for (n = 0; n < P_LAST; n++) {
char name_str[1024];
snprintf(name_str, sizeof(name_str), "%s|%s", PARAMETER[n].group, PARAMETER[n].name);
if (PARAMETER[n].type == T_FLOAT) {
fprintf(cfg_fp, "%s=%f\n", name_str, PARAMETER[n].vfloat);
} else if (PARAMETER[n].type == T_DOUBLE) {
fprintf(cfg_fp, "%s=%f\n", name_str, PARAMETER[n].vdouble);
} else if (PARAMETER[n].type == T_INT) {
fprintf(cfg_fp, "%s=%i\n", name_str, PARAMETER[n].vint);
} else if (PARAMETER[n].type == T_SELECT) {
fprintf(cfg_fp, "%s=%i\n", name_str, PARAMETER[n].vint);
} else if (PARAMETER[n].type == T_BOOL) {
fprintf(cfg_fp, "%s=%i\n", name_str, PARAMETER[n].vint);
} else if (PARAMETER[n].type == T_STRING) {
fprintf(cfg_fp, "%s=%s\n", name_str, PARAMETER[n].vstr);
} else if (PARAMETER[n].type == T_FILE) {
fprintf(cfg_fp, "%s=%s\n", name_str, PARAMETER[n].vstr);
}
}
if (PARAMETER[P_O_PARAVIEW].vint == 0) {
fprintf(cfg_fp, "GUI|PANED|Position=%i\n", gtk_paned_get_position(GTK_PANED(hbox)));
int gn = 0;
for (gn = 0; gn < G_LAST; gn++) {
fprintf(cfg_fp, "GUI|EXPANDER|%s=%i\n", GROUPS[gn].name, gtk_expander_get_expanded(GTK_EXPANDER(GroupExpander[gn])));
}
}
fclose(cfg_fp);
}
开发者ID:gitter-badger,项目名称:cammill,代码行数:42,代码来源:setup.c
注:本文中的GTK_PANED函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论