Add GNU LGPL headers to all .c .C and .h files
[oweals/cde.git] / cde / programs / dtprintinfo / libUI / MotifUI / Container.h
1 /*
2  * CDE - Common Desktop Environment
3  *
4  * Copyright (c) 1993-2012, The Open Group. All rights reserved.
5  *
6  * These libraries and programs are free software; you can
7  * redistribute them and/or modify them under the terms of the GNU
8  * Lesser General Public License as published by the Free Software
9  * Foundation; either version 2 of the License, or (at your option)
10  * any later version.
11  *
12  * These libraries and programs are distributed in the hope that
13  * they will be useful, but WITHOUT ANY WARRANTY; without even the
14  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15  * PURPOSE. See the GNU Lesser General Public License for more
16  * details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with these librararies and programs; if not, write
20  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21  * Floor, Boston, MA 02110-1301 USA
22  */
23 /* $XConsortium: Container.h /main/3 1995/11/06 09:39:43 rswiston $ */
24 /*                                                                      *
25  * (c) Copyright 1993, 1994 Hewlett-Packard Company                     *
26  * (c) Copyright 1993, 1994 International Business Machines Corp.       *
27  * (c) Copyright 1993, 1994 Sun Microsystems, Inc.                      *
28  * (c) Copyright 1993, 1994 Novell, Inc.                                *
29  */
30
31 #ifndef CONTAINER_H
32 #define CONTAINER_H
33
34 #include "MotifUI.h"
35
36 const long OPEN_TIME = 40000L;
37
38 class Container : public MotifUI {
39
40    friend void UpdateAreaMessage(Widget, XtPointer, XEvent *, Boolean *);
41    friend void MakeChildVisible(Widget, XtPointer, XtPointer);
42    friend void ResizeTimeOut(void *, XtIntervalId *id);
43    friend void ResizeSW(Widget, XtPointer, XtPointer);
44    friend void ResizeRC(Widget, XEvent *, String *, int *);
45
46
47    static void UpdateAreaMessage(Widget, XtPointer, XEvent *, Boolean *);
48    static void MakeChildVisible(Widget, XtPointer, XtPointer);
49    static void ResizeTimeOut(void *, XtIntervalId *id);
50    static void ResizeSW(Widget, XtPointer, XtPointer);
51    static void ResizeRC(Widget, XEvent *, String *, int *);
52
53  protected:
54
55    Widget _sw;
56    Widget _workArea;
57    Widget _clipWidget;
58    Widget _vbar;
59    Widget _hbar;
60    XmString _xm_update_message;
61    BaseUI *_last_selected;
62    IconStyle _style;
63    IconStyle _previous_style;
64    ContainerType _container_type;
65    SelectionType _select_type;
66    virtual boolean SetIcon(IconStyle);
67
68    void NotifySelected(BaseUI *);
69    void NotifyDelete(BaseUI *);
70    void NotifyVisiblity(BaseUI *);
71    void DoBeginUpdate();
72    void DoEndUpdate();
73    void DoUpdateMessage(char *);
74    void CreateContainer(MotifUI *,char *, char *, ContainerType, SelectionType);
75
76  public:
77
78    Container(MotifUI *parent,
79              char *name,
80              ContainerType container_type = SCROLLED_WORK_AREA,
81              SelectionType select_type = SINGLE_SELECT);
82
83    Container(char *category,
84              MotifUI *parent,
85              char *name,
86              ContainerType container_type = SCROLLED_WORK_AREA,
87              SelectionType select_type = SINGLE_SELECT);
88
89    void OpenAnimation(MotifUI *obj);
90    void SelectionPolicy(SelectionType);
91    const SelectionType SelectionPolicy() { return _select_type; }
92    const Widget InnerWidget()            { return _workArea; }
93
94    const UI_Class UIClass()              { return CONTAINER; }
95    const int UISubClass()                { return _container_type; }
96
97    const char *const UIClassName()       { return "Container"; }
98 };
99
100 #endif /* CONTAINER_H */