forked from extnet/Ext.NET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWindowBase.cs
More file actions
1057 lines (973 loc) · 40.2 KB
/
WindowBase.cs
File metadata and controls
1057 lines (973 loc) · 40.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/********
* @version : 1.6.0 - Ext.NET Pro License
* @author : Ext.NET, Inc. http://www.ext.net/
* @date : 2012-11-21
* @copyright : Copyright (c) 2007-2012, Ext.NET, Inc. (http://www.ext.net/). All rights reserved.
* @license : See license.txt and http://www.ext.net/license/.
********/
using System.ComponentModel;
using System.Web.UI;
using System.Web.UI.WebControls;
using Ext.Net.Utilities;
namespace Ext.Net
{
/// <summary>
///
/// </summary>
[Meta]
[Description("")]
public abstract partial class WindowBase : PanelBase
{
/* IScriptable
-----------------------------------------------------------------------------------------------*/
/// <summary>
///
/// </summary>
[Category("0. About")]
[Description("")]
public override string InstanceOf
{
get
{
return "Ext.Window";
}
}
/* Overrides
-----------------------------------------------------------------------------------------------*/
/// <summary>
///
/// </summary>
[Category("0. About")]
[Description("")]
public override string XType
{
get
{
return "window";
}
}
/// <summary>
///
/// </summary>
[Description("")]
protected override string ContainerStyle
{
get
{
return "display:none;";
}
}
/// <summary>
/// True to render the panel with custom rounded borders, false to render with plain 1px square borders (defaults to false).
/// </summary>
[Meta]
[ConfigOption]
[Category("7. Window")]
[DefaultValue(true)]
[NotifyParentProperty(true)]
[Description("True to render the window with custom rounded borders, false to render with plain 1px square borders (defaults to false).")]
public override bool Frame
{
get
{
object obj = this.ViewState["Frame"];
return (obj == null) ? true : (bool)obj;
}
set
{
this.ViewState["Frame"] = value;
}
}
/* Public Properties
-----------------------------------------------------------------------------------------------*/
/// <summary>
///
/// </summary>
[Meta]
[ReadOnly(true)]
[Browsable(false)]
[DefaultValue(false)]
[EditorBrowsable(EditorBrowsableState.Never)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public override bool AutoWidth
{
get
{
return base.AutoWidth;
}
set
{
base.AutoWidth = value;
}
}
/// <summary>
/// Id or element from which the window should animate while opening (defaults to null with no animation).
/// </summary>
[Meta]
[ConfigOption]
[DirectEventUpdate(MethodName = "SetAnimateTarget")]
[Category("7. Window")]
[DefaultValue("")]
[TypeConverter(typeof(ControlConverter))]
[Description("Id or element from which the window should animate while opening (defaults to null with no animation).")]
public virtual string AnimateTarget
{
get
{
return (string)this.ViewState["AnimateTarget"] ?? "";
}
set
{
this.ViewState["AnimateTarget"] = value;
}
}
/// <summary>
/// True to display the 'close' tool button and allow the user to close the window, false to hide the button and disallow closing the window (default to true).
/// </summary>
[Meta]
[ConfigOption]
[Category("7. Window")]
[DefaultValue(true)]
[Description("True to display the 'close' tool button and allow the user to close the window, false to hide the button and disallow closing the window (default to true).")]
public override bool Closable
{
get
{
object obj = this.ViewState["Closable"];
return (obj == null) ? true : (bool)obj;
}
set
{
this.ViewState["Closable"] = value;
}
}
/// <summary>
/// The action to take when the close button is clicked. The default action is 'close' which will actually remove the window from the DOM and destroy it. The other valid option is 'hide' which will simply hide the window by setting visibility to hidden and applying negative offsets, keeping the window available to be redisplayed via the show method.
/// </summary>
[Meta]
[ConfigOption(JsonMode.ToLower)]
[Category("7. Window")]
[DefaultValue(CloseAction.Hide)]
[Description("The action to take when the close button is clicked. The default action is 'close' which will actually remove the window from the DOM and destroy it. The other valid option is 'hide' which will simply hide the window by setting visibility to hidden and applying negative offsets, keeping the window available to be redisplayed via the show method.")]
public override CloseAction CloseAction
{
get
{
object obj = this.ViewState["CloseAction"];
return (obj == null) ? CloseAction.Hide : (CloseAction)obj;
}
set
{
this.ViewState["CloseAction"] = value;
}
}
/// <summary>
/// True to constrain the window to the viewport, false to allow it to fall outside of the viewport (defaults to false). Optionally the header only can be constrained using ConstrainHeader.
/// </summary>
[Meta]
[ConfigOption]
[Category("7. Window")]
[DefaultValue(false)]
[Description("True to constrain the window to the viewport, false to allow it to fall outside of the viewport (defaults to false). Optionally the header only can be constrained using ConstrainHeader.")]
public virtual bool Constrain
{
get
{
object obj = this.ViewState["Constrain"];
return (obj == null) ? false : (bool)obj;
}
set
{
this.ViewState["Constrain"] = value;
}
}
/// <summary>
/// True to constrain the window header to the viewport, allowing the window body to fall outside of the viewport, false to allow the header to fall outside the viewport (defaults to false). Optionally the entire window can be constrained using constrain.
/// </summary>
[Meta]
[ConfigOption]
[Category("7. Window")]
[DefaultValue(false)]
[Description("True to constrain the window header to the viewport, allowing the window body to fall outside of the viewport, false to allow the header to fall outside the viewport (defaults to false). Optionally the entire window can be constrained using constrain.")]
public virtual bool ConstrainHeader
{
get
{
object obj = this.ViewState["ConstrainHeader"];
return (obj == null) ? false : (bool)obj;
}
set
{
this.ViewState["ConstrainHeader"] = value;
}
}
/// <summary>
/// The id of a button to focus when this window received the focus.
/// </summary>
[Meta]
[ConfigOption]
[Category("7. Window")]
[DefaultValue("")]
[Description("The id of a button to focus when this window received the focus.")]
public virtual string DefaultButton
{
get
{
return (string)this.ViewState["DefaultButton"] ?? "";
}
set
{
this.ViewState["DefaultButton"] = value;
}
}
/// <summary>
/// The default render to Element (Body or Form). Using when AutoRender="false"
/// </summary>
[Meta]
[ConfigOption(JsonMode.ToLower)]
[Category("7. Window")]
[DefaultValue(DefaultRenderTo.Body)]
[Description("The default render to Element (Body or Form). Using when AutoRender='false'")]
public virtual DefaultRenderTo DefaultRenderTo
{
get
{
object obj = this.ViewState["DefaultRenderTo"];
return (obj == null) ? DefaultRenderTo.Body : (DefaultRenderTo)obj;
}
set
{
this.ViewState["DefaultRenderTo"] = value;
}
}
/// <summary>
/// True to allow the window to be dragged by the header bar, false to disable dragging (defaults to true). Note that by default the window will be centered in the viewport, so if dragging is disabled the window may need to be positioned programmatically after render (e.g., myWindow.setPosition(100, 100);).
/// </summary>
[Meta]
[ConfigOption]
[Category("7. Window")]
[DefaultValue(true)]
[Description("True to allow the window to be dragged by the header bar, false to disable dragging (defaults to true). Note that by default the window will be centered in the viewport, so if dragging is disabled the window may need to be positioned programmatically after render (e.g., myWindow.setPosition(100, 100);).")]
public override bool Draggable
{
get
{
object obj = this.ViewState["Draggable"];
return (obj == null) ? true : (bool)obj;
}
set
{
this.ViewState["Draggable"] = value;
}
}
/// <summary>
/// True to always expand the window when it is displayed, false to keep it in its current state (which may be collapsed) when displayed (defaults to true).
/// </summary>
[Meta]
[Category("7. Window")]
[DefaultValue(true)]
[Description("True to always expand the window when it is displayed, false to keep it in its current state (which may be collapsed) when displayed (defaults to true).")]
public virtual bool ExpandOnShow
{
get
{
object obj = this.ViewState["ExpandOnShow"];
return (obj == null) ? true : (bool)obj;
}
set
{
this.ViewState["ExpandOnShow"] = value;
}
}
/// <summary>
///
/// </summary>
[ConfigOption("expandOnShow")]
[DefaultValue(true)]
[Description("")]
protected bool ExpandOnShowProxy
{
get
{
return (this.Collapsed) ? false : this.ExpandOnShow;
}
}
/// <summary>
///
/// </summary>
[ConfigOption("hidden")]
[DefaultValue(true)]
[Description("")]
protected virtual bool HiddenProxy
{
get
{
return this.Hidden;
}
}
//[ClientConfig]
//[Category("7. Window")]
//[DefaultValue(null)]
//[Description("A reference to the WindowGroup that should manage this window (defaults to Ext.WindowMgr).")]
//public virtual ManagerGroup Manager
//{
// get
// {
// object obj = this.ViewState["Manager"];
// return (obj == null) ? null : (ManagerGroup)obj;
// }
// set
// {
// this.ViewState["Manager"] = value;
// }
//}
/// <summary>
/// True to display the 'maximize' tool button and allow the user to maximize the window, false to hide the button and disallow maximizing the window (defaults to false). Note that when a window is maximized, the tool button will automatically change to a 'restore' button with the appropriate behavior already built-in that will restore the window to its previous size.
/// </summary>
[Meta]
[ConfigOption]
[Category("7. Window")]
[DefaultValue(false)]
[Description("True to display the 'maximize' tool button and allow the user to maximize the window, false to hide the button and disallow maximizing the window (defaults to false). Note that when a window is maximized, the tool button will automatically change to a 'restore' button with the appropriate behavior already built-in that will restore the window to its previous size.")]
public virtual bool Maximizable
{
get
{
object obj = this.ViewState["Maximizable"];
return (obj == null) ? false : (bool)obj;
}
set
{
this.ViewState["Maximizable"] = value;
}
}
/// <summary>
/// True to initially display the window in a maximized state. (Defaults to false).
/// </summary>
[Meta]
[ConfigOption]
[Category("7. Window")]
[DefaultValue(false)]
[Description("True to initially display the window in a maximized state. (Defaults to false).")]
public virtual bool Maximized
{
get
{
object obj = this.ViewState["Maximized"];
return (obj == null) ? false : (bool)obj;
}
set
{
this.ViewState["Maximized"] = value;
}
}
/// <summary>
/// The height of this component in pixels (defaults to auto).
/// </summary>
[Meta]
[ConfigOption]
[DirectEventUpdate(MethodName = "SetHeight")]
[Category("7. Window")]
[DefaultValue(typeof(Unit), "")]
[Description("The height of this component in pixels (defaults to auto).")]
public override Unit Height
{
get
{
Unit height = this.UnitPixelTypeCheck(ViewState["Height"], Unit.Empty, "Height");
return (height.Value < this.MinHeight.Value) ? this.MinHeight : height;
}
set
{
this.ViewState["Height"] = value;
}
}
/// <summary>
/// The minimum height in pixels allowed for this window (defaults to 100).
/// </summary>
[Meta]
[ConfigOption]
[Category("7. Window")]
[DefaultValue(typeof(Unit), "100")]
[Description("The minimum height in pixels allowed for this window (defaults to 100).")]
public override Unit MinHeight
{
get
{
return this.UnitPixelTypeCheck(ViewState["MinHeight"], Unit.Pixel(100), "MinHeight");
}
set
{
this.ViewState["MinHeight"] = value;
}
}
/// <summary>
/// The width of this component in pixels (defaults to auto).
/// </summary>
[Meta]
[ConfigOption]
[DirectEventUpdate(MethodName = "SetWidth")]
[Category("7. Window")]
[DefaultValue(typeof(Unit), "")]
[Description("The width of this component in pixels (defaults to auto).")]
public override Unit Width
{
get
{
Unit width = this.UnitPixelTypeCheck(ViewState["Width"], Unit.Empty, "Width");
return (width.Value < this.MinWidth.Value) ? this.MinWidth : width;
}
set
{
this.ViewState["Width"] = value;
}
}
/// <summary>
/// The minimum width in pixels allowed for this window (defaults to 200). Only applies when resizable = true.
/// </summary>
[Meta]
[ConfigOption]
[Category("7. Window")]
[DefaultValue(typeof(Unit), "200")]
[Description("The minimum width in pixels allowed for this window (defaults to 200). Only applies when resizable = true.")]
public override Unit MinWidth
{
get
{
return this.UnitPixelTypeCheck(ViewState["MinWidth"], Unit.Pixel(200), "MinWidth");
}
set
{
this.ViewState["MinWidth"] = value;
}
}
/// <summary>
/// True to display the 'minimize' tool button and allow the user to minimize the window, false to hide the button and disallow minimizing the window (defaults to false). Note that this button provides no implementation -- the behavior of minimizing a window is implementation-specific, so the minimize event must be handled and a custom minimize behavior implemented for this option to be useful.
/// </summary>
[Meta]
[ConfigOption]
[Category("7. Window")]
[DefaultValue(false)]
[Description("True to display the 'minimize' tool button and allow the user to minimize the window, false to hide the button and disallow minimizing the window (defaults to false). Note that this button provides no implementation -- the behavior of minimizing a window is implementation-specific, so the minimize event must be handled and a custom minimize behavior implemented for this option to be useful.")]
public virtual bool Minimizable
{
get
{
object obj = this.ViewState["Minimizable"];
return (obj == null) ? false : (bool)obj;
}
set
{
this.ViewState["Minimizable"] = value;
}
}
/// <summary>
/// True to make the window modal and mask everything behind it when displayed, false to display it without restricting access to other UI elements (defaults to false).
/// </summary>
[Meta]
[ConfigOption]
[DirectEventUpdate(MethodName = "ToggleModal")]
[Category("7. Window")]
[DefaultValue(false)]
[Description("True to make the window modal and mask everything behind it when displayed, false to display it without restricting access to other UI elements (defaults to false).")]
public virtual bool Modal
{
get
{
object obj = this.ViewState["Modal"];
return (obj == null) ? false : (bool)obj;
}
set
{
this.ViewState["Modal"] = value;
}
}
/// <summary>
/// Allows override of the built-in processing for the escape key. Default action is to close the Window (performing whatever action is specified in closeAction. To prevent the Window closing when the escape key is pressed, specify this as Ext.emptyFn (See Ext.emptyFn).
/// </summary>
[Meta]
[ConfigOption(JsonMode.Raw)]
[Category("7. Window")]
[DefaultValue("Ext.emptyFn")]
[Description("Allows override of the built-in processing for the escape key. Default action is to close the Window (performing whatever action is specified in closeAction. To prevent the Window closing when the escape key is pressed, specify this as Ext.emptyFn (See Ext.emptyFn).")]
public virtual string OnEsc
{
get
{
object obj = this.ViewState["OnEsc"];
return (obj == null) ? "Ext.emptyFn" : (string)obj;
}
set
{
this.ViewState["OnEsc"] = value;
}
}
/// <summary>
/// True to render the window body with a transparent background so that it will blend into the framing elements, false to add a lighter background color to visually highlight the body element and separate it more distinctly from the surrounding frame (defaults to false).
/// </summary>
[Meta]
[ConfigOption]
[Category("7. Window")]
[DefaultValue(false)]
[Description("True to render the window body with a transparent background so that it will blend into the framing elements, false to add a lighter background color to visually highlight the body element and separate it more distinctly from the surrounding frame (defaults to false).")]
public virtual bool Plain
{
get
{
object obj = this.ViewState["Plain"];
return (obj == null) ? false : (bool)obj;
}
set
{
this.ViewState["Plain"] = value;
}
}
/// <summary>
/// True to allow user resizing at each edge and corner of the window, false to disable resizing (defaults to true).
/// </summary>
[Meta]
[ConfigOption]
[Category("7. Window")]
[DefaultValue(true)]
[Description("True to allow user resizing at each edge and corner of the window, false to disable resizing (defaults to true).")]
public virtual bool Resizable
{
get
{
object obj = this.ViewState["Resizable"];
return (obj == null) ? true : (bool)obj;
}
set
{
this.ViewState["Resizable"] = value;
}
}
/// <summary>
/// A valid Ext.Resizable handles config string (defaults to 'all'). Only applies when resizable = true.
///
/// Value Description
/// ------ -------------------
/// 'n' north
/// 's' south
/// 'e' east
/// 'w' west
/// 'nw' northwest
/// 'sw' southwest
/// 'se' southeast
/// 'ne' northeast
/// 'all' all
/// </summary>
[Meta]
[ConfigOption]
[Category("7. Window")]
[DefaultValue("all")]
[Description("A valid Ext.Resizable handles config string (defaults to 'all'). Only applies when resizable = true.")]
public virtual string ResizeHandles
{
get
{
object obj = this.ViewState["ResizeHandles"];
return (obj == null) ? "all" : (string)obj;
}
set
{
this.ViewState["ResizeHandles"] = value;
}
}
/// <summary>
/// Centers this window in the viewport when the Page loads.
/// </summary>
[Meta]
[Category("7. Window")]
[DefaultValue(true)]
[Description("Centers this window in the viewport when the window is initialized.")]
public virtual bool InitCenter
{
get
{
object obj = this.ViewState["InitCenter"];
return (obj == null) ? true : (bool)obj;
}
set
{
this.ViewState["InitCenter"] = value;
}
}
/// <summary>
///
/// </summary>
[ConfigOption("initCenter")]
[DefaultValue(true)]
[Description("")]
protected virtual bool InitCenterProxy
{
get
{
if (this.X != 0 && this.Y != 0)
{
return false;
}
return this.InitCenter;
}
}
/* Overrides
-----------------------------------------------------------------------------------------------*/
/// <summary>
///
/// </summary>
[ConfigOption("renderTo")]
[DefaultValue("")]
protected internal override string RenderToProxy
{
get
{
if (!this.AutoRender)
{
return "";
}
if (this.RenderTo.IsEmpty())
{
return this.IsInForm ? "={Ext.get(\"".ConcatWith(this.ParentForm.ClientID, "\")}") : "={Ext.getBody()}";
}
return base.RenderToProxy;
}
}
/// <summary>
///
/// </summary>
[Description("")]
protected override bool RemoveContainer
{
get
{
return true;
}
}
/* Public Methods
-----------------------------------------------------------------------------------------------*/
/// <summary>
/// Aligns the window to the specified element
/// </summary>
[Meta]
[Description("Aligns the window to the specified element")]
public virtual void AlignTo(string element, string position)
{
this.Call("alignTo", new JRawValue(element), position);
}
/// <summary>
/// Aligns the window to the specified element
/// </summary>
[Meta]
[Description("Aligns the window to the specified element")]
public virtual void AlignTo(string element, string position, int offsetX, int offsetY)
{
this.Call("alignTo", new JRawValue(element), position, new int[] { offsetX, offsetY });
}
/// <summary>
/// Anchors this window to another element and realigns it when the window is resized or scrolled.
/// </summary>
[Meta]
[Description("Anchors this window to another element and realigns it when the window is resized or scrolled.")]
public virtual void AnchorTo(string element, string position)
{
this.Call("anchorTo", new JRawValue(element), position);
}
/// <summary>
/// Anchors this window to another element and realigns it when the window is resized or scrolled.
/// </summary>
[Meta]
[Description("Anchors this window to another element and realigns it when the window is resized or scrolled.")]
public virtual void AnchorTo(string element, string position, int offsetX, int offsetY)
{
this.Call("anchorTo", new JRawValue(element), position, new int[] { offsetX, offsetY });
}
/// <summary>
/// Anchors this window to another element and realigns it when the window is resized or scrolled.
/// </summary>
[Meta]
[Description("Anchors this window to another element and realigns it when the window is resized or scrolled.")]
public virtual void AnchorTo(string element, string position, int offsetX, int offsetY, bool monitorScroll)
{
this.Call("anchorTo", new JRawValue(element), position, new int[] { offsetX, offsetY }, monitorScroll);
}
/// <summary>
/// Centers this window in the viewport
/// </summary>
[Meta]
[Description("Centers this window in the viewport")]
public virtual void Center()
{
this.Call("center");
}
/// <summary>
/// Closes the window, removes it from the DOM and destroys the window object. The beforeclose event is fired before the close happens and will cancel the close action if it returns false.
/// </summary>
[Meta]
[Description("Closes the window, removes it from the DOM and destroys the window object. The beforeclose event is fired before the close happens and will cancel the close action if it returns false.")]
public virtual void Close()
{
this.Call("close");
}
/// <summary>
/// Focuses the window. If a defaultButton is set, it will receive focus, otherwise the window itself will receive focus.
/// </summary>
[Meta]
[Description("Focuses the window. If a defaultButton is set, it will receive focus, otherwise the window itself will receive focus.")]
public override void Focus()
{
base.Focus();
}
/// <summary>
/// Hides the window, setting it to invisible and applying negative offsets.
/// </summary>
[Meta]
[Description("Hides the window, setting it to invisible and applying negative offsets.")]
public override void Hide()
{
base.Hide();
}
/// <summary>
/// Hides the window, setting it to invisible and applying negative offsets.
/// </summary>
[Meta]
[Description("Hides the window, setting it to invisible and applying negative offsets.")]
public virtual void Hide(Control animateTarget)
{
this.Call("hide", animateTarget.ClientID);
}
/// <summary>
/// Hides the window, setting it to invisible and applying negative offsets.
/// </summary>
[Meta]
[Description("Hides the window, setting it to invisible and applying negative offsets.")]
public virtual void Hide(Control animateTarget, string callback)
{
this.Call("hide", animateTarget.ClientID, new JRawValue(callback));
}
/// <summary>
/// Hides the window, setting it to invisible and applying negative offsets.
/// </summary>
[Meta]
[Description("Hides the window, setting it to invisible and applying negative offsets.")]
public virtual void Hide(Control animateTarget, string callback, string scope)
{
this.Call("hide", animateTarget.ClientID, new JRawValue(callback), new JRawValue(scope));
}
/// <summary>
/// Hides the window, setting it to invisible and applying negative offsets.
/// </summary>
[Meta]
[Description("Hides the window, setting it to invisible and applying negative offsets.")]
public virtual void Hide(string animateTarget)
{
this.Call("hide", animateTarget);
}
/// <summary>
/// Hides the window, setting it to invisible and applying negative offsets.
/// </summary>
[Meta]
[Description("Hides the window, setting it to invisible and applying negative offsets.")]
public virtual void Hide(string animateTarget, string callback)
{
this.Call("hide", animateTarget, new JRawValue(callback));
}
/// <summary>
/// Hides the window, setting it to invisible and applying negative offsets.
/// </summary>
[Meta]
[Description("Hides the window, setting it to invisible and applying negative offsets.")]
public virtual void Hide(string animateTarget, string callback, string scope)
{
this.Call("hide", animateTarget, new JRawValue(callback), new JRawValue(scope));
}
/// <summary>
/// Fits the window within its current container and automatically replaces the 'maximize' tool button with the 'restore' tool button.
/// </summary>
[Meta]
[Description("Fits the window within its current container and automatically replaces the 'maximize' tool button with the 'restore' tool button.")]
public virtual void Maximize()
{
this.Call("maximize");
}
/// <summary>
/// Placeholder method for minimizing the window. By default, this method simply fires the minimize event since the behavior of minimizing a window is application-specific. To implement custom minimize behavior, either the minimize event can be handled or this method can be overridden.
/// </summary>
[Meta]
[Description("Placeholder method for minimizing the window. By default, this method simply fires the minimize event since the behavior of minimizing a window is application-specific. To implement custom minimize behavior, either the minimize event can be handled or this method can be overridden.")]
public virtual void Minimize()
{
this.Call("minimize");
}
/// <summary>
/// Restores a maximized window back to its original size and position prior to being maximized and also replaces the 'restore' tool button with the 'maximize' tool button.
/// </summary>
[Meta]
[Description("Restores a maximized window back to its original size and position prior to being maximized and also replaces the 'restore' tool button with the 'maximize' tool button.")]
public virtual void Restore()
{
this.Call("restore");
}
/// <summary>
/// Makes this the active window by showing its shadow, or deactivates it by hiding its shadow. This method also fires the activate or deactivate event depending on which action occurred.
/// </summary>
/// <param name="active">if set to <c>true</c> [active].</param>
[Meta]
[Description("Makes this the active window by showing its shadow, or deactivates it by hiding its shadow. This method also fires the activate or deactivate event depending on which action occurred.")]
public virtual void SetActive(bool active)
{
this.Call("setActive", active);
}
/// <summary>
/// Sets the target element from which the window should animate while opening.
/// </summary>
[Meta]
[Description("Sets the target element from which the window should animate while opening.")]
public virtual void SetAnimateTarget(string element)
{
this.Call("setAnimateTarget", new JRawValue(element));
}
/// <summary>
/// Sets the target element from which the window should animate while opening.
/// </summary>
[Meta]
[Description("Sets the target element from which the window should animate while opening.")]
public virtual void SetAnimateTarget(Control element)
{
this.Call("setAnimateTarget", new JRawValue(element.ClientID+".getEl()"));
}
/// <summary>
/// Shows the window, rendering it first if necessary, or activates it and brings it to front if hidden.
/// </summary>
[Meta]
[Description("Shows the window, rendering it first if necessary, or activates it and brings it to front if hidden.")]
public override void Show()
{
base.Show();
}
/// <summary>
/// Shows the window, rendering it first if necessary, or activates it and brings it to front if hidden.
/// </summary>
[Meta]
[Description("Shows the window, rendering it first if necessary, or activates it and brings it to front if hidden.")]
public virtual void Show(Control animateTarget)
{
this.Call("show", new JRawValue(animateTarget.ClientID + ".getEl()"));
}
/// <summary>
/// Shows the window, rendering it first if necessary, or activates it and brings it to front if hidden.
/// </summary>
[Meta]
[Description("Shows the window, rendering it first if necessary, or activates it and brings it to front if hidden.")]
public virtual void Show(Control animateTarget, string callback)
{
this.Call("show", new JRawValue(animateTarget.ClientID + ".getEl()"), new JRawValue(callback));
}
/// <summary>
/// Shows the window, rendering it first if necessary, or activates it and brings it to front if hidden.
/// </summary>
[Meta]
[Description("Shows the window, rendering it first if necessary, or activates it and brings it to front if hidden.")]
public virtual void Show(Control animateTarget, string callback, string scope)
{
this.Call("show", new JRawValue(animateTarget.ClientID + ".getEl()"), new JRawValue(callback), new JRawValue(scope));
}
/// <summary>
/// Shows the window, rendering it first if necessary, or activates it and brings it to front if hidden.
/// </summary>
[Meta]
[Description("Shows the window, rendering it first if necessary, or activates it and brings it to front if hidden.")]
public virtual void Show(string animateTarget)
{
this.Call("show", animateTarget);
}
/// <summary>
/// Shows the window, rendering it first if necessary, or activates it and brings it to front if hidden.
/// </summary>
[Meta]
[Description("Shows the window, rendering it first if necessary, or activates it and brings it to front if hidden.")]
public virtual void Show(string animateTarget, string callback)
{
this.Call("show", animateTarget, new JRawValue(callback));
}
/// <summary>
/// Shows the window, rendering it first if necessary, or activates it and brings it to front if hidden.
/// </summary>
[Meta]
[Description("Shows the window, rendering it first if necessary, or activates it and brings it to front if hidden.")]
public virtual void Show(string animateTarget, string callback, string scope)
{
this.Call("show", animateTarget, new JRawValue(callback), new JRawValue(scope));
}
/// <summary>
/// Sends this window to the back of (lower z-index than) any other visible windows
/// </summary>
[Meta]
[Description("Sends this window to the back of (lower z-index than) any other visible windows")]
public virtual void ToBack()
{
this.Call("toBack");
}
/// <summary>
/// Brings this window to the front of any other visible windows
/// </summary>
[Meta]
[Description("Brings this window to the front of any other visible windows")]
public virtual void ToFront()
{
this.Call("toFront");
}
/// <summary>
/// A shortcut method for toggling between maximize and restore based on the current maximized state of the window.