PageRenderTime 28ms CodeModel.GetById 25ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/src/wrappers/gtk/library/gtk_color_selection_dialog.e

http://github.com/tybor/Liberty
Specman e | 97 lines | 57 code | 20 blank | 20 comment | 4 complexity | d9f0f16159305d7e98e8a66e2d120166 MD5 | raw file
 1indexing
 2	description: "GtkColorSelectionDialog รข€” A standard dialog box for selecting a color."
 3	copyright: "[
 4					Copyright (C) 2006 eiffel-libraries team, GTK+ team
 5					
 6					This library is free software; you can redistribute it and/or
 7					modify it under the terms of the GNU Lesser General Public License
 8					as published by the Free Software Foundation; either version 2.1 of
 9					the License, or (at your option) any later version.
10					
11					This library is distributed in the hope that it will be useful, but
12					WITHOUT ANY WARRANTY; without even the implied warranty of
13					MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14					Lesser General Public License for more details.
15
16					You should have received a copy of the GNU Lesser General Public
17					License along with this library; if not, write to the Free Software
18					Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19					02110-1301 USA
20					]"					
21	date: "$Date:$"
22	revision: "$Revision:$"
23	
24class GTK_COLOR_SELECTION_DIALOG
25	-- The GtkColorSelectionDialog provides a standard dialog which allows the
26	-- user to select a color much like the GtkFileSelection provides a standard
27	-- dialog for file selection.
28
29inherit
30	GTK_DIALOG
31		rename make as make_dialog
32		redefine struct_size
33		end 
34	-- GtkColorSelectionDialog implements AtkImplementorIface.
35
36insert
37	GTK_COLOR_SELECTION_DIALOG_EXTERNALS
38
39creation make, from_external_pointer
40
41feature {} -- Creation
42	make (a_title: STRING) is
43			-- Creates a new GtkColorSelectionDialog.
44		require title_not_void: a_title /= Void
45		do
46			from_external_pointer (gtk_color_selection_new(a_title.to_external))
47		end
48	
49
50feature
51
52	colorselection: GTK_COLOR_SELECTION is
53		local
54			selection_ptr: POINTER
55			cs: G_OBJECT_FACTORY [GTK_COLOR_SELECTION]
56		do
57			selection_ptr := gtk_color_selection_dialog_get_colorsel (handle)
58			Result := cs.existant_wrapper (selection_ptr)
59			if Result=Void then
60				create Result.from_external_pointer (selection_ptr)
61			end
62		end
63
64feature {} -- External call
65	gtk_color_selection_dialog_new  (a_title: POINTER): POINTER is -- GtkWidget*
66		external "C use <gtk/gtk.h>"
67		end
68
69feature {} -- GtkColorSelectionDialog struct
70	
71	-- typedef struct _GtkColorSelectionDialog GtkColorSelectionDialog;
72	
73	-- The GtkColorSelectionDialog struct contains the following
74	-- fields. (These fields should be considered read-only. They
75	-- should never be set by an application.)
76	
77	-- GtkWidget *colorsel; The GtkColorSelection widget contained
78	-- within the dialog. Use this widget and its
79	-- gtk_color_selection_get_current_color() function to gain access
80	-- to the selected color. Connect a handler for this widget's
81	-- color_changed signal to be notified when the color changes.
82	
83	-- GtkWidget *ok_button; The OK button widget contained within the
84	-- dialog. Connect a handler for the clicked event.
85	
86	-- GtkWidget *cancel_button; The cancel button widget contained
87	-- within the dialog. Connect a handler for the clicked event.
88	
89	-- GtkWidget *help_button; The help button widget contained within
90	-- the dialog. Connect a handler for the clicked event.
91	
92feature -- struct size
93	struct_size: INTEGER is
94		external "C inline use <gtk/gtk.h>"
95		alias "sizeof(GtkColorSelectionDialog)"
96		end
97end -- class GTK_COLOR_SELECTION_DIALOG