当前位置: 首页>>代码示例>>C++>>正文


C++ GTK_PANED函数代码示例

本文整理汇总了C++中GTK_PANED函数的典型用法代码示例。如果您正苦于以下问题:C++ GTK_PANED函数的具体用法?C++ GTK_PANED怎么用?C++ GTK_PANED使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了GTK_PANED函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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


注:本文中的GTK_PANED函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。