(DISTFILES): Comment out a few missing files.
[mono-project.git] / mcs / class / System.Windows.Forms / System.Windows.Forms / ToolBar.cs
blobd07c396ff16938b48a8a94e78c857b816b8f4a34
1 //
2 // System.Windows.Forms.ToolBar
3 //
4 // Author:
5 // stubbed out by Jackson Harper (jackson@latitudegeo.com)
6 // Dennis Hayes (dennish@Raytek.com)
7 //
8 // (C) 2002 Ximian, Inc
9 //
12 // Permission is hereby granted, free of charge, to any person obtaining
13 // a copy of this software and associated documentation files (the
14 // "Software"), to deal in the Software without restriction, including
15 // without limitation the rights to use, copy, modify, merge, publish,
16 // distribute, sublicense, and/or sell copies of the Software, and to
17 // permit persons to whom the Software is furnished to do so, subject to
18 // the following conditions:
19 //
20 // The above copyright notice and this permission notice shall be
21 // included in all copies or substantial portions of the Software.
22 //
23 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
24 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
25 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
26 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
27 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
28 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
29 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31 using System.Drawing;
32 using System.Collections;
33 using System.ComponentModel;
35 namespace System.Windows.Forms {
37 // <summary>
39 // </summary>
41 public class ToolBar : Control {
42 private Size buttonSize;
43 private bool dropDownArrows;
44 private bool showToolTips;
47 // --- Public Constructors
49 [MonoTODO]
50 public ToolBar()
52 Dock = DockStyle.Top;
53 buttonSize = new Size ( 24, 22 );
54 dropDownArrows = false;
55 showToolTips = false;
58 // --- Public Properties
60 [MonoTODO]
61 public ToolBarAppearance Appearance {
62 get {
63 throw new NotImplementedException ();
65 set {
66 //FIXME:
69 [MonoTODO]
70 public bool AutoSize {
71 get {
72 throw new NotImplementedException ();
74 set {
75 //FIXME:
79 [EditorBrowsable (EditorBrowsableState.Never)]
80 public override Color BackColor {
81 get { return base.BackColor; }
82 set { base.BackColor = value; }
85 [EditorBrowsable (EditorBrowsableState.Never)]
86 public override Image BackgroundImage{
87 get { return base.BackgroundImage; }
88 set { base.BackgroundImage = value; }
91 [MonoTODO]
92 public BorderStyle BorderStyle{
93 get {
94 throw new NotImplementedException ();
96 set {
97 throw new NotImplementedException ();
100 [MonoTODO]
101 public ToolBar.ToolBarButtonCollection Buttons {
102 get {
103 throw new NotImplementedException ();
106 [MonoTODO]
107 public Size ButtonSize {
108 get {
109 return buttonSize;
111 set {
112 if ( value.Width < 0 || value.Height < 0 )
113 throw new ArgumentOutOfRangeException( "value" );
115 buttonSize = value;
118 [MonoTODO]
119 public bool Divider {
120 get {
121 throw new NotImplementedException ();
123 set {
124 throw new NotImplementedException ();
127 [MonoTODO]
128 public override DockStyle Dock{
129 get {
130 if ( base.Dock == DockStyle.Fill )
131 return DockStyle.Top;
132 return base.Dock;
134 set {
135 base.Dock = value;
139 [MonoTODO]
140 public bool DropDownArrows {
141 get {
142 return dropDownArrows;
144 set {
145 dropDownArrows = value;
149 [EditorBrowsable (EditorBrowsableState.Never)]
150 public override Color ForeColor {
151 get { return base.ForeColor; }
152 set { base.ForeColor = value; }
154 [MonoTODO]
155 public ImageList ImageList {
156 get {
157 throw new NotImplementedException ();
159 set {
160 throw new NotImplementedException ();
163 [MonoTODO]
164 public Size ImageSize {
165 get {
166 throw new NotImplementedException ();
169 [MonoTODO]
170 public new ImeMode ImeMode {
171 get {
172 throw new NotImplementedException ();
174 set {
175 throw new NotImplementedException ();
178 [MonoTODO]
179 public override RightToLeft RightToLeft {
180 get {
181 throw new NotImplementedException ();
183 set {
184 throw new NotImplementedException ();
188 [MonoTODO]
189 public bool ShowToolTips {
190 get {
191 return showToolTips;
193 set {
194 showToolTips = value;
197 [MonoTODO]
198 public override string Text {
199 get {
200 return base.Text;
202 set {
203 base.Text = value;
206 [MonoTODO]
207 public ToolBarTextAlign TextAlign {
208 get {
209 throw new NotImplementedException ();
211 set {
212 throw new NotImplementedException ();
215 [MonoTODO]
216 public bool Wrappable{
217 get {
218 throw new NotImplementedException ();
220 set {
221 throw new NotImplementedException ();
225 // --- Public Methods
227 [MonoTODO]
228 public override string ToString()
230 throw new NotImplementedException ();
233 // --- Public Events
235 [MonoTODO]
236 public event ToolBarButtonClickEventHandler ButtonClick;
237 [MonoTODO]
238 public event ToolBarButtonClickEventHandler ButtonDropDown;
240 // --- Protected Properties
242 [MonoTODO]
243 protected override CreateParams CreateParams {
244 get {
245 CreateParams createParams = base.CreateParams;
247 createParams.ClassName = Win32.TOOLBAR_CLASS;
248 createParams.Style |= (int) WindowStyles.WS_CHILD;
249 return createParams;
252 [MonoTODO]
253 protected override ImeMode DefaultImeMode {
254 get {
255 throw new NotImplementedException ();
258 [MonoTODO]
259 protected override Size DefaultSize {
260 get {
261 return new Size ( 100, 22 );
265 // --- Protected Methods
267 [MonoTODO]
268 protected override void CreateHandle()
270 initCommonControlsLibrary ( );
271 base.CreateHandle();
274 [MonoTODO]
275 protected override void Dispose(bool disposing) {
276 // FIXME:
277 base.Dispose(disposing);
280 [MonoTODO]
281 protected virtual void OnButtonClick(ToolBarButtonClickEventArgs e)
283 //FIXME:
285 [MonoTODO]
286 protected virtual void OnButtonDropDown(ToolBarButtonClickEventArgs e)
288 //FIXME:
290 [MonoTODO]
291 protected override void OnFontChanged(EventArgs e)
293 //FIXME:
295 [MonoTODO]
296 protected override void OnHandleCreated(EventArgs e)
298 base.OnHandleCreated ( e );
299 UpdateBounds ( );
301 [MonoTODO]
302 protected override void OnResize(EventArgs e)
304 base.OnResize ( e );
306 [MonoTODO]
307 protected override void SetBoundsCore(int x, int y, int width, int height, BoundsSpecified specified)
309 base.SetBoundsCore ( x, y, width, height, specified );
311 [MonoTODO]
312 protected override void WndProc(ref Message m)
316 private void initCommonControlsLibrary ( ) {
317 if ( !RecreatingHandle ) {
318 INITCOMMONCONTROLSEX initEx = new INITCOMMONCONTROLSEX();
319 initEx.dwICC = CommonControlInitFlags.ICC_TAB_CLASSES;
320 Win32.InitCommonControlsEx(initEx);
324 public class ToolBarButtonCollection : IList, ICollection, IEnumerable {
326 // --- Public Constructor
328 [MonoTODO]
329 public ToolBarButtonCollection(ToolBar owner)
334 // --- Public Properties
336 [MonoTODO]
337 public int Count {
338 get {
339 throw new NotImplementedException ();
342 [MonoTODO]
343 public bool IsReadOnly {
344 get {
345 throw new NotImplementedException ();
348 [MonoTODO]
349 public virtual ToolBarButton this[int index] {
350 get {
351 throw new NotImplementedException ();
353 set {
354 throw new NotImplementedException ();
358 // --- Public Methods
360 [MonoTODO]
361 public int Add(string text)
363 throw new NotImplementedException ();
365 [MonoTODO]
366 public int Add(ToolBarButton button)
368 throw new NotImplementedException ();
370 [MonoTODO]
371 public void AddRange(ToolBarButton[] buttons)
373 //FIXME:
375 [MonoTODO]
376 public void Clear()
378 //FIXME:
380 [MonoTODO]
381 public bool Contains(ToolBarButton button)
383 throw new NotImplementedException ();
385 [MonoTODO]
386 public IEnumerator GetEnumerator()
388 throw new NotImplementedException ();
390 [MonoTODO]
391 public int IndexOf(ToolBarButton button)
393 throw new NotImplementedException ();
395 [MonoTODO]
396 public void Insert(int index, ToolBarButton button)
398 throw new NotImplementedException ();
400 //[MonoTODO]
401 //public void Insert(int index, ToolBarButton button) {
402 // throw new NotImplementedException ();
404 [MonoTODO]
405 public void Remove(ToolBarButton button)
407 throw new NotImplementedException ();
409 [MonoTODO]
410 public void RemoveAt(int index)
412 throw new NotImplementedException ();
414 /// <summary>
415 /// IList Interface implmentation.
416 /// </summary>
417 bool IList.IsReadOnly{
418 get{
419 // We allow addition, removeal, and editing of items after creation of the list.
420 return false;
423 bool IList.IsFixedSize{
424 get{
425 // We allow addition and removeal of items after creation of the list.
426 return false;
430 //[MonoTODO]
431 object IList.this[int index]{
432 get{
433 throw new NotImplementedException ();
435 set{
436 throw new NotImplementedException ();
440 [MonoTODO]
441 void IList.Clear(){
442 throw new NotImplementedException ();
445 [MonoTODO]
446 int IList.Add( object value){
447 throw new NotImplementedException ();
450 [MonoTODO]
451 bool IList.Contains( object value){
452 throw new NotImplementedException ();
455 [MonoTODO]
456 int IList.IndexOf( object value){
457 throw new NotImplementedException ();
460 [MonoTODO]
461 void IList.Insert(int index, object value){
462 throw new NotImplementedException ();
465 [MonoTODO]
466 void IList.Remove( object value){
467 throw new NotImplementedException ();
470 [MonoTODO]
471 void IList.RemoveAt( int index){
472 throw new NotImplementedException ();
474 // End of IList interface
475 /// <summary>
476 /// ICollection Interface implmentation.
477 /// </summary>
478 int ICollection.Count{
479 get{
480 throw new NotImplementedException ();
483 bool ICollection.IsSynchronized{
484 get{
485 throw new NotImplementedException ();
488 object ICollection.SyncRoot{
489 get{
490 throw new NotImplementedException ();
493 void ICollection.CopyTo(Array array, int index){
494 throw new NotImplementedException ();
496 // End Of ICollection