• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ GTK_IS_EDITABLE函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



在下文中一共展示了GTK_IS_EDITABLE函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: e_dialog_editable_get

/**
 * e_dialog_editable_get:
 * @widget: A #GtkEditable widget.
 *
 * Queries the string value inside a #GtkEditable-derived widget.
 *
 * Return value: String value.  You should free it when you are done with it.
 * This function can return NULL if the string could not be converted from
 * GTK+'s encoding into UTF8.
 **/
gchar *
e_dialog_editable_get (GtkWidget *widget)
{
	g_return_val_if_fail (GTK_IS_EDITABLE (widget), NULL);

	return gtk_editable_get_chars (GTK_EDITABLE (widget), 0, -1);
}
开发者ID:jdapena,项目名称:evolution,代码行数:17,代码来源:e-dialog-widgets.c


示例2: gtk_editable_get_position

/**
 * gtk_editable_get_position:
 * @editable: a #GtkEditable
 *
 * Retrieves the current position of the cursor relative to the start
 * of the content of the editable. 
 * 
 * Note that this position is in characters, not in bytes.
 *
 * Return value: the cursor position
 */
gint
gtk_editable_get_position (GtkEditable *editable)
{
  g_return_val_if_fail (GTK_IS_EDITABLE (editable), 0);

  return GTK_EDITABLE_GET_IFACE (editable)->get_position (editable);
}
开发者ID:rightpeter,项目名称:gtk-1,代码行数:18,代码来源:gtkeditable.c


示例3: gtk_editable_paste_clipboard

/**
 * gtk_editable_paste_clipboard:
 * @editable: a #GtkEditable
 *
 * Pastes the content of the clipboard to the current position of the
 * cursor in the editable.
 */
void
gtk_editable_paste_clipboard (GtkEditable *editable)
{
  g_return_if_fail (GTK_IS_EDITABLE (editable));
  
  g_signal_emit_by_name (editable, "paste-clipboard");
}
开发者ID:rightpeter,项目名称:gtk-1,代码行数:14,代码来源:gtkeditable.c


示例4: gtk_editable_set_position

/**
 * gtk_editable_set_position:
 * @editable: a #GtkEditable
 * @position: the position of the cursor 
 *
 * Sets the cursor position in the editable to the given value.
 *
 * The cursor is displayed before the character with the given (base 0) 
 * index in the contents of the editable. The value must be less than or 
 * equal to the number of characters in the editable. A value of -1 
 * indicates that the position should be set after the last character 
 * of the editable. Note that @position is in characters, not in bytes.
 */
void
gtk_editable_set_position (GtkEditable      *editable,
			   gint              position)
{
  g_return_if_fail (GTK_IS_EDITABLE (editable));

  GTK_EDITABLE_GET_IFACE (editable)->set_position (editable, position);
}
开发者ID:rightpeter,项目名称:gtk-1,代码行数:21,代码来源:gtkeditable.c


示例5: gtk_editable_select_region

/**
 * gtk_editable_select_region: (virtual set_selection_bounds)
 * @editable: a #GtkEditable
 * @start_pos: start of region
 * @end_pos: end of region
 *
 * Selects a region of text. The characters that are selected are 
 * those characters at positions from @start_pos up to, but not 
 * including @end_pos. If @end_pos is negative, then the
 * characters selected are those characters from @start_pos to 
 * the end of the text.
 * 
 * Note that positions are specified in characters, not bytes.
 */
void
gtk_editable_select_region (GtkEditable *editable,
			    gint         start_pos,
			    gint         end_pos)
{
  g_return_if_fail (GTK_IS_EDITABLE (editable));
  
  GTK_EDITABLE_GET_IFACE (editable)->set_selection_bounds (editable, start_pos, end_pos);
}
开发者ID:rightpeter,项目名称:gtk-1,代码行数:23,代码来源:gtkeditable.c


示例6: gtk_editable_delete_text

/**
 * gtk_editable_delete_text: (virtual do_delete_text)
 * @editable: a #GtkEditable
 * @start_pos: start position
 * @end_pos: end position
 *
 * Deletes a sequence of characters. The characters that are deleted are 
 * those characters at positions from @start_pos up to, but not including 
 * @end_pos. If @end_pos is negative, then the characters deleted
 * are those from @start_pos to the end of the text.
 *
 * Note that the positions are specified in characters, not bytes.
 */
void
gtk_editable_delete_text (GtkEditable *editable,
			  gint         start_pos,
			  gint         end_pos)
{
  g_return_if_fail (GTK_IS_EDITABLE (editable));

  GTK_EDITABLE_GET_IFACE (editable)->do_delete_text (editable, start_pos, end_pos);
}
开发者ID:rightpeter,项目名称:gtk-1,代码行数:22,代码来源:gtkeditable.c


