• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

ev_Toolbar_Control.h

Go to the documentation of this file.
00001 /* AbiSource Program Utilities
00002  * Copyright (C) 1998 AbiSource, Inc.
00003  *
00004  * This program is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU General Public License
00006  * as published by the Free Software Foundation; either version 2
00007  * of the License, or (at your option) any later version.
00008  *
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software
00016  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00017  * 02110-1301 USA.
00018  */
00019 
00020 #ifndef EV_TOOLBAR_CONTROL_H
00021 #define EV_TOOLBAR_CONTROL_H
00022 
00023 #include "ut_types.h"
00024 #include "ut_misc.h"
00025 #include "ut_vector.h"
00026 
00027 class EV_Toolbar;
00028 
00029 
00030 // this abstract class encapsulates the contents of a toolbar control.
00031 // it allows the EV_Toolbar logic to build and manage the underlying widgets.
00032 
00033 class ABI_EXPORT EV_Toolbar_Control
00034 {
00035 public:
00036     EV_Toolbar_Control(EV_Toolbar * pToolbar);
00037     virtual ~EV_Toolbar_Control(void);
00038 
00039     virtual bool        populate(void) = 0;
00040 
00041     const UT_GenericVector<const char*> *   getContents(void) const;
00042     const char *        getNthItem(UT_uint32 n) const;
00043 
00044     UT_uint32           getMaxLength(void) const;
00045     UT_uint32           getPixelWidth(void) const;
00046     virtual UT_uint32   getDroppedWidth(void) const {return getPixelWidth();}
00047     bool                shouldSort(void) const;
00048 
00049 protected:
00050     EV_Toolbar *    m_pToolbar;
00051     UT_uint32       m_nLimit;
00052     UT_uint32       m_nPixels;
00053     bool            m_bSort;
00054 
00055     UT_GenericVector<const char*>   m_vecContents;
00056 };
00057 
00058 #endif /* EV_TOOLBAR_CONTROL_H */

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1