这篇教程C++ GTK_IS_EDITABLE函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中GTK_IS_EDITABLE函数的典型用法代码示例。如果您正苦于以下问题:C++ GTK_IS_EDITABLE函数的具体用法?C++ GTK_IS_EDITABLE怎么用?C++ GTK_IS_EDITABLE使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了GTK_IS_EDITABLE函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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,
示例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 */gintgtk_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,
示例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. */voidgtk_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,
示例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. */voidgtk_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,
示例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. */voidgtk_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,
示例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. */voidgtk_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,
示例7: editable_undo_delete_textstatic voideditable_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,
示例8: editable_undo_insert_textstatic voideditable_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,
示例9: gtk_editable_get_charsgchar * 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,
示例10: gtk_editable_select_regionvoidgtk_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,
示例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,
示例12: on_break_ignore_editing_startedstatic 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,
示例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. */voidgtk_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,
示例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. */voidgtk_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,
示例15: edit_copy_activatedstatic voidedit_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,
示例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. */gbooleangtk_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,
示例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. **/voide_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,
示例18: on_pastevoid 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,
示例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. */voidgtk_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,
示例20: on_display_editing_startedstatic 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,
示例21: caja_clipboard_set_up_editablevoidcaja_clipboard_set_up_editable (GtkEditable *target, GtkUIManager *ui_manager, gboolean shares_selection_changes){ g_return_if_fail (GTK_IS_EDITABLE (target)); g_return_if_fail (GTK_IS_UI_MANAGER (ui_manager)); caja_clipboard_real_set_up (target, ui_manager, shares_selection_changes, editable_select_all_callback, editable_connect_callbacks, editable_disconnect_callbacks);}
开发者ID:TheCoffeMaker,项目名称:Mate-Desktop-Environment,代码行数:14,
示例22: on_copy1_activatevoid on_copy1_activate(GtkMenuItem *menuitem, gpointer user_data){ GtkWidget *focusw = gtk_window_get_focus(GTK_WINDOW(main_widgets.window)); if (GTK_IS_EDITABLE(focusw)) gtk_editable_copy_clipboard(GTK_EDITABLE(focusw)); else if (IS_SCINTILLA(focusw)) sci_copy(SCINTILLA(focusw)); else if (GTK_IS_TEXT_VIEW(focusw)) { GtkTextBuffer *buffer = gtk_text_view_get_buffer( GTK_TEXT_VIEW(focusw)); gtk_text_buffer_copy_clipboard(buffer, gtk_clipboard_get(GDK_NONE)); }}
开发者ID:ndunsworth,项目名称:geany,代码行数:15,
示例23: on_delete1_activatevoid on_delete1_activate(GtkMenuItem *menuitem, gpointer user_data){ GtkWidget *focusw = gtk_window_get_focus(GTK_WINDOW(main_widgets.window)); if (GTK_IS_EDITABLE(focusw)) gtk_editable_delete_selection(GTK_EDITABLE(focusw)); else if (IS_SCINTILLA(focusw) && sci_has_selection(SCINTILLA(focusw))) sci_clear(SCINTILLA(focusw)); else if (GTK_IS_TEXT_VIEW(focusw)) { GtkTextBuffer *buffer = gtk_text_view_get_buffer( GTK_TEXT_VIEW(focusw)); gtk_text_buffer_delete_selection(buffer, TRUE, TRUE); }}
开发者ID:ndunsworth,项目名称:geany,代码行数:15,
示例24: widget_undo_place_cursor_atstatic voidwidget_undo_place_cursor_at (GObject *object, gint char_pos){ if (GTK_IS_EDITABLE (object)) gtk_editable_set_position (GTK_EDITABLE (object), char_pos); else if (GTK_IS_TEXT_BUFFER (object)) { GtkTextBuffer *buffer; GtkTextIter pos; buffer = GTK_TEXT_BUFFER (object); gtk_text_buffer_get_iter_at_offset (buffer, &pos, char_pos); gtk_text_buffer_place_cursor (buffer, &pos); }}
开发者ID:UIKit0,项目名称:evolution,代码行数:16,
示例25: on_break_ignore_editing_startedstatic void on_break_ignore_editing_started(G_GNUC_UNUSED GtkCellRenderer *cell, GtkCellEditable *editable, const gchar *path_str, G_GNUC_UNUSED gpointer gdata){ GtkTreeIter iter; const gchar *ignore; 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); scp_tree_store_get_iter_from_string(store, &iter, path_str); scp_tree_store_get(store, &iter, BREAK_IGNORE, &ignore, -1); g_signal_connect(editable, "map", G_CALLBACK(on_view_editable_map), g_strdup(ignore));}
开发者ID:StephenWassell,项目名称:geany-plugins,代码行数:16,
示例26: action_select_all/* Edit->Select All */voidaction_select_all(GtkAction *action, I7Document *document){ GtkWidget *widget = gtk_window_get_focus(GTK_WINDOW(document)); /* What actually happens depends on the type of widget that is focused */ if(WEBKIT_IS_WEB_VIEW(widget)) webkit_web_view_select_all(WEBKIT_WEB_VIEW(widget)); else if(GTK_IS_LABEL(widget) && gtk_label_get_selectable(GTK_LABEL(widget))) gtk_label_select_region(GTK_LABEL(widget), 0, -1); else if(GTK_IS_EDITABLE(widget)) gtk_editable_select_region(GTK_EDITABLE(widget), 0, -1); else if(GTK_IS_TEXT_VIEW(widget)) g_signal_emit_by_name(widget, "select-all", TRUE, NULL); else /* If we don't know how to select it, just select all in the source */ g_signal_emit_by_name(i7_document_get_default_view(document), "select-all", TRUE, NULL);}
开发者ID:ptomato,项目名称:gnome-inform7,代码行数:18,
示例27: on_copyvoid on_copy(GtkAction* act, FmMainWin* win){ GtkWidget* focus = gtk_window_get_focus((GtkWindow*)win); if(GTK_IS_EDITABLE(focus) && gtk_editable_get_selection_bounds((GtkEditable*)focus, NULL, NULL) ) { gtk_editable_copy_clipboard((GtkEditable*)focus); } else { FmPathList* files = fm_folder_view_get_selected_file_paths(FM_FOLDER_VIEW(win->folder_view)); if(files) { fm_clipboard_copy_files(win, files); fm_list_unref(files); } }}
开发者ID:gilir,项目名称:libfm-debian,代码行数:18,
示例28: gtk_test_text_set/** * gtk_test_text_set: * @widget: valid widget pointer. * @string: a 0-terminated C string * * Set the text string of @widget to @string if it is a GtkLabel, * GtkEditable (entry and text widgets) or GtkTextView. * * Since: 2.14 **/voidgtk_test_text_set (GtkWidget *widget, const gchar *string){ if (GTK_IS_LABEL (widget)) gtk_label_set_text (GTK_LABEL (widget), string); else if (GTK_IS_EDITABLE (widget)) { int pos = 0; gtk_editable_delete_text (GTK_EDITABLE (widget), 0, -1); gtk_editable_insert_text (GTK_EDITABLE (widget), string, -1, &pos); } else if (GTK_IS_TEXT_VIEW (widget)) { GtkTextBuffer *tbuffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (widget)); gtk_text_buffer_set_text (tbuffer, string, -1); }}
开发者ID:jdapena,项目名称:gtk,代码行数:28,
示例29: remmina_file_editor_on_realizestatic void remmina_file_editor_on_realize(GtkWidget* widget, gpointer user_data){ RemminaFileEditor* gfe; GtkWidget* defaultwidget; gfe = REMMINA_FILE_EDITOR(widget); defaultwidget = gfe->priv->name_entry; if (defaultwidget) { if (GTK_IS_EDITABLE(defaultwidget)) { gtk_editable_select_region(GTK_EDITABLE(defaultwidget), 0, -1); } gtk_widget_grab_focus(defaultwidget); }}
开发者ID:absmall,项目名称:Remmina,代码行数:18,
示例30: gtk_editable_get_selection_bounds/** * gtk_editable_get_selection_bounds: * @editable: a #GtkEditable * @start_pos: (out) (allow-none): location to store the starting position, or %NULL * @end_pos: (out) (allow-none): location to store the end position, or %NULL * * Retrieves the selection bound of the editable. start_pos will be filled * with the start of the selection and @end_pos with end. If no text was * selected both will be identical and %FALSE will be returned. * * Note that positions are specified in characters, not bytes. * * Return value: %TRUE if an area is selected, %FALSE otherwise */gbooleangtk_editable_get_selection_bounds (GtkEditable *editable, gint *start_pos, gint *end_pos){ gint tmp_start, tmp_end; gboolean result; g_return_val_if_fail (GTK_IS_EDITABLE (editable), FALSE); result = GTK_EDITABLE_GET_IFACE (editable)->get_selection_bounds (editable, &tmp_start, &tmp_end); if (start_pos) *start_pos = MIN (tmp_start, tmp_end); if (end_pos) *end_pos = MAX (tmp_start, tmp_end); return result;}
开发者ID:rightpeter,项目名称:gtk-1,代码行数:33,
注:本文中的GTK_IS_EDITABLE函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ GTK_IS_ENTRY函数代码示例 C++ GTK_IS_CONTAINER函数代码示例 |