From d40fed5ce2bc806a91245adb18039634eac13ed0 Mon Sep 17 00:00:00 2001 From: MichaelTheShifter Date: Wed, 20 Jul 2016 09:40:36 -0400 Subject: Move ShiftUI source code to ShiftOS This'll be a lot easier to work on. --- source/ShiftUI/Events/AccessibleEvents.cs | 74 +++++++++ source/ShiftUI/Events/BindingCompleteEventArgs.cs | 101 ++++++++++++ .../ShiftUI/Events/BindingCompleteEventHandler.cs | 32 ++++ .../Events/BindingManagerDataErrorEventArgs.cs | 50 ++++++ .../Events/BindingManagerDataErrorEventHandler.cs | 32 ++++ .../ShiftUI/Events/CacheVirtualItemsEventArgs.cs | 56 +++++++ .../Events/CacheVirtualItemsEventHandler.cs | 32 ++++ source/ShiftUI/Events/ContentsResizedEventArgs.cs | 52 ++++++ .../ShiftUI/Events/ContentsResizedEventHandler.cs | 31 ++++ source/ShiftUI/Events/ConvertEventArgs.cs | 61 +++++++ source/ShiftUI/Events/ConvertEventHandler.cs | 31 ++++ source/ShiftUI/Events/DateBoldEventArgs.cs | 70 ++++++++ source/ShiftUI/Events/DateBoldEventHandler.cs | 31 ++++ source/ShiftUI/Events/DateRangeEventArgs.cs | 67 ++++++++ source/ShiftUI/Events/DateRangeEventHandler.cs | 31 ++++ source/ShiftUI/Events/DrawItemEventArgs.cs | 101 ++++++++++++ source/ShiftUI/Events/DrawItemEventHandler.cs | 31 ++++ .../Events/DrawListViewColumnHeaderEventArgs.cs | 133 +++++++++++++++ .../Events/DrawListViewColumnHeaderEventHandler.cs | 31 ++++ source/ShiftUI/Events/DrawListViewItemEventArgs.cs | 116 ++++++++++++++ .../ShiftUI/Events/DrawListViewItemEventHandler.cs | 31 ++++ .../ShiftUI/Events/DrawListViewSubItemEventArgs.cs | 140 ++++++++++++++++ .../Events/DrawListViewSubItemEventHandler.cs | 31 ++++ source/ShiftUI/Events/DrawTreeNodeEventArgs.cs | 80 +++++++++ source/ShiftUI/Events/DrawTreeNodeEventHandler.cs | 33 ++++ source/ShiftUI/Events/GiveFeedbackEventArgs.cs | 63 ++++++++ source/ShiftUI/Events/GiveFeedbackEventHandler.cs | 32 ++++ source/ShiftUI/Events/HelpEventArgs.cs | 65 ++++++++ source/ShiftUI/Events/HelpEventHandler.cs | 30 ++++ .../Events/InputLanguageChangedEventArgs.cs | 73 +++++++++ .../Events/InputLanguageChangedEventHandler.cs | 31 ++++ .../Events/InputLanguageChangingEventArgs.cs | 74 +++++++++ .../Events/InputLanguageChangingEventHandler.cs | 31 ++++ source/ShiftUI/Events/InvalidateEventArgs.cs | 50 ++++++ source/ShiftUI/Events/InvalidateEventHandler.cs | 32 ++++ source/ShiftUI/Events/ItemChangedEventArgs.cs | 50 ++++++ source/ShiftUI/Events/ItemChangedEventHandler.cs | 33 ++++ source/ShiftUI/Events/ItemCheckEventArgs.cs | 65 ++++++++ source/ShiftUI/Events/ItemCheckEventHandler.cs | 33 ++++ source/ShiftUI/Events/ItemCheckedEventArgs.cs | 49 ++++++ source/ShiftUI/Events/ItemCheckedEventHandler.cs | 32 ++++ source/ShiftUI/Events/ItemDragEventArgs.cs | 63 ++++++++ source/ShiftUI/Events/ItemDragEventHandler.cs | 33 ++++ source/ShiftUI/Events/LabelEditEventArgs.cs | 73 +++++++++ source/ShiftUI/Events/LabelEditEventHandler.cs | 34 ++++ source/ShiftUI/Events/LayoutEventArgs.cs | 70 ++++++++ source/ShiftUI/Events/LayoutEventHandler.cs | 32 ++++ .../ShiftUI/Events/ListControlConvertEventArgs.cs | 50 ++++++ .../Events/ListControlConvertEventHandler.cs | 32 ++++ source/ShiftUI/Events/MeasureItemEventArgs.cs | 77 +++++++++ source/ShiftUI/Events/MeasureItemEventHandler.cs | 30 ++++ source/ShiftUI/Events/NodeLabelEditEventArgs.cs | 71 ++++++++ source/ShiftUI/Events/NodeLabelEditEventHandler.cs | 33 ++++ source/ShiftUI/Events/PreviewKeyDownEventArgs.cs | 79 +++++++++ .../ShiftUI/Events/PreviewKeyDownEventHandler.cs | 32 ++++ .../Events/QueryAccessibilityHelpEventArgs.cs | 85 ++++++++++ .../Events/QueryAccessibilityHelpEventHandler.cs | 31 ++++ .../ShiftUI/Events/QueryContinueDragEventArgs.cs | 72 +++++++++ .../Events/QueryContinueDragEventHandler.cs | 31 ++++ .../ShiftUI/Events/RetrieveVirtualItemEventArgs.cs | 55 +++++++ .../Events/RetrieveVirtualItemEventHandler.cs | 32 ++++ source/ShiftUI/Events/ScrollEventArgs.cs | 95 +++++++++++ source/ShiftUI/Events/ScrollEventHandler.cs | 31 ++++ source/ShiftUI/Events/ScrollEventType.cs | 44 +++++ .../Events/SearchForVirtualItemEventArgs.cs | 97 +++++++++++ .../Events/SearchForVirtualItemEventHandler.cs | 32 ++++ source/ShiftUI/Events/SplitterCancelEventArgs.cs | 70 ++++++++ .../ShiftUI/Events/SplitterCancelEventHandler.cs | 32 ++++ source/ShiftUI/Events/SplitterEventArgs.cs | 79 +++++++++ source/ShiftUI/Events/SplitterEventHandler.cs | 32 ++++ .../ShiftUI/Events/StatusBarDrawItemEventArgs.cs | 57 +++++++ .../Events/StatusBarDrawItemEventHandler.cs | 36 +++++ .../ShiftUI/Events/StatusBarPanelClickEventArgs.cs | 46 ++++++ .../Events/StatusBarPanelClickEventHandler.cs | 32 ++++ source/ShiftUI/Events/TabControlCancelEventArgs.cs | 63 ++++++++ .../ShiftUI/Events/TabControlCancelEventHandler.cs | 32 ++++ source/ShiftUI/Events/TabControlEventArgs.cs | 64 ++++++++ source/ShiftUI/Events/TabControlEventHandler.cs | 32 ++++ .../Events/TableLayoutCellPaintEventArgs.cs | 64 ++++++++ .../Events/TableLayoutCellPaintEventHandler.cs | 32 ++++ .../Events/TableLayoutColumnStyleCollection.cs | 75 +++++++++ .../ShiftUI/Events/TableLayoutControlCollection.cs | 66 ++++++++ .../Events/TableLayoutPanelCellBorderStyle.cs | 42 +++++ .../ShiftUI/Events/TableLayoutPanelCellPosition.cs | 99 ++++++++++++ source/ShiftUI/Events/TableLayoutPanelGrowStyle.cs | 33 ++++ .../Events/TableLayoutRowStyleCollection.cs | 75 +++++++++ source/ShiftUI/Events/TableLayoutStyle.cs | 62 +++++++ .../ShiftUI/Events/TableLayoutStyleCollection.cs | 178 +++++++++++++++++++++ .../ShiftUI/Events/TreeNodeMouseClickEventArgs.cs | 49 ++++++ .../Events/TreeNodeMouseClickEventHandler.cs | 32 ++++ .../ShiftUI/Events/TreeNodeMouseHoverEventArgs.cs | 52 ++++++ .../Events/TreeNodeMouseHoverEventHandler.cs | 32 ++++ source/ShiftUI/Events/TreeViewCancelEventArgs.cs | 52 ++++++ .../ShiftUI/Events/TreeViewCancelEventHandler.cs | 31 ++++ source/ShiftUI/Events/TreeViewEventArgs.cs | 52 ++++++ source/ShiftUI/Events/TreeViewEventHandler.cs | 30 ++++ source/ShiftUI/Events/UICues.cs | 42 +++++ source/ShiftUI/Events/UICuesEventArgs.cs | 88 ++++++++++ source/ShiftUI/Events/UICuesEventHandler.cs | 33 ++++ 99 files changed, 5329 insertions(+) create mode 100644 source/ShiftUI/Events/AccessibleEvents.cs create mode 100644 source/ShiftUI/Events/BindingCompleteEventArgs.cs create mode 100644 source/ShiftUI/Events/BindingCompleteEventHandler.cs create mode 100644 source/ShiftUI/Events/BindingManagerDataErrorEventArgs.cs create mode 100644 source/ShiftUI/Events/BindingManagerDataErrorEventHandler.cs create mode 100644 source/ShiftUI/Events/CacheVirtualItemsEventArgs.cs create mode 100644 source/ShiftUI/Events/CacheVirtualItemsEventHandler.cs create mode 100644 source/ShiftUI/Events/ContentsResizedEventArgs.cs create mode 100644 source/ShiftUI/Events/ContentsResizedEventHandler.cs create mode 100644 source/ShiftUI/Events/ConvertEventArgs.cs create mode 100644 source/ShiftUI/Events/ConvertEventHandler.cs create mode 100644 source/ShiftUI/Events/DateBoldEventArgs.cs create mode 100644 source/ShiftUI/Events/DateBoldEventHandler.cs create mode 100644 source/ShiftUI/Events/DateRangeEventArgs.cs create mode 100644 source/ShiftUI/Events/DateRangeEventHandler.cs create mode 100644 source/ShiftUI/Events/DrawItemEventArgs.cs create mode 100644 source/ShiftUI/Events/DrawItemEventHandler.cs create mode 100644 source/ShiftUI/Events/DrawListViewColumnHeaderEventArgs.cs create mode 100644 source/ShiftUI/Events/DrawListViewColumnHeaderEventHandler.cs create mode 100644 source/ShiftUI/Events/DrawListViewItemEventArgs.cs create mode 100644 source/ShiftUI/Events/DrawListViewItemEventHandler.cs create mode 100644 source/ShiftUI/Events/DrawListViewSubItemEventArgs.cs create mode 100644 source/ShiftUI/Events/DrawListViewSubItemEventHandler.cs create mode 100644 source/ShiftUI/Events/DrawTreeNodeEventArgs.cs create mode 100644 source/ShiftUI/Events/DrawTreeNodeEventHandler.cs create mode 100644 source/ShiftUI/Events/GiveFeedbackEventArgs.cs create mode 100644 source/ShiftUI/Events/GiveFeedbackEventHandler.cs create mode 100644 source/ShiftUI/Events/HelpEventArgs.cs create mode 100644 source/ShiftUI/Events/HelpEventHandler.cs create mode 100644 source/ShiftUI/Events/InputLanguageChangedEventArgs.cs create mode 100644 source/ShiftUI/Events/InputLanguageChangedEventHandler.cs create mode 100644 source/ShiftUI/Events/InputLanguageChangingEventArgs.cs create mode 100644 source/ShiftUI/Events/InputLanguageChangingEventHandler.cs create mode 100644 source/ShiftUI/Events/InvalidateEventArgs.cs create mode 100644 source/ShiftUI/Events/InvalidateEventHandler.cs create mode 100644 source/ShiftUI/Events/ItemChangedEventArgs.cs create mode 100644 source/ShiftUI/Events/ItemChangedEventHandler.cs create mode 100644 source/ShiftUI/Events/ItemCheckEventArgs.cs create mode 100644 source/ShiftUI/Events/ItemCheckEventHandler.cs create mode 100644 source/ShiftUI/Events/ItemCheckedEventArgs.cs create mode 100644 source/ShiftUI/Events/ItemCheckedEventHandler.cs create mode 100644 source/ShiftUI/Events/ItemDragEventArgs.cs create mode 100644 source/ShiftUI/Events/ItemDragEventHandler.cs create mode 100644 source/ShiftUI/Events/LabelEditEventArgs.cs create mode 100644 source/ShiftUI/Events/LabelEditEventHandler.cs create mode 100644 source/ShiftUI/Events/LayoutEventArgs.cs create mode 100644 source/ShiftUI/Events/LayoutEventHandler.cs create mode 100644 source/ShiftUI/Events/ListControlConvertEventArgs.cs create mode 100644 source/ShiftUI/Events/ListControlConvertEventHandler.cs create mode 100644 source/ShiftUI/Events/MeasureItemEventArgs.cs create mode 100644 source/ShiftUI/Events/MeasureItemEventHandler.cs create mode 100644 source/ShiftUI/Events/NodeLabelEditEventArgs.cs create mode 100644 source/ShiftUI/Events/NodeLabelEditEventHandler.cs create mode 100644 source/ShiftUI/Events/PreviewKeyDownEventArgs.cs create mode 100644 source/ShiftUI/Events/PreviewKeyDownEventHandler.cs create mode 100644 source/ShiftUI/Events/QueryAccessibilityHelpEventArgs.cs create mode 100644 source/ShiftUI/Events/QueryAccessibilityHelpEventHandler.cs create mode 100644 source/ShiftUI/Events/QueryContinueDragEventArgs.cs create mode 100644 source/ShiftUI/Events/QueryContinueDragEventHandler.cs create mode 100644 source/ShiftUI/Events/RetrieveVirtualItemEventArgs.cs create mode 100644 source/ShiftUI/Events/RetrieveVirtualItemEventHandler.cs create mode 100644 source/ShiftUI/Events/ScrollEventArgs.cs create mode 100644 source/ShiftUI/Events/ScrollEventHandler.cs create mode 100644 source/ShiftUI/Events/ScrollEventType.cs create mode 100644 source/ShiftUI/Events/SearchForVirtualItemEventArgs.cs create mode 100644 source/ShiftUI/Events/SearchForVirtualItemEventHandler.cs create mode 100644 source/ShiftUI/Events/SplitterCancelEventArgs.cs create mode 100644 source/ShiftUI/Events/SplitterCancelEventHandler.cs create mode 100644 source/ShiftUI/Events/SplitterEventArgs.cs create mode 100644 source/ShiftUI/Events/SplitterEventHandler.cs create mode 100644 source/ShiftUI/Events/StatusBarDrawItemEventArgs.cs create mode 100644 source/ShiftUI/Events/StatusBarDrawItemEventHandler.cs create mode 100644 source/ShiftUI/Events/StatusBarPanelClickEventArgs.cs create mode 100644 source/ShiftUI/Events/StatusBarPanelClickEventHandler.cs create mode 100644 source/ShiftUI/Events/TabControlCancelEventArgs.cs create mode 100644 source/ShiftUI/Events/TabControlCancelEventHandler.cs create mode 100644 source/ShiftUI/Events/TabControlEventArgs.cs create mode 100644 source/ShiftUI/Events/TabControlEventHandler.cs create mode 100644 source/ShiftUI/Events/TableLayoutCellPaintEventArgs.cs create mode 100644 source/ShiftUI/Events/TableLayoutCellPaintEventHandler.cs create mode 100644 source/ShiftUI/Events/TableLayoutColumnStyleCollection.cs create mode 100644 source/ShiftUI/Events/TableLayoutControlCollection.cs create mode 100644 source/ShiftUI/Events/TableLayoutPanelCellBorderStyle.cs create mode 100644 source/ShiftUI/Events/TableLayoutPanelCellPosition.cs create mode 100644 source/ShiftUI/Events/TableLayoutPanelGrowStyle.cs create mode 100644 source/ShiftUI/Events/TableLayoutRowStyleCollection.cs create mode 100644 source/ShiftUI/Events/TableLayoutStyle.cs create mode 100644 source/ShiftUI/Events/TableLayoutStyleCollection.cs create mode 100644 source/ShiftUI/Events/TreeNodeMouseClickEventArgs.cs create mode 100644 source/ShiftUI/Events/TreeNodeMouseClickEventHandler.cs create mode 100644 source/ShiftUI/Events/TreeNodeMouseHoverEventArgs.cs create mode 100644 source/ShiftUI/Events/TreeNodeMouseHoverEventHandler.cs create mode 100644 source/ShiftUI/Events/TreeViewCancelEventArgs.cs create mode 100644 source/ShiftUI/Events/TreeViewCancelEventHandler.cs create mode 100644 source/ShiftUI/Events/TreeViewEventArgs.cs create mode 100644 source/ShiftUI/Events/TreeViewEventHandler.cs create mode 100644 source/ShiftUI/Events/UICues.cs create mode 100644 source/ShiftUI/Events/UICuesEventArgs.cs create mode 100644 source/ShiftUI/Events/UICuesEventHandler.cs (limited to 'source/ShiftUI/Events') diff --git a/source/ShiftUI/Events/AccessibleEvents.cs b/source/ShiftUI/Events/AccessibleEvents.cs new file mode 100644 index 0000000..90a9e82 --- /dev/null +++ b/source/ShiftUI/Events/AccessibleEvents.cs @@ -0,0 +1,74 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2005 Novell, Inc. (http://www.novell.com) +// +// Authors: +// Peter Bartok pbartok@novell.com +// +// + +// COMPLETE + +namespace ShiftUI { + public enum AccessibleEvents { + SystemSound = 1, + SystemAlert = 2, + SystemForeground = 3, + SystemMenuStart = 4, + SystemMenuEnd = 5, + SystemMenuPopupStart = 6, + SystemMenuPopupEnd = 7, + SystemCaptureStart = 8, + SystemCaptureEnd = 9, + SystemMoveSizeStart = 10, + SystemMoveSizeEnd = 11, + SystemContextHelpStart = 12, + SystemContextHelpEnd = 13, + SystemDragDropStart = 14, + SystemDragDropEnd = 15, + SystemDialogStart = 16, + SystemDialogEnd = 17, + SystemScrollingStart = 18, + SystemScrollingEnd = 19, + SystemSwitchStart = 20, + SystemSwitchEnd = 21, + SystemMinimizeStart = 22, + SystemMinimizeEnd = 23, + Create = 32768, + Destroy = 32769, + Show = 32770, + Hide = 32771, + Reorder = 32772, + Focus = 32773, + Selection = 32774, + SelectionAdd = 32775, + SelectionRemove = 32776, + SelectionWithin = 32777, + StateChange = 32778, + LocationChange = 32779, + NameChange = 32780, + DescriptionChange = 32781, + ValueChange = 32782, + ParentChange = 32783, + HelpChange = 32784, + DefaultActionChange = 32785, + AcceleratorChange = 32786 + } +} diff --git a/source/ShiftUI/Events/BindingCompleteEventArgs.cs b/source/ShiftUI/Events/BindingCompleteEventArgs.cs new file mode 100644 index 0000000..69f8f22 --- /dev/null +++ b/source/ShiftUI/Events/BindingCompleteEventArgs.cs @@ -0,0 +1,101 @@ +// +// BindingCompleteEventArgs.cs +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2006 Novell, Inc. +// +// Authors: +// Jonathan Pobst (monkey@jpobst.com) +// + +using System.ComponentModel; +using System; + +namespace ShiftUI +{ + public class BindingCompleteEventArgs : CancelEventArgs + { + private Binding binding; + private BindingCompleteState state; + private BindingCompleteContext context; + private string error_text; + private Exception exception; + + #region Public Constructors + public BindingCompleteEventArgs(Binding binding, BindingCompleteState state, BindingCompleteContext context) + : this (binding, state, context, String.Empty, null, false) + { + } + + public BindingCompleteEventArgs(Binding binding, BindingCompleteState state, BindingCompleteContext context, string errorText) + : this (binding, state, context, errorText, null, false) + { + } + + public BindingCompleteEventArgs(Binding binding, BindingCompleteState state, BindingCompleteContext context, string errorText, Exception exception) + : this (binding, state, context, errorText, exception, false) + { + } + + public BindingCompleteEventArgs(Binding binding, BindingCompleteState state, BindingCompleteContext context, string errorText, Exception exception, bool cancel) + : base (cancel) + { + this.binding = binding; + this.state = state; + this.context = context; + this.error_text = errorText; + this.exception = exception; + } + #endregion // Public Constructors + + #region Public Instance Properties + public Binding Binding { + get { return this.binding; } + } + + public BindingCompleteContext BindingCompleteContext { + get { return this.context; } + } + + public BindingCompleteState BindingCompleteState { + get { return this.state; } + } + + public string ErrorText { + get { return this.error_text; } + } + + public Exception Exception { + get { return this.exception; } + } + #endregion // Public Instance Properties + + internal void SetErrorText (string error_text) + { + this.error_text = error_text; + } + + internal void SetException (Exception exception) + { + this.exception = exception; + } + } +} diff --git a/source/ShiftUI/Events/BindingCompleteEventHandler.cs b/source/ShiftUI/Events/BindingCompleteEventHandler.cs new file mode 100644 index 0000000..695ad24 --- /dev/null +++ b/source/ShiftUI/Events/BindingCompleteEventHandler.cs @@ -0,0 +1,32 @@ +// +// BindingCompleteEventHandler.cs +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2006 Novell, Inc. +// +// Authors: +// Jonathan Pobst (monkey@jpobst.com) +// + +namespace ShiftUI +{ + public delegate void BindingCompleteEventHandler(object sender, BindingCompleteEventArgs e); +} diff --git a/source/ShiftUI/Events/BindingManagerDataErrorEventArgs.cs b/source/ShiftUI/Events/BindingManagerDataErrorEventArgs.cs new file mode 100644 index 0000000..e7fae6a --- /dev/null +++ b/source/ShiftUI/Events/BindingManagerDataErrorEventArgs.cs @@ -0,0 +1,50 @@ +// +// BindingManagerDataErrorEventArgs.cs +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2006 Novell, Inc. +// +// Authors: +// Jonathan Pobst (monkey@jpobst.com) +// +using System; + +namespace ShiftUI +{ + public class BindingManagerDataErrorEventArgs : EventArgs + { + + private Exception exception; + + #region Public Constructors + public BindingManagerDataErrorEventArgs(Exception exception) : base () + { + this.exception = exception; + } + #endregion // Public Constructors + + #region Public Instance Properties + public Exception Exception { + get { return this.exception; } + } + #endregion // Public Instance Properties + } +} diff --git a/source/ShiftUI/Events/BindingManagerDataErrorEventHandler.cs b/source/ShiftUI/Events/BindingManagerDataErrorEventHandler.cs new file mode 100644 index 0000000..e138980 --- /dev/null +++ b/source/ShiftUI/Events/BindingManagerDataErrorEventHandler.cs @@ -0,0 +1,32 @@ +// +// BindingManagerDataErrorEventHandler.cs +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2006 Novell, Inc. +// +// Authors: +// Jonathan Pobst (monkey@jpobst.com) +// + +namespace ShiftUI +{ + public delegate void BindingManagerDataErrorEventHandler(object sender, BindingManagerDataErrorEventArgs e); +} diff --git a/source/ShiftUI/Events/CacheVirtualItemsEventArgs.cs b/source/ShiftUI/Events/CacheVirtualItemsEventArgs.cs new file mode 100644 index 0000000..e8ddf64 --- /dev/null +++ b/source/ShiftUI/Events/CacheVirtualItemsEventArgs.cs @@ -0,0 +1,56 @@ +// +// CacheVirtualItemsEventArgs.cs +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2006 Novell, Inc. +// +// Authors: +// Jonathan Pobst (monkey@jpobst.com) +// +using System; + +namespace ShiftUI +{ + public class CacheVirtualItemsEventArgs : EventArgs + { + + private int start_index; + private int end_index; + + #region Public Constructors + public CacheVirtualItemsEventArgs(int startIndex, int endIndex) : base () + { + this.start_index = startIndex; + this.end_index = endIndex; + } + #endregion // Public Constructors + + #region Public Instance Properties + public int StartIndex { + get { return this.start_index; } + } + + public int EndIndex { + get { return this.end_index; } + } + #endregion // Public Instance Properties + } +} diff --git a/source/ShiftUI/Events/CacheVirtualItemsEventHandler.cs b/source/ShiftUI/Events/CacheVirtualItemsEventHandler.cs new file mode 100644 index 0000000..8100d4d --- /dev/null +++ b/source/ShiftUI/Events/CacheVirtualItemsEventHandler.cs @@ -0,0 +1,32 @@ +// +// CacheVirtualItemsEventHandler.cs +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2006 Novell, Inc. +// +// Authors: +// Jonathan Pobst (monkey@jpobst.com) +// + +namespace ShiftUI +{ + public delegate void CacheVirtualItemsEventHandler(object sender, CacheVirtualItemsEventArgs e); +} diff --git a/source/ShiftUI/Events/ContentsResizedEventArgs.cs b/source/ShiftUI/Events/ContentsResizedEventArgs.cs new file mode 100644 index 0000000..d233416 --- /dev/null +++ b/source/ShiftUI/Events/ContentsResizedEventArgs.cs @@ -0,0 +1,52 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2005 Novell, Inc. (http://www.novell.com) +// +// Authors: +// Peter Bartok (pbartok@novell.com) +// +// + +// COMPLETE + +using System.Drawing; +using System; + +namespace ShiftUI { + public class ContentsResizedEventArgs : EventArgs { + #region Local Variables + Rectangle rect; + #endregion // Local Variables + + #region Public Constructors + public ContentsResizedEventArgs(Rectangle newRectangle) { + rect = newRectangle; + } + #endregion // Public Constructors + + #region Public Instance Properties + public Rectangle NewRectangle { + get { + return rect; + } + } + #endregion // Public Instance Properties + } +} diff --git a/source/ShiftUI/Events/ContentsResizedEventHandler.cs b/source/ShiftUI/Events/ContentsResizedEventHandler.cs new file mode 100644 index 0000000..764d2db --- /dev/null +++ b/source/ShiftUI/Events/ContentsResizedEventHandler.cs @@ -0,0 +1,31 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2005 Novell, Inc. (http://www.novell.com) +// +// Authors: +// Peter Bartok (pbartok@novell.com) +// +// + +// COMPLETE + +namespace ShiftUI { + public delegate void ContentsResizedEventHandler(object sender, ContentsResizedEventArgs e); +} diff --git a/source/ShiftUI/Events/ConvertEventArgs.cs b/source/ShiftUI/Events/ConvertEventArgs.cs new file mode 100644 index 0000000..da2dfb0 --- /dev/null +++ b/source/ShiftUI/Events/ConvertEventArgs.cs @@ -0,0 +1,61 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2004 Novell, Inc. +// +// Authors: +// Peter Bartok pbartok@novell.com +// +// + + +// COMPLETE +using System; + +namespace ShiftUI { + public class ConvertEventArgs : EventArgs { + private object object_value; + private Type desired_type; + + #region Public Constructors + public ConvertEventArgs(object value, Type desiredType) { + this.object_value=value; + this.desired_type=desiredType; + } + #endregion // Public Constructors + + #region Public Instance Properties + public Type DesiredType { + get { + return this.desired_type; + } + } + + public object Value { + get { + return this.object_value; + } + + set { + this.object_value=value; + } + } + #endregion // Public Instance Properties + } +} diff --git a/source/ShiftUI/Events/ConvertEventHandler.cs b/source/ShiftUI/Events/ConvertEventHandler.cs new file mode 100644 index 0000000..54c9188 --- /dev/null +++ b/source/ShiftUI/Events/ConvertEventHandler.cs @@ -0,0 +1,31 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2004 Novell, Inc. +// +// Authors: +// Peter Bartok pbartok@novell.com +// + + +// COMPLETE + +namespace ShiftUI { + public delegate void ConvertEventHandler (object sender, ConvertEventArgs e); +} diff --git a/source/ShiftUI/Events/DateBoldEventArgs.cs b/source/ShiftUI/Events/DateBoldEventArgs.cs new file mode 100644 index 0000000..3280375 --- /dev/null +++ b/source/ShiftUI/Events/DateBoldEventArgs.cs @@ -0,0 +1,70 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2005 Novell, Inc. (http://www.novell.com) +// +// Authors: +// Peter Bartok (pbartok@novell.com) +// +// + +// COMPLETE +using System; + +namespace ShiftUI { + public class DateBoldEventArgs : EventArgs { + #region Local Variables + private int size; + private DateTime start; + private int[] days_to_bold; + #endregion // Local Variables + + #region Internal Constructor + DateBoldEventArgs(DateTime start, int size, int[] daysToBold) { + this.start = start; + this.size = size; + this.days_to_bold = daysToBold; + } + #endregion + + #region Public Instance Properties + public int[] DaysToBold { + get { + return days_to_bold; + } + + set { + days_to_bold = value; + } + } + + public int Size { + get { + return size; + } + } + + public DateTime StartDate { + get { + return start; + } + } + #endregion // Public Instance Properties + } +} diff --git a/source/ShiftUI/Events/DateBoldEventHandler.cs b/source/ShiftUI/Events/DateBoldEventHandler.cs new file mode 100644 index 0000000..c3f3185 --- /dev/null +++ b/source/ShiftUI/Events/DateBoldEventHandler.cs @@ -0,0 +1,31 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2005 Novell, Inc. (http://www.novell.com) +// +// Authors: +// Peter Bartok (pbartok@novell.com) +// +// + +// COMPLETE + +namespace ShiftUI { + public delegate void DateBoldEventHandler (object sender, DateBoldEventArgs e); +} diff --git a/source/ShiftUI/Events/DateRangeEventArgs.cs b/source/ShiftUI/Events/DateRangeEventArgs.cs new file mode 100644 index 0000000..2b22d7f --- /dev/null +++ b/source/ShiftUI/Events/DateRangeEventArgs.cs @@ -0,0 +1,67 @@ +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2004 Novell, Inc. +// +// Authors: +// John BouAntoun jba-mono@optusnet.com.au +// + +using System; +using System.Drawing; + +namespace ShiftUI { + public class DateRangeEventArgs : EventArgs { + #region local members + + DateTime end; + DateTime start; + + #endregion // local members + + #region public constructors + + // constructor that receives two dates, uses the lower of the two as start + public DateRangeEventArgs (DateTime start, DateTime end) { + this.start = start; + this.end = end; + } + + #endregion // public constructors + + #region public properties + + // end date of this range + public DateTime End { + get { + return end; + } + } + + // start date of this range + public DateTime Start { + get { + return start; + } + } + + #endregion // public properties + } +} diff --git a/source/ShiftUI/Events/DateRangeEventHandler.cs b/source/ShiftUI/Events/DateRangeEventHandler.cs new file mode 100644 index 0000000..c8bb443 --- /dev/null +++ b/source/ShiftUI/Events/DateRangeEventHandler.cs @@ -0,0 +1,31 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2004 Novell, Inc. +// +// Authors: +// John BouAntoun jba-mono@optusnet.com.au +// + +// COMPLETE + +namespace ShiftUI { + // event handler for when a daterange event is fired (datechanged or dateselected) + public delegate void DateRangeEventHandler(object sender, DateRangeEventArgs e); +} diff --git a/source/ShiftUI/Events/DrawItemEventArgs.cs b/source/ShiftUI/Events/DrawItemEventArgs.cs new file mode 100644 index 0000000..d9131f2 --- /dev/null +++ b/source/ShiftUI/Events/DrawItemEventArgs.cs @@ -0,0 +1,101 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2004 Novell, Inc. +// +// Authors: +// Jackson Harper (jackson@ximian.com) + + +using System; +using System.Drawing; + +namespace ShiftUI { + + public class DrawItemEventArgs : EventArgs { + + Graphics graphics; + Font font; + Rectangle rect; + int index; + DrawItemState state; + Color fore_color; + Color back_color; + + public DrawItemEventArgs (Graphics graphics, Font font, + Rectangle rect, int index, DrawItemState state) : + this (graphics, font, rect, index, state, + Widget.DefaultForeColor, Widget.DefaultBackColor) + { + + } + + public DrawItemEventArgs (Graphics graphics, Font font, + Rectangle rect, int index, DrawItemState state, + Color foreColor, Color backColor) + { + this.graphics = graphics; + this.font = font; + this.rect = rect; + this.index = index; + this.state = state; + this.fore_color = foreColor; + this.back_color = backColor; + } + + public Graphics Graphics { + get { return graphics; } + } + + public Font Font { + get { return font; } + } + + public Rectangle Bounds { + get { return rect; } + } + + public int Index { + get { return index; } + } + + public DrawItemState State { + get { return state; } + } + + public Color BackColor { + get { return back_color; } + } + + public Color ForeColor { + get { return fore_color; } + } + + public virtual void DrawBackground () + { + ThemeEngine.Current.DrawOwnerDrawBackground (this); + } + + public virtual void DrawFocusRectangle () + { + ThemeEngine.Current.DrawOwnerDrawFocusRectangle (this); + } + } +} + diff --git a/source/ShiftUI/Events/DrawItemEventHandler.cs b/source/ShiftUI/Events/DrawItemEventHandler.cs new file mode 100644 index 0000000..5223b0e --- /dev/null +++ b/source/ShiftUI/Events/DrawItemEventHandler.cs @@ -0,0 +1,31 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2004 Novell, Inc. +// +// Authors: +// Jordi Mas i Hernandez, jordi@ximian.com +// +// +// COMPLETE + +namespace ShiftUI +{ + public delegate void DrawItemEventHandler (object sender, DrawItemEventArgs e); +} diff --git a/source/ShiftUI/Events/DrawListViewColumnHeaderEventArgs.cs b/source/ShiftUI/Events/DrawListViewColumnHeaderEventArgs.cs new file mode 100644 index 0000000..67ee147 --- /dev/null +++ b/source/ShiftUI/Events/DrawListViewColumnHeaderEventArgs.cs @@ -0,0 +1,133 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2004-2005 Novell, Inc. +// +// Authors: +// Alan McGovern (alan.mcgovern@gmail.com) +// + + +using System.Drawing; +using System.Drawing.Drawing2D; +using System; + +namespace ShiftUI +{ + public class DrawListViewColumnHeaderEventArgs : EventArgs + { + #region Private Fields + + private Color backColor; + private Rectangle bounds; + private int columnIndex; + private bool drawDefault; + private Font font; + private Color foreColor; + private Graphics graphics; + private ColumnHeader header; + private ListViewItemStates state; + + #endregion Private Fields + + + #region Properties + + public Color BackColor { + get { return backColor; } + } + + public Rectangle Bounds { + get { return bounds; } + } + + public int ColumnIndex { + get { return columnIndex; } + } + + public bool DrawDefault { + get { return drawDefault; } + set { drawDefault = value; } + } + + public Font Font { + get { return font; } + } + + public Color ForeColor { + get { return foreColor; } + } + + public Graphics Graphics { + get { return graphics; } + } + + public ColumnHeader Header { + get { return header; } + } + + public ListViewItemStates State { + get { return state; } + } + + #endregion Properties + + + #region Constructors + + public DrawListViewColumnHeaderEventArgs(Graphics graphics, Rectangle bounds, int columnIndex, + ColumnHeader header, ListViewItemStates state, Color foreColor, + Color backColor, Font font) + { + this.backColor = backColor; + this.bounds = bounds; + this.columnIndex = columnIndex; + this.font = font; + this.foreColor = foreColor; + this.graphics = graphics; + this.header = header; + this.state = state; + } + + #endregion Constructors + + + #region Methods + + public void DrawBackground () + { + // Always draw a non-pushed button + ThemeEngine.Current.CPDrawButton (graphics, bounds, ButtonState.Normal); + } + + public void DrawText () + { + DrawText (TextFormatFlags.EndEllipsis | TextFormatFlags.SingleLine); + } + + public void DrawText (TextFormatFlags flags) + { + // Text adjustments + Rectangle text_bounds = new Rectangle (bounds.X + 8, bounds.Y, bounds.Width - 13, bounds.Height); + TextRenderer.DrawText (graphics, header.Text, font, text_bounds, foreColor, flags); + } + + #endregion Methods + } +} diff --git a/source/ShiftUI/Events/DrawListViewColumnHeaderEventHandler.cs b/source/ShiftUI/Events/DrawListViewColumnHeaderEventHandler.cs new file mode 100644 index 0000000..f1dae4a --- /dev/null +++ b/source/ShiftUI/Events/DrawListViewColumnHeaderEventHandler.cs @@ -0,0 +1,31 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2007 Novell, Inc. +// +// Authors: +// Rolf Bjarne Kvinge +// +// +// COMPLETE + +namespace ShiftUI +{ + public delegate void DrawListViewColumnHeaderEventHandler(object sender, DrawListViewColumnHeaderEventArgs e); +} diff --git a/source/ShiftUI/Events/DrawListViewItemEventArgs.cs b/source/ShiftUI/Events/DrawListViewItemEventArgs.cs new file mode 100644 index 0000000..346d64b --- /dev/null +++ b/source/ShiftUI/Events/DrawListViewItemEventArgs.cs @@ -0,0 +1,116 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2004-2005 Novell, Inc. +// +// Authors: +// Alan McGovern (alan.mcgovern@gmail.com) +// + + +using System.Drawing; +using System; + +namespace ShiftUI +{ + public class DrawListViewItemEventArgs : EventArgs + { + #region Private Fields + + private Rectangle bounds; + private bool drawDefault; + private Graphics graphics; + private ListViewItem item; + private int itemIndex; + private ListViewItemStates state; + + #endregion Private Fields + + + #region Properties + + public bool DrawDefault { + get { return drawDefault; } + set { drawDefault = value; } + } + + public Rectangle Bounds { + get { return bounds; } + } + + public Graphics Graphics { + get { return graphics; } + } + + public ListViewItem Item { + get { return item; } + } + + public int ItemIndex { + get { return itemIndex; } + } + + public ListViewItemStates State { + get { return state; } + } + + #endregion Properties + + + #region Constructors + + public DrawListViewItemEventArgs (Graphics graphics, ListViewItem item, + Rectangle bounds, int itemIndex, ListViewItemStates state) + { + this.graphics = graphics; + this.item = item; + this.bounds = bounds; + this.itemIndex = itemIndex; + this.state = state; + } + + #endregion Constructors + + + #region Public Methods + + public void DrawBackground () + { + graphics.FillRectangle (ThemeEngine.Current.ResPool.GetSolidBrush (item.BackColor), bounds); + } + + public void DrawFocusRectangle () + { + if ((state & ListViewItemStates.Focused) != 0) + ThemeEngine.Current.CPDrawFocusRectangle (graphics, bounds, item.ListView.ForeColor, item.ListView.BackColor); + } + + public void DrawText () + { + DrawText (TextFormatFlags.Default); + } + + public void DrawText (TextFormatFlags flags) + { + TextRenderer.DrawText (graphics, item.Text, item.Font, bounds, item.ForeColor, flags); + } + + #endregion Public Methods + } +} diff --git a/source/ShiftUI/Events/DrawListViewItemEventHandler.cs b/source/ShiftUI/Events/DrawListViewItemEventHandler.cs new file mode 100644 index 0000000..d54a185 --- /dev/null +++ b/source/ShiftUI/Events/DrawListViewItemEventHandler.cs @@ -0,0 +1,31 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2007 Novell, Inc. +// +// Authors: +// Rolf Bjarne Kvinge +// +// +// COMPLETE + +namespace ShiftUI +{ + public delegate void DrawListViewItemEventHandler (object sender, DrawListViewItemEventArgs e); +} diff --git a/source/ShiftUI/Events/DrawListViewSubItemEventArgs.cs b/source/ShiftUI/Events/DrawListViewSubItemEventArgs.cs new file mode 100644 index 0000000..9c509d0 --- /dev/null +++ b/source/ShiftUI/Events/DrawListViewSubItemEventArgs.cs @@ -0,0 +1,140 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2004-2005 Novell, Inc. +// +// Authors: +// Alan McGovern (alan.mcgovern@gmail.com) +// + + +using System.Drawing; +using System; + +namespace ShiftUI +{ + public class DrawListViewSubItemEventArgs : EventArgs + { + #region Private Fields + + private Rectangle bounds; + private int columnIndex; + private bool drawDefault; + private Graphics graphics; + private ColumnHeader header; + private ListViewItem item; + private int itemIndex; + private ListViewItemStates itemState; + private ListViewItem.ListViewSubItem subItem; + + #endregion Private Fields + + + #region Properties + + public Rectangle Bounds { + get { return bounds; } + } + + public int ColumnIndex { + get { return columnIndex; } + } + + public bool DrawDefault { + get { return drawDefault; } + set { drawDefault = value; } + } + + public Graphics Graphics { + get { return graphics; } + } + + public ColumnHeader Header { + get { return header; } + } + + public ListViewItem Item { + get { return item; } + } + + public int ItemIndex { + get { return itemIndex; } + } + + public ListViewItemStates ItemState { + get { return itemState; } + } + + public ListViewItem.ListViewSubItem SubItem { + get { return this.subItem; } + } + + #endregion Properties + + + #region Constructors + + public DrawListViewSubItemEventArgs(Graphics graphics, Rectangle bounds, + ListViewItem item, ListViewItem.ListViewSubItem subItem, + int itemIndex, int columnIndex, + ColumnHeader header, ListViewItemStates itemState) + { + this.bounds = bounds; + this.columnIndex = columnIndex; + this.graphics = graphics; + this.header = header; + this.item = item; + this.itemIndex = itemIndex; + this.itemState = itemState; + this.subItem = subItem; + } + + #endregion Constructors + + + #region Public Methods + + public void DrawBackground () + { + graphics.FillRectangle (ThemeEngine.Current.ResPool.GetSolidBrush (subItem.BackColor), bounds); + } + + public void DrawFocusRectangle (Rectangle bounds) + { + if ((itemState & ListViewItemStates.Focused) != 0) { + Rectangle rect = new Rectangle (bounds.X + 1, bounds.Y + 1, bounds.Width - 1, bounds.Height - 1); + ThemeEngine.Current.CPDrawFocusRectangle (graphics, rect, subItem.ForeColor, subItem.BackColor); + } + } + + public void DrawText () + { + DrawText (TextFormatFlags.EndEllipsis | TextFormatFlags.HorizontalCenter); + } + + public void DrawText (TextFormatFlags flags) + { + // Text adjustments + Rectangle text_bounds = new Rectangle (bounds.X + 8, bounds.Y, bounds.Width - 13, bounds.Height); + TextRenderer.DrawText (graphics, subItem.Text, subItem.Font, text_bounds, subItem.ForeColor, flags); + } + + #endregion Public Methods + } +} diff --git a/source/ShiftUI/Events/DrawListViewSubItemEventHandler.cs b/source/ShiftUI/Events/DrawListViewSubItemEventHandler.cs new file mode 100644 index 0000000..cd43c92 --- /dev/null +++ b/source/ShiftUI/Events/DrawListViewSubItemEventHandler.cs @@ -0,0 +1,31 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2007 Novell, Inc. +// +// Authors: +// Rolf Bjarne Kvinge +// +// +// COMPLETE + +namespace ShiftUI +{ + public delegate void DrawListViewSubItemEventHandler (object sender, DrawListViewSubItemEventArgs e); +} diff --git a/source/ShiftUI/Events/DrawTreeNodeEventArgs.cs b/source/ShiftUI/Events/DrawTreeNodeEventArgs.cs new file mode 100644 index 0000000..82b9784 --- /dev/null +++ b/source/ShiftUI/Events/DrawTreeNodeEventArgs.cs @@ -0,0 +1,80 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2006 Jonathan Chambers +// +// Authors: +// Jonathan Chambers (joncham@gmail.com) +// + + +using System.Drawing; +using System; + +namespace ShiftUI +{ + public class DrawTreeNodeEventArgs : EventArgs + { + private Rectangle bounds; + private bool draw_default; + private Graphics graphics; + private TreeNode node; + private TreeNodeStates state; + + #region Public Constructors + public DrawTreeNodeEventArgs (Graphics graphics, TreeNode node, + Rectangle bounds, TreeNodeStates state) + { + this.bounds = bounds; + this.draw_default = false; + this.graphics = graphics; + this.node = node; + this.state = state; + } + #endregion // Public Constructors + + #region Public Instance Properties + public Rectangle Bounds + { + get { return bounds; } + } + + public bool DrawDefault + { + get { return draw_default; } + set { draw_default = value; } + } + + public Graphics Graphics + { + get { return graphics; } + } + + public TreeNode Node + { + get { return node; } + } + + public TreeNodeStates State + { + get { return state; } + } + #endregion // Public Instance Properties + } +} diff --git a/source/ShiftUI/Events/DrawTreeNodeEventHandler.cs b/source/ShiftUI/Events/DrawTreeNodeEventHandler.cs new file mode 100644 index 0000000..a737183 --- /dev/null +++ b/source/ShiftUI/Events/DrawTreeNodeEventHandler.cs @@ -0,0 +1,33 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2007 Novell, Inc. +// +// Authors: +// Jackson Harper (jackson@ximian.com) +// + + +using System; + +namespace ShiftUI { + + public delegate void DrawTreeNodeEventHandler (object sender, DrawTreeNodeEventArgs e); + +} diff --git a/source/ShiftUI/Events/GiveFeedbackEventArgs.cs b/source/ShiftUI/Events/GiveFeedbackEventArgs.cs new file mode 100644 index 0000000..50c5c11 --- /dev/null +++ b/source/ShiftUI/Events/GiveFeedbackEventArgs.cs @@ -0,0 +1,63 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2004-2005 Novell, Inc. +// +// Authors: +// Peter Bartok pbartok@novell.com +// + + +// COMPLETE + +using System.Runtime.InteropServices; +using System; + +namespace ShiftUI { + [ComVisible(true)] + public class GiveFeedbackEventArgs : EventArgs { + internal DragDropEffects effect; + internal bool use_default_cursors; + + #region Public Constructors + public GiveFeedbackEventArgs(DragDropEffects effect, bool useDefaultCursors) { + this.effect=effect; + this.use_default_cursors=useDefaultCursors; + } + #endregion // Public Constructors + + #region Public Instance Properties + public DragDropEffects Effect { + get { + return this.effect; + } + } + + public bool UseDefaultCursors { + get { + return this.use_default_cursors; + } + + set { + this.use_default_cursors=value; + } + } + #endregion // Public Instance Properties + } +} diff --git a/source/ShiftUI/Events/GiveFeedbackEventHandler.cs b/source/ShiftUI/Events/GiveFeedbackEventHandler.cs new file mode 100644 index 0000000..84c0710 --- /dev/null +++ b/source/ShiftUI/Events/GiveFeedbackEventHandler.cs @@ -0,0 +1,32 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2004 Novell, Inc. +// +// Authors: +// Peter Bartok pbartok@novell.com +// +// + + +// COMPLETE + +namespace ShiftUI { + public delegate void GiveFeedbackEventHandler (object sender, GiveFeedbackEventArgs e); +} diff --git a/source/ShiftUI/Events/HelpEventArgs.cs b/source/ShiftUI/Events/HelpEventArgs.cs new file mode 100644 index 0000000..916cf12 --- /dev/null +++ b/source/ShiftUI/Events/HelpEventArgs.cs @@ -0,0 +1,65 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2004-2005 Novell, Inc. +// +// Authors: +// Peter Bartok pbartok@novell.com +// + + +// COMPLETE + +using System.Drawing; + +using System.Runtime.InteropServices; +using System; + +namespace ShiftUI { + [ComVisible(true)] + public class HelpEventArgs : EventArgs { + private Point mouse_position; + private bool event_handled; + + #region Public Constructors + public HelpEventArgs(System.Drawing.Point mousePos) { + this.mouse_position=mousePos; + this.event_handled=false; + } + #endregion // Public Constructors + + #region Public Instance Properties + public bool Handled { + get { + return this.event_handled; + } + + set { + this.event_handled=value; + } + } + + public Point MousePos { + get { + return this.mouse_position; + } + } + #endregion // Public Instance Properties + } +} diff --git a/source/ShiftUI/Events/HelpEventHandler.cs b/source/ShiftUI/Events/HelpEventHandler.cs new file mode 100644 index 0000000..8333d2a --- /dev/null +++ b/source/ShiftUI/Events/HelpEventHandler.cs @@ -0,0 +1,30 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2004 Novell, Inc. +// +// Authors: +// Peter Bartok pbartok@novell.com +// + +// COMPLETE + +namespace ShiftUI { + public delegate void HelpEventHandler (object sender, HelpEventArgs hlpevent); +} diff --git a/source/ShiftUI/Events/InputLanguageChangedEventArgs.cs b/source/ShiftUI/Events/InputLanguageChangedEventArgs.cs new file mode 100644 index 0000000..fe3115d --- /dev/null +++ b/source/ShiftUI/Events/InputLanguageChangedEventArgs.cs @@ -0,0 +1,73 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2004 Novell, Inc. +// +// Authors: +// Peter Bartok pbartok@novell.com +// +// + + +// COMPLETE + +using System.Globalization; +using System; + +namespace ShiftUI { + public class InputLanguageChangedEventArgs : EventArgs { + private CultureInfo culture; + private byte charset; + private InputLanguage input_language; + + #region Public Constructors + public InputLanguageChangedEventArgs(System.Globalization.CultureInfo culture, byte charSet) { + this.culture = culture; + this.charset = charSet; + this.input_language = InputLanguage.FromCulture(culture); + } + + public InputLanguageChangedEventArgs(InputLanguage inputLanguage, byte charSet) { + this.culture = inputLanguage.Culture; + this.charset = charSet; + this.input_language = inputLanguage; + } + #endregion // Public Constructors + + #region Public Instance Properties + public byte CharSet { + get { + return this.charset; + } + } + + public CultureInfo Culture { + get { + return this.culture; + } + } + + public InputLanguage InputLanguage { + get { + return this.input_language; + } + } + #endregion // Public Instance Properties + } +} diff --git a/source/ShiftUI/Events/InputLanguageChangedEventHandler.cs b/source/ShiftUI/Events/InputLanguageChangedEventHandler.cs new file mode 100644 index 0000000..a4a981a --- /dev/null +++ b/source/ShiftUI/Events/InputLanguageChangedEventHandler.cs @@ -0,0 +1,31 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2004 Novell, Inc. +// +// Authors: +// Peter Bartok pbartok@novell.com +// +// + +// COMPLETE + +namespace ShiftUI { + public delegate void InputLanguageChangedEventHandler(object sender, InputLanguageChangedEventArgs e); +} diff --git a/source/ShiftUI/Events/InputLanguageChangingEventArgs.cs b/source/ShiftUI/Events/InputLanguageChangingEventArgs.cs new file mode 100644 index 0000000..1ca5f44 --- /dev/null +++ b/source/ShiftUI/Events/InputLanguageChangingEventArgs.cs @@ -0,0 +1,74 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2004 Novell, Inc. +// +// Authors: +// Peter Bartok pbartok@novell.com +// +// + + +// COMPLETE + +using System; +using System.ComponentModel; +using System.Globalization; + +namespace ShiftUI { + public class InputLanguageChangingEventArgs : System.ComponentModel.CancelEventArgs { + private CultureInfo culture; + private bool system_charset; + private InputLanguage input_language; + + #region Public Constructors + public InputLanguageChangingEventArgs (System.Globalization.CultureInfo culture, bool sysCharSet) { + this.culture = culture; + this.system_charset = sysCharSet; + this.input_language = InputLanguage.FromCulture(culture); + } + + public InputLanguageChangingEventArgs (InputLanguage inputLanguage, bool sysCharSet) { + this.culture = inputLanguage.Culture; + this.system_charset = sysCharSet; + this.input_language = inputLanguage; + } + #endregion // Public Constructors + + #region Public Instance Properties + public bool SysCharSet { + get { + return this.system_charset; + } + } + + public CultureInfo Culture { + get { + return this.culture; + } + } + + public InputLanguage InputLanguage { + get { + return this.input_language; + } + } + #endregion // Public Instance Properties + } +} diff --git a/source/ShiftUI/Events/InputLanguageChangingEventHandler.cs b/source/ShiftUI/Events/InputLanguageChangingEventHandler.cs new file mode 100644 index 0000000..2127a6c --- /dev/null +++ b/source/ShiftUI/Events/InputLanguageChangingEventHandler.cs @@ -0,0 +1,31 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2004 Novell, Inc. +// +// Authors: +// Peter Bartok pbartok@novell.com +// + + +// COMPLETE + +namespace ShiftUI { + public delegate void InputLanguageChangingEventHandler(object sender, InputLanguageChangingEventArgs e); +} diff --git a/source/ShiftUI/Events/InvalidateEventArgs.cs b/source/ShiftUI/Events/InvalidateEventArgs.cs new file mode 100644 index 0000000..f92a9f6 --- /dev/null +++ b/source/ShiftUI/Events/InvalidateEventArgs.cs @@ -0,0 +1,50 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2004 Novell, Inc. +// +// Authors: +// Peter Bartok pbartok@novell.com +// + + +// COMPLETE + +using System.Drawing; +using System; + +namespace ShiftUI { + public class InvalidateEventArgs : EventArgs { + private Rectangle invalidated_rectangle; + + #region Public Constructors + public InvalidateEventArgs(System.Drawing.Rectangle invalidRect) { + this.invalidated_rectangle=invalidRect; + } + #endregion // Public Constructors + + #region Public Instance Properties + public Rectangle InvalidRect { + get { + return this.invalidated_rectangle; + } + } + #endregion // Public Instance Properties + } +} diff --git a/source/ShiftUI/Events/InvalidateEventHandler.cs b/source/ShiftUI/Events/InvalidateEventHandler.cs new file mode 100644 index 0000000..395e64f --- /dev/null +++ b/source/ShiftUI/Events/InvalidateEventHandler.cs @@ -0,0 +1,32 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2004 Novell, Inc. +// +// Authors: +// Peter Bartok pbartok@novell.com +// +// + + +// COMPLETE + +namespace ShiftUI { + public delegate void InvalidateEventHandler (object sender, InvalidateEventArgs e); +} diff --git a/source/ShiftUI/Events/ItemChangedEventArgs.cs b/source/ShiftUI/Events/ItemChangedEventArgs.cs new file mode 100644 index 0000000..ceafef4 --- /dev/null +++ b/source/ShiftUI/Events/ItemChangedEventArgs.cs @@ -0,0 +1,50 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2004 Novell, Inc. (http://www.novell.com) +// +// Author: +// Ravindra (rkumar@novell.com) +// + +// COMPLETE + + +using System; + +namespace ShiftUI +{ + public class ItemChangedEventArgs : EventArgs + { + private int index; + + #region Internal Constructors + internal ItemChangedEventArgs (int index) + { + this.index = index; + } + #endregion // Internal Constructors + + #region Public Instance Properties + public int Index { + get { return index; } + } + #endregion // Public Instance Properties + } +} diff --git a/source/ShiftUI/Events/ItemChangedEventHandler.cs b/source/ShiftUI/Events/ItemChangedEventHandler.cs new file mode 100644 index 0000000..2b3e136 --- /dev/null +++ b/source/ShiftUI/Events/ItemChangedEventHandler.cs @@ -0,0 +1,33 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2004 Novell, Inc. (http://www.novell.com) +// +// Author: +// Ravindra (rkumar@novell.com) +// + + +// COMPLETE + + +namespace ShiftUI +{ + public delegate void ItemChangedEventHandler (object sender, ItemChangedEventArgs e); +} diff --git a/source/ShiftUI/Events/ItemCheckEventArgs.cs b/source/ShiftUI/Events/ItemCheckEventArgs.cs new file mode 100644 index 0000000..6296c5a --- /dev/null +++ b/source/ShiftUI/Events/ItemCheckEventArgs.cs @@ -0,0 +1,65 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2004 Novell, Inc. (http://www.novell.com) +// +// Author: +// Ravindra (rkumar@novell.com) +// + +// COMPLETE + + +using System; +using System.Runtime.InteropServices; + +namespace ShiftUI +{ + [ComVisible (true)] + public class ItemCheckEventArgs : EventArgs + { + private CheckState currentValue; + private int index; + private CheckState newValue; + + #region Public Constructors + public ItemCheckEventArgs (int index, CheckState newCheckValue, CheckState currentValue) + { + this.index = index; + this.newValue = newCheckValue; + this.currentValue = currentValue; + } + #endregion // Public Constructors + + #region Public Instance Properties + public CheckState CurrentValue { + get { return currentValue; } + } + + public int Index { + get { return index; } + } + + public CheckState NewValue { + get { return newValue; } + set { newValue = value; } + } + #endregion // Public Instance Properties + } +} diff --git a/source/ShiftUI/Events/ItemCheckEventHandler.cs b/source/ShiftUI/Events/ItemCheckEventHandler.cs new file mode 100644 index 0000000..b88e66c --- /dev/null +++ b/source/ShiftUI/Events/ItemCheckEventHandler.cs @@ -0,0 +1,33 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2004 Novell, Inc. (http://www.novell.com) +// +// Author: +// Ravindra (rkumar@novell.com) +// + + +// COMPLETE + + +namespace ShiftUI +{ + public delegate void ItemCheckEventHandler (object sender, ItemCheckEventArgs e); +} diff --git a/source/ShiftUI/Events/ItemCheckedEventArgs.cs b/source/ShiftUI/Events/ItemCheckedEventArgs.cs new file mode 100644 index 0000000..b6f2309 --- /dev/null +++ b/source/ShiftUI/Events/ItemCheckedEventArgs.cs @@ -0,0 +1,49 @@ +// +// ItemCheckedEventArgs.cs +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2006 Novell, Inc. +// +// Authors: +// Jonathan Pobst (monkey@jpobst.com) +// +using System; + +namespace ShiftUI +{ + public class ItemCheckedEventArgs : EventArgs + { + private ListViewItem item; + + #region Public Constructors + public ItemCheckedEventArgs (ListViewItem item) : base () + { + this.item = item; + } + #endregion // Public Constructors + + #region Public Instance Properties + public ListViewItem Item { + get { return this.item; } + } + #endregion // Public Instance Properties + } +} diff --git a/source/ShiftUI/Events/ItemCheckedEventHandler.cs b/source/ShiftUI/Events/ItemCheckedEventHandler.cs new file mode 100644 index 0000000..ebc45e9 --- /dev/null +++ b/source/ShiftUI/Events/ItemCheckedEventHandler.cs @@ -0,0 +1,32 @@ +// +// ItemCheckedEventHandler.cs +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2006 Novell, Inc. +// +// Authors: +// Jonathan Pobst (monkey@jpobst.com) +// + +namespace ShiftUI +{ + public delegate void ItemCheckedEventHandler (object sender, ItemCheckedEventArgs e); +} diff --git a/source/ShiftUI/Events/ItemDragEventArgs.cs b/source/ShiftUI/Events/ItemDragEventArgs.cs new file mode 100644 index 0000000..4104c81 --- /dev/null +++ b/source/ShiftUI/Events/ItemDragEventArgs.cs @@ -0,0 +1,63 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2004 Novell, Inc. (http://www.novell.com) +// +// Author: +// Ravindra (rkumar@novell.com) +// + +// COMPLETE + + +using System; +using System.Runtime.InteropServices; + +namespace ShiftUI +{ + [ComVisible (true)] + public class ItemDragEventArgs : EventArgs + { + private MouseButtons button; + private object item; + + #region Public Constructors + public ItemDragEventArgs (MouseButtons button) + { + this.button = button; + } + + public ItemDragEventArgs (MouseButtons button, object item) + { + this.button = button; + this.item = item; + } + #endregion // Public Constructors + + #region Public Instance Properties + public MouseButtons Button { + get { return button; } + } + + public object Item { + get { return item; } + } + #endregion // Public Instance Properties + } +} diff --git a/source/ShiftUI/Events/ItemDragEventHandler.cs b/source/ShiftUI/Events/ItemDragEventHandler.cs new file mode 100644 index 0000000..5c7f35d --- /dev/null +++ b/source/ShiftUI/Events/ItemDragEventHandler.cs @@ -0,0 +1,33 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2004 Novell, Inc. (http://www.novell.com) +// +// Author: +// Ravindra (rkumar@novell.com) +// + + +// COMPLETE + + +namespace ShiftUI +{ + public delegate void ItemDragEventHandler (object sender, ItemDragEventArgs e); +} diff --git a/source/ShiftUI/Events/LabelEditEventArgs.cs b/source/ShiftUI/Events/LabelEditEventArgs.cs new file mode 100644 index 0000000..23ac0a0 --- /dev/null +++ b/source/ShiftUI/Events/LabelEditEventArgs.cs @@ -0,0 +1,73 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2004 Novell, Inc. (http://www.novell.com) +// +// Author: +// Ravindra (rkumar@novell.com) +// + + +// COMPLETE + + +using System; + +namespace ShiftUI +{ + public class LabelEditEventArgs : EventArgs + { + private int item; + private string label; + private bool cancelEdit = false; + + #region Public Constructors + public LabelEditEventArgs (int item) + { + this.item = item; + } + + public LabelEditEventArgs (int item, string label) + { + this.item = item; + this.label = label; + } + #endregion // Public Constructors + + #region Public Instance Properties + public bool CancelEdit { + get { return cancelEdit; } + set { cancelEdit = value; } + } + + public int Item { + get { return item; } + } + + public string Label { + get { return label; } + } + #endregion // Public Instance Properties + + internal void SetLabel (string label) + { + this.label = label; + } + } +} diff --git a/source/ShiftUI/Events/LabelEditEventHandler.cs b/source/ShiftUI/Events/LabelEditEventHandler.cs new file mode 100644 index 0000000..dbdef96 --- /dev/null +++ b/source/ShiftUI/Events/LabelEditEventHandler.cs @@ -0,0 +1,34 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2004 Novell, Inc. (http://www.novell.com) +// +// Author: +// Ravindra (rkumar@novell.com) +// + + + +// COMPLETE + + +namespace ShiftUI +{ + public delegate void LabelEditEventHandler (object sender, LabelEditEventArgs e); +} diff --git a/source/ShiftUI/Events/LayoutEventArgs.cs b/source/ShiftUI/Events/LayoutEventArgs.cs new file mode 100644 index 0000000..7599987 --- /dev/null +++ b/source/ShiftUI/Events/LayoutEventArgs.cs @@ -0,0 +1,70 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2004 Novell, Inc. +// +// Authors: +// Peter Bartok pbartok@novell.com +// +// + + +// COMPLETE + +using System.ComponentModel; +using System; + +namespace ShiftUI { + public sealed class LayoutEventArgs : EventArgs { + private Widget affected_control; + private string affected_property; + private IComponent affected_component; + + #region Public Constructors + public LayoutEventArgs(Widget affectedControl, string affectedProperty) { + this.affected_control = affectedControl; + this.affected_property = affectedProperty; + } + + public LayoutEventArgs (IComponent affectedComponent, string affectedProperty) + { + this.affected_component = affectedComponent; + this.affected_property = affectedProperty; + } + #endregion // Public Constructors + + #region Public Instance Properties + public IComponent AffectedComponent { + get { return this.affected_component; } + } + + public Widget AffectedControl { + get { + return this.affected_control; + } + } + + public string AffectedProperty { + get { + return this.affected_property; + } + } + #endregion // Public Instance Properties + } +} diff --git a/source/ShiftUI/Events/LayoutEventHandler.cs b/source/ShiftUI/Events/LayoutEventHandler.cs new file mode 100644 index 0000000..82e8630 --- /dev/null +++ b/source/ShiftUI/Events/LayoutEventHandler.cs @@ -0,0 +1,32 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2004 Novell, Inc. +// +// Authors: +// Peter Bartok pbartok@novell.com +// +// + + +// COMPLETE + +namespace ShiftUI { + public delegate void LayoutEventHandler (object sender, LayoutEventArgs e); +} diff --git a/source/ShiftUI/Events/ListControlConvertEventArgs.cs b/source/ShiftUI/Events/ListControlConvertEventArgs.cs new file mode 100644 index 0000000..fb40872 --- /dev/null +++ b/source/ShiftUI/Events/ListControlConvertEventArgs.cs @@ -0,0 +1,50 @@ +// +// ListControlConvertEventArgs.cs +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2006 Novell, Inc. +// +// Authors: +// Jonathan Pobst (monkey@jpobst.com) +// +using System; + +namespace ShiftUI +{ + public class ListWidgetConvertEventArgs : ConvertEventArgs + { + private object list_item; + + #region Public Constructors + public ListWidgetConvertEventArgs (object value, Type desiredType, object listItem) + : base (value, desiredType) + { + this.list_item = listItem; + } + #endregion // Public Constructors + + #region Public Instance Properties + public object ListItem { + get { return this.list_item; } + } + #endregion // Public Instance Properties + } +} diff --git a/source/ShiftUI/Events/ListControlConvertEventHandler.cs b/source/ShiftUI/Events/ListControlConvertEventHandler.cs new file mode 100644 index 0000000..847e0b9 --- /dev/null +++ b/source/ShiftUI/Events/ListControlConvertEventHandler.cs @@ -0,0 +1,32 @@ +// +// ListControlConvertEventHandler.cs +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2006 Novell, Inc. +// +// Authors: +// Jonathan Pobst (monkey@jpobst.com) +// + +namespace ShiftUI +{ + public delegate void ListWidgetConvertEventHandler (object sender, ListWidgetConvertEventArgs e); +} diff --git a/source/ShiftUI/Events/MeasureItemEventArgs.cs b/source/ShiftUI/Events/MeasureItemEventArgs.cs new file mode 100644 index 0000000..eca771b --- /dev/null +++ b/source/ShiftUI/Events/MeasureItemEventArgs.cs @@ -0,0 +1,77 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2004 Novell, Inc. +// +// Authors: +// Jordi Mas i Hernandez, jordi@ximian.com +// +// + +using System.Drawing; +using System; + +namespace ShiftUI +{ + public class MeasureItemEventArgs : EventArgs + { + private Graphics graphics; + private int index; + private int itemHeight; + private int itemWidth = 0; + + public MeasureItemEventArgs (Graphics graphics, int index) + { + this.graphics = graphics; + this.index = index; + this.itemHeight = 0; + } + + public MeasureItemEventArgs (Graphics graphics, int index, int itemHeight) + { + this.graphics = graphics; + this.index = index; + this.itemHeight = itemHeight; + } + + #region Public Properties + + public Graphics Graphics { + get { return graphics;} + } + + public int Index { + get { return index;} + } + + public int ItemHeight { + get { return itemHeight;} + set { itemHeight = value;} + } + + public int ItemWidth { + get { return itemWidth;} + set { itemWidth = value;} + } + + #endregion Public Properties + } + +} + diff --git a/source/ShiftUI/Events/MeasureItemEventHandler.cs b/source/ShiftUI/Events/MeasureItemEventHandler.cs new file mode 100644 index 0000000..55ccade --- /dev/null +++ b/source/ShiftUI/Events/MeasureItemEventHandler.cs @@ -0,0 +1,30 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2004 Novell, Inc. +// +// Authors: +// Jordi Mas i Hernandez, jordi@ximian.com +// +// + +namespace ShiftUI +{ + public delegate void MeasureItemEventHandler (object sender, MeasureItemEventArgs e); +} diff --git a/source/ShiftUI/Events/NodeLabelEditEventArgs.cs b/source/ShiftUI/Events/NodeLabelEditEventArgs.cs new file mode 100644 index 0000000..5d28858 --- /dev/null +++ b/source/ShiftUI/Events/NodeLabelEditEventArgs.cs @@ -0,0 +1,71 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2004 Novell, Inc. +// +// Authors: +// Jackson Harper (jackson@ximian.com) + + +using System; + +namespace ShiftUI { + + public class NodeLabelEditEventArgs : EventArgs { + + private TreeNode node; + private string label; + private bool cancel; + + public NodeLabelEditEventArgs (TreeNode node) + { + this.node = node; + } + + public NodeLabelEditEventArgs (TreeNode node, string label) : this (node) + { + this.label = label; + } + + public bool CancelEdit { + get { return cancel; } + set { + cancel = value; + + if (cancel) + node.EndEdit (true); + } + } + + public TreeNode Node { + get { return node; } + } + + public string Label { + get { return label; } + } + + internal void SetLabel (string label) + { + this.label = label; + } + } + +} + diff --git a/source/ShiftUI/Events/NodeLabelEditEventHandler.cs b/source/ShiftUI/Events/NodeLabelEditEventHandler.cs new file mode 100644 index 0000000..b9de87e --- /dev/null +++ b/source/ShiftUI/Events/NodeLabelEditEventHandler.cs @@ -0,0 +1,33 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2004 Novell, Inc. +// +// Authors: +// Jackson Harper (jackson@ximian.com) + + +using System; + +namespace ShiftUI { + + public delegate void NodeLabelEditEventHandler (object sender, NodeLabelEditEventArgs e); + +} + diff --git a/source/ShiftUI/Events/PreviewKeyDownEventArgs.cs b/source/ShiftUI/Events/PreviewKeyDownEventArgs.cs new file mode 100644 index 0000000..4da9775 --- /dev/null +++ b/source/ShiftUI/Events/PreviewKeyDownEventArgs.cs @@ -0,0 +1,79 @@ +// +// PreviewKeyDownEventArgs.cs +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2006 Novell, Inc. +// +// Authors: +// Jonathan Pobst (monkey@jpobst.com) +// +using System; + +namespace ShiftUI +{ + public class PreviewKeyDownEventArgs : EventArgs + { + private Keys key_data; + private bool is_input_key; + + #region Public Constructors + public PreviewKeyDownEventArgs (Keys keyData) : base () + { + this.key_data = keyData; + } + #endregion // Public Constructors + + #region Public Instance Properties + public bool Alt { + get { return (this.key_data & Keys.Alt) != 0; } + } + + public bool Widget { + get { return (this.key_data & Keys.Widget) != 0; } + } + + public bool IsInputKey { + get { return this.is_input_key; } + set { this.is_input_key = value; } + } + + public Keys KeyCode { + get { return (this.key_data & Keys.KeyCode); } + } + + public Keys KeyData { + get { return this.key_data; } + } + + public int KeyValue { + get { return Convert.ToInt32 (this.key_data); } + } + + public Keys Modifiers { + get { return (this.key_data & Keys.Modifiers); } + } + + public bool Shift { + get { return (this.key_data & Keys.Shift) != 0; } + } + #endregion // Public Instance Properties + } +} diff --git a/source/ShiftUI/Events/PreviewKeyDownEventHandler.cs b/source/ShiftUI/Events/PreviewKeyDownEventHandler.cs new file mode 100644 index 0000000..88c4cf9 --- /dev/null +++ b/source/ShiftUI/Events/PreviewKeyDownEventHandler.cs @@ -0,0 +1,32 @@ +// +// PreviewKeyDownEventHandler.cs +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2006 Novell, Inc. +// +// Authors: +// Jonathan Pobst (monkey@jpobst.com) +// + +namespace ShiftUI +{ + public delegate void PreviewKeyDownEventHandler (object sender, PreviewKeyDownEventArgs e); +} diff --git a/source/ShiftUI/Events/QueryAccessibilityHelpEventArgs.cs b/source/ShiftUI/Events/QueryAccessibilityHelpEventArgs.cs new file mode 100644 index 0000000..4f0c1a6 --- /dev/null +++ b/source/ShiftUI/Events/QueryAccessibilityHelpEventArgs.cs @@ -0,0 +1,85 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2004-2005 Novell, Inc. +// +// Authors: +// Peter Bartok pbartok@novell.com +// + + +// COMPLETE + +using System.Runtime.InteropServices; +using System; + +namespace ShiftUI { + [ComVisible(true)] + public class QueryAccessibilityHelpEventArgs : EventArgs { + private string help_namespace; + private string help_string; + private string help_keyword; + + #region Public Constructors + public QueryAccessibilityHelpEventArgs() { + this.help_namespace = null; + this.help_string = null; + this.help_keyword = null; + } + + public QueryAccessibilityHelpEventArgs(string helpNamespace, string helpString, string helpKeyword) { + this.help_namespace=helpNamespace; + this.help_string=helpString; + this.help_keyword=helpKeyword; + } + #endregion // Public Constructors + + #region Public Instance Properties + public string HelpKeyword { + get { + return this.help_keyword; + } + + set { + this.help_keyword = value; + } + } + + public string HelpNamespace { + get { + return this.help_namespace; + } + + set { + this.help_namespace = value; + } + } + + public string HelpString { + get { + return this.help_string; + } + + set { + this.help_string = value; + } + } + #endregion // Public Instance Properties + } +} diff --git a/source/ShiftUI/Events/QueryAccessibilityHelpEventHandler.cs b/source/ShiftUI/Events/QueryAccessibilityHelpEventHandler.cs new file mode 100644 index 0000000..b55372f --- /dev/null +++ b/source/ShiftUI/Events/QueryAccessibilityHelpEventHandler.cs @@ -0,0 +1,31 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2004 Novell, Inc. +// +// Authors: +// Peter Bartok pbartok@novell.com +// + + +// COMPLETE + +namespace ShiftUI { + public delegate void QueryAccessibilityHelpEventHandler (object sender, QueryAccessibilityHelpEventArgs e); +} diff --git a/source/ShiftUI/Events/QueryContinueDragEventArgs.cs b/source/ShiftUI/Events/QueryContinueDragEventArgs.cs new file mode 100644 index 0000000..e11cbec --- /dev/null +++ b/source/ShiftUI/Events/QueryContinueDragEventArgs.cs @@ -0,0 +1,72 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2004-2005 Novell, Inc. +// +// Authors: +// Peter Bartok pbartok@novell.com +// +// + + +// COMPLETE + +using System.Runtime.InteropServices; +using System; + +namespace ShiftUI { + [ComVisible(true)] + public class QueryContinueDragEventArgs : EventArgs { + internal int key_state; + internal bool escape_pressed; + internal DragAction drag_action; + + #region Public Constructors + public QueryContinueDragEventArgs(int keyState, bool escapePressed, DragAction action) { + this.key_state = keyState; + this.escape_pressed = escapePressed; + this.drag_action = action; + } + #endregion // Public Constructors + + #region Public Instance Properties + public DragAction Action { + get { + return this.drag_action; + } + + set { + this.drag_action=value; + } + } + + public bool EscapePressed { + get { + return this.escape_pressed; + } + } + + public int KeyState { + get { + return this.key_state; + } + } + #endregion // Public Instance Properties + } +} diff --git a/source/ShiftUI/Events/QueryContinueDragEventHandler.cs b/source/ShiftUI/Events/QueryContinueDragEventHandler.cs new file mode 100644 index 0000000..e20e29c --- /dev/null +++ b/source/ShiftUI/Events/QueryContinueDragEventHandler.cs @@ -0,0 +1,31 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2004 Novell, Inc. +// +// Authors: +// Peter Bartok pbartok@novell.com +// + + +// COMPLETE + +namespace ShiftUI { + public delegate void QueryContinueDragEventHandler (object sender, QueryContinueDragEventArgs e); +} diff --git a/source/ShiftUI/Events/RetrieveVirtualItemEventArgs.cs b/source/ShiftUI/Events/RetrieveVirtualItemEventArgs.cs new file mode 100644 index 0000000..ba3c499 --- /dev/null +++ b/source/ShiftUI/Events/RetrieveVirtualItemEventArgs.cs @@ -0,0 +1,55 @@ +// +// RetrieveVirtualItemEventArgs.cs +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2006 Novell, Inc. +// +// Authors: +// Jonathan Pobst (monkey@jpobst.com) +// +using System; + +namespace ShiftUI +{ + public class RetrieveVirtualItemEventArgs : EventArgs + { + private ListViewItem item; + private int item_index; + + #region Public Constructors + public RetrieveVirtualItemEventArgs (int itemIndex) : base () + { + this.item_index = itemIndex; + } + #endregion // Public Constructors + + #region Public Instance Properties + public ListViewItem Item { + get { return this.item; } + set { this.item = value; } + } + + public int ItemIndex { + get { return this.item_index; } + } + #endregion // Public Instance Properties + } +} diff --git a/source/ShiftUI/Events/RetrieveVirtualItemEventHandler.cs b/source/ShiftUI/Events/RetrieveVirtualItemEventHandler.cs new file mode 100644 index 0000000..3c4e05d --- /dev/null +++ b/source/ShiftUI/Events/RetrieveVirtualItemEventHandler.cs @@ -0,0 +1,32 @@ +// +// RetrieveVirtualItemEventHandler.cs +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2006 Novell, Inc. +// +// Authors: +// Jonathan Pobst (monkey@jpobst.com) +// + +namespace ShiftUI +{ + public delegate void RetrieveVirtualItemEventHandler (object sender, RetrieveVirtualItemEventArgs e); +} diff --git a/source/ShiftUI/Events/ScrollEventArgs.cs b/source/ShiftUI/Events/ScrollEventArgs.cs new file mode 100644 index 0000000..52f87e5 --- /dev/null +++ b/source/ShiftUI/Events/ScrollEventArgs.cs @@ -0,0 +1,95 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2004-2005 Novell, Inc. +// +// Authors: +// Peter Bartok pbartok@novell.com +// + + +// COMPLETE + +using System.Runtime.InteropServices; +using System; + +namespace ShiftUI { + [ComVisible(true)] + public class ScrollEventArgs : EventArgs { + #region Local Variables + private ScrollEventType type; + private int new_value; + private int old_value; + private ScrollOrientation scroll_orientation; + #endregion + + #region Public Constructors + public ScrollEventArgs(ScrollEventType type, int newValue) : + this (type, -1, newValue, ScrollOrientation.HorizontalScroll) + { + } + + public ScrollEventArgs (ScrollEventType type, int oldValue, int newValue) : + this (type, oldValue, newValue, ScrollOrientation.HorizontalScroll) + { + } + + public ScrollEventArgs (ScrollEventType type, int newValue, ScrollOrientation scroll) : + this (type, -1, newValue, scroll) + { + } + + + public ScrollEventArgs (ScrollEventType type, int oldValue, int newValue, ScrollOrientation scroll) + { + this.new_value = newValue; + this.old_value = oldValue; + this.scroll_orientation = scroll; + this.type = type; + } + + #endregion // Public Constructors + + #region Public Instance Properties + public int NewValue { + get { + return new_value; + } + + set { + new_value = value; + } + } + + public int OldValue { + get { return old_value; } + } + + public ScrollOrientation ScrollOrientation { + get { return scroll_orientation; } + } + + public ScrollEventType Type { + get { + return type; + } + } + #endregion // Public Instance Properties + } +} diff --git a/source/ShiftUI/Events/ScrollEventHandler.cs b/source/ShiftUI/Events/ScrollEventHandler.cs new file mode 100644 index 0000000..ba4e1c6 --- /dev/null +++ b/source/ShiftUI/Events/ScrollEventHandler.cs @@ -0,0 +1,31 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2004 Novell, Inc. +// +// Authors: +// Peter Bartok pbartok@novell.com +// + + +// COMPLETE + +namespace ShiftUI { + public delegate void ScrollEventHandler(object sender, ScrollEventArgs e); +} diff --git a/source/ShiftUI/Events/ScrollEventType.cs b/source/ShiftUI/Events/ScrollEventType.cs new file mode 100644 index 0000000..1ba8a6f --- /dev/null +++ b/source/ShiftUI/Events/ScrollEventType.cs @@ -0,0 +1,44 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2004-2005 Novell, Inc. +// +// Authors: +// Peter Bartok pbartok@novell.com +// + + +// COMPLETE + +using System.Runtime.InteropServices; + +namespace ShiftUI { + [ComVisible(true)] + public enum ScrollEventType { + SmallDecrement = 0, + SmallIncrement = 1, + LargeDecrement = 2, + LargeIncrement = 3, + ThumbPosition = 4, + ThumbTrack = 5, + First = 6, + Last = 7, + EndScroll = 8 + } +} diff --git a/source/ShiftUI/Events/SearchForVirtualItemEventArgs.cs b/source/ShiftUI/Events/SearchForVirtualItemEventArgs.cs new file mode 100644 index 0000000..42a9bdc --- /dev/null +++ b/source/ShiftUI/Events/SearchForVirtualItemEventArgs.cs @@ -0,0 +1,97 @@ +// +// SearchForVirtualItemEventArgs.cs +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2006 Novell, Inc. +// +// Authors: +// Jonathan Pobst (monkey@jpobst.com) +// + +using System.Drawing; +using System; + +namespace ShiftUI +{ + public class SearchForVirtualItemEventArgs : EventArgs + { + private SearchDirectionHint direction; + private bool include_sub_items_in_search; + private int index; + private bool is_prefix_search; + private bool is_text_search; + private int start_index; + private Point starting_point; + private string text; + + #region Public Constructors + public SearchForVirtualItemEventArgs (bool isTextSearch, bool isPrefixSearch, + bool includeSubItemsInSearch, string text, Point startingPoint, + SearchDirectionHint direction, int startIndex) : base () + { + this.is_text_search = isTextSearch; + this.is_prefix_search = isPrefixSearch; + this.include_sub_items_in_search = includeSubItemsInSearch; + this.text = text; + this.starting_point = startingPoint; + this.direction = direction; + this.start_index = startIndex; + this.index = -1; + } + #endregion // Public Constructors + + #region Public Instance Properties + public SearchDirectionHint Direction { + get { return this.direction; } + } + + public bool IncludeSubItemsInSearch { + get { return this.include_sub_items_in_search; } + } + + public int Index { + get { return this.index; } + set { this.index = value; } + } + + public bool IsPrefixSearch { + get { return this.is_prefix_search; } + } + + public bool IsTextSearch { + get { return this.is_text_search; } + } + + public int StartIndex { + get { return this.start_index; } + } + + public Point StartingPoint { + get { return this.starting_point; } + } + + public string Text { + get { return this.text; } + } + + #endregion // Public Instance Properties + } +} diff --git a/source/ShiftUI/Events/SearchForVirtualItemEventHandler.cs b/source/ShiftUI/Events/SearchForVirtualItemEventHandler.cs new file mode 100644 index 0000000..12acc83 --- /dev/null +++ b/source/ShiftUI/Events/SearchForVirtualItemEventHandler.cs @@ -0,0 +1,32 @@ +// +// SearchForVirtualItemEventHandler.cs +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2006 Novell, Inc. +// +// Authors: +// Jonathan Pobst (monkey@jpobst.com) +// + +namespace ShiftUI +{ + public delegate void SearchForVirtualItemEventHandler (object sender, SearchForVirtualItemEventArgs e); +} diff --git a/source/ShiftUI/Events/SplitterCancelEventArgs.cs b/source/ShiftUI/Events/SplitterCancelEventArgs.cs new file mode 100644 index 0000000..332e1b0 --- /dev/null +++ b/source/ShiftUI/Events/SplitterCancelEventArgs.cs @@ -0,0 +1,70 @@ +// +// SplitterCancelEventArgs.cs +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2006 Novell, Inc. +// +// Authors: +// Jonathan Pobst (monkey@jpobst.com) +// + +using System.ComponentModel; + +namespace ShiftUI +{ + public class SplitterCancelEventArgs : CancelEventArgs + { + private int mouse_cursor_x; + private int mouse_cursor_y; + private int split_x; + private int split_y; + + #region Public Constructors + public SplitterCancelEventArgs (int mouseCursorX, int mouseCursorY, int splitX, int splitY) : base() + { + this.mouse_cursor_x = mouseCursorX; + this.mouse_cursor_y = mouseCursorY; + this.split_x = splitX; + this.split_y = splitY; + } + #endregion // Public Constructors + + #region Public Instance Properties + public int MouseCursorX { + get { return this.mouse_cursor_x; } + } + + public int MouseCursorY { + get { return this.mouse_cursor_y; } + } + + public int SplitX { + get { return this.split_x; } + set { this.split_x = value; } + } + + public int SplitY { + get { return this.split_y; } + set { this.split_y = value; } + } + #endregion // Public Instance Properties + } +} diff --git a/source/ShiftUI/Events/SplitterCancelEventHandler.cs b/source/ShiftUI/Events/SplitterCancelEventHandler.cs new file mode 100644 index 0000000..630637b --- /dev/null +++ b/source/ShiftUI/Events/SplitterCancelEventHandler.cs @@ -0,0 +1,32 @@ +// +// SplitterCancelEventHandler.cs +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2006 Novell, Inc. +// +// Authors: +// Jonathan Pobst (monkey@jpobst.com) +// + +namespace ShiftUI +{ + public delegate void SplitterCancelEventHandler (object sender, SplitterCancelEventArgs e); +} diff --git a/source/ShiftUI/Events/SplitterEventArgs.cs b/source/ShiftUI/Events/SplitterEventArgs.cs new file mode 100644 index 0000000..be522a7 --- /dev/null +++ b/source/ShiftUI/Events/SplitterEventArgs.cs @@ -0,0 +1,79 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2004-2005 Novell, Inc. (http://www.novell.com) +// +// Authors: +// Aleksandar Dezelin adezelin@beotel.net +// Peter Dennis Bartok pbartok@novell.com +// + +using System; +using System.Runtime.InteropServices; + +namespace ShiftUI { + [ComVisible(true)] + public class SplitterEventArgs : EventArgs + { + #region Private fields + + internal int split_x; + internal int split_y; + internal int x; + internal int y; + + #endregion + + #region Constructors + + public SplitterEventArgs(int x, int y, int splitX, int splitY) + { + this.x = x; + this.y = y; + SplitX = splitX; + SplitY = splitY; + } + + #endregion + + #region Properties + + public int SplitX { + get { return split_x; } + set { split_x = value; } + } + + public int SplitY { + get { return split_y; } + set { split_y = value; } + } + + public int X { + get { return x; } + } + + public int Y { + get { return y; } + } + + #endregion + } +} + + diff --git a/source/ShiftUI/Events/SplitterEventHandler.cs b/source/ShiftUI/Events/SplitterEventHandler.cs new file mode 100644 index 0000000..002dc43 --- /dev/null +++ b/source/ShiftUI/Events/SplitterEventHandler.cs @@ -0,0 +1,32 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2004 Novell, Inc. (http://www.novell.com) +// +// Authors: +// Aleksandar Dezelin adezelin@beotel.net +// + +using System; + +namespace ShiftUI +{ + public delegate void SplitterEventHandler(object sender, SplitterEventArgs e); +} + diff --git a/source/ShiftUI/Events/StatusBarDrawItemEventArgs.cs b/source/ShiftUI/Events/StatusBarDrawItemEventArgs.cs new file mode 100644 index 0000000..675a1e6 --- /dev/null +++ b/source/ShiftUI/Events/StatusBarDrawItemEventArgs.cs @@ -0,0 +1,57 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2004 Novell, Inc. +// +// Authors: +// Jackson Harper (jackson@ximian.com) + + +using System; +using System.Drawing; + + +namespace ShiftUI { + + public class StatusBarDrawItemEventArgs : DrawItemEventArgs { + + private StatusBarPanel panel; + + public StatusBarDrawItemEventArgs (Graphics g, Font font, Rectangle r, + int itemId, DrawItemState itemState, StatusBarPanel panel) : + this (g, font, r, itemId, itemState, panel, Widget.DefaultForeColor, + Widget.DefaultBackColor) + + { + } + + public StatusBarDrawItemEventArgs (Graphics g, Font font, Rectangle r, + int itemId, DrawItemState itemState, StatusBarPanel panel, + Color foreColor, Color backColor) : base (g, font, r, + itemId, itemState) + { + this.panel = panel; + } + + public StatusBarPanel Panel { + get { return panel; } + } + } +} + diff --git a/source/ShiftUI/Events/StatusBarDrawItemEventHandler.cs b/source/ShiftUI/Events/StatusBarDrawItemEventHandler.cs new file mode 100644 index 0000000..b1a48f0 --- /dev/null +++ b/source/ShiftUI/Events/StatusBarDrawItemEventHandler.cs @@ -0,0 +1,36 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2004 Novell, Inc. +// +// Authors: +// Jackson Harper (jackson@ximian.com) + + +using System; +using System.Drawing; + +namespace ShiftUI { + + public delegate void StatusBarDrawItemEventHandler (object sender, + StatusBarDrawItemEventArgs sbdevent); + +} + + diff --git a/source/ShiftUI/Events/StatusBarPanelClickEventArgs.cs b/source/ShiftUI/Events/StatusBarPanelClickEventArgs.cs new file mode 100644 index 0000000..e935ce8 --- /dev/null +++ b/source/ShiftUI/Events/StatusBarPanelClickEventArgs.cs @@ -0,0 +1,46 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2004 Novell, Inc. +// +// Authors: +// Jackson Harper (jackson@ximian.com) + + +using System; + +namespace ShiftUI { + + public class StatusBarPanelClickEventArgs : MouseEventArgs { + + private StatusBarPanel panel; + + public StatusBarPanelClickEventArgs (StatusBarPanel statusBarPanel, + MouseButtons button, int clicks, int x, int y) : + base (button, clicks, x, y, 0) + { + this.panel = statusBarPanel; + } + + public StatusBarPanel StatusBarPanel { + get { return panel; } + } + } +} + diff --git a/source/ShiftUI/Events/StatusBarPanelClickEventHandler.cs b/source/ShiftUI/Events/StatusBarPanelClickEventHandler.cs new file mode 100644 index 0000000..615cc7d --- /dev/null +++ b/source/ShiftUI/Events/StatusBarPanelClickEventHandler.cs @@ -0,0 +1,32 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2004 Novell, Inc. +// +// Authors: +// Jackson Harper (jackson@ximian.com) + + +namespace ShiftUI { + + public delegate void StatusBarPanelClickEventHandler (object sender, + StatusBarPanelClickEventArgs e); + +} + diff --git a/source/ShiftUI/Events/TabControlCancelEventArgs.cs b/source/ShiftUI/Events/TabControlCancelEventArgs.cs new file mode 100644 index 0000000..cbc5dd8 --- /dev/null +++ b/source/ShiftUI/Events/TabControlCancelEventArgs.cs @@ -0,0 +1,63 @@ +// +// TabControlCancelEventArgs.cs +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2006 Novell, Inc. +// +// Authors: +// Jonathan Pobst (monkey@jpobst.com) +// + +using System.ComponentModel; + +namespace ShiftUI +{ + public class TabControlCancelEventArgs : CancelEventArgs + { + private TabControlAction action; + private TabPage tab_page; + private int tab_page_index; + + #region Public Constructors + public TabControlCancelEventArgs (TabPage tabPage, int tabPageIndex, bool cancel, TabControlAction action) + : base (cancel) + { + this.tab_page = tabPage; + this.tab_page_index = tabPageIndex; + this.action = action; + } + #endregion // Public Constructors + + #region Public Instance Properties + public TabControlAction Action { + get { return this.action; } + } + + public TabPage TabPage { + get { return this.tab_page; } + } + + public int TabPageIndex { + get { return this.tab_page_index; } + } + #endregion // Public Instance Properties + } +} diff --git a/source/ShiftUI/Events/TabControlCancelEventHandler.cs b/source/ShiftUI/Events/TabControlCancelEventHandler.cs new file mode 100644 index 0000000..0377cca --- /dev/null +++ b/source/ShiftUI/Events/TabControlCancelEventHandler.cs @@ -0,0 +1,32 @@ +// +// TabControlCancelEventHandler.cs +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2006 Novell, Inc. +// +// Authors: +// Jonathan Pobst (monkey@jpobst.com) +// + +namespace ShiftUI +{ + public delegate void TabControlCancelEventHandler (object sender, TabControlCancelEventArgs e); +} diff --git a/source/ShiftUI/Events/TabControlEventArgs.cs b/source/ShiftUI/Events/TabControlEventArgs.cs new file mode 100644 index 0000000..f3e22c4 --- /dev/null +++ b/source/ShiftUI/Events/TabControlEventArgs.cs @@ -0,0 +1,64 @@ +// +// TabControlEventArgs.cs +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2006 Novell, Inc. +// +// Authors: +// Jonathan Pobst (monkey@jpobst.com) +// +using System; + +namespace ShiftUI +{ + public class TabControlEventArgs : EventArgs + { + private TabControlAction action; + private TabPage tab_page; + private int tab_page_index; + + #region Public Constructors + public TabControlEventArgs (TabPage tabPage, int tabPageIndex, TabControlAction action) : base () + { + this.tab_page = tabPage; + this.tab_page_index = tabPageIndex; + this.action = action; + } + #endregion // Public Constructors + + #region Public Instance Properties + public TabControlAction Action + { + get { return this.action; } + } + + public TabPage TabPage + { + get { return this.tab_page; } + } + + public int TabPageIndex + { + get { return this.tab_page_index; } + } + #endregion // Public Instance Properties + } +} diff --git a/source/ShiftUI/Events/TabControlEventHandler.cs b/source/ShiftUI/Events/TabControlEventHandler.cs new file mode 100644 index 0000000..146367e --- /dev/null +++ b/source/ShiftUI/Events/TabControlEventHandler.cs @@ -0,0 +1,32 @@ +// +// TabControlEventHandler.cs +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2006 Novell, Inc. +// +// Authors: +// Jonathan Pobst (monkey@jpobst.com) +// + +namespace ShiftUI +{ + public delegate void TabControlEventHandler (object sender, TabControlEventArgs e); +} diff --git a/source/ShiftUI/Events/TableLayoutCellPaintEventArgs.cs b/source/ShiftUI/Events/TableLayoutCellPaintEventArgs.cs new file mode 100644 index 0000000..e29dc93 --- /dev/null +++ b/source/ShiftUI/Events/TableLayoutCellPaintEventArgs.cs @@ -0,0 +1,64 @@ +// +// TableLayoutCellPaintEventArgs.cs +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2006 Novell, Inc. +// +// Authors: +// Jonathan Pobst (monkey@jpobst.com) +// + +using System.Drawing; + +namespace ShiftUI +{ + public class TableLayoutCellPaintEventArgs : PaintEventArgs + { + private Rectangle cell_bounds; + private int column; + private int row; + + #region Public Constructors + public TableLayoutCellPaintEventArgs (Graphics g, Rectangle clipRectangle, + Rectangle cellBounds, int column, int row) + : base (g, clipRectangle) + { + this.cell_bounds = cellBounds; + this.column = column; + this.row = row; + } + #endregion // Public Constructors + + #region Public Instance Properties + public Rectangle CellBounds { + get { return this.cell_bounds; } + } + + public int Column { + get { return this.column; } + } + + public int Row { + get { return this.row; } + } + #endregion // Public Instance Properties + } +} diff --git a/source/ShiftUI/Events/TableLayoutCellPaintEventHandler.cs b/source/ShiftUI/Events/TableLayoutCellPaintEventHandler.cs new file mode 100644 index 0000000..80aa4ae --- /dev/null +++ b/source/ShiftUI/Events/TableLayoutCellPaintEventHandler.cs @@ -0,0 +1,32 @@ +// +// TableLayoutCellPaintEventHandler.cs +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2006 Novell, Inc. +// +// Authors: +// Jonathan Pobst (monkey@jpobst.com) +// + +namespace ShiftUI +{ + public delegate void TableLayoutCellPaintEventHandler (object sender, TableLayoutCellPaintEventArgs e); +} diff --git a/source/ShiftUI/Events/TableLayoutColumnStyleCollection.cs b/source/ShiftUI/Events/TableLayoutColumnStyleCollection.cs new file mode 100644 index 0000000..4949103 --- /dev/null +++ b/source/ShiftUI/Events/TableLayoutColumnStyleCollection.cs @@ -0,0 +1,75 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// +// Author: +// Miguel de Icaza (miguel@gnome.org) +// +// Copyright 2004-2006 Novell, Inc. +// + +using System; +using System.ComponentModel; +using System.Collections; +using ShiftUI.Layout; + +namespace ShiftUI { + + public class TableLayoutColumnStyleCollection : TableLayoutStyleCollection { + + internal TableLayoutColumnStyleCollection (TableLayoutPanel panel) : base (panel) + { + } + + public int Add (ColumnStyle columnStyle) + { + return base.Add (columnStyle); + } + + public bool Contains (ColumnStyle columnStyle) + { + return ((IList)this).Contains (columnStyle); + } + + public int IndexOf (ColumnStyle columnStyle) + { + return ((IList)this).IndexOf (columnStyle); + } + + public void Insert (int index, ColumnStyle columnStyle) + { + ((IList)this).Insert (index, columnStyle); + } + + public void Remove (ColumnStyle columnStyle) + { + ((IList)this).Remove (columnStyle); + } + + public new ColumnStyle this [int index] { + get { + return (ColumnStyle) base [index]; + } + + set { + base [index] = value; + } + } + } +} diff --git a/source/ShiftUI/Events/TableLayoutControlCollection.cs b/source/ShiftUI/Events/TableLayoutControlCollection.cs new file mode 100644 index 0000000..16c6ae3 --- /dev/null +++ b/source/ShiftUI/Events/TableLayoutControlCollection.cs @@ -0,0 +1,66 @@ +// +// TableLayoutControlCollection.cs +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2006 Jonathan Pobst +// +// Authors: +// Jonathan Pobst (monkey@jpobst.com) +// + +using System; +using System.ComponentModel; +using System.ComponentModel.Design.Serialization; + +namespace ShiftUI +{ + //[DesignerSerializer ("ShiftUI.Design.TableLayoutControlCollectionCodeDomSerializer, " + Consts.AssemblySystem_Design, "System.ComponentModel.Design.Serialization.CodeDomSerializer, " + Consts.AssemblySystem_Design)] + [ListBindable (false)] + public class TableLayoutControlCollection : Widget.WidgetCollection + { + private TableLayoutPanel panel; + + #region Public Constructor + public TableLayoutControlCollection (TableLayoutPanel container) : base (container) + { + this.panel = container; + } + #endregion + + #region Public Property + public TableLayoutPanel Container { get { return this.panel; } } + #endregion + + #region Public Method + public virtual void Add (Widget control, int column, int row) + { + if (column < -1) + throw new ArgumentException ("column"); + if (row < -1) + throw new ArgumentException ("row"); + + base.Add (control); + + panel.SetCellPosition (control, new TableLayoutPanelCellPosition (column, row)); + } + #endregion + } +} diff --git a/source/ShiftUI/Events/TableLayoutPanelCellBorderStyle.cs b/source/ShiftUI/Events/TableLayoutPanelCellBorderStyle.cs new file mode 100644 index 0000000..a0c3922 --- /dev/null +++ b/source/ShiftUI/Events/TableLayoutPanelCellBorderStyle.cs @@ -0,0 +1,42 @@ +// +// TableLayoutPanelCellBorderStyle.cs +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2006 Novell, Inc. +// +// Authors: +// Jonathan Pobst (monkey@jpobst.com) +// + + +namespace ShiftUI +{ + public enum TableLayoutPanelCellBorderStyle + { + None = 0, + Single = 1, + Inset = 2, + InsetDouble = 3, + Outset = 4, + OutsetDouble = 5, + OutsetPartial = 6 + } +} diff --git a/source/ShiftUI/Events/TableLayoutPanelCellPosition.cs b/source/ShiftUI/Events/TableLayoutPanelCellPosition.cs new file mode 100644 index 0000000..009a903 --- /dev/null +++ b/source/ShiftUI/Events/TableLayoutPanelCellPosition.cs @@ -0,0 +1,99 @@ +// +// TableLayoutPanelCellPosition.cs +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2006 Novell, Inc. +// +// Authors: +// Miguel de Icaza (miguel@novell.com) +// + + +using System.ComponentModel; +using System; + +namespace ShiftUI +{ + [TypeConverter (typeof (TableLayoutPanelCellPositionTypeConverter))] + public struct TableLayoutPanelCellPosition { + int column, row; + + public TableLayoutPanelCellPosition (int column, int row) + { + this.column = column; + this.row = row; + } + + public int Column { + get { + return column; + } + + set { + column = value; + } + } + + public int Row { + get { + return row; + } + + set { + row = value; + } + } + + public override string ToString () + { + return String.Concat (column.ToString (), ",", row.ToString ()); + } + + public override int GetHashCode () + { + return column.GetHashCode () ^ row.GetHashCode (); + } + + public static bool operator == (TableLayoutPanelCellPosition p1, TableLayoutPanelCellPosition p2) + { + return p1.column == p2.column && p1.row == p2.row; + } + + public static bool operator != (TableLayoutPanelCellPosition p1, TableLayoutPanelCellPosition p2) + { + return !(p1.column == p2.column && p1.row == p2.row); + } + + public override bool Equals (object other) + { + if (other == null) + return false; + if (!(other is TableLayoutPanelCellPosition)) + return false; + TableLayoutPanelCellPosition o = (TableLayoutPanelCellPosition) other; + return o.column == column && o.row == row; + } + } + + internal class TableLayoutPanelCellPositionTypeConverter : TypeConverter + { + } +} diff --git a/source/ShiftUI/Events/TableLayoutPanelGrowStyle.cs b/source/ShiftUI/Events/TableLayoutPanelGrowStyle.cs new file mode 100644 index 0000000..4795db7 --- /dev/null +++ b/source/ShiftUI/Events/TableLayoutPanelGrowStyle.cs @@ -0,0 +1,33 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// +// Author: +// Miguel de Icaza (miguel@gnome.org) +// +// (C) 2004 Novell, Inc. +// + +namespace ShiftUI { + public enum TableLayoutPanelGrowStyle { + FixedSize, + AddRows, + AddColumns, + } +} diff --git a/source/ShiftUI/Events/TableLayoutRowStyleCollection.cs b/source/ShiftUI/Events/TableLayoutRowStyleCollection.cs new file mode 100644 index 0000000..b57acc8 --- /dev/null +++ b/source/ShiftUI/Events/TableLayoutRowStyleCollection.cs @@ -0,0 +1,75 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// +// Author: +// Miguel de Icaza (miguel@gnome.org) +// +// Copyright 2004-2006 Novell, Inc. +// + +using System; +using System.ComponentModel; +using System.Collections; +using ShiftUI.Layout; + +namespace ShiftUI { + + public class TableLayoutRowStyleCollection : TableLayoutStyleCollection { + + internal TableLayoutRowStyleCollection (TableLayoutPanel panel) : base (panel) + { + } + + public int Add (RowStyle rowStyle) + { + return base.Add (rowStyle); + } + + public bool Contains (RowStyle rowStyle) + { + return ((IList)this).Contains (rowStyle); + } + + public int IndexOf (RowStyle rowStyle) + { + return ((IList)this).IndexOf (rowStyle); + } + + public void Insert (int index, RowStyle rowStyle) + { + ((IList)this).Insert (index, rowStyle); + } + + public void Remove (RowStyle rowStyle) + { + ((IList)this).Remove (rowStyle); + } + + public new RowStyle this [int index] { + get { + return (RowStyle) base [index]; + } + + set { + base [index] = value; + } + } + } +} diff --git a/source/ShiftUI/Events/TableLayoutStyle.cs b/source/ShiftUI/Events/TableLayoutStyle.cs new file mode 100644 index 0000000..61b0187 --- /dev/null +++ b/source/ShiftUI/Events/TableLayoutStyle.cs @@ -0,0 +1,62 @@ +// +// TableLayoutStyle.cs +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2006 Jonathan Pobst +// +// Authors: +// Jonathan Pobst (monkey@jpobst.com) +// + +using System; +using System.ComponentModel; + +namespace ShiftUI +{ + [TypeConverter (typeof (TableLayoutSettings.StyleConverter))] + public abstract class TableLayoutStyle + { + private SizeType size_type; + private TableLayoutPanel owner; + + protected TableLayoutStyle () + { + size_type = SizeType.AutoSize; + } + + [DefaultValue (SizeType.AutoSize)] + public SizeType SizeType { + get { return this.size_type; } + set { + if (size_type != value) { + size_type = value; + if (owner != null) + owner.PerformLayout (); + } + } + } + + internal TableLayoutPanel Owner { + get { return owner; } + set { owner = value; } + } + } +} diff --git a/source/ShiftUI/Events/TableLayoutStyleCollection.cs b/source/ShiftUI/Events/TableLayoutStyleCollection.cs new file mode 100644 index 0000000..c4e7cea --- /dev/null +++ b/source/ShiftUI/Events/TableLayoutStyleCollection.cs @@ -0,0 +1,178 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// +// Author: +// Miguel de Icaza (miguel@gnome.org) +// +// Copyright 2004-2006 Novell, Inc. +// + +using System; +using System.ComponentModel; +using System.Collections; +using ShiftUI.Layout; + +namespace ShiftUI { + //[Editor ("ShiftUI.Design.StyleCollectionEditor, " + Consts.AssemblySystem_Design, typeof (System.Drawing.Design.UITypeEditor))] + public abstract class TableLayoutStyleCollection : IList, ICollection, IEnumerable + { + ArrayList al = new ArrayList (); + TableLayoutPanel table; + + internal TableLayoutStyleCollection (TableLayoutPanel table) + { + if (table == null) + throw new ArgumentNullException("table"); + + this.table = table; + } + + public int Add (TableLayoutStyle style) + { + return ((IList)this).Add (style); + } + + public void Clear () + { + foreach (TableLayoutStyle style in al) + style.Owner = null; + al.Clear (); + table.PerformLayout (); + } + + public int Count { + get { return al.Count; } + } + + public void RemoveAt (int index) + { + ((TableLayoutStyle)al[index]).Owner = null; + al.RemoveAt (index); + table.PerformLayout (); + } + +#region IList methods + // + // The IList methods will later be implemeneted, this is to get us started + // + int IList.Add (object style) + { + TableLayoutStyle layoutStyle = (TableLayoutStyle) style; + if (layoutStyle.Owner != null) + throw new ArgumentException ("Style is already owned"); + + layoutStyle.Owner = table; + int result = al.Add (layoutStyle); + + if (table != null) + table.PerformLayout (); + + return result; + } + + bool IList.Contains (object style) + { + return al.Contains ((TableLayoutStyle) style); + } + + int IList.IndexOf (object style) + { + return al.IndexOf ((TableLayoutStyle) style); + } + + void IList.Insert (int index, object style) + { + if (((TableLayoutStyle)style).Owner != null) + throw new ArgumentException ("Style is already owned"); + ((TableLayoutStyle)style).Owner = table; + al.Insert (index, (TableLayoutStyle) style); + table.PerformLayout (); + } + + void IList.Remove (object style) + { + ((TableLayoutStyle)style).Owner = null; + al.Remove ((TableLayoutStyle) style); + table.PerformLayout (); + } + + bool IList.IsFixedSize { + get { + return al.IsFixedSize; + } + } + + bool IList.IsReadOnly { + get { + return al.IsReadOnly; + } + } + + object IList.this [int index] { + get { + return al [index]; + } + set { + if (((TableLayoutStyle)value).Owner != null) + throw new ArgumentException ("Style is already owned"); + ((TableLayoutStyle)value).Owner = table; + al [index] = value; + table.PerformLayout (); + } + } +#endregion + +#region ICollection methods + void ICollection.CopyTo (Array array, int startIndex) + { + al.CopyTo (array, startIndex); + } + + object ICollection.SyncRoot { + get { + return al.SyncRoot; + } + } + + bool ICollection.IsSynchronized { + get { + return al.IsSynchronized; + } + } +#endregion + +#region IEnumerable methods + IEnumerator IEnumerable.GetEnumerator () + { + return al.GetEnumerator (); + } +#endregion + public TableLayoutStyle this [int index] { + get { + return (TableLayoutStyle) ((IList)this)[index]; + } + + set { + ((IList)this)[index] = value; + } + } + } + +} diff --git a/source/ShiftUI/Events/TreeNodeMouseClickEventArgs.cs b/source/ShiftUI/Events/TreeNodeMouseClickEventArgs.cs new file mode 100644 index 0000000..b33bc6e --- /dev/null +++ b/source/ShiftUI/Events/TreeNodeMouseClickEventArgs.cs @@ -0,0 +1,49 @@ +// +// TreeNodeMouseClickEventArgs.cs +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2006 Novell, Inc. +// +// Authors: +// Jonathan Pobst (monkey@jpobst.com) +// + +namespace ShiftUI +{ + public class TreeNodeMouseClickEventArgs : MouseEventArgs + { + private TreeNode node; + + #region Public Constructors + public TreeNodeMouseClickEventArgs (TreeNode node, MouseButtons button, int clicks, int x, int y) + : base (button, clicks, x, y, 0) + { + this.node = node; + } + #endregion // Public Constructors + + #region Public Instance Properties + public TreeNode Node { + get { return this.node; } + } + #endregion // Public Instance Properties + } +} diff --git a/source/ShiftUI/Events/TreeNodeMouseClickEventHandler.cs b/source/ShiftUI/Events/TreeNodeMouseClickEventHandler.cs new file mode 100644 index 0000000..b5ec525 --- /dev/null +++ b/source/ShiftUI/Events/TreeNodeMouseClickEventHandler.cs @@ -0,0 +1,32 @@ +// +// TreeNodeMouseClickEventHandler.cs +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2006 Novell, Inc. +// +// Authors: +// Jonathan Pobst (monkey@jpobst.com) +// + +namespace ShiftUI +{ + public delegate void TreeNodeMouseClickEventHandler (object sender, TreeNodeMouseClickEventArgs e); +} diff --git a/source/ShiftUI/Events/TreeNodeMouseHoverEventArgs.cs b/source/ShiftUI/Events/TreeNodeMouseHoverEventArgs.cs new file mode 100644 index 0000000..768cdee --- /dev/null +++ b/source/ShiftUI/Events/TreeNodeMouseHoverEventArgs.cs @@ -0,0 +1,52 @@ +// +// TreeNodeMouseHoverEventArgs.cs +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2006 Novell, Inc. +// +// Authors: +// Jonathan Pobst (monkey@jpobst.com) +// + +using System.Runtime.InteropServices; +using System; + +namespace ShiftUI +{ + [ComVisible (true)] + public class TreeNodeMouseHoverEventArgs : EventArgs + { + private TreeNode node; + + #region Public Constructors + public TreeNodeMouseHoverEventArgs (TreeNode node) : base () + { + this.node = node; + } + #endregion // Public Constructors + + #region Public Instance Properties + public TreeNode Node { + get { return this.node; } + } + #endregion // Public Instance Properties + } +} diff --git a/source/ShiftUI/Events/TreeNodeMouseHoverEventHandler.cs b/source/ShiftUI/Events/TreeNodeMouseHoverEventHandler.cs new file mode 100644 index 0000000..fde795d --- /dev/null +++ b/source/ShiftUI/Events/TreeNodeMouseHoverEventHandler.cs @@ -0,0 +1,32 @@ +// +// TreeNodeMouseHoverEventHandler.cs +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2006 Novell, Inc. +// +// Authors: +// Jonathan Pobst (monkey@jpobst.com) +// + +namespace ShiftUI +{ + public delegate void TreeNodeMouseHoverEventHandler (object sender, TreeNodeMouseHoverEventArgs e); +} diff --git a/source/ShiftUI/Events/TreeViewCancelEventArgs.cs b/source/ShiftUI/Events/TreeViewCancelEventArgs.cs new file mode 100644 index 0000000..330052b --- /dev/null +++ b/source/ShiftUI/Events/TreeViewCancelEventArgs.cs @@ -0,0 +1,52 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2004 Novell, Inc. +// +// Authors: +// Jackson Harper (jackson@ximian.com) + + +using System; +using System.ComponentModel; + + +namespace ShiftUI { + + public class TreeViewCancelEventArgs : CancelEventArgs { + + private TreeNode node; + private TreeViewAction action; + + public TreeViewCancelEventArgs (TreeNode node, bool cancel, TreeViewAction action) : base (cancel) + { + this.node = node; + this.action = action; + } + + public TreeNode Node { + get { return node; } + } + + public TreeViewAction Action { + get { return action; } + } + } +} + diff --git a/source/ShiftUI/Events/TreeViewCancelEventHandler.cs b/source/ShiftUI/Events/TreeViewCancelEventHandler.cs new file mode 100644 index 0000000..0e03a8b --- /dev/null +++ b/source/ShiftUI/Events/TreeViewCancelEventHandler.cs @@ -0,0 +1,31 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2004 Novell, Inc. +// +// Authors: +// Jackson Harper (jackson@ximian.com) + + +namespace ShiftUI { + + public delegate void TreeViewCancelEventHandler (object sender, TreeViewCancelEventArgs e); + +} + diff --git a/source/ShiftUI/Events/TreeViewEventArgs.cs b/source/ShiftUI/Events/TreeViewEventArgs.cs new file mode 100644 index 0000000..9f1a82f --- /dev/null +++ b/source/ShiftUI/Events/TreeViewEventArgs.cs @@ -0,0 +1,52 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2004 Novell, Inc. +// +// Authors: +// Jackson Harper (jackson@ximian.com) +using System; + +namespace ShiftUI { + + public class TreeViewEventArgs : EventArgs { + + private TreeNode node; + private TreeViewAction action; + + public TreeViewEventArgs (TreeNode node) + { + this.node = node; + } + + public TreeViewEventArgs (TreeNode node, TreeViewAction action) : this (node) + { + this.action = action; + } + + public TreeViewAction Action { + get { return action; } + } + + public TreeNode Node { + get { return node; } + } + } +} + diff --git a/source/ShiftUI/Events/TreeViewEventHandler.cs b/source/ShiftUI/Events/TreeViewEventHandler.cs new file mode 100644 index 0000000..d2bc2df --- /dev/null +++ b/source/ShiftUI/Events/TreeViewEventHandler.cs @@ -0,0 +1,30 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2004 Novell, Inc. +// +// Authors: +// Jackson Harper (jackson@ximian.com) + +namespace ShiftUI { + + public delegate void TreeViewEventHandler (object sender, TreeViewEventArgs e); + +} + diff --git a/source/ShiftUI/Events/UICues.cs b/source/ShiftUI/Events/UICues.cs new file mode 100644 index 0000000..d2f4ca4 --- /dev/null +++ b/source/ShiftUI/Events/UICues.cs @@ -0,0 +1,42 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2004 Novell, Inc. +// +// Authors: +// Peter Bartok pbartok@novell.com +// + + +// COMPLETE +using System; + +namespace ShiftUI { + + [Flags] + public enum UICues { + None = 0x00000000, + ShowFocus = 0x00000001, + ShowKeyboard = 0x00000002, + Shown = 0x00000003, + ChangeFocus = 0x00000004, + ChangeKeyboard = 0x00000008, + Changed = 0x0000000C + } +} diff --git a/source/ShiftUI/Events/UICuesEventArgs.cs b/source/ShiftUI/Events/UICuesEventArgs.cs new file mode 100644 index 0000000..fede8a8 --- /dev/null +++ b/source/ShiftUI/Events/UICuesEventArgs.cs @@ -0,0 +1,88 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2004 Novell, Inc. +// +// Authors: +// Peter Bartok pbartok@novell.com +// + + +// COMPLETE +using System; + +namespace ShiftUI { + public class UICuesEventArgs : EventArgs { + private UICues cues; + + #region Public Constructors + public UICuesEventArgs(UICues uicues) { + this.cues = uicues; + } + #endregion + + #region Public Instance Properties + public UICues Changed { + get { + return (cues & UICues.Changed); + } + } + + public bool ChangeFocus { + get { + if ((cues & UICues.ChangeFocus)==0) { + return false; + } else { + return true; + } + } + } + + public bool ChangeKeyboard { + get { + if ((cues & UICues.ChangeKeyboard)==0) { + return false; + } else { + return true; + } + } + } + + public bool ShowFocus { + get { + if ((cues & UICues.ShowFocus)==0) { + return false; + } else { + return true; + } + } + } + + public bool ShowKeyboard { + get { + if ((cues & UICues.ShowKeyboard)==0) { + return false; + } else { + return true; + } + } + } + #endregion // Public Instance Properties + } +} diff --git a/source/ShiftUI/Events/UICuesEventHandler.cs b/source/ShiftUI/Events/UICuesEventHandler.cs new file mode 100644 index 0000000..0c81f02 --- /dev/null +++ b/source/ShiftUI/Events/UICuesEventHandler.cs @@ -0,0 +1,33 @@ +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// Copyright (c) 2004 Novell, Inc. +// +// Authors: +// Peter Bartok pbartok@novell.com +// +// + + +// COMPLETE +using System; + +namespace ShiftUI { + public delegate void UICuesEventHandler (Object sender, UICuesEventArgs e); +} -- cgit v1.2.3