示例7: editable_undo_delete_text

static void
editable_undo_delete_text (GObject *object,
                           gint position_start,
                           gint position_end)
{
	g_return_if_fail (GTK_IS_EDITABLE (object));

	gtk_editable_delete_text (GTK_EDITABLE (object), position_start, position_end);
}
开发者ID:UIKit0,项目名称:evolution,代码行数:9,代码来源:e-widget-undo.c


示例8: editable_undo_insert_text

static void
editable_undo_insert_text (GObject *object,
                           const gchar *text,
                           gint position)
{
	g_return_if_fail (GTK_IS_EDITABLE (object));

	gtk_editable_insert_text (GTK_EDITABLE (object), text, -1, &position);
}
开发者ID:UIKit0,项目名称:evolution,代码行数:9,代码来源:e-widget-undo.c


示例9: gtk_editable_get_chars

gchar *    
gtk_editable_get_chars (GtkEditable *editable,
			gint         start,
			gint         end)
{
  g_return_val_if_fail (GTK_IS_EDITABLE (editable), NULL);

  return GTK_EDITABLE_GET_CLASS (editable)->get_chars (editable, start, end);
}
开发者ID:zjx632,项目名称:tinygtk,代码行数:9,代码来源:gtkeditable.c


示例10: gtk_editable_select_region

void
gtk_editable_select_region (GtkEditable *editable,
			    gint         start,
			    gint         end)
{
  g_return_if_fail (GTK_IS_EDITABLE (editable));
  
  GTK_EDITABLE_GET_CLASS (editable)->set_selection_bounds (editable,  start, end);
}
开发者ID:zjx632,项目名称:tinygtk,代码行数:9,代码来源:gtkeditable.c


示例11: gtk_editable_get_chars

/**
 * gtk_editable_get_chars:
 * @editable: a #GtkEditable
 * @start_pos: start of text
 * @end_pos: end of text
 *
 * Retrieves a sequence of characters. The characters that are retrieved 
 * are those characters at positions from @start_pos up to, but not 
 * including @end_pos. If @end_pos is negative, then the characters
 * retrieved are those characters from @start_pos to the end of the text.
 * 
 * Note that positions are specified in characters, not bytes.
 *
 * Return value: a pointer to the contents of the widget as a
 *      string. This string is allocated by the #GtkEditable
 *      implementation and should be freed by the caller.
 */
gchar *    
gtk_editable_get_chars (GtkEditable *editable,
			gint         start_pos,
			gint         end_pos)
{
  g_return_val_if_fail (GTK_IS_EDITABLE (editable), NULL);

  return GTK_EDITABLE_GET_IFACE (editable)->get_chars (editable, start_pos, end_pos);
}
开发者ID:rightpeter,项目名称:gtk-1,代码行数:26,代码来源:gtkeditable.c


示例12: on_break_ignore_editing_started

static void on_break_ignore_editing_started(G_GNUC_UNUSED GtkCellRenderer *cell,
	GtkCellEditable *editable, G_GNUC_UNUSED const gchar *path, G_GNUC_UNUSED gpointer gdata)
{
	if (GTK_IS_EDITABLE(editable))
		validator_attach(GTK_EDITABLE(editable), VALIDATOR_NUMERIC);

	if (GTK_IS_ENTRY(editable))
		gtk_entry_set_max_length(GTK_ENTRY(editable), 10);
}
开发者ID:Qu1cK5tud9,项目名称:geany-plugins,代码行数:9,代码来源:break.c


示例13: gtk_editable_delete_selection

/**
 * gtk_editable_delete_selection:
 * @editable: a #GtkEditable
 *
 * Deletes the currently selected text of the editable.
 * This call doesn’t do anything if there is no selected text.
 */
void
gtk_editable_delete_selection (GtkEditable *editable)
{
  gint start, end;

  g_return_if_fail (GTK_IS_EDITABLE (editable));

  if (gtk_editable_get_selection_bounds (editable, &start, &end))
    gtk_editable_delete_text (editable, start, end);
}
开发者ID:rightpeter,项目名称:gtk-1,代码行数:17,代码来源:gtkeditable.c


示例14: gtk_editable_set_editable

/**
 * gtk_editable_set_editable:
 * @editable: a #GtkEditable
 * @is_editable: %TRUE if the user is allowed to edit the text
 *   in the widget
 *
 * Determines if the user can edit the text in the editable
 * widget or not. 
 */
void
gtk_editable_set_editable (GtkEditable    *editable,
			   gboolean        is_editable)
{
  g_return_if_fail (GTK_IS_EDITABLE (editable));

  g_object_set (editable,
		"editable", is_editable != FALSE,
		NULL);
}
开发者ID:rightpeter,项目名称:gtk-1,代码行数:19,代码来源:gtkeditable.c


示例15: edit_copy_activated

