summaryrefslogtreecommitdiffstats
path: root/beos/liblayout/MBorder.h
blob: 4e925ec2d778c8a3aec07af70c00d51306db2a74 (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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68

#ifndef _MBORDER_H
#define _MBORDER_H
#include "MGroup.h"

#if __POWERPC__
#pragma simple_class_byval off
#endif

class IMPEXPLIBLAYOUT MBorder :  public MGroup, public BView
{
	public:
			enum {
				ROTATE_REVERSE=(int)0x80000000
			};
	
			MBorder(ulong border_type,ulong spacing,char *name=NULL,MView *kid=NULL);
			MBorder(BMessage*);
			virtual long Archive(BMessage *archive, bool deep=true) const;
			static BArchivable *Instantiate(BMessage *archive);
			~MBorder();
			virtual	minimax	layoutprefs();
			virtual BRect	layout(BRect rect);
			virtual void	Draw(BRect);
			virtual void AttachedToWindow();
			virtual void DetachedFromWindow();
			virtual void FrameResized(float width, float height);
			void			DrawBorder();
			void			SetLabel(char *);
			char           *Label();
			void			SetHighlight(int);
			void			SetHighlightColors(rgb_color color1, rgb_color color2, rgb_color color3);

	private:
			virtual void	_expansionmborder1();
			virtual void	_expansionmborder2();

			static long		_cycler(void *arg);
			void			Cycler();
			int	highlightmode;
			thread_id cycler;

			ulong bordertype;
			ulong extraspacing;
			ulong extralabelspacing;
			char  *label;
			char  *truncatedlabel;
			
			rgb_color *highlightcolors;

			uint32 _expansiondata[1];
};


enum
{
	M_NO_BORDER,
	M_RAISED_BORDER,
	M_DEPRESSED_BORDER,
	M_LABELED_BORDER,
	M_ETCHED_BORDER
};

enum
{
	M_SHOW_FULL_LABEL=	0x00000100
};
#endif