Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

FXComposite.h
Go to the documentation of this file.
1 /********************************************************************************
2 * *
3 * C o m p o s i t e W i d g e t *
4 * *
5 *********************************************************************************
6 * Copyright (C) 1997,2006 by Jeroen van der Zijp. All Rights Reserved. *
7 *********************************************************************************
8 * This library is free software; you can redistribute it and/or *
9 * modify it under the terms of the GNU Lesser General Public *
10 * License as published by the Free Software Foundation; either *
11 * version 2.1 of the License, or (at your option) any later version. *
12 * *
13 * This library is distributed in the hope that it will be useful, *
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
16 * Lesser General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU Lesser General Public *
19 * License along with this library; if not, write to the Free Software *
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
21 *********************************************************************************
22 * $Id: FXComposite.h,v 1.24 2006/01/22 17:57:59 fox Exp $ *
23 ********************************************************************************/
24 #ifndef FXCOMPOSITE_H
25 #define FXCOMPOSITE_H
26 
27 #ifndef FXWINDOW_H
28 #include "FXWindow.h"
29 #endif
30 
31 namespace FX {
32 
33 
34 /// Base composite
35 class FXAPI FXComposite : public FXWindow {
37 protected:
38  FXComposite(){}
39  FXComposite(FXApp* a,FXVisual *vis);
40  FXComposite(FXApp* a,FXWindow* own,FXuint opts,FXint x,FXint y,FXint w,FXint h);
41 private:
42  FXComposite(const FXComposite&);
43  FXComposite &operator=(const FXComposite&);
44 public:
45  long onKeyPress(FXObject*,FXSelector,void*);
46  long onKeyRelease(FXObject*,FXSelector,void*);
47  long onFocusNext(FXObject*,FXSelector,void*);
48  long onFocusPrev(FXObject*,FXSelector,void*);
49  long onCmdUpdate(FXObject*,FXSelector,void*);
50 public:
51 
52  /// Constructor
53  FXComposite(FXComposite* p,FXuint opts=0,FXint x=0,FXint y=0,FXint w=0,FXint h=0);
54 
55  /// Create server-side resources
56  virtual void create();
57 
58  /// Detach server-side resources
59  virtual void detach();
60 
61  /// Destroy server-side resources
62  virtual void destroy();
63 
64  /// Perform layout
65  virtual void layout();
66 
67  /// Return default width
68  virtual FXint getDefaultWidth();
69 
70  /// Return default height
71  virtual FXint getDefaultHeight();
72 
73  /// Return the width of the widest child window
74  FXint maxChildWidth() const;
75 
76  /// Return the height of the tallest child window
77  FXint maxChildHeight() const;
78 
79  /// Overrides this virtual function to return TRUE
80  virtual bool isComposite() const;
81 
82  /// Destructor
83  virtual ~FXComposite();
84  };
85 
86 }
87 
88 #endif
Base class for all windows.
Definition: FXWindow.h:115
unsigned int FXuint
Definition: fxdefs.h:396
FXuint FXSelector
Association key.
Definition: FXObject.h:53
#define FXAPI
Definition: fxdefs.h:122
Application Object.
Definition: FXApp.h:158
Base composite.
Definition: FXComposite.h:35
int FXint
Definition: fxdefs.h:397
Visual describes pixel format of a drawable.
Definition: FXVisual.h:84
Object is the base class for all objects in FOX; in order to receive messages from the user interface...
Definition: FXObject.h:166
#define FXDECLARE(classname)
Macro to set up class declaration.
Definition: FXObject.h:92

Copyright © 1997-2005 Jeroen van der Zijp