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

xap_Toolbar_ControlFactory.h

Go to the documentation of this file.
00001 /* AbiWord
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 XAP_TOOLBAR_CONTROLFACTORY_H
00021 #define XAP_TOOLBAR_CONTROLFACTORY_H
00022 
00023 /*****************************************************************
00024 ******************************************************************
00025 ** This file defines the base class for the cross-platform
00026 ** application Toolbar_Control factory.  This is used as a container
00027 ** and constructor for all Toolbar_Controls.
00028 ******************************************************************
00029 *****************************************************************/
00030 
00031 /* pre-emptive dismissal; ut_types.h is needed by just about everything,
00032  * so even if it's commented out in-file that's still a lot of work for
00033  * the preprocessor to do...
00034  */
00035 #ifndef UT_TYPES_H
00036 #include "ut_types.h"
00037 #endif
00038 /* #include "ut_vector.h" */
00039 
00040 /* #include "EV_Toolbar_Control.h" */
00041 
00042 #include "xap_Types.h"
00043 
00044 class EV_Toolbar_Control;
00045 class EV_Toolbar;
00046 
00047 /*****************************************************************/
00048 
00049 class ABI_EXPORT XAP_Toolbar_ControlFactory
00050 {
00051 public:
00052     struct _ctl_table
00053     {
00054         XAP_Toolbar_Id          m_id;
00055         EV_Toolbar_Control *    (*m_pfnStaticConstructor)(EV_Toolbar * pToolbar, XAP_Toolbar_Id id);
00056     };
00057 
00058     XAP_Toolbar_ControlFactory(int nrElem, const struct _ctl_table * pDlgTable);
00059     virtual ~XAP_Toolbar_ControlFactory(void);
00060 
00061     EV_Toolbar_Control *        getControl(EV_Toolbar * pToolbar, XAP_Toolbar_Id id);
00062 
00063 protected:
00064     bool                        _find_ControlInTable(XAP_Toolbar_Id id, UT_uint32 * pIndex) const;
00065 
00066     UT_uint32                   m_nrElementsCtlTable;
00067     const _ctl_table *  m_ctl_table;            /* an array of elements */
00068 };
00069 
00070 #endif /* XAP_TOOLBAR_CONTROLFACTORY_H */

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1