home *** CD-ROM | disk | FTP | other *** search
- #ifndef _IBUTTON_
- #define _IBUTTON_
- /*******************************************************************************
- * FILE NAME: Ibutton.hpp *
- * *
- * DESCRIPTION: *
- * Declaration of the class(es): *
- * Ibutton - The button class is the abstract base class for button controls.*
- * *
- * COPYRIGHT: *
- * Licensed Materials - Property of IBM *
- * (C) Copyright IBM Corporation 1992, 1993 *
- * All Rights Reserved *
- * US Government Users Restricted Rights - Use, duplication, or disclosure *
- * restricted by GSA ADP Schedule Contract with IBM Corp. *
- * *
- * $Log: R:/IBMCLASS/IBASECTL/VCS/IBUTTON.HPV $
- //
- // Rev 1.7 25 Oct 1992 17:05:08 nunn
- //changed library name to ICLUI
- //
- // Rev 1.6 25 Oct 1992 10:51:26 boezeman
- //Add documentation and converted file to skeleton.hpp format.
-
- Rev 1.5 13 Oct 1992 21:21:34 tsuji
- Correct comments around log directive.
-
- Rev 1.4 13 Oct 1992 20:56:30 tsuji
- Correct log directive, remove IBM Confidential classification.
-
- Rev 1.3 13 Oct 1992 19:05:30 tsuji
- Remove no-op virtual destructor, add Inherited typedef.
- *******************************************************************************/
- #ifndef _ITEXTCTL_
- #include <itextctl.hpp>
- #endif
-
- // Forward declarations for other classes:
- class IButton; /* but */
- #ifndef _IBITFLAG_
- #include <ibitflag.hpp>
- #endif
-
- class IButton : public ITextControl {
- /*******************************************************************************
- * This button class is the abstract base class for button controls. *
- * *
- * An instance of this class cannot be created. Actual button controls are *
- * created by subclassing from this base class. *
- * *
- * EXAMPLE: *
- * <sample code> *
- *******************************************************************************/
- typedef ITextControl
- Inherited;
- public:
- INESTEDBITFLAGCLASSDEF2(Style, IButton, IWindow, IControl);
- // style class definition
- static const Style
- noPointerFocus,
- autosize;
- /*------------------------ CONSTRUCTORS/DESTRUCTORS ----------------------------
- | There is 1 way to construct instances of this class: |
- | 1. default |
- ------------------------------------------------------------------------------*/
- IButton() {;}
-
-
- /*-------------------------------- MOUSE FOCUS STYLE ---------------------------
- | enableMouseClickFocus - Enable the button to receive the focus when the |
- | user clicks on the button using the mouse. |
- | disableMouseClickFocus - Disable the button to receive the focus when the |
- | user clicks on the button using the mouse. |
- ------------------------------------------------------------------------------*/
- void
- enableMouseClickFocus(),
- disableMouseClickFocus();
-
- /*-------------------------------- HILITE STATE --------------------------------
- | These operations test and set a button's hilite state. A highlighted button |
- | will have the same apperances as if the mouse selection button (mouse |
- | button 1) was pressed while the mouse pointer was over the button control. |
- | isHilited - return true is the button's hilite state is set |
- | hilite - set the button's hilite state |
- | unhilite - turn off the button's hilite state |
- ------------------------------------------------------------------------------*/
- Boolean
- isHilited() const;
- void
- hilite(),
- unhilite();
-
- /*-------------------------------- CLICK THE BUTTON ----------------------------
- | click - Simulates the user clicking on the button control using the |
- | mouse selection button. |
- ------------------------------------------------------------------------------*/
- void
- click();
-
- protected:
- static const Style
- buttonTypes; // for derived classes
-
- private:
- /*--------------------------------- PRIVATE ----------------------------------*/
- IButton(const IButton&);
- //IButton& operator=(const IButton&);
- }; // class IButton
-
- INESTEDBITFLAGCLASSFUNCS(Style, IButton);
- // global style functions
- #endif /* _IBUTTON_ */