1/*
2 * Author:      William Chia-Wei Cheng (bill.cheng@acm.org)
3 *
4 * Copyright (C) 2001-2009, William Chia-Wei Cheng.
5 *
6 * This file may be distributed under the terms of the Q Public License
7 * as defined by Trolltech AS of Norway and appearing in the file
8 * LICENSE.QPL included in the packaging of this file.
9 *
10 * THIS FILE IS PROVIDED AS IS WITH NO WARRANTY OF ANY KIND, INCLUDING
11 * THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
12 * PURPOSE.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL,
13 * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
14 * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
15 * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
16 * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 *
18 * @(#)$Header: /mm2/home/cvs/bc-src/tgif/tdgtbrow.e,v 1.6 2011/05/16 16:22:00 william Exp $
19 */
20
21#ifndef _TDGTBROW_E_
22#define _TDGTBROW_E_
23
24#include "tidget.h"
25
26#include "tdgtbtn.e"
27#include "list.e"
28
29#define TDGTBROW_DEF_H_PAD 2
30#define TDGTBROW_DEF_V_PAD 2
31
32/*
33 * A button row tidget is a container of which other buttons can sit on top.
34 */
35typedef struct tagTdgtBtnRow {
36   TidgetInfo *pti;
37
38   SimpleWinInfo client_area;
39
40   int content_w, content_h; /* the area occupied by the buttons */
41   int h_gap;
42   int just; /* JUST_L, JUST_C, or JUST_R */
43} TdgtBtnRow;
44
45#ifdef _INCLUDE_FROM_TDGTBROW_C_
46#undef extern
47#define extern
48#endif /*_INCLUDE_FROM_TDGTBROW_C_*/
49
50extern void	TdgtBtnRowReset ARGS_DECL((TdgtBtnRow*));
51extern TdgtBtnRow	*CreateTdgtBtnRow ARGS_DECL((Window parent_win,
52				TidgetInfo *parent_tidgetinfo, int ctl_id,
53				int x, int y, int h_pad, int v_pad, int state,
54				int h_gap, int just));
55
56extern int	TdgtBtnRowAddBtn ARGS_DECL((TdgtBtnRow*, TdgtBtn*));
57
58extern int	InitTdgtBtnRow ARGS_DECL((void));
59extern void	CleanUpTdgtBtnRow ARGS_DECL((void));
60
61#ifdef _INCLUDE_FROM_TDGTBROW_C_
62#undef extern
63#ifndef _NO_RECURSIVE_EXTERN
64#define extern extern
65#endif /* ~_NO_RECURSIVE_EXTERN */
66#endif /*_INCLUDE_FROM_TDGTBROW_C_*/
67
68#endif /*_TDGTBROW_E_*/
69