Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 14561 Details for
Bug 14297
Add a Spinner widget to the SWT toolkit
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
gtk c code - spin button example
spinbutton.c (text/plain), 1.08 KB, created by
Felipe Heidrich
on 2004-09-15 17:05:32 EDT
(
hide
)
Description:
gtk c code - spin button example
Filename:
MIME Type:
Creator:
Felipe Heidrich
Created:
2004-09-15 17:05:32 EDT
Size:
1.08 KB
patch
obsolete
>#include <gtk/gtk.h> > >int value_changed (GtkSpinButton *spinbutton, gpointer user_data) { > GtkEntry *entry = GTK_ENTRY(spinbutton); > printf ("Value %s\n", gtk_entry_get_text (entry)); > return 0; >} > >int main( int argc, char *argv[] ) { > GtkWidget *window, *spinner; > GtkAdjustment *spinner_adj; > > gtk_init (&argc, &argv); > > window = gtk_window_new (GTK_WINDOW_TOPLEVEL); > gtk_container_set_border_width (GTK_CONTAINER (window), 5); > > spinner_adj = (GtkAdjustment *) gtk_adjustment_new (0.0, 0.0, 10.0, 1.0, 3.0, 0.0); > spinner = gtk_spin_button_new (spinner_adj, 1.0, 0); > gtk_spin_button_set_snap_to_ticks (GTK_SPIN_BUTTON(spinner), FALSE); > gtk_spin_button_set_numeric (GTK_SPIN_BUTTON(spinner), FALSE); > > gtk_container_add (GTK_CONTAINER (window), spinner); > > g_signal_connect (G_OBJECT (spinner), "value_changed", G_CALLBACK (value_changed), NULL); > > g_signal_connect (G_OBJECT (window), "destroy", G_CALLBACK (gtk_main_quit), NULL); > g_signal_connect (G_OBJECT (window), "delete_event",G_CALLBACK (gtk_main_quit), NULL); > gtk_widget_show_all (window); > gtk_main (); > return 0; >} >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 14297
:
14407
| 14561 |
14562
|
14563