]> git.saurik.com Git - wxWidgets.git/blob - src/motif/mdi/lib/XsComponent.h
wxDC::SetFont can now handle invalid font and doesn't assert anymore (other ports...
[wxWidgets.git] / src / motif / mdi / lib / XsComponent.h
1 /*
2 Copyright (C) 1996 Scott W. Sadler
3 All rights reserved.
4 */
5
6 /*
7 XsComponent.h
8
9 History
10 03-Mar-96 1.0; Scott W. Sadler (ssadler@cisco.com)
11 Created
12 */
13
14 #ifndef XSCOMPONENT_H
15 #define XSCOMPONENT_H
16
17 // Includes
18
19 #include <X11/Intrinsic.h>
20
21 // XsComponent class
22
23 class XsComponent {
24
25 public:
26
27 // Destructor
28
29 virtual ~XsComponent ( );
30
31 // Component manipulation
32
33 virtual void show ( ); // Show the component
34 virtual void hide ( ); // Hide the component
35
36 // Component name
37
38 const char *name ( ) const;
39
40 // Utilities
41
42 Widget base ( ) const;
43 virtual operator Widget ( ) const;
44
45 // Operators
46
47 Boolean operator == (const XsComponent&);
48
49 // Class name
50
51 virtual const char *className ( ) const;
52
53 protected:
54
55 // Protected constructor
56
57 XsComponent (const char *name);
58
59 // Component life-cycle
60
61 virtual void _componentDestroyed ( );
62 void _installDestroyHandler ( );
63 void _removeDestroyHandler ( );
64
65 // Resource manager
66
67 void _setResources (Widget w, const String *);
68 void _getResources (const XtResourceList, int);
69
70 // Implementation
71
72 char *_name; // Component name
73 Widget _base; // Base widget
74
75 private:
76
77 // Callbacks
78
79 static void _componentDestroyedCallback (Widget, XtPointer, XtPointer);
80 };
81
82 // Inline member functions
83
84 inline Widget XsComponent::base ( ) const
85 {
86 return (_base);
87 }
88
89 inline const char* XsComponent::name ( ) const
90 {
91 return (_name);
92 }
93
94 #endif
95