2002-06-24 22:12:32 +00:00
|
|
|
//
|
2002-06-24 20:38:48 +00:00
|
|
|
// Gtk.FileSelection.custom - Gtk FileSelection class customizations
|
|
|
|
//
|
|
|
|
// Author: Duncan Mak (duncan@ximian.com)
|
2002-08-13 14:01:14 +00:00
|
|
|
// Joe Shaw (joe@ximian.com)
|
2002-06-24 20:38:48 +00:00
|
|
|
//
|
|
|
|
// Copyright (C) 2002 Ximian, Inc.
|
|
|
|
//
|
|
|
|
// This code is inserted after the automatically generated code.
|
|
|
|
//
|
2004-06-25 18:42:19 +00:00
|
|
|
//
|
|
|
|
// This program is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of version 2 of the Lesser GNU General
|
|
|
|
// Public License as published by the Free Software Foundation.
|
|
|
|
//
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
// Lesser General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU Lesser General Public
|
|
|
|
// License along with this program; if not, write to the
|
|
|
|
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
// Boston, MA 02111-1307, USA.
|
|
|
|
|
2002-06-24 20:38:48 +00:00
|
|
|
|
2003-02-20 04:03:15 +00:00
|
|
|
public class FSButton : Gtk.Button {
|
|
|
|
FileSelection file_sel;
|
2002-08-13 14:01:14 +00:00
|
|
|
|
2003-02-20 04:03:15 +00:00
|
|
|
public FileSelection FileSelection {
|
2002-08-13 14:01:14 +00:00
|
|
|
get { return file_sel; }
|
|
|
|
}
|
|
|
|
|
2003-07-22 04:38:13 +00:00
|
|
|
internal FSButton (FileSelection fs, IntPtr raw) : base (raw) {
|
2002-08-13 14:01:14 +00:00
|
|
|
file_sel = fs;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2004-10-29 20:33:07 +00:00
|
|
|
[DllImport("gtksharpglue-2.0")]
|
2002-06-24 20:38:48 +00:00
|
|
|
static extern IntPtr gtksharp_file_selection_get_dir_list (IntPtr i);
|
|
|
|
public Gtk.TreeView DirList {
|
2003-07-23 23:56:47 +00:00
|
|
|
get { return GLib.Object.GetObject (gtksharp_file_selection_get_dir_list (this.Handle), false) as Gtk.TreeView; }
|
2002-06-24 20:38:48 +00:00
|
|
|
}
|
|
|
|
|
2004-10-29 20:33:07 +00:00
|
|
|
[DllImport("gtksharpglue-2.0")]
|
2002-06-24 20:38:48 +00:00
|
|
|
static extern IntPtr gtksharp_file_selection_get_file_list (IntPtr i);
|
|
|
|
public Gtk.TreeView FileList {
|
2003-07-23 23:56:47 +00:00
|
|
|
get { return GLib.Object.GetObject (gtksharp_file_selection_get_file_list (this.Handle), false) as Gtk.TreeView; }
|
2002-06-24 20:38:48 +00:00
|
|
|
}
|
|
|
|
|
2004-10-29 20:33:07 +00:00
|
|
|
[DllImport("gtksharpglue-2.0")]
|
2002-06-24 20:38:48 +00:00
|
|
|
static extern IntPtr gtksharp_file_selection_get_selection_entry (IntPtr i);
|
|
|
|
public Gtk.Entry SelectionEntry {
|
2003-07-23 23:56:47 +00:00
|
|
|
get { return GLib.Object.GetObject (gtksharp_file_selection_get_selection_entry (this.Handle), false) as Gtk.Entry; }
|
2002-06-24 20:38:48 +00:00
|
|
|
}
|
|
|
|
|
2004-10-29 20:33:07 +00:00
|
|
|
[DllImport("gtksharpglue-2.0")]
|
2002-06-24 20:38:48 +00:00
|
|
|
static extern IntPtr gtksharp_file_selection_get_selection_text (IntPtr i);
|
|
|
|
public Gtk.Label SelectionText {
|
2003-07-23 23:56:47 +00:00
|
|
|
get { return GLib.Object.GetObject (gtksharp_file_selection_get_selection_text (this.Handle), false) as Gtk.Label; }
|
2002-06-24 20:38:48 +00:00
|
|
|
}
|
|
|
|
|
2004-10-29 20:33:07 +00:00
|
|
|
[DllImport("gtksharpglue-2.0")]
|
2002-06-24 20:38:48 +00:00
|
|
|
static extern IntPtr gtksharp_file_selection_get_ok_button (IntPtr i);
|
|
|
|
public Gtk.Button OkButton {
|
2003-02-20 04:03:15 +00:00
|
|
|
get { return new FSButton (this, gtksharp_file_selection_get_ok_button (this.Handle)); }
|
2002-06-24 20:38:48 +00:00
|
|
|
}
|
|
|
|
|
2004-10-29 20:33:07 +00:00
|
|
|
[DllImport("gtksharpglue-2.0")]
|
2002-06-24 20:38:48 +00:00
|
|
|
static extern IntPtr gtksharp_file_selection_get_cancel_button (IntPtr i);
|
|
|
|
public Gtk.Button CancelButton {
|
2003-02-20 04:03:15 +00:00
|
|
|
get { return new FSButton (this, gtksharp_file_selection_get_cancel_button (this.Handle)); }
|
2002-06-24 20:38:48 +00:00
|
|
|
}
|
|
|
|
|
2004-10-29 20:33:07 +00:00
|
|
|
[DllImport("gtksharpglue-2.0")]
|
2002-06-24 20:38:48 +00:00
|
|
|
static extern IntPtr gtksharp_file_selection_get_help_button (IntPtr i);
|
|
|
|
public Gtk.Button HelpButton {
|
2003-02-20 04:03:15 +00:00
|
|
|
get { return new FSButton (this, gtksharp_file_selection_get_help_button (this.Handle)); }
|
2002-06-24 20:38:48 +00:00
|
|
|
}
|
|
|
|
|
2004-10-29 20:33:07 +00:00
|
|
|
[DllImport("gtksharpglue-2.0")]
|
2002-06-24 20:38:48 +00:00
|
|
|
static extern IntPtr gtksharp_file_selection_get_history_pulldown (IntPtr i);
|
|
|
|
public Gtk.OptionMenu HistoryPulldown {
|
2003-07-23 23:56:47 +00:00
|
|
|
get { return GLib.Object.GetObject (gtksharp_file_selection_get_history_pulldown (this.Handle), false) as Gtk.OptionMenu; }
|
2002-06-24 20:38:48 +00:00
|
|
|
}
|
|
|
|
|
2004-10-29 20:33:07 +00:00
|
|
|
[DllImport("gtksharpglue-2.0")]
|
2002-06-24 20:38:48 +00:00
|
|
|
static extern IntPtr gtksharp_file_selection_get_history_menu (IntPtr i);
|
|
|
|
public Gtk.Menu HistoryMenu {
|
2003-07-23 23:56:47 +00:00
|
|
|
get { return GLib.Object.GetObject (gtksharp_file_selection_get_history_menu (this.Handle), false) as Gtk.Menu; }
|
2002-06-24 20:38:48 +00:00
|
|
|
}
|
|
|
|
|
2004-10-29 20:33:07 +00:00
|
|
|
[DllImport("gtksharpglue-2.0")]
|
2002-06-24 20:38:48 +00:00
|
|
|
static extern IntPtr gtksharp_file_selection_get_fileop_dialog (IntPtr i);
|
|
|
|
public Gtk.MessageDialog FileopDialog {
|
2003-07-23 23:56:47 +00:00
|
|
|
get { return GLib.Object.GetObject (gtksharp_file_selection_get_fileop_dialog (this.Handle), false) as Gtk.MessageDialog; }
|
2002-06-24 20:38:48 +00:00
|
|
|
}
|
|
|
|
|
2004-10-29 20:33:07 +00:00
|
|
|
[DllImport("gtksharpglue-2.0")]
|
2002-06-24 20:38:48 +00:00
|
|
|
static extern IntPtr gtksharp_file_selection_get_fileop_entry (IntPtr i);
|
|
|
|
public Gtk.Entry FileopEntry {
|
2003-07-23 23:56:47 +00:00
|
|
|
get { return GLib.Object.GetObject (gtksharp_file_selection_get_fileop_entry (this.Handle), false) as Gtk.Entry; }
|
2002-06-24 20:38:48 +00:00
|
|
|
}
|
|
|
|
|
2004-10-29 20:33:07 +00:00
|
|
|
[DllImport("gtksharpglue-2.0", CallingConvention=CallingConvention.Cdecl)]
|
2003-05-29 Rachel Hestilow <rachel@nullenvoid.com>
* gconf/Value.cs: Update to use new string marshalling.
* generator/StringGen.cs, ConstStringGen.cs: Added.
* generator/IGeneratable.cs: Add new method ToNativeReturn.
* generator/CallbackGen.cs: Implement ToNativeReturn. Call
ToNativeReturn for the return statement. Fix a couple of
places where s_ret was being used incorrectly for m_ret.
* generator/ClassGen.cs, EnumGen.cs, ManualGen.cs,
SimpleGen.cs, StructBase.cs: Implement ToNativeReturn.
* generator/SignalHandler.cs: Call ToNativeReturn for the
return statement, instead of CallByName.
* generator/SymbolTable.cs: Use StringGen for gchar, char,
and gunichar, and ConstStringGen for their const variants.
Add a new method wrapper for ToNativeReturn.
(Trim): Add a special-case for const strings so that the
const is not stripped. Otherwise there is no way of
resolving the const case.
* glade/XML.custom: Update to use new string marshalling.
* glib/Marshaller.cs: Added.
* glib/GException.cs, Markup.cs, ObjectManager.cs,
Value.cs: Update to use new string marshalling.
* glib/Object.cs: Remove old g_type_name DllImport
as it is no longer used.
* glue/fileselection.c (gtksharp_file_selection_get_fileop_entry):
Mark this as const return.
* gtk/ColorSelection.custom, FileSelection.custom,
SelectionData.custom: Update to use new string marshalling.
svn path=/trunk/gtk-sharp/; revision=15286
2003-06-10 18:09:47 +00:00
|
|
|
static extern IntPtr gtksharp_file_selection_get_fileop_file (IntPtr i);
|
2002-06-24 20:38:48 +00:00
|
|
|
public string FileopFile {
|
|
|
|
get {
|
2003-05-29 Rachel Hestilow <rachel@nullenvoid.com>
* gconf/Value.cs: Update to use new string marshalling.
* generator/StringGen.cs, ConstStringGen.cs: Added.
* generator/IGeneratable.cs: Add new method ToNativeReturn.
* generator/CallbackGen.cs: Implement ToNativeReturn. Call
ToNativeReturn for the return statement. Fix a couple of
places where s_ret was being used incorrectly for m_ret.
* generator/ClassGen.cs, EnumGen.cs, ManualGen.cs,
SimpleGen.cs, StructBase.cs: Implement ToNativeReturn.
* generator/SignalHandler.cs: Call ToNativeReturn for the
return statement, instead of CallByName.
* generator/SymbolTable.cs: Use StringGen for gchar, char,
and gunichar, and ConstStringGen for their const variants.
Add a new method wrapper for ToNativeReturn.
(Trim): Add a special-case for const strings so that the
const is not stripped. Otherwise there is no way of
resolving the const case.
* glade/XML.custom: Update to use new string marshalling.
* glib/Marshaller.cs: Added.
* glib/GException.cs, Markup.cs, ObjectManager.cs,
Value.cs: Update to use new string marshalling.
* glib/Object.cs: Remove old g_type_name DllImport
as it is no longer used.
* glue/fileselection.c (gtksharp_file_selection_get_fileop_entry):
Mark this as const return.
* gtk/ColorSelection.custom, FileSelection.custom,
SelectionData.custom: Update to use new string marshalling.
svn path=/trunk/gtk-sharp/; revision=15286
2003-06-10 18:09:47 +00:00
|
|
|
return Marshal.PtrToStringAnsi (gtksharp_file_selection_get_fileop_file (this.Handle));
|
2002-06-24 20:38:48 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2004-10-29 20:33:07 +00:00
|
|
|
[DllImport("gtksharpglue-2.0")]
|
2002-06-24 20:38:48 +00:00
|
|
|
static extern IntPtr gtksharp_file_selection_get_fileop_c_dir (IntPtr i);
|
|
|
|
public Gtk.Button FileopCDir {
|
2003-02-20 04:03:15 +00:00
|
|
|
get { return new FSButton (this, gtksharp_file_selection_get_fileop_c_dir(this.Handle)); }
|
2002-06-24 20:38:48 +00:00
|
|
|
}
|
|
|
|
|
2004-10-29 20:33:07 +00:00
|
|
|
[DllImport("gtksharpglue-2.0")]
|
2002-06-24 20:38:48 +00:00
|
|
|
static extern IntPtr gtksharp_file_selection_get_fileop_del_file (IntPtr i);
|
|
|
|
public Gtk.Button FileopDelFile {
|
2003-02-20 04:03:15 +00:00
|
|
|
get { return new FSButton (this, gtksharp_file_selection_get_fileop_del_file (this.Handle)); }
|
2002-06-24 20:38:48 +00:00
|
|
|
}
|
|
|
|
|
2004-10-29 20:33:07 +00:00
|
|
|
[DllImport("gtksharpglue-2.0")]
|
2002-06-24 20:38:48 +00:00
|
|
|
static extern IntPtr gtksharp_file_selection_get_fileop_ren_file (IntPtr i);
|
|
|
|
public Gtk.Button FileopRenFile {
|
2003-02-20 04:03:15 +00:00
|
|
|
get { return new FSButton (this, gtksharp_file_selection_get_fileop_ren_file (this.Handle)); }
|
2002-06-24 20:38:48 +00:00
|
|
|
}
|
|
|
|
|
2004-10-29 20:33:07 +00:00
|
|
|
[DllImport("gtksharpglue-2.0")]
|
2002-06-24 20:38:48 +00:00
|
|
|
static extern IntPtr gtksharp_file_selection_get_button_area (IntPtr i);
|
|
|
|
public Gtk.HButtonBox ButtonArea {
|
2003-07-23 23:56:47 +00:00
|
|
|
get { return GLib.Object.GetObject (gtksharp_file_selection_get_button_area (this.Handle), false) as Gtk.HButtonBox; }
|
2002-06-24 20:38:48 +00:00
|
|
|
}
|
|
|
|
|
2004-10-29 20:33:07 +00:00
|
|
|
[DllImport("gtksharpglue-2.0")]
|
2002-06-24 20:38:48 +00:00
|
|
|
static extern IntPtr gtksharp_file_selection_get_action_area (IntPtr i);
|
2002-07-13 Rachel Hestilow <hestilow@ximian.com>
* parser/Gnome.metadata, Gtk.metadata: More conflict
fixes.
* parser/build.pl: Fully qualify all lib names. (Gtk+ packages
are now LFS-compliant in Debian...)
* parser/gapi2xml.pl: Fix for whitespace in fields, defines,
and docs.
* generator/BoxedGen.cs: Remove extraneous CallByName definition,
add "override" keyword to FromNative.
(Generate): Generate methods after fields.
* generator/ClassBase.cs: Change CallByName, FromNative to virtual.
(.ctor): Ignore "hidden" nodes. Set container on signal.
(GenSignals, GenMethods): Add "implementor" argument for interface
use.
(Get(Method|Signal|Property)Recursively): Rework to correctly
recurse interfaces.
(Implements): Added.
* generator/Ctor.cs (Initialize): Move clash initialization completely
out of Generate, so we can check for collisions.
* generator/Method.cs (GenerateDeclCommon): Check for duplicates,
for "new" keyword.
(Generate): Add "implementor" argument.
* generator/ObjectGen.cs (Generate): Initialize ctor clashes on
this and all parents, before generating.
(Ctors, InitializeCtors): Added.
* generator/Signal.cs: Store the container_type, check for
collisions.
* generator/StructGen.cs: Add "override" keyword to overriden methods.
* gtk/FileSelection.custom (ActionArea): Add "new" keyword.
svn path=/trunk/gtk-sharp/; revision=5782
2002-07-13 20:31:23 +00:00
|
|
|
public new Gtk.HButtonBox ActionArea {
|
2003-07-23 23:56:47 +00:00
|
|
|
get { return GLib.Object.GetObject (gtksharp_file_selection_get_action_area (this.Handle), false) as Gtk.HButtonBox; }
|
2002-06-24 20:38:48 +00:00
|
|
|
}
|
2003-10-10 21:34:34 +00:00
|
|
|
|
|
|
|
[DllImport("libgtk-win32-2.0-0.dll")]
|
|
|
|
static extern IntPtr gtk_file_selection_get_selections (IntPtr handle);
|
|
|
|
|
|
|
|
[DllImport("libglib-2.0-0.dll")]
|
|
|
|
static extern void g_strfreev (IntPtr handle);
|
|
|
|
|
|
|
|
public string[] Selections {
|
|
|
|
get {
|
|
|
|
IntPtr strv = gtk_file_selection_get_selections (Handle);
|
|
|
|
|
|
|
|
System.Collections.ArrayList result = new System.Collections.ArrayList ();
|
|
|
|
|
|
|
|
int i = 0;
|
|
|
|
IntPtr strptr = Marshal.ReadIntPtr (strv, IntPtr.Size * i++);
|
|
|
|
while (strptr != IntPtr.Zero) {
|
|
|
|
result.Add (Marshal.PtrToStringAnsi (strptr));
|
|
|
|
strptr = Marshal.ReadIntPtr (strv, IntPtr.Size * i++);
|
|
|
|
}
|
|
|
|
|
|
|
|
g_strfreev (strv);
|
|
|
|
|
|
|
|
return result.ToArray (typeof (string)) as string[];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|