textview cut cpy paste
- From: kapil dua <gtkkaps yahoo com>
- To: gtk-app-devel-list gnome org
- Subject: textview cut cpy paste
- Date: Fri, 2 Apr 2004 01:11:51 -0800 (PST)
hi all,
i am facing problem in cut, copy, paste on GtkTextView
this is the code i had written
textview1 = gtk_text_view_new ();
gtk_widget_show (textview1);
gtk_text_view_set_editable (GTK_TEXT_VIEW
(textview1), TRUE);
gtk_container_add (GTK_CONTAINER (scrolledwindow8),
textview1);
gtk_widget_set_size_request (textview1, 50, 150);
gtk_container_set_border_width (GTK_CONTAINER
(textview1), 7);
gtk_widget_set_extension_events (textview1,
GDK_EXTENSION_EVENTS_ALL);
gtk_text_view_set_cursor_visible (GTK_TEXT_VIEW
(textview1), TRUE);
gtk_text_view_set_pixels_above_lines (GTK_TEXT_VIEW
(textview1), 4);
gtk_text_view_set_pixels_below_lines (GTK_TEXT_VIEW
(textview1), 4);
gtk_text_view_set_left_margin (GTK_TEXT_VIEW
(textview1), 5);
gtk_text_view_set_right_margin (GTK_TEXT_VIEW
(textview1), 5);
g_signal_connect ((gpointer) Send_button, "clicked",
G_CALLBACK
(on_Send_button_clicked),
NULL);
g_signal_connect ((gpointer) cut_button_, "clicked",
G_CALLBACK
(on_cut_button__clicked),
NULL);
g_signal_connect ((gpointer) copy_button, "clicked",
G_CALLBACK
(on_copy_button_clicked),
NULL);
g_signal_connect ((gpointer) paste_button,
"clicked",
G_CALLBACK
(on_paste_button_clicked),
NULL);
g_signal_connect ((gpointer) textview1,
"copy_clipboard",
G_CALLBACK
(on_textview1_copy_clipboard),
NULL);
g_signal_connect ((gpointer) textview1,
"cut_clipboard",
G_CALLBACK
(on_textview1_cut_clipboard),
NULL);
g_signal_connect ((gpointer) textview1,
"paste_clipboard",
G_CALLBACK
(on_textview1_paste_clipboard),
NULL);
void
on_cut_button__clicked (GtkButton
*button,
gpointer
user_data)
{
void gtk_editable_cut_clipboard
(GtkTextView (textview1));
}
void
on_copy_button_clicked (GtkButton
*button,
gpointer
user_data)
{
void gtk_editable_copy_clipboard
(GtkTextView (textview1));
/* unselects the newly copied region
gtk_editable_select_region (GtkEditable *user_data,
0, 0);*/
}void
on_paste_button_clicked (GtkButton
*button,
gpointer
user_data)
{
void gtk_editable_paste_clipboard
(GtkTextView (textview1));
}
void
on_textview1_copy_clipboard (GtkTextView
*textview,
gpointer
user_data)
{
void gtk_editable_copy_clipboard
(GTK_TEXT_VIEW (textview));
}
void
on_textview1_cut_clipboard (GtkTextView
*textview,
gpointer
user_data)
{
void gtk_editable_cut_clipboard (GTK_TEXT_VIEW
(textview));
}
void
on_textview1_paste_clipboard (GtkTextView
*textview,
gpointer
user_data)
{
void gtk_editable_paste_clipboard
(GTK_TEXT_VIEW (textview));
}
can any body help
thanx and regards
kapil
__________________________________
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway
http://promotions.yahoo.com/design_giveaway/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]