static void
edit_copy_activated (GtkAction  * action,
                     CMainWindow* self)
{
	if (GTK_IS_EDITABLE (gtk_window_get_focus (GTK_WINDOW (self)))) {
		gtk_editable_copy_clipboard (GTK_EDITABLE (gtk_window_get_focus (GTK_WINDOW (self))));
	} else if (C_IS_TASK_WIDGET (gtk_window_get_focus (GTK_WINDOW (self)))) {
                c_task_widget_copy_clipboard (C_TASK_WIDGET (gtk_window_get_focus (GTK_WINDOW (self))));
	}
}
开发者ID:herzi,项目名称:classify,代码行数:10,代码来源:main-window.c


示例16: gtk_editable_get_editable

/**
 * gtk_editable_get_editable:
 * @editable: a #GtkEditable
 *
 * Retrieves whether @editable is editable. See
 * gtk_editable_set_editable().
 *
 * Return value: %TRUE if @editable is editable.
 */
gboolean
gtk_editable_get_editable (GtkEditable *editable)
{
  gboolean value;

  g_return_val_if_fail (GTK_IS_EDITABLE (editable), FALSE);

  g_object_get (editable, "editable", &value, NULL);

  return value;
}
开发者ID:rightpeter,项目名称:gtk-1,代码行数:20,代码来源:gtkeditable.c


示例17: e_dialog_editable_set

/**
 * e_dialog_editable_set:
 * @widget: A #GtkEditable widget.
 * @value: String value.
 *
 * Sets the string value inside a #GtkEditable-derived widget.
 **/
void
e_dialog_editable_set (GtkWidget *widget,
                       const gchar *value)
{
	gint pos = 0;

	g_return_if_fail (GTK_IS_EDITABLE (widget));

	gtk_editable_delete_text (GTK_EDITABLE (widget), 0, -1);

	if (value)
		gtk_editable_insert_text (GTK_EDITABLE (widget), value, strlen (value), &pos);
}
开发者ID:jdapena,项目名称:evolution,代码行数:20,代码来源:e-dialog-widgets.c


示例18: on_paste

void on_paste(GtkAction* act, FmMainWin* win)
{
    GtkWidget* focus = gtk_window_get_focus((GtkWindow*)win);
    if(GTK_IS_EDITABLE(focus) )
    {
        gtk_editable_paste_clipboard((GtkEditable*)focus);
    }
    else
    {
        FmPath* path = fm_folder_view_get_cwd(FM_FOLDER_VIEW(win->folder_view));
        fm_clipboard_paste_files(win->folder_view, path);
    }
}
开发者ID:gilir,项目名称:libfm-debian,代码行数:13,代码来源:main-win.c


示例19: gtk_editable_insert_text

/**
 * gtk_editable_insert_text: (virtual do_insert_text)
 * @editable: a #GtkEditable
 * @new_text: the text to append
 * @new_text_length: the length of the text in bytes, or -1
 * @position: (inout): location of the position text will be inserted at
 *
 * Inserts @new_text_length bytes of @new_text into the contents of the
 * widget, at position @position.
 *
 * Note that the position is in characters, not in bytes. 
 * The function updates @position to point after the newly inserted text.
 */
void
gtk_editable_insert_text (GtkEditable *editable,
			  const gchar *new_text,
			  gint         new_text_length,
			  gint        *position)
{
  g_return_if_fail (GTK_IS_EDITABLE (editable));
  g_return_if_fail (position != NULL);

  if (new_text_length < 0)
    new_text_length = strlen (new_text);
  
  GTK_EDITABLE_GET_IFACE (editable)->do_insert_text (editable, new_text, new_text_length, position);
}
开发者ID:rightpeter,项目名称:gtk-1,代码行数:27,代码来源:gtkeditable.c


示例20: on_display_editing_started

static void on_display_editing_started(G_GNUC_UNUSED GtkCellRenderer *cell,
	GtkCellEditable *editable, const gchar *path_str, ScpTreeStore *store)
{
	GtkTreeIter iter;
	const char *value;
	gint hb_mode;

	g_assert(GTK_IS_EDITABLE(editable));
	scp_tree_store_get_iter_from_string(store, &iter, path_str);
	scp_tree_store_get(store, &iter, COLUMN_VALUE, &value, COLUMN_HB_MODE, &hb_mode, -1);
	/* scrolling editable to the proper position is left as an exercise for the reader */
	g_signal_connect(editable, "map-event", G_CALLBACK(on_display_editable_map_event),
		parse_get_display_from_7bit(value, hb_mode, MR_EDITVC));
}
开发者ID:BYC,项目名称:geany-plugins,代码行数:14,代码来源:views.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GTK_IS_ENTRY函数代码示例发布时间:2022-05-30
下一篇:
C++ GTK_IS_CONTAINER函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap