60 строки
1.9 KiB
Plaintext
60 строки
1.9 KiB
Plaintext
// CanvasView.Custom - customizations
|
|
//
|
|
// Author: Martin Willemoes Hansen <mwh@sysrq.dk>
|
|
// Copyright (C) 2003 2004 Martin Willemoes Hansen <mwh@sysrq.dk>
|
|
//
|
|
// This library is free software; you can redistribute it and/or
|
|
// modify it under the terms of the GNU Lesser General Public
|
|
// License as published by the Free Software Foundation; either
|
|
// version 2.1 of the License, or (at your option) any later version.
|
|
//
|
|
// This library 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 library; if not, write to the Free Software
|
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
//
|
|
// This code is inserted after the automatically generated code.
|
|
|
|
[DllImport ("diacanvassharpglue")]
|
|
extern static IntPtr diasharp_canvas_view_get_selected_items (IntPtr view);
|
|
|
|
public CanvasViewItem [] SelectedItems {
|
|
get {
|
|
IntPtr list_ptr = diasharp_canvas_view_get_selected_items (Handle);
|
|
if (list_ptr == IntPtr.Zero)
|
|
return new CanvasViewItem [0];
|
|
|
|
GLib.List list = new GLib.List (list_ptr, typeof (CanvasViewItem));
|
|
CanvasViewItem [] result = new CanvasViewItem [list.Count];
|
|
int i = 0;
|
|
foreach (CanvasViewItem val in list)
|
|
result [i ++] = val;
|
|
return result;
|
|
}
|
|
}
|
|
|
|
[DllImport ("diacanvassharpglue")]
|
|
extern static IntPtr diasharp_canvas_view_get_focus_item (IntPtr view);
|
|
|
|
public CanvasViewItem FocusItem {
|
|
get {
|
|
return new CanvasViewItem (diasharp_canvas_view_get_focus_item (Handle));
|
|
}
|
|
}
|
|
|
|
[DllImport ("diacanvassharpglue")]
|
|
extern static IntPtr diasharp_canvas_view_get_handle_layer (IntPtr view);
|
|
|
|
public HandleLayer HandleLayer {
|
|
get {
|
|
return new HandleLayer (diasharp_canvas_view_get_handle_layer (Handle));
|
|
}
|
|
}
|
|
|
|
|
|
|