home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ool_main.zip / ool / include / xlistbox.h < prev    next >
Text File  |  1997-08-12  |  3KB  |  58 lines

  1. #ifndef __OOL_XLISTBOX_H__
  2. #define __OOL_XLISTBOX_H__
  3.  
  4. /*===========================================================================*/
  5. /* OOL ------------------- the Open Object Library ------------------- r 1.0 */
  6. /*===========================================================================*/
  7. /*                              class: XListBox                              */
  8. /*                       derived from: XControl                              */
  9. /*                        last update: 12/96                                 */
  10. /*                      programmed by: Stefan von Brauk (sbrauk@gwdg.de)     */
  11. /*===========================================================================*/
  12.  
  13.  
  14. #include "xcontrol.h"
  15.  
  16.  
  17. #ifdef OOL_FOR_OS2_X86
  18.    #define LS_NONE          -1
  19.    #define LS_FIRST         -1
  20.    #define LS_LAST          -1
  21.    #define LS_ASCENDING     -2
  22.    #define LS_DESCENDING    -3
  23.    #define LS_PREFIX        0x0002
  24.    #define LS_CASESENSITIVE 0x0004
  25.    #define LS_SUBSTRING     0x0001
  26.    #define LS_SCROLL        LS_HORZSCROLL
  27.    #define LS_MULTI         LS_MULTIPLESEL
  28.    #define LS_EXTENDED      LS_EXTENDEDSEL
  29. #endif
  30.  
  31. class _export_ XListBox: public XControl
  32. {
  33.       friend void BuildChilds( HWND );
  34.    protected:
  35.       XListBox( const HWND hwnd): XControl(hwnd) {;}
  36.       XListBox( const XRect * rec, const ULONG style, const XWindow * owner, const USHORT id, const PSZ className, const char* font=NULL);
  37.    public:
  38.       XListBox( const XWindow * owner, const XRect& rec= XRect(), const USHORT id = 0, const ULONG style = WIN_VISIBLE, const char* font=NULL);
  39.       virtual ~XListBox() {;}
  40.       SHORT InsertItem( const char * item, const SHORT pos = LS_LAST) const ;
  41.       SHORT GetCount(void) const ;
  42.       LONG GetItemHandle( const SHORT pos) const ;
  43.       SHORT GetItemText( const SHORT pos, XString * buffer);
  44.       SHORT GetSelection( const SHORT start = LS_FIRST) const ;
  45.       SHORT GetTopIndex( void ) const ;
  46.       BOOL RemoveAll(void) const ;
  47.       void RemoveItem( const SHORT pos) const ;
  48.       SHORT SearchString ( const char * p, const SHORT start=LS_FIRST, const SHORT matchCode=LS_CASESENSITIVE) const ;
  49.       BOOL SelectItem( const SHORT pos, const BOOL select = TRUE) const ;
  50.       BOOL SetItemHandle( const SHORT pos, const LONG handle) const ;
  51.       void SetItemHeight( const SHORT height ) const ;
  52.       BOOL SetItemText( const SHORT pos, const char * p) const ;
  53.       void SetItemWidth( const SHORT width ) const ;
  54.       void SetTopIndex( const SHORT index ) const ;
  55. };
  56.  
  57. #endif
  58.