X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/68dda78574c865bd5bec89fbf4c8c3607b0912db..8704bf74fba8523e2e174bd5a8195b5202009cd0:/src/motif/mdi/lib/XsComponent.h diff --git a/src/motif/mdi/lib/XsComponent.h b/src/motif/mdi/lib/XsComponent.h new file mode 100644 index 0000000000..d2d71f061a --- /dev/null +++ b/src/motif/mdi/lib/XsComponent.h @@ -0,0 +1,98 @@ +/* + Copyright (C) 1996 Scott W. Sadler + All rights reserved. +*/ + +/* + XsComponent.h + + History + 03-Mar-96 1.0; Scott W. Sadler (sws@iti-oh.com) + Created +*/ + +#ifndef XSCOMPONENT_H +#define XSCOMPONENT_H + +// Includes + +#include + +// XsComponent class + +class XsComponent { + + public: + +// Destructor + + virtual ~XsComponent ( ); + +// Component manipulation + + virtual void show ( ); // Show the component + virtual void hide ( ); // Hide the component + +// Added JACS 19/10/98 + inline Widget GetBase() const { return _base; } + +// Component name + + const char *name ( ) const; + +// Utilities + + Widget base ( ) const; + virtual operator Widget ( ) const; + +// Operators + + Boolean operator == (const XsComponent&); + +// Class name + + virtual const char *className ( ) const; + + protected: + +// Protected constructor + + XsComponent (const char *name); + +// Component life-cycle + + virtual void _componentDestroyed ( ); + void _installDestroyHandler ( ); + void _removeDestroyHandler ( ); + +// Resource manager + + void _setResources (Widget w, const String *); + void _getResources (const XtResourceList, int); + +// Implementation + + char *_name; // Component name + Widget _base; // Base widget + + private: + +// Callbacks + + static void _componentDestroyedCallback (Widget, XtPointer, XtPointer); +}; + +// Inline member functions + +inline Widget XsComponent::base ( ) const +{ + return (_base); +} + +inline const char* XsComponent::name ( ) const +{ + return (_name); +} + +#endif +