summaryrefslogtreecommitdiffstats
path: root/beos/liblayout
diff options
context:
space:
mode:
Diffstat (limited to 'beos/liblayout')
-rw-r--r--beos/liblayout/HGroup.h40
-rw-r--r--beos/liblayout/LayeredGroup.h37
-rw-r--r--beos/liblayout/MApplication.h29
-rw-r--r--beos/liblayout/MBViewWrapper.h30
-rw-r--r--beos/liblayout/MBorder.h68
-rw-r--r--beos/liblayout/MButton.h53
-rw-r--r--beos/liblayout/MCheckBox.h33
-rw-r--r--beos/liblayout/MDividable.h35
-rw-r--r--beos/liblayout/MDragBar.h38
-rw-r--r--beos/liblayout/MEject.h23
-rw-r--r--beos/liblayout/MFFWD.h24
-rw-r--r--beos/liblayout/MGroup.h31
-rw-r--r--beos/liblayout/MListView.h30
-rw-r--r--beos/liblayout/MMenuBar.h33
-rw-r--r--beos/liblayout/MOutlineListView.h32
-rw-r--r--beos/liblayout/MPictureButton.h55
-rw-r--r--beos/liblayout/MPlayBW.h23
-rw-r--r--beos/liblayout/MPlayFW.h22
-rw-r--r--beos/liblayout/MPopup.h45
-rw-r--r--beos/liblayout/MProgressBar.h58
-rw-r--r--beos/liblayout/MRadioGroup.h46
-rw-r--r--beos/liblayout/MRew.h22
-rw-r--r--beos/liblayout/MScrollView.h39
-rw-r--r--beos/liblayout/MSlider.h30
-rw-r--r--beos/liblayout/MSplitter.h38
-rw-r--r--beos/liblayout/MStop.h22
-rw-r--r--beos/liblayout/MStringView.h25
-rw-r--r--beos/liblayout/MTabView.h33
-rw-r--r--beos/liblayout/MTextControl.h36
-rw-r--r--beos/liblayout/MTextView.h31
-rw-r--r--beos/liblayout/MVolume.h48
-rw-r--r--beos/liblayout/MWindow.h62
-rw-r--r--beos/liblayout/PropGadget.h75
-rw-r--r--beos/liblayout/Space.h22
-rw-r--r--beos/liblayout/SpinButton.h78
-rw-r--r--beos/liblayout/TabGroup.h46
-rw-r--r--beos/liblayout/VGroup.h41
-rw-r--r--beos/liblayout/layout-all.h35
-rw-r--r--beos/liblayout/layout.h168
39 files changed, 1636 insertions, 0 deletions
diff --git a/beos/liblayout/HGroup.h b/beos/liblayout/HGroup.h
new file mode 100644
index 000000000..9eee83fea
--- /dev/null
+++ b/beos/liblayout/HGroup.h
@@ -0,0 +1,40 @@
+
+#ifndef _HGROUP_H
+#define _HGROUP_H
+#include "MGroup.h"
+#include <View.h>
+#if __POWERPC__
+#pragma simple_class_byval off
+#endif
+
+class IMPEXPLIBLAYOUT HGroup : public MGroup, public BView
+{
+ public: HGroup(minimax mpm,MView *kid=0, ...);
+ HGroup(MView *kid=0, ...);
+ HGroup(BMessage*);
+ virtual ~HGroup();
+ virtual long Archive(BMessage *archive, bool deep=true) const;
+ static BArchivable *Instantiate(BMessage *archive);
+ virtual minimax layoutprefs();
+ virtual BRect layout(BRect rect);
+ virtual void AttachedToWindow();
+ virtual void DetachedFromWindow();
+ virtual void MouseDown(BPoint);
+
+ private: virtual void _expansionhgroup1();
+ virtual void _expansionhgroup2();
+ virtual void _expansionhgroup3();
+
+ static int cmpkids(const void* v1,const void *v2);
+ int *size;
+ float totalweight;
+ int numkids;
+ sortstruct *childorder;
+ MView **mkid;
+ float totalminx,totalmaxx;
+ BRect *lastrect;
+
+ uint32 _expansiondata[2];
+};
+
+#endif
diff --git a/beos/liblayout/LayeredGroup.h b/beos/liblayout/LayeredGroup.h
new file mode 100644
index 000000000..61264ca36
--- /dev/null
+++ b/beos/liblayout/LayeredGroup.h
@@ -0,0 +1,37 @@
+
+#ifndef _LAYEREDGROUP_H
+#define _LAYEREDGROUP_H
+
+#include "MGroup.h"
+#include <Control.h>
+
+#if __POWERPC__
+#pragma simple_class_byval off
+#endif
+
+class IMPEXPLIBLAYOUT LayeredGroup : public MGroup, public BControl
+{
+ public: LayeredGroup(minimax mpm,MView *arg=0, ...);
+ LayeredGroup(MView *arg=0, ...);
+ LayeredGroup(BMessage*);
+ virtual ~LayeredGroup();
+ virtual long Archive(BMessage *archive, bool deep=true) const;
+ static BArchivable *Instantiate(BMessage *archive);
+ virtual minimax layoutprefs();
+ virtual BRect layout(BRect rect);
+ void ActivateLayer(int);
+ virtual void MessageReceived(BMessage *mes);
+ virtual void AttachedToWindow();
+ virtual void DetachedFromWindow();
+
+ private: virtual void _expansionlayeredgroup1();
+ virtual void _expansionlayeredgroup2();
+
+ int numkids;
+ int activekid;
+
+ uint32 _expansiondata[3];
+};
+
+
+#endif
diff --git a/beos/liblayout/MApplication.h b/beos/liblayout/MApplication.h
new file mode 100644
index 000000000..acdd13214
--- /dev/null
+++ b/beos/liblayout/MApplication.h
@@ -0,0 +1,29 @@
+
+#ifndef _MAPPLICATION_H
+#define _MAPPLICATION_H
+
+#include "layout.h"
+#include <Application.h>
+
+#if __POWERPC__
+#pragma simple_class_byval off
+#endif
+
+class IMPEXPLIBLAYOUT MApplication : public BApplication
+{
+ public: MApplication(char *);
+ MApplication(BMessage*);
+ virtual ~MApplication();
+ virtual long Archive(BMessage *archive, bool deep=true) const;
+ static BArchivable *Instantiate(BMessage *archive);
+ virtual void MessageReceived(BMessage*);
+
+ virtual status_t GetSupportedSuites(BMessage *message);
+ virtual BHandler *ResolveSpecifier(BMessage *message, int32 index, BMessage *specifier, int32 command, const char *property);
+
+ private:
+ virtual void _expansionmapplication1();
+ virtual void _expansionmapplication2();
+ uint32 _expansiondata[4];
+};
+#endif
diff --git a/beos/liblayout/MBViewWrapper.h b/beos/liblayout/MBViewWrapper.h
new file mode 100644
index 000000000..351dfb800
--- /dev/null
+++ b/beos/liblayout/MBViewWrapper.h
@@ -0,0 +1,30 @@
+
+#ifndef _MBVIEWWRAPPER_H
+#define _MBVIEWWRAPPER_H
+#include "layout.h"
+#include <View.h>
+
+#if __POWERPC__
+#pragma simple_class_byval off
+#endif
+
+class IMPEXPLIBLAYOUT MBViewWrapper : public MView, public BView
+{
+ public: MBViewWrapper(BView *view, bool usepreferred=true, bool x_fixed=true, bool y_fixed=true);
+ MBViewWrapper(BMessage*);
+ virtual long Archive(BMessage *archive, bool deep=true) const;
+ static BArchivable *Instantiate(BMessage *archive);
+ virtual ~MBViewWrapper();
+ virtual minimax layoutprefs();
+ virtual BRect layout(BRect rect);
+ virtual void AttachedToWindow();
+ virtual void DetachedFromWindow();
+
+ private: virtual void _expansionmbviewwrapper1();
+
+ BView *childview;
+
+ uint32 _expansiondata[2];
+};
+
+#endif
diff --git a/beos/liblayout/MBorder.h b/beos/liblayout/MBorder.h
new file mode 100644
index 000000000..4e925ec2d
--- /dev/null
+++ b/beos/liblayout/MBorder.h
@@ -0,0 +1,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
diff --git a/beos/liblayout/MButton.h b/beos/liblayout/MButton.h
new file mode 100644
index 000000000..64cd3e32b
--- /dev/null
+++ b/beos/liblayout/MButton.h
@@ -0,0 +1,53 @@
+
+#ifndef _MBUTTON
+#define _MBUTTON
+#include "layout.h"
+#include <Button.h>
+
+#if __POWERPC__
+#pragma simple_class_byval off
+#endif
+
+class IMPEXPLIBLAYOUT MButton : public MView, public BButton
+{
+ public: ulong ID;
+
+ MButton(const char *label, ulong id=0,minimax size=minimax(-1,-1,1E6,1E6,1));
+ MButton(const char *label, BMessage *message, BHandler *handler=NULL, minimax size=minimax(-1,-1,1E6,1E6,1));
+ MButton(BMessage*);
+ virtual long Archive(BMessage *archive, bool deep=true) const;
+ static BArchivable *Instantiate(BMessage *archive);
+
+ virtual ~MButton();
+ void SetRepeat(ulong initial_delay, ulong repeat_delay);
+ virtual minimax layoutprefs();
+ virtual BRect layout(BRect rect);
+ virtual void setcolor(rgb_color, bool);
+
+ virtual void Draw(BRect);
+ virtual void AttachedToWindow();
+ virtual void DetachedFromWindow();
+
+ virtual void MouseDown(BPoint);
+
+ private: static long _mousetracker(void *arg);
+ void _MouseTracker();
+ thread_id mousethread;
+ BHandler *target;
+ int64 lastwhen;
+ ulong initialdelay;
+ ulong repeatdelay;
+ void initobject();
+ ulong buttonmask;
+
+ uint32 _expansiondata[2];
+};
+
+extern const IMPEXPLIBLAYOUT char M_BUTTON_POINTER[];
+extern const IMPEXPLIBLAYOUT char M_BUTTON_ID[];
+extern const IMPEXPLIBLAYOUT char M_BUTTON_MASK[];
+extern const IMPEXPLIBLAYOUT char M_DOUBLECLICK[];
+extern const IMPEXPLIBLAYOUT char M_REPEAT[];
+extern const IMPEXPLIBLAYOUT char M_RELEASE[];
+
+#endif
diff --git a/beos/liblayout/MCheckBox.h b/beos/liblayout/MCheckBox.h
new file mode 100644
index 000000000..7b39abda2
--- /dev/null
+++ b/beos/liblayout/MCheckBox.h
@@ -0,0 +1,33 @@
+
+#ifndef _MCHECKBOX
+#define _MCHECKBOX
+#include "layout.h"
+#include <CheckBox.h>
+
+#if __POWERPC__
+#pragma simple_class_byval off
+#endif
+
+class IMPEXPLIBLAYOUT MCheckBox : public MView, public BCheckBox
+{
+ public: MCheckBox(const char *label,ulong id=0, bool state=false);
+ MCheckBox(const char *label, BMessage *message, BHandler *handler=NULL, bool state=false);
+ MCheckBox(BMessage*);
+ virtual long Archive(BMessage *archive, bool deep=true) const;
+ static BArchivable *Instantiate(BMessage *archive);
+
+ virtual ~MCheckBox();
+ virtual void AttachedToWindow();
+ virtual void DetachedFromWindow();
+
+ virtual minimax layoutprefs();
+ virtual BRect layout(BRect rect);
+
+ private: BHandler *target;
+ uint32 _expansiondata[2];
+};
+
+extern const IMPEXPLIBLAYOUT char M_CHECKBOX_POINTER[];
+extern const IMPEXPLIBLAYOUT char M_CHECKBOX_ID[];
+
+#endif
diff --git a/beos/liblayout/MDividable.h b/beos/liblayout/MDividable.h
new file mode 100644
index 000000000..800772b88
--- /dev/null
+++ b/beos/liblayout/MDividable.h
@@ -0,0 +1,35 @@
+
+// Abstract base class for an object that can be 'divided'.
+// Currently this includes MTextControl and MPopup.
+// The dividable class, and the global function below, is
+// used to align the left half (the label) and the right
+// half (data-entry/selection) of a group of MDividable's
+
+#ifndef _MDIVIDABLE_H
+#define _MDIVIDABLE_H
+
+#include "layout.h"
+
+#if __POWERPC__
+#pragma simple_class_byval off
+#endif
+
+class IMPEXPLIBLAYOUT MDividable
+{
+ public:
+ float labelwidth;
+ MDividable *rolemodel;
+
+ public:
+ MDividable();
+// work around my own bug...
+#ifdef BUILDING_LIBLAYOUT
+ ~MDividable();
+#endif
+ void DivideSameAs(MDividable *);
+ virtual float LabelWidth();
+};
+
+extern void IMPEXPLIBLAYOUT DivideSame(MView *, MView *, ...);
+
+#endif
diff --git a/beos/liblayout/MDragBar.h b/beos/liblayout/MDragBar.h
new file mode 100644
index 000000000..e345668c4
--- /dev/null
+++ b/beos/liblayout/MDragBar.h
@@ -0,0 +1,38 @@
+
+#ifndef _MDRAGBAR_H
+#define _MDRAGBAR_H
+#include "layout.h"
+#include <Control.h>
+
+#if __POWERPC__
+#pragma simple_class_byval off
+#endif
+
+class IMPEXPLIBLAYOUT MDragBar : public MView, public BControl
+{
+ public: MDragBar(minimax size=minimax(1,1,1E6,1E6));
+ MDragBar(BMessage*);
+ virtual long Archive(BMessage *archive, bool deep=true) const;
+ static BArchivable *Instantiate(BMessage *archive);
+ virtual ~MDragBar();
+
+ virtual minimax layoutprefs();
+ virtual BRect layout(BRect rect);
+ virtual void AttachedToWindow();
+ virtual void Draw(BRect rect);
+ virtual void KeyDown(const char *bytes, int32 numbytes);
+ virtual void DetachedFromWindow();
+ virtual void MouseDown(BPoint);
+
+ private: virtual void _expansionmdragbar1();
+
+ thread_id mousethread;
+ BPoint dragpoint;
+
+ static long _mousetracker(void *arg);
+ void _MouseTracker();
+
+ uint32 _expansiondata[2];
+};
+
+#endif
diff --git a/beos/liblayout/MEject.h b/beos/liblayout/MEject.h
new file mode 100644
index 000000000..a9c017346
--- /dev/null
+++ b/beos/liblayout/MEject.h
@@ -0,0 +1,23 @@
+#ifndef _MEJECT_H
+#define _MEJECT_H
+
+#include "MPictureButton.h"
+
+#if __POWERPC__
+#pragma simple_class_byval off
+#endif
+
+class IMPEXPLIBLAYOUT MEject : public MPictureButton
+{
+ public: MEject(BHandler *id);
+ MEject(BHandler *id, BMessage*);
+ MEject(BMessage*);
+ virtual ~MEject();
+ virtual long Archive(BMessage *archive, bool deep=true) const;
+ static BArchivable *Instantiate(BMessage *archive);
+
+ virtual void MakePictures();
+};
+extern const IMPEXPLIBLAYOUT char M_BUTTON_POINTER[];
+
+#endif
diff --git a/beos/liblayout/MFFWD.h b/beos/liblayout/MFFWD.h
new file mode 100644
index 000000000..97c0d53e1
--- /dev/null
+++ b/beos/liblayout/MFFWD.h
@@ -0,0 +1,24 @@
+#ifndef _MFFWD_H
+#define _MFFWD_H
+
+#include "MPictureButton.h"
+
+#if __POWERPC__
+#pragma simple_class_byval off
+#endif
+
+class IMPEXPLIBLAYOUT MFFWD : public MPictureButton
+{
+ public: MFFWD(BHandler *id=NULL);
+ MFFWD(BHandler *id, BMessage*);
+ MFFWD(BMessage*);
+ virtual ~MFFWD();
+ virtual long Archive(BMessage *archive, bool deep=true) const;
+ static BArchivable *Instantiate(BMessage *archive);
+
+ virtual void MakePictures();
+};
+
+extern const IMPEXPLIBLAYOUT char M_BUTTON_POINTER[];
+
+#endif
diff --git a/beos/liblayout/MGroup.h b/beos/liblayout/MGroup.h
new file mode 100644
index 000000000..73dcbfb9c
--- /dev/null
+++ b/beos/liblayout/MGroup.h
@@ -0,0 +1,31 @@
+/*
+
+ MGroup is an abstract class from which all groups should derive.
+
+*/
+
+#ifndef _MGROUP_H
+#define _MGROUP_H
+
+#include "layout.h"
+#include <View.h>
+
+#if __POWERPC__
+#pragma simple_class_byval off
+#endif
+
+class IMPEXPLIBLAYOUT MGroup : public MView
+{
+ public: MGroup();
+ virtual ~MGroup();
+
+ virtual void reloadfont(BFont *font[]);
+};
+
+typedef struct
+{
+ MView *kid;
+ int kidnum;
+} sortstruct;
+
+#endif
diff --git a/beos/liblayout/MListView.h b/beos/liblayout/MListView.h
new file mode 100644
index 000000000..95c4d42ca
--- /dev/null
+++ b/beos/liblayout/MListView.h
@@ -0,0 +1,30 @@
+
+#ifndef _MLISTVIEW_H
+#define _MLISTVIEW_H
+#include "layout.h"
+#include <ListView.h>
+
+#if __POWERPC__
+#pragma simple_class_byval off
+#endif
+
+class IMPEXPLIBLAYOUT MListView : public MView, public BListView
+{
+ public: MListView(list_view_type type=B_SINGLE_SELECTION_LIST,
+ minimax size=minimax(50,50));
+ MListView(BMessage*);
+ virtual ~MListView();
+ virtual long Archive(BMessage *archive, bool deep=true) const;
+ static BArchivable *Instantiate(BMessage *archive);
+ virtual void reloadfont(BFont *font[]);
+ virtual minimax layoutprefs();
+ virtual BRect layout(BRect rect);
+ virtual void MessageReceived(BMessage*);
+ virtual void AttachedToWindow();
+ virtual void DetachedFromWindow();
+
+ private: virtual void _expansionmlistview1();
+ uint32 _expansiondata[2];
+};
+
+#endif
diff --git a/beos/liblayout/MMenuBar.h b/beos/liblayout/MMenuBar.h
new file mode 100644
index 000000000..a5b061a19
--- /dev/null
+++ b/beos/liblayout/MMenuBar.h
@@ -0,0 +1,33 @@
+
+#ifndef _MMENUBAR_H
+#define _MMENUBAR_H
+
+#include "layout.h"
+#include <MenuBar.h>
+
+#if __POWERPC__
+#pragma simple_class_byval off
+#endif
+
+class IMPEXPLIBLAYOUT MMenuBar: public MView, public BMenuBar
+{
+ public:
+ MMenuBar(menu_layout layout=B_ITEMS_IN_ROW);
+ MMenuBar(menu_layout layout, bool resizetofit);
+ MMenuBar(BMessage*);
+ virtual ~MMenuBar();
+ virtual long Archive(BMessage *archive, bool deep=true) const;
+ static BArchivable *Instantiate(BMessage *archive);
+
+ virtual minimax layoutprefs();
+ virtual BRect layout(BRect);
+ virtual void reloadfont(BFont *font[]);
+ virtual void AttachedToWindow();
+ virtual void DetachedFromWindow();
+ private:
+ virtual void _expansionmmenubar1();
+ virtual void _expansionmmenubar2();
+
+ uint32 _expansiondata[2];
+};
+#endif
diff --git a/beos/liblayout/MOutlineListView.h b/beos/liblayout/MOutlineListView.h
new file mode 100644
index 000000000..acb00e19b
--- /dev/null
+++ b/beos/liblayout/MOutlineListView.h
@@ -0,0 +1,32 @@
+
+#ifndef _MOUTLINELISTVIEW_H
+#define _MOUTLINELISTVIEW_H
+#include "layout.h"
+#include <OutlineListView.h>
+
+#if __POWERPC__
+#pragma simple_class_byval off
+#endif
+
+class IMPEXPLIBLAYOUT MOutlineListView : public MView, public BOutlineListView
+{
+ public: MOutlineListView(list_view_type type=B_SINGLE_SELECTION_LIST,
+ minimax size=minimax(50,50));
+ MOutlineListView(BMessage*);
+ virtual ~MOutlineListView();
+ virtual long Archive(BMessage *archive, bool deep=true) const;
+ static BArchivable *Instantiate(BMessage *archive);
+ virtual void reloadfont(BFont *font[]);
+ virtual minimax layoutprefs();
+ virtual BRect layout(BRect rect);
+ virtual void MessageReceived(BMessage*);
+ virtual void AttachedToWindow();
+ virtual void DetachedFromWindow();
+
+ private: virtual void _expansionmoutlinelistview1();
+ virtual void _expansionmoutlinelistview2();
+
+ uint32 _expansiondata[2];
+};
+
+#endif
diff --git a/beos/liblayout/MPictureButton.h b/beos/liblayout/MPictureButton.h
new file mode 100644
index 000000000..687b5c28a
--- /dev/null
+++ b/beos/liblayout/MPictureButton.h
@@ -0,0 +1,55 @@
+#ifndef _MPICTUREBUTTON_H
+#define _MPICTUREBUTTON_H
+
+#include "layout.h"
+#include <PictureButton.h>
+
+#if __POWERPC__
+#pragma simple_class_byval off
+#endif
+
+class IMPEXPLIBLAYOUT MPictureButton : public MView, public BPictureButton
+{
+ public:
+ MPictureButton(minimax size, BPicture *off, BPicture *on,
+ BMessage *message=NULL, BHandler *target=NULL,
+ uint32 behavior=B_ONE_STATE_BUTTON);
+ MPictureButton(BMessage *archive);
+ virtual ~MPictureButton();
+ void SetRepeat(ulong initial_delay, ulong repeat_delay);
+
+ virtual long Archive(BMessage *archive, bool deep=true) const;
+ static BArchivable *Instantiate(BMessage *archive);
+
+ virtual minimax layoutprefs();
+ virtual BRect layout(BRect);
+ virtual void setcolor(rgb_color col, bool deep=false);
+ virtual void MakePictures();
+
+ virtual void AttachedToWindow();
+ virtual void DetachedFromWindow();
+ virtual void MouseDown(BPoint);
+
+ private:
+ virtual void _expansionmpicturebutton1();
+ virtual void _expansionmpicturebutton2();
+
+ thread_id mousethread;
+ int64 lastwhen;
+ ulong initialdelay;
+ ulong repeatdelay;
+ ulong buttonmask;
+ BHandler *target;
+
+ static long _mousetracker(void *arg);
+ void _MouseTracker();
+
+ uint32 _expansiondata[2];
+};
+
+extern const IMPEXPLIBLAYOUT char M_DOUBLECLICK[];
+extern const IMPEXPLIBLAYOUT char M_BUTTON_MASK[];
+extern const IMPEXPLIBLAYOUT char M_REPEAT[];
+extern const IMPEXPLIBLAYOUT char M_RELEASE[];
+
+#endif
diff --git a/beos/liblayout/MPlayBW.h b/beos/liblayout/MPlayBW.h
new file mode 100644
index 000000000..043aa46d3
--- /dev/null
+++ b/beos/liblayout/MPlayBW.h
@@ -0,0 +1,23 @@
+#ifndef _MPLAYBW_H
+#define _MPLAYBW_H
+
+#include "MPictureButton.h"
+
+#if __POWERPC__
+#pragma simple_class_byval off
+#endif
+
+class IMPEXPLIBLAYOUT MPlayBW : public MPictureButton
+{
+ public: MPlayBW(BHandler*);
+ MPlayBW(BHandler *id, BMessage*);
+ MPlayBW(BMessage*);
+ virtual ~MPlayBW();
+ virtual long Archive(BMessage *archive, bool deep=true) const;
+ static BArchivable *Instantiate(BMessage *archive);
+
+ virtual void MakePictures();
+};
+extern const IMPEXPLIBLAYOUT char M_BUTTON_POINTER[];
+
+#endif
diff --git a/beos/liblayout/MPlayFW.h b/beos/liblayout/MPlayFW.h
new file mode 100644
index 000000000..7f847df7b
--- /dev/null
+++ b/beos/liblayout/MPlayFW.h
@@ -0,0 +1,22 @@
+#ifndef _MPLAYFW_H
+#define _MPLAYFW_H
+
+#include "MPictureButton.h"
+
+#if __POWERPC__
+#pragma simple_class_byval off
+#endif
+
+class IMPEXPLIBLAYOUT MPlayFW : public MPictureButton
+{
+ public: MPlayFW(BHandler*);
+ MPlayFW(BHandler *id, BMessage*);
+ MPlayFW(BMessage*);
+ virtual ~MPlayFW();
+ virtual long Archive(BMessage *archive, bool deep=true) const;
+ static BArchivable *Instantiate(BMessage *archive);
+ virtual void MakePictures();
+};
+extern const IMPEXPLIBLAYOUT char M_BUTTON_POINTER[];
+
+#endif
diff --git a/beos/liblayout/MPopup.h b/beos/liblayout/MPopup.h
new file mode 100644
index 000000000..2223664ec
--- /dev/null
+++ b/beos/liblayout/MPopup.h
@@ -0,0 +1,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
diff --git a/beos/liblayout/MProgressBar.h b/beos/liblayout/MProgressBar.h
new file mode 100644
index 000000000..3938c2583
--- /dev/null
+++ b/beos/liblayout/MProgressBar.h
@@ -0,0 +1,58 @@
+
+#ifndef _MSTATUSBAR_H
+#define _MSTATUSBAR_H
+#include "layout.h"
+#include <View.h>
+
+#if __POWERPC__
+#pragma simple_class_byval off
+#endif
+
+class IMPEXPLIBLAYOUT MProgressBar : public MView, public BView
+{
+ public: float value;
+ float currentwidth;
+
+ public: MProgressBar(BHandler *, bool pulsed_updates=false);
+ MProgressBar(BMessage*);
+ virtual ~MProgressBar();
+ virtual long Archive(BMessage *archive, bool deep=true) const;
+ static BArchivable *Instantiate(BMessage *archive);
+
+ virtual minimax layoutprefs();
+ virtual BRect layout(BRect rect);
+ virtual void setcolor(rgb_color,bool);
+ void setbarcolor(rgb_color);
+ rgb_color getbarcolor() {return bar_fill;};
+ virtual void Draw(BRect);
+ virtual void Pulse();
+ void Refresh();
+ void SetValue(float value);
+ virtual void MouseDown(BPoint);
+ virtual void WindowActivated(bool);
+ virtual void FrameResized(float,float);
+ virtual void MessageReceived(BMessage *mes);
+ virtual void AttachedToWindow();
+ virtual void DetachedFromWindow();
+
+ private: virtual void _expansionmprogressbar1();
+ virtual void _expansionmprogressbar2();
+
+ thread_id mousethread;
+ static long _mousetracker(void *arg);
+ long mousetracker();
+
+ BRect lastbounds;
+ BHandler *target;
+ rgb_color bar_hi;
+ rgb_color bar_fill;
+ rgb_color bar_low;
+ float barwidth;
+
+ uint32 _expansiondata[2];
+};
+
+extern const IMPEXPLIBLAYOUT char M_PROGRESSBAR_FRACTION[];
+
+#endif
+
diff --git a/beos/liblayout/MRadioGroup.h b/beos/liblayout/MRadioGroup.h
new file mode 100644
index 000000000..bb430f2da
--- /dev/null
+++ b/beos/liblayout/MRadioGroup.h
@@ -0,0 +1,46 @@
+
+#ifndef _MRADIOGROUP_H
+#define _MRADIOGROUP_H
+#include "MGroup.h"
+#include <RadioButton.h>
+
+#if __POWERPC__
+#pragma simple_class_byval off
+#endif
+
+class IMPEXPLIBLAYOUT MRadioGroup : public MGroup, public BView
+{
+ public: MRadioGroup(char *item ...);
+ MRadioGroup(BMessage *model, char *item ...);
+ MRadioGroup(BMessage *model, BHandler *target, char *item ...);
+ MRadioGroup(BMessage*);
+ virtual ~MRadioGroup();
+ virtual long Archive(BMessage *archive, bool deep=true) const;
+ static BArchivable *Instantiate(BMessage *archive);
+
+ virtual minimax layoutprefs();
+ virtual BRect layout(BRect rect);
+ virtual void SetActive(ulong);
+ virtual long ActiveButton();
+ virtual void reloadfont(BFont *font[]);
+ virtual void setcolor(rgb_color col,bool deep);
+ virtual void AttachedToWindow();
+ virtual void DetachedFromWindow();
+
+ private: virtual void _expansionmradiogroup1();
+ virtual void _expansionmradiogroup2();
+
+ ulong numradios;
+ BHandler *handler;
+
+ uint32 _expansiondata[3];
+};
+
+extern const IMPEXPLIBLAYOUT char M_RADIO_POINTER_NAME[];
+extern const IMPEXPLIBLAYOUT char M_RADIO_INDEX_NAME[];
+
+
+#endif
+
+
+
diff --git a/beos/liblayout/MRew.h b/beos/liblayout/MRew.h
new file mode 100644
index 000000000..f21683b5d
--- /dev/null
+++ b/beos/liblayout/MRew.h
@@ -0,0 +1,22 @@
+#ifndef _MREW_H
+#define _MREW_H
+
+#include "MPictureButton.h"
+
+#if __POWERPC__
+#pragma simple_class_byval off
+#endif
+
+class IMPEXPLIBLAYOUT MRew : public MPictureButton
+{
+ public: MRew(BHandler*);
+ MRew(BHandler *id, BMessage*);
+ MRew(BMessage*);
+ virtual ~MRew();
+ virtual long Archive(BMessage *archive, bool deep=true) const;
+ static BArchivable *Instantiate(BMessage *archive);
+ virtual void MakePictures();
+};
+extern const IMPEXPLIBLAYOUT char M_BUTTON_POINTER[];
+
+#endif
diff --git a/beos/liblayout/MScrollView.h b/beos/liblayout/MScrollView.h
new file mode 100644
index 000000000..8ba21ce0e
--- /dev/null
+++ b/beos/liblayout/MScrollView.h
@@ -0,0 +1,39 @@
+
+#ifndef _MSCROLLVIEW_H
+#define _MSCROLLVIEW_H
+
+#include "layout.h"
+#include <ScrollView.h>
+
+// An MScrollView accepts another MView as its target.
+// The MScrollView will display scrollbars as requested
+// so that the target MView may be scrolled left/right or
+// up/down.
+
+#if __POWERPC__
+#pragma simple_class_byval off
+#endif
+
+class IMPEXPLIBLAYOUT MScrollView: public MView, public BScrollView
+{
+ public:
+ MScrollView(MView *target, bool horizontal=false, bool vertical=false,
+ border_style border=B_FANCY_BORDER, minimax size=0);
+ MScrollView(BMessage*);
+ virtual ~MScrollView();
+ virtual long Archive(BMessage *archive, bool deep=true) const;
+ static BArchivable *Instantiate(BMessage *archive);
+ virtual minimax layoutprefs();
+ virtual BRect layout(BRect);
+ virtual void AttachedToWindow();
+ virtual void DetachedFromWindow();
+
+ private:
+ MView *kid;
+ float leftinset;
+ float rightinset;
+ float topinset;
+ float bottominset;
+};
+
+#endif
diff --git a/beos/liblayout/MSlider.h b/beos/liblayout/MSlider.h
new file mode 100644
index 000000000..6e7077d3d
--- /dev/null
+++ b/beos/liblayout/MSlider.h
@@ -0,0 +1,30 @@
+
+
+#ifndef _MSLIDER_H
+#define _MSLIDER_H
+
+#include "layout.h"
+#include "Slider.h"
+
+class IMPEXPLIBLAYOUT MSlider: public MView, public BSlider
+{
+ public:
+ MSlider(const char *label, int32 minval, int32 maxval,int32 granularity=1, BMessage *message=NULL, BHandler *target=NULL, thumb_style ts=B_BLOCK_THUMB);
+ virtual ~MSlider();
+ virtual void AllAttached();
+ virtual void DetachedFromWindow();
+ virtual void SetValue(int32 value);
+ void SetGranularity(int32 granul);
+
+ virtual minimax layoutprefs();
+ virtual BRect layout(BRect);
+
+ private:
+ virtual void _expansionmslider1();
+ virtual void _expansionmslider2();
+ BHandler *target;
+ int32 granularity;
+ uint32 _expansiondata[4];
+};
+
+#endif
diff --git a/beos/liblayout/MSplitter.h b/beos/liblayout/MSplitter.h
new file mode 100644
index 000000000..411c5d14f
--- /dev/null
+++ b/beos/liblayout/MSplitter.h
@@ -0,0 +1,38 @@
+
+#ifndef _MSPLITTER_H
+#define _MSPLITTER_H
+
+#include "layout.h"
+
+#if __POWERPC__
+#pragma simple_class_byval off
+#endif
+
+class IMPEXPLIBLAYOUT MSplitter : public MView, public BView
+{
+ public: MSplitter();
+ MSplitter(bool cosmetic);
+ MSplitter(BMessage*);
+ virtual ~MSplitter();
+ virtual long Archive(BMessage *archive, bool deep=true) const;
+ static BArchivable *Instantiate(BMessage *archive);
+
+ virtual minimax layoutprefs();
+ virtual BRect layout(BRect rect);
+ virtual void MouseDown(BPoint);
+ virtual void Draw(BRect);
+ virtual void MouseMoved(BPoint, ulong, const BMessage*);
+ virtual void AttachedToWindow();
+ virtual void DetachedFromWindow();
+
+ private:
+ float siblingweight;
+ MView *previoussibling;
+ MView *nextsibling;
+ thread_id mousethread;
+ static long _mousetracker(void *);
+ void _MouseTracker(void);
+ uint32 _expansiondata[2];
+};
+
+#endif
diff --git a/beos/liblayout/MStop.h b/beos/liblayout/MStop.h
new file mode 100644
index 000000000..b99fc2fe4
--- /dev/null
+++ b/beos/liblayout/MStop.h
@@ -0,0 +1,22 @@
+#ifndef _MSTOP_H
+#define _MSTOP_H
+
+#include "MPictureButton.h"
+
+#if __POWERPC__
+#pragma simple_class_byval off
+#endif
+
+class IMPEXPLIBLAYOUT MStop : public MPictureButton
+{
+ public: MStop(BHandler*);
+ MStop(BHandler *id, BMessage*);
+ MStop(BMessage*);
+ virtual ~MStop();
+ virtual long Archive(BMessage *archive, bool deep=true) const;
+ static BArchivable *Instantiate(BMessage *archive);
+ virtual void MakePictures();
+};
+extern const IMPEXPLIBLAYOUT char M_BUTTON_POINTER[];
+
+#endif
diff --git a/beos/liblayout/MStringView.h b/beos/liblayout/MStringView.h
new file mode 100644
index 000000000..4db74452e
--- /dev/null
+++ b/beos/liblayout/MStringView.h
@@ -0,0 +1,25 @@
+
+#ifndef _MSTRINGVIEW_H
+#define _MSTRINGVIEW_H
+#include "layout.h"
+#include <StringView.h>
+
+#if __POWERPC__
+#pragma simple_class_byval off
+#endif
+
+class IMPEXPLIBLAYOUT MStringView : public MView, public BStringView
+{
+ public: MStringView(const char *label,alignment a=B_ALIGN_LEFT,minimax size=minimax(10,10,65536,65536,1));
+ MStringView(BMessage*);
+ virtual ~MStringView();
+ virtual long Archive(BMessage *archive, bool deep=true) const;
+ static BArchivable *Instantiate(BMessage *archive);
+
+ virtual minimax layoutprefs();
+ virtual BRect layout(BRect rect);
+ virtual void AttachedToWindow();
+ virtual void DetachedFromWindow();
+};
+
+#endif
diff --git a/beos/liblayout/MTabView.h b/beos/liblayout/MTabView.h
new file mode 100644
index 000000000..04c69ec59
--- /dev/null
+++ b/beos/liblayout/MTabView.h
@@ -0,0 +1,33 @@
+
+#ifndef _MTABVIEW_H
+#define _MTABVIEW_H
+
+#include <TabView.h>
+#include "MGroup.h"
+
+class IMPEXPLIBLAYOUT MTab: public BTab
+{
+ public:
+ MTab(MView *view, const char *name=NULL);
+ MTab(BMessage *archive);
+ virtual ~MTab();
+};
+
+
+class IMPEXPLIBLAYOUT MTabView: public MGroup, public BTabView
+{
+ public:
+ MTabView();
+ MTabView(BMessage *archive);
+ virtual void Add(MTab *tab);
+ virtual void Select(int32 tab);
+
+ virtual void reloadfont(BFont *font[]);
+ virtual minimax layoutprefs();
+ virtual BRect layout(BRect);
+
+ private:
+ void LayoutCurrentTab();
+};
+
+#endif
diff --git a/beos/liblayout/MTextControl.h b/beos/liblayout/MTextControl.h
new file mode 100644
index 000000000..46f1a746f
--- /dev/null
+++ b/beos/liblayout/MTextControl.h
@@ -0,0 +1,36 @@
+
+#ifndef _MTEXTCONTROL_H
+#define _MTEXTCONTROL_H
+#include "layout.h"
+#include "MDividable.h"
+#include <TextControl.h>
+
+#if __POWERPC__
+#pragma simple_class_byval off
+#endif
+
+class IMPEXPLIBLAYOUT MTextControl:
+ public MView, public MDividable, public BTextControl
+{
+ public: MTextControl(char *label, char *text);
+ MTextControl(char *label, char *text, BMessage *mes);
+ MTextControl(BMessage*);
+ virtual ~MTextControl();
+ virtual long Archive(BMessage *archive, bool deep=true) const;
+ static BArchivable *Instantiate(BMessage *archive);
+
+ virtual void SetLabel(const char *);
+ virtual float LabelWidth();
+
+ virtual minimax layoutprefs();
+ virtual BRect layout(BRect rect);
+ virtual void reloadfont(BFont *font[]);
+ virtual void AttachedToWindow();
+ virtual void DetachedFromWindow();
+
+ private: float lastheight;
+
+ uint32 _expansiondata[2];
+};
+
+#endif
diff --git a/beos/liblayout/MTextView.h b/beos/liblayout/MTextView.h
new file mode 100644
index 000000000..512a85cd1
--- /dev/null
+++ b/beos/liblayout/MTextView.h
@@ -0,0 +1,31 @@
+
+#ifndef _MTEXTVIEW_H
+#define _MTEXTVIEW_H
+#include "layout.h"
+#include <TextView.h>
+
+#if __POWERPC__
+#pragma simple_class_byval off
+#endif
+
+class IMPEXPLIBLAYOUT MTextView : public MView, public BTextView
+{
+ public: MTextView(minimax size=0);
+ MTextView(BMessage*);
+ virtual ~MTextView();
+ virtual long Archive(BMessage *archive, bool deep=true) const;
+ static BArchivable *Instantiate(BMessage *archive);
+
+ virtual minimax layoutprefs();
+ virtual BRect layout(BRect rect);
+ virtual void AttachedToWindow();
+ virtual void DetachedFromWindow();
+ virtual void MessageReceived(BMessage *mes);
+
+ private: void initobject();
+ static long AsyncSetTextRect(void *arg);
+ thread_id resizer;
+ uint32 _expansiondata[2];
+};
+
+#endif
diff --git a/beos/liblayout/MVolume.h b/beos/liblayout/MVolume.h
new file mode 100644
index 000000000..9d70b7955
--- /dev/null
+++ b/beos/liblayout/MVolume.h
@@ -0,0 +1,48 @@
+#ifndef _MVOLUME_H
+#define _MVOLUME_H
+
+#include "layout.h"
+#include <Control.h>
+
+#if __POWERPC__
+#pragma simple_class_byval off
+#endif
+
+class IMPEXPLIBLAYOUT MVolume : public MView, public BControl
+{
+ public: MVolume(BHandler*);
+ MVolume(BMessage*);
+ virtual ~MVolume();
+ virtual long Archive(BMessage *archive, bool deep=true) const;
+ static BArchivable *Instantiate(BMessage *archive);
+
+ virtual minimax layoutprefs();
+ BRect layout(BRect);
+ virtual void AttachedToWindow();
+ virtual void DetachedFromWindow();
+ virtual void Draw(BRect);
+ virtual void DrawVolume(void);
+ float Volume();
+ void SetVolume(float vol);
+ virtual void MouseDown(BPoint);
+ virtual void KeyDown(const char *bytes, int32 numbytes);
+
+ private: float volume;
+ BHandler *target;
+ BPoint lastvoldot;
+ BPoint clickpoint;
+ thread_id mousethread;
+ bool ispressed;
+ // moved into private area 21-6-98
+ static long _mousetracker(void *arg);
+ void _MouseTracker();
+ // added 21-6-98
+ void _PUMouseTracker();
+};
+
+inline float MVolume::Volume()
+{
+ return volume;
+}
+
+#endif
diff --git a/beos/liblayout/MWindow.h b/beos/liblayout/MWindow.h
new file mode 100644
index 000000000..6118f87bc
--- /dev/null
+++ b/beos/liblayout/MWindow.h
@@ -0,0 +1,62 @@
+
+#ifndef _MWINDOW_H
+#define _MWINDOW_H
+
+#include "layout.h"
+#include <Window.h>
+
+class BPopUpMenu;
+
+#if __POWERPC__
+#pragma simple_class_byval off
+#endif
+
+class IMPEXPLIBLAYOUT MWindow : public BWindow
+{
+ public:
+ ulong flags;
+
+ MWindow(BRect r,const char *name,window_type type,uint32 flags, uint32 workspaces=B_CURRENT_WORKSPACE);
+ MWindow(BRect r,const char *name,window_look look, window_feel feel,uint32 flags, uint32 workspaces=B_CURRENT_WORKSPACE);
+ MWindow(BMessage*);
+ virtual ~MWindow();
+ virtual long Archive(BMessage *archive, bool deep=true) const;
+ static BArchivable *Instantiate(BMessage *archive);
+
+ virtual const BFont *getfont(fontspec font);
+
+ virtual void MessageReceived(BMessage *message);
+ virtual void Show();
+ virtual void RecalcSize();
+ virtual void FrameResized(float width, float height);
+
+ virtual status_t GetSupportedSuites(BMessage *message);
+ virtual BHandler *ResolveSpecifier(BMessage *message, int32 index, BMessage *specifier, int32 command, const char *property);
+ virtual void ScreenChanged(BRect frame, color_space mode);
+ virtual void WorkspaceActivated(int32 workspace, bool active);
+
+ void StartDragging();
+ static long _mousetracker(void *arg);
+ void _MouseTracker();
+
+ private:
+ virtual void _expansionmwindow1();
+ virtual void _expansionmwindow2();
+ virtual void _expansionmwindow3();
+
+ void initobject();
+ BFont **fontlist;
+ BRect lastrect;
+ BPopUpMenu *pop;
+ thread_id mousethread;
+ BPoint dragpoint;
+
+ uint32 _expansiondata[1];
+};
+
+enum {
+ M_WIN_AUTORESIZE =0x00000100,
+ M_WIN_ESCAPETOCLOSE=0x00000200
+};
+
+#endif // MWINDOW_H
diff --git a/beos/liblayout/PropGadget.h b/beos/liblayout/PropGadget.h
new file mode 100644
index 000000000..81a3f1f9b
--- /dev/null
+++ b/beos/liblayout/PropGadget.h
@@ -0,0 +1,75 @@
+
+#ifndef _PROPGADGET
+#define _PROPGADGET
+#include "layout.h"
+#include <Control.h>
+#include <Bitmap.h>
+
+class IMPEXPLIBLAYOUT PropGadget;
+
+typedef void (*propgadget_hook)(PropGadget*, void*, double, double);
+
+#if __POWERPC__
+#pragma simple_class_byval off
+#endif
+
+class PropGadget : public MView, public BControl
+{
+ public: PropGadget(double xprop, double xval, double yprop, double yval,
+ BBitmap *knobimage=NULL,
+ propgadget_hook=NULL,
+ void *callbackarg=NULL,
+ long extraspacing=0);
+ PropGadget(BMessage*);
+ virtual ~PropGadget();
+ virtual long Archive(BMessage *archive, bool deep=true) const;
+ static BArchivable *Instantiate(BMessage *archive);
+
+ BBitmap* Pknob;
+
+ virtual void Draw(BRect);
+ virtual void AttachedToWindow();
+ virtual void DetachedFromWindow();
+ virtual void MouseDown(BPoint);
+
+ void SetProportion(double, double);
+ void SetProportionNoDraw(double,double);
+ virtual void SetValues(double,double);
+ void SetValuesNoDraw(double,double);
+ virtual void FrameResized(float,float);
+ void ReDraw();
+ inline double Hval() {return hval;}
+ inline double Vval() {return 1.0-vval;}
+
+ virtual minimax layoutprefs();
+ virtual BRect layout(BRect rect);
+ virtual void setcolor(rgb_color col, bool deep=false);
+ virtual void DrawContainer(BRect);
+ virtual void DrawKnob(BRect);
+ virtual void KeyDown(const char *bytes, int32 numbytes);
+ bool IsBusy();
+
+ private: virtual void _expansionpropgadget1();
+ virtual void _expansionpropgadget2();
+
+ thread_id mousethread;
+ BPoint clickpoint;
+ BRect lastknobrect;
+ bool _isbusy;
+ bool vertical;
+ bool horizontal;
+
+ double hprop;
+ double hval;
+ double vprop;
+ double vval;
+ void (*callback)(PropGadget*,void*,double,double);
+ void *callbackarg;
+ long borderspacing;
+
+ static long _mousetracker(void *arg);
+ void _MouseTracker();
+
+ uint32 _expansiondata[2];
+};
+#endif
diff --git a/beos/liblayout/Space.h b/beos/liblayout/Space.h
new file mode 100644
index 000000000..c49f6fbd2
--- /dev/null
+++ b/beos/liblayout/Space.h
@@ -0,0 +1,22 @@
+
+#ifndef _SPACE_H
+#define _SPACE_H
+#include "layout.h"
+#include "View.h"
+
+#if __POWERPC__
+#pragma simple_class_byval off
+#endif
+class IMPEXPLIBLAYOUT Space : public MView, public BView
+{
+ public: Space();
+ Space(minimax);
+ Space(BMessage*);
+ virtual ~Space();
+ virtual long Archive(BMessage *archive, bool deep=true) const;
+ static BArchivable *Instantiate(BMessage *archive);
+ virtual minimax layoutprefs();
+ virtual BRect layout(BRect rect);
+};
+
+#endif
diff --git a/beos/liblayout/SpinButton.h b/beos/liblayout/SpinButton.h
new file mode 100644
index 000000000..3bb00db69
--- /dev/null
+++ b/beos/liblayout/SpinButton.h
@@ -0,0 +1,78 @@
+
+#ifndef _SPINBUTTON_H
+#define _SPINBUTTON_H
+
+#include <View.h>
+#include "layout.h"
+#include "HGroup.h"
+#include "MTextControl.h"
+
+enum spinmode
+{
+ SPIN_FLOAT,
+ SPIN_INTEGER
+};
+
+class NumberTextView;
+class TinyButton;
+#if __POWERPC__
+#pragma warn_hidevirtual off
+#endif
+class IMPEXPLIBLAYOUT SpinButton: public MView, public MDividable, public BControl
+{
+ public:
+ SpinButton(const char *label,spinmode mode, BHandler *target=NULL);
+ virtual ~SpinButton();
+
+ virtual void reloadfont(BFont *font[]);
+ virtual minimax layoutprefs();
+ virtual BRect layout(BRect);
+
+ virtual float LabelWidth();
+
+ virtual void AllAttached();
+ virtual void DetachedFromWindow();
+ virtual void Draw(BRect);
+ virtual void MessageReceived(BMessage *mes);
+ virtual void SetEnabled(bool);
+
+ double Increment();
+ double Decrement();
+ double StepSize();
+ void SetStepSize(double step);
+
+ virtual void SetValue(int32 v);
+ virtual void SetValue(double v);
+ double Value();
+ double Maximum();
+ void SetMaximum(double max);
+ double Minimum();
+ void SetMinimum(double min);
+ const char * Format() const;
+ void SetFormat(const char *f);
+
+ private:
+ spinmode mode;
+ ulong height;
+ TinyButton *tb1,*tb2;
+ NumberTextView *tv;
+ long lx,ly;
+ void NotifyWorld(BMessage *mes);
+ BHandler *target;
+ uint32 _expansiondata[4];
+};
+
+enum
+{
+ M_SPIN_UP='!!up',
+ M_SPIN_DOWN='!!dn',
+ M_SPIN_TICK='!spn'
+};
+
+extern const IMPEXPLIBLAYOUT char M_RELEASE[];
+
+#if __POWERPC__
+#pragma warn_hidevirtual on
+#endif
+
+#endif
diff --git a/beos/liblayout/TabGroup.h b/beos/liblayout/TabGroup.h
new file mode 100644
index 000000000..64a2cf9cc
--- /dev/null
+++ b/beos/liblayout/TabGroup.h
@@ -0,0 +1,46 @@
+
+#ifndef _TABGROUP_H
+#define _TABGROUP_H
+
+#include "MGroup.h"
+#include <Control.h>
+
+#if __POWERPC__
+#pragma simple_class_byval off
+#endif
+
+class IMPEXPLIBLAYOUT TabGroup : public MGroup, public BControl
+{
+ public: TabGroup(minimax mpm,char *arg=0, ...);
+ TabGroup(char *arg=0, ...);
+ TabGroup(BMessage*);
+ virtual ~TabGroup();
+ virtual long Archive(BMessage *archive, bool deep=true) const;
+ static BArchivable *Instantiate(BMessage *archive);
+ virtual minimax layoutprefs();
+ virtual BRect layout(BRect rect);
+ virtual void AttachedToWindow();
+ virtual void MouseDown(BPoint point);
+ virtual void Draw(BRect clip);
+ virtual void KeyDown(const char *bytes, int32 numbytes);
+ virtual void ActivateTab(int);
+ int32 ActiveTab();
+ virtual void DetachedFromWindow();
+ virtual void SetEnabled(bool enabled);
+ void SetExtraSpacing(float spacing);
+ float ExtraSpacing();
+
+ private: virtual void _expansiontabgroup1();
+ virtual void _expansiontabgroup2();
+
+ int numkids;
+ int activekid;
+ float tabheight;
+ float biggesttabmin;
+ float fontdescent;
+ float extraspacing;
+
+ uint32 _expansiondata[1];
+};
+
+#endif
diff --git a/beos/liblayout/VGroup.h b/beos/liblayout/VGroup.h
new file mode 100644
index 000000000..56be070df
--- /dev/null
+++ b/beos/liblayout/VGroup.h
@@ -0,0 +1,41 @@
+
+#ifndef _VGROUP_H
+#define _VGROUP_H
+#include "MGroup.h"
+#include <View.h>
+
+#if __POWERPC__
+#pragma simple_class_byval off
+#endif
+
+class IMPEXPLIBLAYOUT VGroup : public MGroup, public BView
+{
+ public: VGroup(minimax mpm,MView *kid=0, ...);
+ VGroup(MView *kid=0, ...);
+ VGroup(BMessage*);
+ virtual ~VGroup();
+ virtual long Archive(BMessage *archive, bool deep=true) const;
+ static BArchivable *Instantiate(BMessage *archive);
+ virtual minimax layoutprefs();
+ virtual BRect layout(BRect rect);
+ virtual void AttachedToWindow();
+ virtual void DetachedFromWindow();
+ virtual void MouseDown(BPoint);
+
+ private: virtual void _expansionvgroup1();
+ virtual void _expansionvgroup2();
+ virtual void _expansionvgroup3();
+
+ static int cmpkids(const void* v1,const void *v2);
+ int *size;
+ float totalweight;
+ int numkids;
+ sortstruct *childorder;
+ MView **mkid;
+ float totalminy,totalmaxy;
+ BRect *lastrect;
+
+ uint32 _expansiondata[2];
+};
+
+#endif
diff --git a/beos/liblayout/layout-all.h b/beos/liblayout/layout-all.h
new file mode 100644
index 000000000..b2e78df10
--- /dev/null
+++ b/beos/liblayout/layout-all.h
@@ -0,0 +1,35 @@
+#include "MApplication.h"
+#include "MWindow.h"
+#include "HGroup.h"
+#include "VGroup.h"
+#include "LayeredGroup.h"
+#include "TabGroup.h"
+#include "MBViewWrapper.h"
+#include "MBorder.h"
+#include "MButton.h"
+#include "MCheckBox.h"
+#include "MDividable.h"
+#include "MDragBar.h"
+#include "MEject.h"
+#include "MFFWD.h"
+#include "MListView.h"
+#include "MMenuBar.h"
+#include "MOutlineListView.h"
+#include "MPictureButton.h"
+#include "MPlayBW.h"
+#include "MPlayFW.h"
+#include "MPopup.h"
+#include "MProgressBar.h"
+#include "MRadioGroup.h"
+#include "MRew.h"
+#include "MScrollView.h"
+#include "MSlider.h"
+#include "MSplitter.h"
+#include "MStop.h"
+#include "MStringView.h"
+#include "MTextControl.h"
+#include "MTextView.h"
+#include "MVolume.h"
+#include "PropGadget.h"
+#include "Space.h"
+#include "SpinButton.h"
diff --git a/beos/liblayout/layout.h b/beos/liblayout/layout.h
new file mode 100644
index 000000000..772b251db
--- /dev/null
+++ b/beos/liblayout/layout.h
@@ -0,0 +1,168 @@
+/*
+
+ Lowest-level classes in liblayout
+ - minimax, used to store information about minimum size, maximum size, and weigth of objects
+ - MView, a class that knows how to layout itself
+
+*/
+
+#ifndef _LAYOUT_H
+#define _LAYOUT_H
+
+#if __POWERPC__
+#pragma simple_class_byval off
+#endif
+
+#include <BeBuild.h>
+
+#if !defined(IMPEXPLIBLAYOUT) && defined(BUILDING_LIBLAYOUT)
+#define IMPEXPLIBLAYOUT _EXPORT
+#else
+#define IMPEXPLIBLAYOUT _IMPORT
+#endif
+
+#include <Rect.h>
+#include <GraphicsDefs.h>
+#include <stdlib.h>
+
+class BMessage;
+class BFont;
+
+// use macro to make code slightly more readable
+#define MVPTR(x) dynamic_cast<MView*>(x)
+
+enum fontspec
+{
+ M_PLAIN_FONT=0,
+ M_BOLD_FONT,
+ M_FIXED_FONT
+};
+
+
+// this structure is exported from liblayout, and contains the version number
+struct LAYOUT_VERSION_INFO
+{
+ uchar major;
+ uchar minor;
+ ushort patchlevel;
+};
+
+extern "C" LAYOUT_VERSION_INFO IMPEXPLIBLAYOUT LIBLAYOUT_VERSION;
+
+
+class IMPEXPLIBLAYOUT minimax // Order now, by dialing the number on your screen!
+{
+struct xypair { float x,y;};
+
+ public: xypair mini;
+ xypair maxi;
+ float weight;
+
+ minimax(int minx=0,int miny=0,
+ int maxx=10000,int maxy=10000,
+ float wght=1.0);
+};
+
+class IMPEXPLIBLAYOUT MView
+{
+ protected: rgb_color FILL_COLOR;
+ rgb_color LOW_COLOR;
+ rgb_color HI_COLOR;
+
+ // helper functions for archiving/unarchiving the MView
+ // part of MView hybrids
+ status_t archive(BMessage *);
+ status_t unarchive(BMessage *);
+
+ public: minimax mpm; // currently active minimax (calculated from ct_mpm and environmental constraints)
+ minimax ct_mpm; // size specified at construction-time
+ ulong flags; // various flags
+ // upper 16 bits are reserve for liblayout-use
+ // bits 8-15 are reserved for per-class liblayout-use
+ // bits 0-7 are available
+
+ MView();
+ virtual ~MView();
+ virtual minimax layoutprefs()=0;
+ virtual BRect layout(BRect rect)=0;
+
+ // reload the font from one of the fonts in the font-array
+ virtual void reloadfont(BFont *font[]);
+ // get a BFont with the required fontspec
+ const BFont *getfont(fontspec font);
+
+ // set the color of the MView
+ virtual void setcolor(rgb_color col, bool deep=true);
+ // this one calls the above function
+ void setcolor(uchar red, uchar green, uchar blue, bool deep=true);
+ rgb_color getcolor(); // get the base color (what is set through setcolor() )
+
+ private:
+ virtual void _expansionmview1();
+ virtual void _expansionmview2();
+ virtual void _expansionmview3();
+ virtual void _expansionmview4();
+
+ uint32 _expansiondata[4];
+};
+
+
+// constants used in messaging all start with a '!'
+#define M_POPUP_SELECTED '!pop'
+#define M_CHECKBOX_SELECTED '!chk'
+#define M_BUTTON_SELECTED '!but'
+#define M_RADIO_SELECTED '!rad'
+#define M_PLAYBW_SELECTED '!ylp'
+#define M_PLAYFW_SELECTED '!ply'
+#define M_FFWD_SELECTED '!fwd'
+#define M_REW_SELECTED '!rwd'
+#define M_STOP_SELECTED '!stp'
+#define M_VOLUME_CHANGED '!vol'
+#define M_EJECT_SELECTED '!ejt'
+#define M_PREV_SELECTED '!prv'
+#define M_NEXT_SELECTED '!nxt'
+#define M_PROGRESSBAR_CLICKED '!pbc'
+#define M_PROGRESSBAR_DRAGGED '!pbd'
+#define M_PROGRESSBAR_RELEASED '!pbr'
+#define M_ACTIVATE_LAYER '!lyr'
+
+// when sent to a window, it recalculates the entire window
+#define M_RECALCULATE_SIZE '!rsz'
+
+// font-change message is understood by MWindow and MApplication,
+// but is not generated by liblayout.
+#define M_FONT_CHANGED '!FNT'
+
+extern IMPEXPLIBLAYOUT rgb_color M_FILL_COLOR;
+extern IMPEXPLIBLAYOUT rgb_color M_LOW_COLOR;
+extern IMPEXPLIBLAYOUT rgb_color M_HI_COLOR;
+extern IMPEXPLIBLAYOUT rgb_color BLACK_COLOR;
+extern IMPEXPLIBLAYOUT rgb_color WHITE_COLOR;
+
+void IMPEXPLIBLAYOUT SetDefaultColors(uchar red, uchar green, uchar blue);
+void IMPEXPLIBLAYOUT SetDefaultColors(rgb_color cs);
+
+// misc flags
+// note that not all controls responds to all flags
+
+enum{
+ M_REPORT_IMMEDIATE= 0x00010000, // report first click on control
+ M_REPORT_REPEAT = 0x00020000, // report if control is clicked and held
+ M_REPORT_RELEASE= 0x00040000, // report release of button over control
+ M_REPORT_RELEASE_ALWAYS= 0x00080000, // always report release of button
+ M_REPORT_MASK= 0x000f0000, // all of the above
+
+ // mostly for internal use, therefore not documented (yet)
+ M_USE_CALCULATED_MINX= 0x00100000,
+ M_USE_CALCULATED_MINY= 0x00200000,
+ M_USE_CALCULATED_MAXX= 0x00400000,
+ M_USE_CALCULATED_MAXY= 0x00800000,
+ M_NO_X_LEFTOVERS= 0x01000000, // don't add "leftover" space to this object
+ M_NO_Y_LEFTOVERS= 0x02000000, // don't add "leftover" space to this object
+ M_NO_COLOR_CHANGES= 0x20000000, // don't listen to color-drop messages
+ M_NO_FONT_CHANGES= 0x40000000, // don't listen to font-change messages
+ M_USE_FULL_SIZE = (int) 0x80000000 // don't respect max-size (set for grouping classes)
+};
+
+
+#endif