home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: Programmierung / SOURCE.mdf / programm / windows / c / mobjm260 / stoolbar.h_ / stoolbar.h
Encoding:
C/C++ Source or Header  |  1994-09-06  |  2.2 KB  |  82 lines

  1. //    Microworks ObjectMate  2.6
  2. //
  3. //  "SFX Class Library"
  4. //
  5. //    An ObjectWindows 2.0 extension for Borland C++ 4.0
  6. //
  7. //    Copyright 1992-94 Microworks Sydney, Australia.
  8. //
  9. //  STOOLBAR.H
  10.  
  11. #if !defined(__SFX_STOOLBAR_H)
  12. #define __SFX_STOOLBAR_H
  13.  
  14. #if !defined(__OWL_WINDOW_H)
  15.   #include <owl\window.h>
  16. #endif
  17.  
  18. //  class TSFXToolbar
  19.  
  20. class _OWLCLASS TSFXToolbar : public TWindow
  21. {
  22.   public:
  23.     TSFXToolbar(TWindow*        parent,
  24.                 int             id,
  25.                 const char far* title,
  26.                 int x, int y,
  27.                 BOOL            isChild = TRUE,
  28.                 TModule*        module = 0);
  29.  
  30.     TSFXToolbar(TWindow* parent, int resourceId, TModule* module = 0);
  31.  
  32.     //    Returns the toolbar id
  33.     virtual int GetId();
  34.  
  35.     //    Retrieves the full text string used to create the toolbar.
  36.     void        GetTitle(char far* str);
  37.  
  38.     /*    Aligns Toolbar along Top, Left, Right or Bottom of Window
  39.         depending on mtb_XXXXXX style. Use this to align a toolbar
  40.         from the parent's WMSize message when its window is resized     */
  41.     void        AlignToolbar();
  42.  
  43.     //    Returns the check state of a Toolbar button
  44.     UINT        GetCheck(int toolId);
  45.  
  46.     //    Checks a Toolbar button (appears depressed)
  47.     void        CheckTool(int toolId);
  48.  
  49.     //    Unchecks a Toolbar button
  50.     void        UncheckTool(int toolId);
  51.  
  52.     //  Returns true if the Toolbar button identified by ToolId is enabled
  53.     BOOL        IsToolEnabled(int toolId);
  54.  
  55.     //  Enables/Disables the Toolbar button identifed by ToolId
  56.     void        EnableTool(int toolId, BOOL enabled);
  57.  
  58.     //  Get the Static control text in an aligned toolbar or status bar
  59.     void        GetText(char far* str);
  60.  
  61.     //  Sets the Static control text in an aligned toolbar or status bar to str
  62.     void        SetText(const char far* str);
  63.  
  64.     //  Changes a toolbar button's Id and bitmap(s)
  65.     void        SetTool(int newId, int toolId);
  66.  
  67.     //    Sets the status bar font if the MTB_STATUS style is specified
  68.     void        SetFont(HFONT font);
  69.  
  70.     //    Retrieves the window handle of the toolbar's static control
  71.     HWND        StatusWindow();
  72.  
  73.   protected:
  74.     char far* GetClassName();
  75.     void      EvPaint();
  76.  
  77.   DECLARE_RESPONSE_TABLE(TSFXToolbar);
  78.   DECLARE_STREAMABLE(_OWLCLASS, TSFXToolbar, 1);
  79. };
  80.  
  81. #endif  // __SFX_STOOLBAR_H
  82.