| 11 | namespace MyGUI.Sharp |
| 12 | { |
| 13 | public class Window : |
| 14 | TextBox |
| 15 | { |
| 16 | #region Window |
| 17 | |
| 18 | protected override string GetWidgetType() { return "Window"; } |
| 19 | |
| 20 | internal static BaseWidget RequestWrapWindow(BaseWidget _parent, IntPtr _widget) |
| 21 | { |
| 22 | Window widget = new Window(); |
| 23 | widget.WrapWidget(_parent, _widget); |
| 24 | return widget; |
| 25 | } |
| 26 | |
| 27 | internal static BaseWidget RequestCreateWindow(BaseWidget _parent, WidgetStyle _style, string _skin, IntCoord _coord, Align _align, string _layer, string _name) |
| 28 | { |
| 29 | Window widget = new Window(); |
| 30 | widget.CreateWidgetImpl(_parent, _style, _skin, _coord, _align, _layer, _name); |
| 31 | return widget; |
| 32 | } |
| 33 | |
| 34 | #endregion |
| 35 | |
| 36 | |
| 37 | //InsertPoint |
| 38 | #region Event WindowChangeCoord |
| 39 | |
| 40 | [DllImport(DllName.m_dllName, CallingConvention = CallingConvention.Cdecl)] |
| 41 | private static extern void ExportWindowEvent_AdviseWindowChangeCoord(IntPtr _native, bool _advise); |
| 42 | |
| 43 | public delegate void HandleWindowChangeCoord( |
| 44 | Window _sender); |
| 45 | |
| 46 | private HandleWindowChangeCoord mEventWindowChangeCoord; |
| 47 | public event HandleWindowChangeCoord EventWindowChangeCoord |
| 48 | { |
| 49 | add |
| 50 | { |
| 51 | if (ExportEventWindowChangeCoord.mDelegate == null) |
| 52 | { |
| 53 | ExportEventWindowChangeCoord.mDelegate = new ExportEventWindowChangeCoord.ExportHandle(OnExportWindowChangeCoord); |
| 54 | ExportEventWindowChangeCoord.ExportWindowEvent_DelegateWindowChangeCoord(ExportEventWindowChangeCoord.mDelegate); |
| 55 | } |
| 56 | |
| 57 | if (mEventWindowChangeCoord == null) |
| 58 | ExportWindowEvent_AdviseWindowChangeCoord(Native, true); |
| 59 | mEventWindowChangeCoord += value; |
| 60 | } |
| 61 | remove |
| 62 | { |
| 63 | mEventWindowChangeCoord -= value; |
| 64 | if (mEventWindowChangeCoord == null) |
| 65 | ExportWindowEvent_AdviseWindowChangeCoord(Native, false); |
| 66 | } |
| 67 | } |
| 68 | |
| 69 | private struct ExportEventWindowChangeCoord |
| 70 | { |
no test coverage detected