summaryrefslogtreecommitdiffstats
path: root/beos/liblayout/MPopup.h
blob: 2223664ec4f320c1c1d8140ea6adc50c7e6dfd92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45

#ifndef _MPOPUP_H
#define _MPOPUP_H
#include "layout.h"
#include "MDividable.h"
#include <MenuField.h>

class BPopUpMenu;

#if __POWERPC__
#pragma simple_class_byval off
#endif

class IMPEXPLIBLAYOUT MPopup:
	public MView, public MDividable, public BMenuField
{
	public:		MPopup(char *label, char *item ...);
				MPopup(char *label, BMessage*, BHandler *, char *item ...);
				MPopup(BMessage*);
				virtual ~MPopup();
				virtual long Archive(BMessage *archive, bool deep=true) const;
				static BArchivable *Instantiate(BMessage *archive);

				virtual float	LabelWidth();

				virtual	minimax	layoutprefs();
				virtual BRect	layout(BRect rect);
				virtual void	reloadfont(BFont *font[]);
				void			SetActive(ulong, bool send=true);
				void			EnableItem(ulong index, bool enabled);
				virtual void	AttachedToWindow();
				virtual void	DetachedFromWindow();

	private:	virtual void _expansionmpopup1();

				char		*poplabel;
				BHandler	*target;
				BPopUpMenu	*popup;

				uint32  _expansiondata[2];
};

extern const IMPEXPLIBLAYOUT char M_POPUP_POINTER_NAME[];

#endif