diff --git a/headers/build/os/interface/Alert.h b/headers/build/os/interface/Alert.h deleted file mode 100644 index 13758a6f07..0000000000 --- a/headers/build/os/interface/Alert.h +++ /dev/null @@ -1,155 +0,0 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2001-2002, OpenBeOS -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -// DEALINGS IN THE SOFTWARE. -// -// File Name: Alert.h -// Author: Erik Jaesler (erik@cgsoftware.com) -// Description: BAlert displays a modal alert window. -//------------------------------------------------------------------------------ - -#ifndef _ALERT_H -#define _ALERT_H - -// Standard Includes ----------------------------------------------------------- - -// System Includes ------------------------------------------------------------- -#include -#include - -// Project Includes ------------------------------------------------------------ - -// Local Includes -------------------------------------------------------------- - -// Local Defines --------------------------------------------------------------- - -// Globals --------------------------------------------------------------------- - -class BBitmap; -class BButton; -class BInvoker; -class BTextView; - -// enum for flavors of alert --------------------------------------------------- -enum alert_type { - B_EMPTY_ALERT = 0, - B_INFO_ALERT, - B_IDEA_ALERT, - B_WARNING_ALERT, - B_STOP_ALERT -}; - - -enum button_spacing { - B_EVEN_SPACING = 0, - B_OFFSET_SPACING -}; - -// BAlert class ---------------------------------------------------------------- -class BAlert : public BWindow -{ -public: - - BAlert( const char *title, - const char *text, - const char *button1, - const char *button2 = NULL, - const char *button3 = NULL, - button_width width = B_WIDTH_AS_USUAL, - alert_type type = B_INFO_ALERT); - BAlert( const char *title, - const char *text, - const char *button1, - const char *button2, - const char *button3, - button_width width, - button_spacing spacing, - alert_type type = B_INFO_ALERT); -virtual ~BAlert(); - -// Archiving - BAlert(BMessage *data); -static BArchivable *Instantiate(BMessage *data); -virtual status_t Archive(BMessage *data, bool deep = true) const; - -// BAlert guts - void SetShortcut(int32 button_index, char key); - char Shortcut(int32 button_index) const; - - int32 Go(); - status_t Go(BInvoker *invoker); - -virtual void MessageReceived(BMessage *an_event); -virtual void FrameResized(float new_width, float new_height); - BButton *ButtonAt(int32 index) const; - BTextView *TextView() const; - -virtual BHandler *ResolveSpecifier(BMessage *msg, - int32 index, - BMessage *specifier, - int32 form, - const char *property); -virtual status_t GetSupportedSuites(BMessage *data); - -virtual void DispatchMessage(BMessage *msg, BHandler *handler); -virtual void Quit(); -virtual bool QuitRequested(); - -static BPoint AlertPosition(float width, float height); - -// Private or reserved --------------------------------------------------------- -virtual status_t Perform(perform_code d, void *arg); - -private: -friend class _BAlertFilter_; - -virtual void _ReservedAlert1(); -virtual void _ReservedAlert2(); -virtual void _ReservedAlert3(); - - void InitObject(const char *text, - const char *button1, - const char *button2 = NULL, - const char *button3 = NULL, - button_width width = B_WIDTH_AS_USUAL, - button_spacing spacing = B_EVEN_SPACING, - alert_type type = B_INFO_ALERT); - BBitmap *InitIcon(); - - sem_id fAlertSem; - int32 fAlertVal; - BButton *fButtons[3]; - BTextView *fTextView; - char fKeys[3]; - alert_type fMsgType; - button_width fButtonWidth; - BInvoker *fInvoker; - uint32 _reserved[4]; -}; -//------------------------------------------------------------------------------ - -#endif // _ALERT_H - -/* - * $Log $ - * - * $Id $ - * - */ - diff --git a/headers/build/os/interface/Box.h b/headers/build/os/interface/Box.h deleted file mode 100644 index 958a85e819..0000000000 --- a/headers/build/os/interface/Box.h +++ /dev/null @@ -1,126 +0,0 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2001-2002, OpenBeOS -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -// DEALINGS IN THE SOFTWARE. -// -// File Name: Box.h -// Author: Marc Flerackers (mflerackers@androme.be) -// Description: BBox objects group views together and draw a border -// around them. -//------------------------------------------------------------------------------ - -#ifndef _BOX_H -#define _BOX_H - -// Standard Includes ----------------------------------------------------------- - -// System Includes ------------------------------------------------------------- -#include -#include - -// Project Includes ------------------------------------------------------------ - -// Local Includes -------------------------------------------------------------- - -// Local Defines --------------------------------------------------------------- - -// Globals --------------------------------------------------------------------- - - -// BBox class ------------------------------------------------------------------ -class BBox : public BView { - -public: - BBox(BRect frame, - const char *name = NULL, - uint32 resizingMode = B_FOLLOW_LEFT | B_FOLLOW_TOP, - uint32 flags = B_WILL_DRAW | B_FRAME_EVENTS | - B_NAVIGABLE_JUMP, - border_style border = B_FANCY_BORDER); -virtual ~BBox(); - -/* Archiving */ - BBox(BMessage *archive); -static BArchivable *Instantiate(BMessage *archive); -virtual status_t Archive(BMessage *archive, bool deep = true) const; - -virtual void SetBorder(border_style border); - border_style Border() const; - - void SetLabel(const char *string); - status_t SetLabel(BView *viewLabel); - - const char *Label() const; - BView *LabelView() const; - -virtual void Draw(BRect updateRect); -virtual void AttachedToWindow(); -virtual void DetachedFromWindow(); -virtual void AllAttached(); -virtual void AllDetached(); -virtual void FrameResized(float width, float height); -virtual void MessageReceived(BMessage *message); -virtual void MouseDown(BPoint point); -virtual void MouseUp(BPoint point); -virtual void WindowActivated(bool active); -virtual void MouseMoved(BPoint point, uint32 transit, - const BMessage *message); -virtual void FrameMoved(BPoint newLocation); - -virtual BHandler *ResolveSpecifier(BMessage *message, - int32 index, - BMessage *specifier, - int32 what, - const char *property); - -virtual void ResizeToPreferred(); -virtual void GetPreferredSize(float *width, float *height); -virtual void MakeFocus(bool focused = true); -virtual status_t GetSupportedSuites(BMessage *message); - -virtual status_t Perform(perform_code d, void *arg); - -private: - -virtual void _ReservedBox1(); -virtual void _ReservedBox2(); - - BBox &operator=(const BBox &); - - void InitObject(BMessage *data = NULL); - void DrawPlain(); - void DrawFancy(); - void ClearAnyLabel(); - - char *fLabel; - BRect fBounds; - border_style fStyle; - BView *fLabelView; - uint32 _reserved[1]; -}; -//------------------------------------------------------------------------------ - -#endif // _BOX_H - -/* - * $Log $ - * - * $Id $ - * - */ diff --git a/headers/build/os/interface/Button.h b/headers/build/os/interface/Button.h deleted file mode 100644 index af1c9f76bc..0000000000 --- a/headers/build/os/interface/Button.h +++ /dev/null @@ -1,122 +0,0 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2001-2002, OpenBeOS -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -// DEALINGS IN THE SOFTWARE. -// -// File Name: Button.h -// Author: Marc Flerackers (mflerackers@androme.be) -// Description: BButton displays and controls a button in a window. -//------------------------------------------------------------------------------ - -#ifndef _BUTTON_H -#define _BUTTON_H - -// Standard Includes ----------------------------------------------------------- - -// System Includes ------------------------------------------------------------- -#include -#include - -// Project Includes ------------------------------------------------------------ - -// Local Includes -------------------------------------------------------------- - -// Local Defines --------------------------------------------------------------- - -// Globals --------------------------------------------------------------------- - - -// BButton class --------------------------------------------------------------- -class BButton : public BControl { - -public: - BButton(BRect frame, - const char *name, - const char *label, - BMessage *message, - uint32 resizingMode = B_FOLLOW_LEFT | B_FOLLOW_TOP, - uint32 flags = B_WILL_DRAW | B_NAVIGABLE); - -virtual ~BButton(); - - BButton(BMessage *archive); - -static BArchivable *Instantiate(BMessage *archive); -virtual status_t Archive (BMessage *archive, bool deep = true) const; - -virtual void Draw(BRect updateRect); -virtual void MouseDown(BPoint point); -virtual void AttachedToWindow(); -virtual void KeyDown(const char *bytes, int32 numBytes); -virtual void MakeDefault(bool flag); -virtual void SetLabel(const char *string); - bool IsDefault() const; - -virtual void MessageReceived(BMessage *message); -virtual void WindowActivated(bool active); -virtual void MouseMoved(BPoint point, uint32 transit, const BMessage *message); -virtual void MouseUp(BPoint point); -virtual void DetachedFromWindow(); -virtual void SetValue(int32 value); -virtual void GetPreferredSize (float *width, float *height); -virtual void ResizeToPreferred(); -virtual status_t Invoke(BMessage *message = NULL); -virtual void FrameMoved(BPoint newLocation); -virtual void FrameResized(float width, float height); - -virtual void MakeFocus(bool focused = true); -virtual void AllAttached(); -virtual void AllDetached(); - -virtual BHandler *ResolveSpecifier(BMessage *message, - int32 index, - BMessage *specifier, - int32 what, - const char *property); -virtual status_t GetSupportedSuites(BMessage *message); -virtual status_t Perform(perform_code d, void *arg); - -private: - -virtual void _ReservedButton1(); -virtual void _ReservedButton2(); -virtual void _ReservedButton3(); - - BButton &operator=(const BButton &); - - BRect DrawDefault(BRect bounds, bool enabled); - void DrawFocusLine(float x, float y, float width, - bool bVisible); - - status_t Execute (); - - float fCachedWidth; - bool fDrawAsDefault; - uint32 _reserved[3]; -}; -//------------------------------------------------------------------------------ - -#endif // _BUTTON_H - -/* - * $Log $ - * - * $Id $ - * - */ diff --git a/headers/build/os/interface/ChannelControl.h b/headers/build/os/interface/ChannelControl.h deleted file mode 100644 index d310bbbe80..0000000000 --- a/headers/build/os/interface/ChannelControl.h +++ /dev/null @@ -1,221 +0,0 @@ -/******************************************************************************* -/ -/ File: ChannelControl.h -/ -/ Description: BChannelControl is the base class for controls that -/ have several independent values, with minima and maxima. -/ -/ Copyright 1998-99, Be Incorporated, All Rights Reserved -/ -*******************************************************************************/ - -#if !defined(_CHANNEL_CONTROL_H) -#define _CHANNEL_CONTROL_H - -#include -#include - -class BChannelControl : - public BControl -{ -public: - BChannelControl( - BRect frame, - const char * name, - const char * label, - BMessage * model, - int32 channel_count = 1, - uint32 resize = B_FOLLOW_LEFT | B_FOLLOW_TOP, - uint32 flags = B_WILL_DRAW); - BChannelControl( - BMessage * from); -virtual ~BChannelControl(); -virtual status_t Archive( - BMessage * into, - bool deep = true) const; - -virtual void Draw( - BRect area) = 0; -virtual void MouseDown( - BPoint where) = 0; -virtual void KeyDown( - const char * bytes, - int32 size) = 0; - -virtual void FrameResized( - float width, - float height); -virtual void SetFont( - const BFont * font, - uint32 mask = B_FONT_ALL); - -virtual void AttachedToWindow(); -virtual void DetachedFromWindow(); -virtual void ResizeToPreferred(); -virtual void GetPreferredSize( - float * width, - float * height) = 0; -virtual void MessageReceived( - BMessage * message); - -virtual BHandler *ResolveSpecifier(BMessage *msg, - int32 index, - BMessage *specifier, - int32 form, - const char *property); -virtual status_t GetSupportedSuites(BMessage *data); - -virtual void SetModificationMessage( - BMessage *message); - BMessage *ModificationMessage() const; - -virtual status_t Invoke(BMessage *msg = NULL); - -// Perform a full-fledged channel invocation. These methods are -// just like Invoke() and InvokeNotify(), but include information -// about all of the channels in the control. -virtual status_t InvokeChannel(BMessage *msg = NULL, - int32 from_channel = 0, - int32 channel_count = -1, - const bool* in_mask = NULL); - status_t InvokeNotifyChannel(BMessage *msg = NULL, - uint32 kind = B_CONTROL_INVOKED, - int32 from_channel = 0, - int32 channel_count = -1, - const bool* in_mask = NULL); - -virtual void SetValue( /* SetCurrentChannel() determines which channel */ - int32 value); -virtual status_t SetCurrentChannel( - int32 channel); - int32 CurrentChannel() const; - -virtual int32 CountChannels() const; -virtual int32 MaxChannelCount() const = 0; -virtual status_t SetChannelCount( - int32 channel_count); - int32 ValueFor( - int32 channel) const; -virtual int32 GetValue( - int32 * out_values, - int32 from_channel, - int32 channel_count) const; - status_t SetValueFor( - int32 channel, - int32 value); -virtual status_t SetValue( - int32 from_channel, - int32 channel_count, - const int32 * in_values); - status_t SetAllValue( - int32 values); - status_t SetLimitsFor( - int32 channel, - int32 minimum, - int32 maximum); - status_t GetLimitsFor( - int32 channel, - int32 * minimum, - int32 * maximum) const ; -virtual status_t SetLimitsFor( - int32 from_channel, - int32 channel_count, - const int32 * minimum, - const int32 * maximum); -virtual status_t GetLimitsFor( - int32 from_channel, - int32 channel_count, - int32 * minimum, - int32 * maximum) const; - status_t SetLimits( - int32 minimum, - int32 maximum); - status_t GetLimits( - int32 * outMinimum, - int32 * outMaximum) const; - -virtual bool SupportsIndividualLimits() const = 0; -virtual status_t SetLimitLabels( - const char * min_label, - const char * max_label); - const char * MinLimitLabel() const; - const char * MaxLimitLabel() const; -virtual status_t SetLimitLabelsFor( - int32 channel, - const char * minLabel, - const char * maxLabel); -virtual status_t SetLimitLabelsFor( - int32 from_channel, - int32 channel_count, - const char * minLabel, - const char * maxLabel); - const char * MinLimitLabelFor( - int32 channel) const; - const char * MaxLimitLabelFor( - int32 channel) const; -private: - - BChannelControl( /* unimplemented */ - const BChannelControl &); - BChannelControl & operator=( /* unimplemented */ - const BChannelControl &); -virtual void _Reserverd_ChannelControl_0(void *, ...); -virtual void _Reserverd_ChannelControl_1(void *, ...); -virtual void _Reserverd_ChannelControl_2(void *, ...); -virtual void _Reserverd_ChannelControl_3(void *, ...); -virtual void _Reserverd_ChannelControl_4(void *, ...); -virtual void _Reserverd_ChannelControl_5(void *, ...); -virtual void _Reserverd_ChannelControl_6(void *, ...); -virtual void _Reserverd_ChannelControl_7(void *, ...); -virtual void _Reserverd_ChannelControl_8(void *, ...); -virtual void _Reserverd_ChannelControl_9(void *, ...); -virtual void _Reserverd_ChannelControl_10(void *, ...); -virtual void _Reserverd_ChannelControl_11(void *, ...); - -protected: - - inline int32 * const & MinLimitList() const; - inline int32 * const & MaxLimitList() const; - inline int32 * const & ValueList() const; - -private: - - int32 fChannelCount; - int32 fCurrentChannel; - int32 * fChannelMin; - int32 * fChannelMax; - int32 * fChannelValues; - - BString fMinLabel; - BString fMaxLabel; - - void * fMultiLabels; - - BMessage * fModificationMsg; - - uint32 _reserved_[15]; - - status_t StuffValues( - int32 from_channel, - int32 channel_count, - const int32 * in_values); -}; - -inline int32 * const & BChannelControl::MinLimitList() const -{ - return fChannelMin; -} - -inline int32 * const & BChannelControl::MaxLimitList() const -{ - return fChannelMax; -} - -inline int32 * const & BChannelControl::ValueList() const -{ - return fChannelValues; -} - - -#endif /* _CHANNEL_CONTROL_H */ - diff --git a/headers/build/os/interface/ChannelSlider.h b/headers/build/os/interface/ChannelSlider.h deleted file mode 100644 index 3f6a14e6aa..0000000000 --- a/headers/build/os/interface/ChannelSlider.h +++ /dev/null @@ -1,158 +0,0 @@ -/******************************************************************************* -/ -/ File: ChannelSlider.h -/ -/ Description: BChannelSlider implements a slider which can have a number -/ of (on-screen) related values. A typical use is for a stereo -/ volume control. -/ -/ Copyright 1998-99, Be Incorporated, All Rights Reserved -/ -*******************************************************************************/ - -#if !defined(_CHANNEL_SLIDER_H) -#define _CHANNEL_SLIDER_H - -#include - -class BChannelSlider : - public BChannelControl -{ -public: - BChannelSlider( - BRect area, - const char * name, - const char * label, - BMessage * model, - int32 channels = 1, - uint32 resize = B_FOLLOW_LEFT | B_FOLLOW_TOP, - uint32 flags = B_WILL_DRAW); - BChannelSlider( - BRect area, - const char * name, - const char * label, - BMessage * model, - orientation o, - int32 channels = 1, - uint32 resize = B_FOLLOW_LEFT | B_FOLLOW_TOP, - uint32 flags = B_WILL_DRAW); - BChannelSlider( - BMessage * from); -virtual ~BChannelSlider(); - -static BArchivable * Instantiate(BMessage * from); -virtual status_t Archive(BMessage * into, bool deep = true) const; - -virtual orientation Orientation() const; - void SetOrientation(orientation o); - -virtual int32 MaxChannelCount() const; -virtual bool SupportsIndividualLimits() const; - -virtual void AttachedToWindow(); -virtual void AllAttached(); -virtual void DetachedFromWindow(); -virtual void AllDetached(); - -virtual void MessageReceived(BMessage *msg); - -virtual void Draw(BRect area); -virtual void MouseDown(BPoint where); -virtual void MouseUp(BPoint pt); -virtual void MouseMoved( BPoint pt, - uint32 code, - const BMessage * message); -virtual void WindowActivated(bool state); -virtual void KeyDown(const char *bytes, int32 numBytes); -virtual void KeyUp(const char *bytes, int32 numBytes); -virtual void FrameResized(float width, float height); - -virtual void SetFont(const BFont *font, uint32 mask = B_FONT_ALL); -virtual void MakeFocus(bool focusState = true); - -virtual void SetEnabled(bool on); - -virtual void GetPreferredSize(float *width, float *height); - -virtual BHandler *ResolveSpecifier(BMessage *msg, - int32 index, - BMessage *specifier, - int32 form, - const char *property); -virtual status_t GetSupportedSuites(BMessage *data); - -// Perform rendering for an entire slider channel. -virtual void DrawChannel(BView* into, - int32 channel, - BRect area, - bool pressed); - -// Draw the groove that appears behind a channel's thumb. -virtual void DrawGroove( BView* into, - int32 channel, - BPoint tl, - BPoint br); - -// Draw the thumb for a single channel. -virtual void DrawThumb( BView* into, - int32 channel, - BPoint where, - bool pressed ); - -virtual const BBitmap * ThumbFor(int32 channel, bool pressed); -virtual BRect ThumbFrameFor(int32 channel); -virtual float ThumbDeltaFor(int32 channel); -virtual float ThumbRangeFor(int32 channel); - -private: - typedef BChannelControl inherited; - - BChannelSlider( /* unimplemented */ - const BChannelSlider &); - BChannelSlider& operator=( /* unimplemented */ - const BChannelSlider &); - - -virtual void _Reserved_BChannelSlider_0(void *, ...); -virtual void _Reserved_BChannelSlider_1(void *, ...); -virtual void _Reserved_BChannelSlider_2(void *, ...); -virtual void _Reserved_BChannelSlider_3(void *, ...); -virtual void _Reserved_BChannelSlider_4(void *, ...); -virtual void _Reserved_BChannelSlider_5(void *, ...); -virtual void _Reserved_BChannelSlider_6(void *, ...); -virtual void _Reserved_BChannelSlider_7(void *, ...); - - float fBaseLine; - float fLineFeed; - BBitmap * fLeftKnob; - BBitmap * fMidKnob; - BBitmap * fRightKnob; - BBitmap * fBacking; - BView * fBackingView; - bool fVertical; - bool fPadding[3]; - BPoint fClickDelta; - - int32 fCurrentChannel; - bool fAllChannels; - int32* fInitialValues; - float fMinpoint; - int32 fFocusChannel; - - uint32 _reserved_[12]; - - void InitData(); - - void FinishChange(); - void UpdateFontDimens(); - void DrawThumbs(); - void DrawThumbFrame( - BView * where, - const BRect & area); - bool Vertical() const; - void Redraw(); - void MouseMovedCommon(BPoint , BPoint ); -}; - - -#endif /* _CHANNEL_SLIDER_H */ diff --git a/headers/build/os/interface/CheckBox.h b/headers/build/os/interface/CheckBox.h deleted file mode 100644 index c591313306..0000000000 --- a/headers/build/os/interface/CheckBox.h +++ /dev/null @@ -1,113 +0,0 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2001-2002, OpenBeOS -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -// DEALINGS IN THE SOFTWARE. -// -// File Name: CheckBox.h -// Author: Marc Flerackers (mflerackers@androme.be) -// Description: BCheckBox displays an on/off control. -//------------------------------------------------------------------------------ - -#ifndef _CHECK_BOX_H -#define _CHECK_BOX_H - -// Standard Includes ----------------------------------------------------------- - -// System Includes ------------------------------------------------------------- -#include -#include -// Project Includes ------------------------------------------------------------ - -// Local Includes -------------------------------------------------------------- - -// Local Defines --------------------------------------------------------------- - -// Globals --------------------------------------------------------------------- - - -// BCheckBox class ------------------------------------------------------------- -class BCheckBox : public BControl { - -public: - BCheckBox(BRect frame, - const char *name, - const char *label, - BMessage *message, - uint32 resizingMode = B_FOLLOW_LEFT | B_FOLLOW_TOP, - uint32 flags = B_WILL_DRAW | B_NAVIGABLE); -virtual ~BCheckBox(); - -/* Archiving */ - BCheckBox(BMessage *archive); -static BArchivable *Instantiate(BMessage *archive); -virtual status_t Archive(BMessage *archive, bool deep = true) const; - -virtual void Draw(BRect updateRect); -virtual void AttachedToWindow(); -virtual void MouseDown(BPoint point); - -virtual void MessageReceived(BMessage *message); -virtual void WindowActivated(bool active); -virtual void KeyDown(const char *bytes, int32 numBytes); -virtual void MouseUp(BPoint point); -virtual void MouseMoved(BPoint point, uint32 transit, const BMessage *message); -virtual void DetachedFromWindow(); -virtual void SetValue(int32 value); -virtual void GetPreferredSize(float *width, float *height); -virtual void ResizeToPreferred(); -virtual status_t Invoke(BMessage *message = NULL); -virtual void FrameMoved(BPoint newLocation); -virtual void FrameResized(float width, float height); - -virtual BHandler *ResolveSpecifier(BMessage *message, - int32 index, - BMessage *specifier, - int32 what, - const char *property); -virtual status_t GetSupportedSuites(BMessage *message); - -virtual void MakeFocus(bool focused = true); -virtual void AllAttached(); -virtual void AllDetached(); - -virtual status_t Perform(perform_code d, void *arg); - -private: - -virtual void _ReservedCheckBox1(); -virtual void _ReservedCheckBox2(); -virtual void _ReservedCheckBox3(); - - BRect _CheckBoxFrame() const; - - BCheckBox &operator=(const BCheckBox &); - - bool fOutlined; - uint32 _reserved[2]; -}; -//------------------------------------------------------------------------------ - -#endif // _CHECK_BOX_H - -/* - * $Log $ - * - * $Id $ - * - */ diff --git a/headers/build/os/interface/ColorControl.h b/headers/build/os/interface/ColorControl.h deleted file mode 100644 index c5b0cc5af8..0000000000 --- a/headers/build/os/interface/ColorControl.h +++ /dev/null @@ -1,169 +0,0 @@ -/******************************************************************************* -/ -/ File: ColorControl.h -/ -/ Description: BColorControl displays a palette of selectable colors. -/ -/ Copyright 1996-98, Be Incorporated, All Rights Reserved -/ -*******************************************************************************/ - - -#ifndef _COLOR_CONTROL_H -#define _COLOR_CONTROL_H - -#include -#include - -class BBitmap; - -/*------------------------------------------------------------*/ -/*----- layout options for the color control -----------------*/ - -enum color_control_layout { - B_CELLS_4x64 = 4, - B_CELLS_8x32 = 8, - B_CELLS_16x16 = 16, - B_CELLS_32x8 = 32, - B_CELLS_64x4 = 64 -}; - -class BTextControl; - -/*----------------------------------------------------------------*/ -/*----- BColorControl class --------------------------------------*/ - -class BColorControl : public BControl { -public: - BColorControl( BPoint start, - color_control_layout layout, - float cell_size, - const char *name, - BMessage *message = NULL, - bool use_offscreen = false); -virtual ~BColorControl(); - - BColorControl(BMessage *data); -static BArchivable *Instantiate(BMessage *data); -virtual status_t Archive(BMessage *data, bool deep = true) const; - -virtual void SetValue(int32 color_value); - void SetValue(rgb_color color); - rgb_color ValueAsColor(); - -virtual void SetEnabled(bool state); - -virtual void AttachedToWindow(); -virtual void MessageReceived(BMessage *msg); -virtual void Draw(BRect updateRect); -virtual void MouseDown(BPoint where); -virtual void KeyDown(const char *bytes, int32 numBytes); - -virtual void SetCellSize(float size); - float CellSize() const; -virtual void SetLayout(color_control_layout layout); - color_control_layout Layout() const; - -virtual void WindowActivated(bool state); -virtual void MouseUp(BPoint pt); -virtual void MouseMoved(BPoint pt, uint32 code, const BMessage *msg); -virtual void DetachedFromWindow(); -virtual void GetPreferredSize(float *width, float *height); -virtual void ResizeToPreferred(); -virtual status_t Invoke(BMessage *msg = NULL); -virtual void FrameMoved(BPoint new_position); -virtual void FrameResized(float new_width, float new_height); - -virtual BHandler *ResolveSpecifier(BMessage *msg, - int32 index, - BMessage *specifier, - int32 form, - const char *property); -virtual status_t GetSupportedSuites(BMessage *data); - -virtual void MakeFocus(bool state = true); -virtual void AllAttached(); -virtual void AllDetached(); - - -/*----- Private or reserved -----------------------------------------*/ -virtual status_t Perform(perform_code d, void *arg); - -private: - -virtual void _ReservedColorControl1(); -virtual void _ReservedColorControl2(); -virtual void _ReservedColorControl3(); -virtual void _ReservedColorControl4(); - - BColorControl &operator=(const BColorControl &); - - void LayoutView(bool calc_frame); - void UpdateOffscreen(); - void UpdateOffscreen(BRect update); - void DrawColorArea(BView *target, BRect update); - void ColorRamp( BRect r, - BRect where, - BView *target, - rgb_color c, - int16 flag, - bool focused); - void KbAdjustColor(uint32 key); - bool key_down32(uint32 key); - bool key_down8(uint32 key); -static BRect CalcFrame( BPoint start, - color_control_layout layout, - int32 size); - void InitData( color_control_layout layout, - float size, - bool use_offscreen, - BMessage *data = NULL); - void DoMouseMoved(BPoint pt); - void DoMouseUp(BPoint pt); - - float fCellSize; - int32 fRows; - int32 fColumns; - - struct track_state { - int32 orig_color; - int32 cur_color; - int32 prev_color; - int32 bar_index; - BRect active_area; - BRect r; - rgb_color rgb; - color_space cspace; - }; - - BTextControl *fRedText; - BTextControl *fGreenText; - BTextControl *fBlueText; - BBitmap *fBitmap; - BView *fOffscreenView; - color_space fLastMode; - float fRound; - int32 fFocusedComponent; - int32 fCachedIndex; - uint32 _reserved[3]; - track_state *fTState; - bool fUnused; // fTracking; - bool fFocused; - bool fRetainCache; - bool fFastSet; -}; - -/*------------------------------------------------------------*/ -/*----- inline functions -------------------------------------*/ - -inline void BColorControl::SetValue(rgb_color color) -{ - /* OK, no private parts */ - int32 c = (color.red << 24) + (color.green << 16) + (color.blue << 8); - SetValue(c); -} - -/*-------------------------------------------------------------*/ -/*-------------------------------------------------------------*/ - -#endif /* _COLOR_CONTROL_H */ diff --git a/headers/build/os/interface/ColorUtils.h b/headers/build/os/interface/ColorUtils.h deleted file mode 100644 index 5be9db4fab..0000000000 --- a/headers/build/os/interface/ColorUtils.h +++ /dev/null @@ -1,44 +0,0 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2001-2002, OpenBeOS -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -// DEALINGS IN THE SOFTWARE. -// -// File Name: ColorUtils.h -// Author: DarkWyrm -// Description: Miscellaneous useful functions for working with colors -// -// -//------------------------------------------------------------------------------ -#ifndef COLORUTILS_H_ -#define COLORUTILS_H_ - -#include - -void SetRGBColor(rgb_color *col,uint8 r, uint8 g, uint8 b, uint8 a=255); -void SetRGBColor15(rgb_color *col,uint16 color); -void SetRGBColor16(rgb_color *col,uint16 color); -void SetRGBColor(rgb_color *col,uint32 color); - -uint8 FindClosestColor(const rgb_color *palette, rgb_color color); -uint16 FindClosestColor15(rgb_color color); -uint16 FindClosestColor16(rgb_color color); - -rgb_color MakeBlendColor(rgb_color col, rgb_color col2, float position); - -#endif diff --git a/headers/build/os/interface/Control.h b/headers/build/os/interface/Control.h deleted file mode 100644 index e1cabca6a3..0000000000 --- a/headers/build/os/interface/Control.h +++ /dev/null @@ -1,140 +0,0 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2001-2002, OpenBeOS -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -// DEALINGS IN THE SOFTWARE. -// -// File Name: Control.h -// Author: Marc Flerackers (mflerackers@androme.be) -// Description: BControl is the base class for user-event handling objects. -//------------------------------------------------------------------------------ - -#ifndef _CONTROL_H -#define _CONTROL_H - -// Standard Includes ----------------------------------------------------------- - -// System Includes ------------------------------------------------------------- -#include -#include -#include /* For convenience */ -#include - -// Project Includes ------------------------------------------------------------ - -// Local Includes -------------------------------------------------------------- - -// Local Defines --------------------------------------------------------------- -enum { - B_CONTROL_OFF = 0, - B_CONTROL_ON = 1 -}; - -// Globals --------------------------------------------------------------------- - - -class BWindow; - -// BControl class -------------------------------------------------------------- -class BControl : public BView, public BInvoker { - -public: - BControl(BRect frame, - const char *name, - const char *label, - BMessage *message, - uint32 resizingMode, - uint32 flags); -virtual ~BControl(); - - BControl(BMessage *archive); -static BArchivable *Instantiate(BMessage *archive); -virtual status_t Archive(BMessage *archive, bool deep = true) const; - -virtual void WindowActivated(bool active); -virtual void AttachedToWindow(); -virtual void MessageReceived(BMessage *message); -virtual void MakeFocus(bool focused = true); -virtual void KeyDown(const char *bytes, int32 numBytes); -virtual void MouseDown(BPoint point); -virtual void MouseUp(BPoint point); -virtual void MouseMoved(BPoint point, uint32 transit, const BMessage *message); -virtual void DetachedFromWindow(); - -virtual void SetLabel(const char *string); - const char *Label() const; - -virtual void SetValue(int32 value); - int32 Value() const; - -virtual void SetEnabled(bool enabled); - bool IsEnabled() const; - -virtual void GetPreferredSize(float *width, float *height); -virtual void ResizeToPreferred(); - -virtual status_t Invoke(BMessage *message = NULL); -virtual BHandler *ResolveSpecifier(BMessage *message, - int32 index, - BMessage *specifier, - int32 what, - const char *property); -virtual status_t GetSupportedSuites(BMessage *message); - -virtual void AllAttached(); -virtual void AllDetached(); - -virtual status_t Perform(perform_code d, void *arg); - -protected: - - bool IsFocusChanging() const; - bool IsTracking() const; - void SetTracking(bool state); - - void SetValueNoUpdate(int32 value); - -private: - -virtual void _ReservedControl1(); -virtual void _ReservedControl2(); -virtual void _ReservedControl3(); -virtual void _ReservedControl4(); - - BControl &operator=(const BControl &); - - void InitData(BMessage *data = NULL); - - char *fLabel; - int32 fValue; - bool fEnabled; - bool fFocusChanging; - bool fTracking; - bool fWantsNav; - uint32 _reserved[4]; -}; -//------------------------------------------------------------------------------ - -#endif // _CONTROL_H - -/* - * $Log $ - * - * $Id $ - * - */ diff --git a/headers/build/os/interface/Deskbar.h b/headers/build/os/interface/Deskbar.h deleted file mode 100644 index 9e5919c277..0000000000 --- a/headers/build/os/interface/Deskbar.h +++ /dev/null @@ -1,93 +0,0 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2001-2002, OpenBeOS -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -// DEALINGS IN THE SOFTWARE. -// -// File Name: Deskbar.h -// Author: Jeremy Rand (jrand@magma.ca) -// Description: BDeskbar allows one to control the deskbar from an -// application. -//------------------------------------------------------------------------------ - -#ifndef _DESKBAR_H -#define _DESKBAR_H - -// Standard Includes ----------------------------------------------------------- - -// System Includes ------------------------------------------------------------- -#include -#include - -// Project Includes ------------------------------------------------------------ - -// Local Includes -------------------------------------------------------------- - -// Local Defines --------------------------------------------------------------- - -// Globals --------------------------------------------------------------------- - -class BMessenger; -class BView; - -// enum for deskbar locations -------------------------------------------------- -enum deskbar_location { - B_DESKBAR_TOP, - B_DESKBAR_BOTTOM, - B_DESKBAR_LEFT_TOP, - B_DESKBAR_RIGHT_TOP, - B_DESKBAR_LEFT_BOTTOM, - B_DESKBAR_RIGHT_BOTTOM -}; - - -// BDeskbar class ------------------------------------------------------------- -class BDeskbar -{ -public: - BDeskbar(); - ~BDeskbar(); - -// Location member functions - BRect Frame(void) const; - deskbar_location Location(bool *isExpanded = NULL) const; - status_t SetLocation(deskbar_location location, bool expanded = false); - bool IsExpanded(void) const; - status_t Expand(bool expand); - -// Item querying member functions - status_t GetItemInfo(int32 id, const char **name) const; - status_t GetItemInfo(const char *name, int32 *id) const; - bool HasItem(int32 id) const; - bool HasItem(const char *name) const; - uint32 CountItems(void) const; - -// Item modification member functions - status_t AddItem(BView *archivableView, int32 *id = NULL); - status_t AddItem(entry_ref *addon, int32 *id = NULL); - status_t RemoveItem(int32 id); - status_t RemoveItem(const char *name); - -private: - BMessenger *fMessenger; - uint32 _reserved[12]; -}; -//------------------------------------------------------------------------------ - -#endif // _DESKBAR_H - diff --git a/headers/build/os/interface/Dragger.h b/headers/build/os/interface/Dragger.h deleted file mode 100644 index 8dff6e04d6..0000000000 --- a/headers/build/os/interface/Dragger.h +++ /dev/null @@ -1,126 +0,0 @@ -/******************************************************************************* -/ -/ File: Dragger.h -/ -/ Description: BDragger represents a replicant "handle." -/ -/ Copyright 1997-98, Be Incorporated, All Rights Reserved -/ -*******************************************************************************/ - -#ifndef _DRAGGER_H -#define _DRAGGER_H - -#include -#include -#include -#include - -class BBitmap; -class BMessage; -class BShelf; - -/*----------------------------------------------------------------*/ -/*----- BDragger class -------------------------------------------*/ - -class BDragger : public BView { -public: - BDragger(BRect bounds, - BView *target, - uint32 rmask = B_FOLLOW_NONE, - uint32 flags = B_WILL_DRAW); - BDragger(BMessage *data); - -virtual ~BDragger(); -static BArchivable *Instantiate(BMessage *data); -virtual status_t Archive(BMessage *data, bool deep = true) const; - -virtual void AttachedToWindow(); -virtual void DetachedFromWindow(); -virtual void Draw(BRect update); -virtual void MouseDown(BPoint where); -virtual void MouseUp(BPoint pt); -virtual void MouseMoved(BPoint pt, uint32 code, const BMessage *msg); -virtual void MessageReceived(BMessage *msg); -virtual void FrameMoved(BPoint new_position); -virtual void FrameResized(float new_width, float new_height); - -static status_t ShowAllDraggers(); /* system wide!*/ -static status_t HideAllDraggers(); /* system wide!*/ -static bool AreDraggersDrawn(); - -virtual BHandler *ResolveSpecifier(BMessage *msg, - int32 index, - BMessage *specifier, - int32 form, - const char *property); -virtual status_t GetSupportedSuites(BMessage *data); -virtual status_t Perform(perform_code d, void *arg); - -virtual void ResizeToPreferred(); -virtual void GetPreferredSize(float *width, float *height); -virtual void MakeFocus(bool state = true); -virtual void AllAttached(); -virtual void AllDetached(); - - status_t SetPopUp(BPopUpMenu *context_menu); - BPopUpMenu *PopUp() const; - - bool InShelf() const; - BView *Target() const; - -virtual BBitmap *DragBitmap(BPoint *offset, drawing_mode *mode); - -protected: - bool IsVisibilityChanging() const; - -/*----- Private or reserved -----------------------------------------*/ -private: - -friend class _TContainerViewFilter_; -friend class _rep_data_; -friend class BShelf; -friend void _toggle_handles_(bool); - -//+virtual void _ReservedDragger1(); -virtual void _ReservedDragger2(); -virtual void _ReservedDragger3(); -virtual void _ReservedDragger4(); - - BDragger &operator=(const BDragger &); - - void ListManage(bool); - status_t determine_relationship(); - status_t SetViewToDrag(BView *target); - void SetShelf(BShelf *); - void SetZombied(bool state); - void BuildDefaultPopUp(); - void ShowPopUp(BView *target, BPoint where); -static bool sVisible; -static bool sInited; -static BLocker sLock; -static BList sList; - - enum relation { - TARGET_UNKNOWN, - TARGET_IS_CHILD, - TARGET_IS_PARENT, - TARGET_IS_SIBLING - }; - - BView *fTarget; - relation fRelation; - BShelf *fShelf; - bool fTransition; - bool fIsZombie; - char fErrCount; - bool _unused2; - BBitmap *fBitmap; - BPopUpMenu *fPopUp; - uint32 _reserved[3]; /* was 4 */ -}; - -/*-------------------------------------------------------------*/ -/*-------------------------------------------------------------*/ - -#endif /* _DRAGGER_H */ diff --git a/headers/build/os/interface/Font.h b/headers/build/os/interface/Font.h deleted file mode 100644 index e94831e522..0000000000 --- a/headers/build/os/interface/Font.h +++ /dev/null @@ -1,358 +0,0 @@ -#ifndef _FONT_H_ -#define _FONT_H_ - -#include -#include -#include - -/*----------------------------------------------------------------*/ -/*----- BFont defines and structures -----------------------------*/ - -#define B_FONT_FAMILY_LENGTH 63 -typedef char font_family[B_FONT_FAMILY_LENGTH + 1]; -#define B_FONT_STYLE_LENGTH 63 -typedef char font_style[B_FONT_STYLE_LENGTH + 1]; - -enum { - B_CHAR_SPACING = 0, - B_STRING_SPACING = 1, - B_BITMAP_SPACING = 2, - B_FIXED_SPACING = 3 -}; - -enum font_direction { - B_FONT_LEFT_TO_RIGHT = 0, - B_FONT_RIGHT_TO_LEFT = 1 -}; - -enum { - B_DISABLE_ANTIALIASING = 0x00000001, - B_FORCE_ANTIALIASING = 0x00000002 -}; - -enum { - B_TRUNCATE_END = 0, - B_TRUNCATE_BEGINNING = 1, - B_TRUNCATE_MIDDLE = 2, - B_TRUNCATE_SMART = 3 -}; - -enum { - B_UNICODE_UTF8 = 0, - B_ISO_8859_1 = 1, - B_ISO_8859_2 = 2, - B_ISO_8859_3 = 3, - B_ISO_8859_4 = 4, - B_ISO_8859_5 = 5, - B_ISO_8859_6 = 6, - B_ISO_8859_7 = 7, - B_ISO_8859_8 = 8, - B_ISO_8859_9 = 9, - B_ISO_8859_10 = 10, - B_MACINTOSH_ROMAN = 11 -}; - -enum { - B_SCREEN_FONT_CACHE = 0x0001, - B_PRINTING_FONT_CACHE = 0x0002, - B_DEFAULT_CACHE_SETTING = 0x0004, - B_APP_CACHE_SETTING = 0x0008 -}; - -enum { - B_HAS_TUNED_FONT = 0x0001, - B_IS_FIXED = 0x0002 -}; - -enum { - B_ITALIC_FACE = 0x0001, - B_UNDERSCORE_FACE = 0x0002, - B_NEGATIVE_FACE = 0x0004, - B_OUTLINED_FACE = 0x0008, - B_STRIKEOUT_FACE = 0x0010, - B_BOLD_FACE = 0x0020, - B_REGULAR_FACE = 0x0040 -}; - -enum font_metric_mode { - B_SCREEN_METRIC = 0, - B_PRINTING_METRIC = 1 -}; - -enum font_file_format { - B_TRUETYPE_WINDOWS = 0, - B_POSTSCRIPT_TYPE1_WINDOWS = 1 -}; - -class unicode_block { -public: - inline unicode_block(); - inline unicode_block(uint64 block2, uint64 block1); - - inline bool Includes(const unicode_block &block) const; - inline unicode_block operator&(const unicode_block &block) const; - inline unicode_block operator|(const unicode_block &block) const; - inline unicode_block &operator=(const unicode_block &block); - inline bool operator==(const unicode_block &block) const; - inline bool operator!=(const unicode_block &block) const; - -private: - uint64 fData[2]; -}; - -struct edge_info { - float left; - float right; -}; - -struct font_height { - float ascent; - float descent; - float leading; -}; - -struct escapement_delta { - float nonspace; - float space; -}; - -struct font_cache_info { - int32 sheared_font_penalty; - int32 rotated_font_penalty; - float oversize_threshold; - int32 oversize_penalty; - int32 cache_size; - float spacing_size_threshold; -}; - -struct tuned_font_info { - float size; - float shear; - float rotation; - uint32 flags; - uint16 face; -}; - -class BShape; -class BString; -class BFontPrivate; - -class BFont { -public: - BFont(void); - BFont(const BFont &font); - BFont(const BFont *font); - - status_t SetFamilyAndStyle(const font_family family, - const font_style style); - void SetFamilyAndStyle(uint32 code); - status_t SetFamilyAndFace(const font_family family, uint16 face); - - void SetSize(float size); - void SetShear(float shear); - void SetRotation(float rotation); - void SetSpacing(uint8 spacing); - void SetEncoding(uint8 encoding); - void SetFace(uint16 face); - void SetFlags(uint32 flags); - - void GetFamilyAndStyle(font_family *family, - font_style *style) const; - uint32 FamilyAndStyle(void) const; - float Size(void) const; - float Shear(void) const; - float Rotation(void) const; - uint8 Spacing(void) const; - uint8 Encoding(void) const; - uint16 Face(void) const; - uint32 Flags(void) const; - - font_direction Direction(void) const; - bool IsFixed(void) const; - bool IsFullAndHalfFixed(void) const; - BRect BoundingBox(void) const; - unicode_block Blocks(void) const; - font_file_format FileFormat(void) const; - - int32 CountTuned(void) const; - void GetTunedInfo(int32 index, tuned_font_info *info) const; - - void TruncateString(BString* in_out, - uint32 mode, - float width) const; - void GetTruncatedStrings(const char *stringArray[], - int32 numStrings, - uint32 mode, - float width, - BString resultArray[]) const; - void GetTruncatedStrings(const char *stringArray[], - int32 numStrings, - uint32 mode, - float width, - char *resultArray[]) const; - - float StringWidth(const char *string) const; - float StringWidth(const char *string, int32 length) const; - void GetStringWidths(const char *stringArray[], - const int32 lengthArray[], - int32 numStrings, - float widthArray[]) const; - - void GetEscapements(const char charArray[], - int32 numChars, - float escapementArray[]) const; - void GetEscapements(const char charArray[], - int32 numChars, - escapement_delta *delta, - float escapementArray[]) const; - void GetEscapements(const char charArray[], - int32 numChars, - escapement_delta *delta, - BPoint escapementArray[]) const; - void GetEscapements(const char charArray[], - int32 numChars, - escapement_delta *delta, - BPoint escapementArray[], - BPoint offsetArray[]) const; - - void GetEdges(const char charArray[], - int32 numBytes, - edge_info edgeArray[]) const; - void GetHeight(font_height *height) const; - - void GetBoundingBoxesAsGlyphs(const char charArray[], - int32 numChars, - font_metric_mode mode, - BRect boundingBoxArray[]) const; - void GetBoundingBoxesAsString(const char charArray[], - int32 numChars, - font_metric_mode mode, - escapement_delta *delta, - BRect boundingBoxArray[]) const; - void GetBoundingBoxesForStrings(const char *stringArray[], - int32 numStrings, - font_metric_mode mode, - escapement_delta deltas[], - BRect boundingBoxArray[]) const; - - void GetGlyphShapes(const char charArray[], - int32 numChars, - BShape *glyphShapeArray[]) const; - - void GetHasGlyphs(const char charArray[], - int32 numChars, - bool hasArray[]) const; - - BFont& operator=(const BFont &font); - bool operator==(const BFont &font) const; - bool operator!=(const BFont &font) const; - - void PrintToStream(void) const; - -private: - -friend void _font_control_(BFont*, int32, void*); - - uint16 fFamilyID; - uint16 fStyleID; - float fSize; - float fShear; - float fRotation; - uint8 fSpacing; - uint8 fEncoding; - uint16 fFace; - uint32 fFlags; - font_height fHeight; - uint32 _reserved[3]; - - void SetPacket(void *packet) const; - void GetTruncatedStrings64(const char *stringArray[], - int32 numStrings, - uint32 mode, - float width, - char *resultArray[]) const; - void GetTruncatedStrings64(const char *stringArray[], - int32 numStrings, - uint32 mode, - float width, - BString resultArray[]) const; - void _GetEscapements_(const char charArray[], - int32 numChars, - escapement_delta *delta, - uint8 mode, - float *escapements, - float *offsets = NULL) const; - void _GetBoundingBoxes_(const char charArray[], - int32 numChars, - font_metric_mode mode, - bool string_escapement, - escapement_delta *delta, - BRect boundingBoxArray[]) const; -}; - -/*----------------------------------------------------------------*/ -/*----- BFont related declarations -------------------------------*/ - -extern const BFont *be_plain_font; -extern const BFont *be_bold_font; -extern const BFont *be_fixed_font; - -int32 count_font_families(void); -status_t get_font_family(int32 index, font_family *name, uint32 *flags=NULL); - -int32 count_font_styles(font_family name); -status_t get_font_style(font_family family, int32 index, font_style *name, - uint32 *flags=NULL); -status_t get_font_style(font_family family, int32 index, font_style *name, - uint16 *face, uint32 *flags=NULL); -bool update_font_families(bool check_only); - -status_t get_font_cache_info(uint32 id, void *set); -status_t set_font_cache_info(uint32 id, void *set); - -/*----------------------------------------------------------------*/ -/*----- unicode_block inlines ------------------------------------*/ - -unicode_block::unicode_block() { fData[0] = fData[1] = 0LL; } - -unicode_block::unicode_block(uint64 block2, uint64 block1) { - fData[0] = block1; - fData[1] = block2; -} - -bool unicode_block::Includes(const unicode_block &block) const { - return (((fData[0] & block.fData[0]) == block.fData[0]) && - ((fData[1] & block.fData[1]) == block.fData[1])); -} - -unicode_block unicode_block::operator&(const unicode_block &block) const { - unicode_block res; - - res.fData[0] = fData[0] & block.fData[0]; - res.fData[1] = fData[1] & block.fData[1]; - return res; -} - -unicode_block unicode_block::operator|(const unicode_block &block) const { - unicode_block res; - - res.fData[0] = fData[0] | block.fData[0]; - res.fData[1] = fData[1] | block.fData[1]; - return res; -} - -unicode_block &unicode_block::operator=(const unicode_block &block) { - fData[0] = block.fData[0]; - fData[1] = block.fData[1]; - return *this; -} - -bool unicode_block::operator==(const unicode_block &block) const { - return ((fData[0] == block.fData[0]) && (fData[1] == block.fData[1])); -} - -bool unicode_block::operator!=(const unicode_block &block) const { - return ((fData[0] != block.fData[0]) || (fData[1] != block.fData[1])); -} - -#endif diff --git a/headers/build/os/interface/Input.h b/headers/build/os/interface/Input.h deleted file mode 100644 index 263a94d2f0..0000000000 --- a/headers/build/os/interface/Input.h +++ /dev/null @@ -1,88 +0,0 @@ -/****************************************************************************** -/ -/ File: Input.h -/ -/ Description: Functions and class to manage input devices. -/ -/ Copyright 1998, Be Incorporated, All Rights Reserved. -/ -******************************************************************************/ - -#ifndef _INPUT_H -#define _INPUT_H - -#include -#include -#include - - -enum input_method_op { - B_INPUT_METHOD_STARTED = 0, - B_INPUT_METHOD_STOPPED = 1, - B_INPUT_METHOD_CHANGED = 2, - B_INPUT_METHOD_LOCATION_REQUEST = 3 -}; - - -enum input_device_type { - B_POINTING_DEVICE = 0, - B_KEYBOARD_DEVICE = 1, - B_UNDEFINED_DEVICE = 2 -}; - -/* - what == B_INPUT_DEVICES_CHANGED - FindString("name", name_of_device); - FindInt32("opcode", input_device_notification); -*/ - -enum input_device_notification { - B_INPUT_DEVICE_ADDED = 0x0001, - B_INPUT_DEVICE_STARTED = 0x0002, - B_INPUT_DEVICE_STOPPED = 0x0004, - B_INPUT_DEVICE_REMOVED = 0x0008 -}; - - -class BInputDevice; - - -_IMPEXP_BE BInputDevice* find_input_device(const char *name); -_IMPEXP_BE status_t get_input_devices(BList *list); -_IMPEXP_BE status_t watch_input_devices(BMessenger target, bool start); - - -class BInputDevice { -public: - ~BInputDevice(); - - const char* Name() const; - input_device_type Type() const; - bool IsRunning() const; - - status_t Start(); - status_t Stop(); - status_t Control(uint32 code, - BMessage *message); - - static status_t Start(input_device_type type); - static status_t Stop(input_device_type type); - static status_t Control(input_device_type type, - uint32 code, - BMessage *message); - -private: - friend BInputDevice* find_input_device(const char *name); - friend status_t get_input_devices(BList *list); - - BInputDevice(); - void set_name_and_type(const char *name, - input_device_type type); - - char* fName; - input_device_type fType; - uint32 _reserved[4]; -}; - - -#endif diff --git a/headers/build/os/interface/ListItem.h b/headers/build/os/interface/ListItem.h deleted file mode 100644 index 26066df8f1..0000000000 --- a/headers/build/os/interface/ListItem.h +++ /dev/null @@ -1,87 +0,0 @@ -/******************************************************************************* -/ -/ File: ListItem.h -/ -/ Description: BListView represents a one-dimensional list view. -/ -/ Copyright 1996-98, Be Incorporated, All Rights Reserved -/ -*******************************************************************************/ - -#ifndef _LIST_ITEM_H -#define _LIST_ITEM_H - -#include -#include -#include - -class BFont; -class BMessage; -class BOutlineListView; -class BView; - -/*----------------------------------------------------------------*/ -/*----- BListItem class ------------------------------------------*/ - -class BListItem : public BArchivable { -public: - BListItem(uint32 outlineLevel = 0, bool expanded = true); - BListItem(BMessage *data); -virtual ~BListItem(); -virtual status_t Archive(BMessage *data, bool deep = true) const; - - float Height() const; - float Width() const; - bool IsSelected() const; - void Select(); - void Deselect(); - -virtual void SetEnabled(bool on); - bool IsEnabled() const; - - void SetHeight(float height); - void SetWidth(float width); -virtual void DrawItem(BView *owner, - BRect bounds, - bool complete = false) = 0; -virtual void Update(BView *owner, const BFont *font); - -virtual status_t Perform(perform_code d, void *arg); - - bool IsExpanded() const; - void SetExpanded(bool expanded); - uint32 OutlineLevel() const; - -/*----- Private or reserved -----------------------------------------*/ -private: -friend class BOutlineListView; - - bool HasSubitems() const; - -virtual void _ReservedListItem1(); -virtual void _ReservedListItem2(); - - BListItem(const BListItem &); - BListItem &operator=(const BListItem &); - - /* calls used by BOutlineListView*/ - bool IsItemVisible() const; - void SetItemVisible(bool); - - uint32 _reserved[2]; - float fWidth; - float fHeight; - uint32 fLevel; - bool fSelected; - bool fEnabled; - bool fExpanded; - bool fHasSubitems : 1; - bool fVisible : 1; -}; - - -/*-------------------------------------------------------------*/ - -#include /* to maintain compatibility */ - -#endif /* _LIST_ITEM_H */ diff --git a/headers/build/os/interface/ListView.h b/headers/build/os/interface/ListView.h deleted file mode 100644 index 3e685526aa..0000000000 --- a/headers/build/os/interface/ListView.h +++ /dev/null @@ -1,201 +0,0 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2001-2002, OpenBeOS -// Distributed under the terms of the OpenBeOS license -// -// File: ListView.h -// Author: Axel Doerfler -// Description: BListView represents a one-dimensional list view. -// -//------------------------------------------------------------------------------ - -#ifndef _LIST_VIEW_H -#define _LIST_VIEW_H - -#include -#include -#include -#include - -struct track_data; - -enum list_view_type { - B_SINGLE_SELECTION_LIST, - B_MULTIPLE_SELECTION_LIST -}; - -#ifdef USE_OPENBEOS_NAMESPACE -namespace OpenBeOS { -#endif - -//----- BListView class ------------------------------------------ - -class BListView : public BView, public BInvoker -{ - public: - BListView(BRect frame, const char *name, - list_view_type type = B_SINGLE_SELECTION_LIST, - uint32 resizeMask = B_FOLLOW_LEFT | B_FOLLOW_TOP, - uint32 flags = B_WILL_DRAW | B_FRAME_EVENTS | B_NAVIGABLE); - BListView(BMessage *data); - - virtual ~BListView() ; - - static BArchivable *Instantiate(BMessage *data); - virtual status_t Archive(BMessage *data, bool deep = true) const; - virtual void Draw(BRect updateRect); - virtual void MessageReceived(BMessage *msg); - virtual void MouseDown(BPoint where); - virtual void KeyDown(const char *bytes, int32 numBytes); - virtual void MakeFocus(bool state = true); - virtual void FrameResized(float newWidth, float newHeight); - virtual void TargetedByScrollView(BScrollView *scroller); - void ScrollTo(float x, float y); - virtual void ScrollTo(BPoint where); - virtual bool AddItem(BListItem *item); - virtual bool AddItem(BListItem *item, int32 atIndex); - virtual bool AddList(BList *newItems); - virtual bool AddList(BList *newItems, int32 atIndex); - virtual bool RemoveItem(BListItem *item); - virtual BListItem *RemoveItem(int32 index); - virtual bool RemoveItems(int32 index, int32 count); - - virtual void SetSelectionMessage(BMessage *message); - virtual void SetInvocationMessage(BMessage *message); - - BMessage *SelectionMessage() const; - uint32 SelectionCommand() const; - BMessage *InvocationMessage() const; - uint32 InvocationCommand() const; - - virtual void SetListType(list_view_type type); - list_view_type ListType() const; - - BListItem *ItemAt(int32 index) const; - int32 IndexOf(BPoint point) const; - int32 IndexOf(BListItem *item) const; - BListItem *FirstItem() const; - BListItem *LastItem() const; - bool HasItem(BListItem *item) const; - int32 CountItems() const; - virtual void MakeEmpty(); - bool IsEmpty() const; - void DoForEach(bool (*func)(BListItem *)); - void DoForEach(bool (*func)(BListItem *, void *), void *); - const BListItem **Items() const; - void InvalidateItem(int32 index); - void ScrollToSelection(); - - void Select(int32 index, bool extend = false); - void Select(int32 from, int32 to, bool extend = false); - bool IsItemSelected(int32 index) const; - int32 CurrentSelection(int32 index = 0) const; - virtual status_t Invoke(BMessage *msg = NULL); - - void DeselectAll(); - void DeselectExcept(int32 except_from, int32 except_to); - void Deselect(int32 index); - - virtual void SelectionChanged(); - - void SortItems(int (*cmp)(const void *, const void *)); - - /* These functions bottleneck through DoMiscellaneous() */ - bool SwapItems(int32 a, int32 b); - bool MoveItem(int32 from, int32 to); - bool ReplaceItem(int32 index, BListItem *item); - - virtual void AttachedToWindow(); - virtual void FrameMoved(BPoint new_position); - - BRect ItemFrame(int32 index); - - virtual BHandler *ResolveSpecifier(BMessage *msg, int32 index, - BMessage *specifier, int32 form, const char *property); - virtual status_t GetSupportedSuites(BMessage *data); - - virtual status_t Perform(perform_code code, void *arg); - - virtual void WindowActivated(bool state); - virtual void MouseUp(BPoint point); - virtual void MouseMoved(BPoint point, uint32 code, const BMessage *msg); - virtual void DetachedFromWindow(); - virtual bool InitiateDrag(BPoint point, int32 itemIndex, bool initialySelected); - - virtual void ResizeToPreferred(); - virtual void GetPreferredSize(float *width, float *height); - virtual void AllAttached(); - virtual void AllDetached(); - - protected: - enum MiscCode { B_NO_OP, B_REPLACE_OP, B_MOVE_OP, B_SWAP_OP }; - union MiscData { - struct Spare { int32 data[5]; }; - struct Replace { int32 index; BListItem *item; } replace; - struct Move { int32 from; int32 to; } move; - struct Swap { int32 a; int32 b; } swap; - }; - - virtual bool DoMiscellaneous(MiscCode code, MiscData *data); - - //----- Private or reserved ----------------------------------------- - - private: - friend class BOutlineListView; - - virtual void _ReservedListView2(); - virtual void _ReservedListView3(); - virtual void _ReservedListView4(); - - BListView &operator=(const BListView &); - - void InitObject(list_view_type type); - void FixupScrollBar(); - void InvalidateFrom(int32 index); - status_t PostMsg(BMessage *msg); - void FontChanged(); - int32 RangeCheck(int32 index); - bool _Select(int32 index, bool extend); - bool _Select(int32 from, int32 to, bool extend); - bool _Deselect(int32 index); - void Deselect(int32 from, int32 to); - bool _DeselectAll(int32 except_from, int32 except_to); - void PerformDelayedSelect(); - bool TryInitiateDrag(BPoint where); - int32 CalcFirstSelected(int32 after); - int32 CalcLastSelected(int32 before); - virtual void DrawItem(BListItem *item, BRect itemRect, bool complete = false); - - bool DoSwapItems(int32 a, int32 b); - bool DoMoveItem(int32 from, int32 to); - bool DoReplaceItem(int32 index, BListItem *item); - void RescanSelection(int32 from, int32 to); - void DoMouseUp(BPoint where); - void DoMouseMoved(BPoint where); - - BList fList; - list_view_type fListType; - int32 fFirstSelected; - int32 fLastSelected; - int32 fAnchorIndex; - float fWidth; - BMessage *fSelectMessage; - BScrollView *fScrollView; - track_data *fTrack; - uint32 _reserved[3]; -}; - - -inline void -BListView::ScrollTo(float x, float y) -{ - /* OK, no private parts */ - ScrollTo(BPoint(x, y)); -} - -/*-------------------------------------------------------------*/ - -#ifdef USE_OPENBEOS_NAMESPACE -} -#endif - -#endif /* _LIST_VIEW_H */ diff --git a/headers/build/os/interface/Menu.h b/headers/build/os/interface/Menu.h deleted file mode 100644 index a43abd55b6..0000000000 --- a/headers/build/os/interface/Menu.h +++ /dev/null @@ -1,299 +0,0 @@ -/******************************************************************************* -/ -/ File: Menu.h -/ -/ Description: BMenu display a menu of selectable items. -/ -/ Copyright 1994-98, Be Incorporated, All Rights Reserved -/ -*******************************************************************************/ - -#ifndef _MENU_H -#define _MENU_H - -#include -#include -#include -#include - -/*----------------------------------------------------------------*/ -/*----- Menu decalrations and structures -------------------------*/ - -class BMenuItem; -class BMenuBar; -class BMenuWindow; -class BMenuFrame; - -class _ExtraMenuData_; - -enum menu_layout { - B_ITEMS_IN_ROW = 0, - B_ITEMS_IN_COLUMN, - B_ITEMS_IN_MATRIX -}; - -struct menu_info { - float font_size; - font_family f_family; - font_style f_style; - rgb_color background_color; - int32 separator; - bool click_to_open; - bool triggers_always_shown; -}; - -_IMPEXP_BE status_t set_menu_info(menu_info *info); -_IMPEXP_BE status_t get_menu_info(menu_info *info); - -typedef bool (* menu_tracking_hook )(BMenu *, void *); - -/*----------------------------------------------------------------*/ -/*----- BMenu class ----------------------------------------------*/ - -class BMenu : public BView -{ -public: - BMenu( const char *title, - menu_layout layout = B_ITEMS_IN_COLUMN); - BMenu(const char *title, float width, float height); -virtual ~BMenu(); - - BMenu(BMessage *data); -static BArchivable *Instantiate(BMessage *data); -virtual status_t Archive(BMessage *data, bool deep = true) const; - -virtual void AttachedToWindow(); -virtual void DetachedFromWindow(); - - bool AddItem(BMenuItem *item); - bool AddItem(BMenuItem *item, int32 index); - bool AddItem(BMenuItem *item, BRect frame); - bool AddItem(BMenu *menu); - bool AddItem(BMenu *menu, int32 index); - bool AddItem(BMenu *menu, BRect frame); - bool AddList(BList *list, int32 index); - bool AddSeparatorItem(); - bool RemoveItem(BMenuItem *item); - BMenuItem *RemoveItem(int32 index); - bool RemoveItems(int32 index, - int32 count, - bool del = false); - bool RemoveItem(BMenu *menu); - - BMenuItem *ItemAt(int32 index) const; - BMenu *SubmenuAt(int32 index) const; - int32 CountItems() const; - int32 IndexOf(BMenuItem *item) const; - int32 IndexOf(BMenu *menu) const; - BMenuItem *FindItem(uint32 command) const; - BMenuItem *FindItem(const char *name) const; - -virtual status_t SetTargetForItems(BHandler *target); -virtual status_t SetTargetForItems(BMessenger messenger); -virtual void SetEnabled(bool state); -virtual void SetRadioMode(bool state); -virtual void SetTriggersEnabled(bool state); -virtual void SetMaxContentWidth(float max); - - void SetLabelFromMarked(bool on); - bool IsLabelFromMarked(); - bool IsEnabled() const; - bool IsRadioMode() const; - bool AreTriggersEnabled() const; - bool IsRedrawAfterSticky() const; - float MaxContentWidth() const; - - BMenuItem *FindMarked(); - - BMenu *Supermenu() const; - BMenuItem *Superitem() const; - -virtual void MessageReceived(BMessage *msg); -virtual void KeyDown(const char *bytes, int32 numBytes); -virtual void Draw(BRect updateRect); -virtual void GetPreferredSize(float *width, float *height); -virtual void ResizeToPreferred(); -virtual void FrameMoved(BPoint new_position); -virtual void FrameResized(float new_width, float new_height); - void InvalidateLayout(); - -virtual BHandler *ResolveSpecifier(BMessage *msg, - int32 index, - BMessage *specifier, - int32 form, - const char *property); -virtual status_t GetSupportedSuites(BMessage *data); - -virtual status_t Perform(perform_code d, void *arg); - -virtual void MakeFocus(bool state = true); -virtual void AllAttached(); -virtual void AllDetached(); - -protected: - - BMenu( BRect frame, - const char *viewName, - uint32 resizeMask, - uint32 flags, - menu_layout layout, - bool resizeToFit); - -virtual BPoint ScreenLocation(); - - void SetItemMargins( float left, - float top, - float right, - float bottom); - void GetItemMargins( float *left, - float *top, - float *right, - float *bottom) const; - - menu_layout Layout() const; - -virtual void Show(); - void Show(bool selectFirstItem); - void Hide(); - BMenuItem *Track( bool start_opened = false, - BRect *special_rect = NULL); - -public: - enum add_state { - B_INITIAL_ADD, - B_PROCESSING, - B_ABORT - }; -virtual bool AddDynamicItem(add_state s); -virtual void DrawBackground(BRect update); - - void SetTrackingHook(menu_tracking_hook func, void *state); - -/*----- Private or reserved -----------------------------------------*/ -private: -friend class BWindow; -friend class BMenuBar; -friend class BMenuItem; -friend status_t _init_interface_kit_(); -friend status_t set_menu_info(menu_info *); -friend status_t get_menu_info(menu_info *); - -virtual void _ReservedMenu3(); -virtual void _ReservedMenu4(); -virtual void _ReservedMenu5(); -virtual void _ReservedMenu6(); - - BMenu &operator=(const BMenu &); - - void InitData(BMessage *data = NULL); - bool _show(bool selectFirstItem = false); - void _hide(); - BMenuItem *_track(int *action, long start = -1); - bool _AddItem(BMenuItem *item, int32 index); - bool RemoveItems(int32 index, - int32 count, - BMenuItem *item, - bool del = false); - void LayoutItems(int32 index); - void ComputeLayout(int32 index, bool bestFit, bool moveItems, - float* width, float* height); - BRect Bump(BRect current, BPoint extent, int32 index) const; - BPoint ItemLocInRect(BRect frame) const; - BRect CalcFrame(BPoint where, bool *scrollOn); - bool ScrollMenu(BRect bounds, BPoint loc, bool *fast); - void ScrollIntoView(BMenuItem *item); - - void DrawItems(BRect updateRect); - int State(BMenuItem **item = NULL) const; - void InvokeItem(BMenuItem *item, bool now = false); - - bool OverSuper(BPoint loc); - bool OverSubmenu(BMenuItem *item, BPoint loc); - BMenuWindow *MenuWindow(); - void DeleteMenuWindow(); - BMenuItem *HitTestItems(BPoint where, BPoint slop = B_ORIGIN) const; - BRect Superbounds() const; - void CacheFontInfo(); - - void ItemMarked(BMenuItem *item); - void Install(BWindow *target); - void Uninstall(); - void SelectItem( BMenuItem *m, - uint32 showSubmenu = 0, - bool selectFirstItem = false); - BMenuItem *CurrentSelection() const; - bool SelectNextItem(BMenuItem *item, bool forward); - BMenuItem *NextItem(BMenuItem *item, bool forward) const; - bool IsItemVisible(BMenuItem *item) const; - void SetIgnoreHidden(bool on); - void SetStickyMode(bool on); - bool IsStickyMode() const; - void CalcTriggers(); - const char *ChooseTrigger(const char *title, BList *chars); - void UpdateWindowViewSize(bool upWind = true); - bool IsStickyPrefOn(); - void RedrawAfterSticky(BRect bounds); - bool OkToProceed(BMenuItem *); - - status_t ParseMsg(BMessage *msg, int32 *sindex, BMessage *spec, - int32 *form, const char **prop, - BMenu **tmenu, BMenuItem **titem, int32 *user_data, - BMessage *reply) const; - - status_t DoMenuMsg(BMenuItem **next, BMenu *tar, BMessage *m, - BMessage *r, BMessage *spec, int32 f) const; - status_t DoMenuItemMsg(BMenuItem **next, BMenu *tar, BMessage *m, - BMessage *r, BMessage *spec, int32 f) const; - - status_t DoEnabledMsg(BMenuItem *ti, BMenu *tm, BMessage *m, - BMessage *r) const; - status_t DoLabelMsg(BMenuItem *ti, BMenu *tm, BMessage *m, - BMessage *r) const; - status_t DoMarkMsg(BMenuItem *ti, BMenu *tm, BMessage *m, - BMessage *r) const; - status_t DoDeleteMsg(BMenuItem *ti, BMenu *tm, BMessage *m, - BMessage *r) const; - status_t DoCreateMsg(BMenuItem *ti, BMenu *tm, BMessage *m, - BMessage *r, bool menu) const; - -static menu_info sMenuInfo; -static bool sSwapped; - - BMenuItem *fChosenItem; - BList fItems; - BRect fPad; - BMenuItem *fSelected; - BMenuWindow *fCachedMenuWindow; - BMenu *fSuper; - BMenuItem *fSuperitem; - BRect fSuperbounds; - float fAscent; - float fDescent; - float fFontHeight; - uint32 fState; - menu_layout fLayout; - BRect *fExtraRect; - float fMaxContentWidth; - BPoint *fInitMatrixSize; - _ExtraMenuData_ *fExtraMenuData; // !! - - uint32 _reserved[2]; - - char fTrigger; - bool fResizeToFit; - bool fUseCachedMenuLayout; - bool fEnabled; - bool fDynamicName; - bool fRadioMode; - bool fTrackNewBounds; - bool fStickyMode; - bool fIgnoreHidden; - bool fTriggerEnabled; - bool fRedrawAfterSticky; - bool fAttachAborted; -}; - -/*-------------------------------------------------------------*/ -/*-------------------------------------------------------------*/ - -#endif /* _MENU_H */ diff --git a/headers/build/os/interface/MenuBar.h b/headers/build/os/interface/MenuBar.h deleted file mode 100644 index 619faa8b49..0000000000 --- a/headers/build/os/interface/MenuBar.h +++ /dev/null @@ -1,120 +0,0 @@ -/******************************************************************************* -/ -/ File: Menubar.h -/ -/ Description: BMenuBar is a menu that's at the root of a menu hierarchy. -/ -/ Copyright 1994-98, Be Incorporated, All Rights Reserved -/ -*******************************************************************************/ - -#ifndef _MENU_BAR_H -#define _MENU_BAR_H - -#include -#include -#include -#include - -/*----------------------------------------------------------------*/ -/*----- BmenuBar declarations ------------------------------------*/ - -enum menu_bar_border { - B_BORDER_FRAME, - B_BORDER_CONTENTS, - B_BORDER_EACH_ITEM -}; - -class BMenu; -class BWindow; -class BMenuItem; -class BMenuField; - -/*----------------------------------------------------------------*/ -/*----- BMenuBar class -------------------------------------------*/ - -class BMenuBar : public BMenu -{ -public: - BMenuBar( BRect frame, - const char *title, - uint32 resizeMask = - B_FOLLOW_LEFT_RIGHT | B_FOLLOW_TOP, - menu_layout layout = B_ITEMS_IN_ROW, - bool resizeToFit = true); - BMenuBar(BMessage *data); -virtual ~BMenuBar(); -static BArchivable *Instantiate(BMessage *data); -virtual status_t Archive(BMessage *data, bool deep = true) const; - -virtual void SetBorder(menu_bar_border border); - menu_bar_border Border() const; -virtual void Draw(BRect updateRect); -virtual void AttachedToWindow(); -virtual void DetachedFromWindow(); -virtual void MessageReceived(BMessage *msg); -virtual void MouseDown(BPoint where); -virtual void WindowActivated(bool state); -virtual void MouseUp(BPoint where); -virtual void FrameMoved(BPoint new_position); -virtual void FrameResized(float new_width, float new_height); - -virtual void Show(); -virtual void Hide(); - -virtual BHandler *ResolveSpecifier(BMessage *msg, - int32 index, - BMessage *specifier, - int32 form, - const char *property); -virtual status_t GetSupportedSuites(BMessage *data); - -virtual void ResizeToPreferred(); -virtual void GetPreferredSize(float *width, float *height); -virtual void MakeFocus(bool state = true); -virtual void AllAttached(); -virtual void AllDetached(); - - -/*----- Private or reserved -----------------------------------------*/ -virtual status_t Perform(perform_code d, void *arg); - -private: -friend class BWindow; -friend class BMenuItem; -friend class BMenuField; -friend class BMenu; - -virtual void _ReservedMenuBar1(); -virtual void _ReservedMenuBar2(); -virtual void _ReservedMenuBar3(); -virtual void _ReservedMenuBar4(); - - BMenuBar &operator=(const BMenuBar &); - - void StartMenuBar( int32 menuIndex, - bool sticky = true, - bool show_menu = false, - BRect *special_rect = NULL); -static long TrackTask(void *arg); - BMenuItem *Track( int32 *action, - int32 startIndex = -1, - bool showMenu = false); - void StealFocus(); - void RestoreFocus(); - void InitData(menu_layout layout); - - menu_bar_border fBorder; - thread_id fTrackingPID; - int32 fPrevFocusToken; - sem_id fMenuSem; - BRect* fLastBounds; - uint32 _reserved[2]; // was 3 - - bool fTracking; -}; - -/*-------------------------------------------------------------*/ -/*-------------------------------------------------------------*/ - -#endif /* _MENU_BAR_H */ diff --git a/headers/build/os/interface/MenuField.h b/headers/build/os/interface/MenuField.h deleted file mode 100644 index 505a44347c..0000000000 --- a/headers/build/os/interface/MenuField.h +++ /dev/null @@ -1,125 +0,0 @@ -/******************************************************************************* -/ -/ File: MenuField.h -/ -/ Description: BMenuField displays a labeled pop-up menu. -/ -/ Copyright 1994-98, Be Incorporated, All Rights Reserved -/ -*******************************************************************************/ - - -#ifndef _MENU_FIELD_H -#define _MENU_FIELD_H - -#include -#include /* For convenience */ -#include - -class BMenuBar; - -/*----------------------------------------------------------------*/ -/*----- BMenuField class -----------------------------------------*/ - -class BMenuField : public BView -{ -public: - BMenuField( BRect frame, - const char *name, - const char *label, - BMenu *menu, - uint32 resize = B_FOLLOW_LEFT|B_FOLLOW_TOP, - uint32 flags = B_WILL_DRAW | B_NAVIGABLE); - BMenuField( BRect frame, - const char *name, - const char *label, - BMenu *menu, - bool fixed_size, - uint32 resize = B_FOLLOW_LEFT|B_FOLLOW_TOP, - uint32 flags = B_WILL_DRAW | B_NAVIGABLE); - BMenuField(BMessage *data); -virtual ~BMenuField(); -static BArchivable *Instantiate(BMessage *data); -virtual status_t Archive(BMessage *data, bool deep = true) const; - -virtual void Draw(BRect update); -virtual void AttachedToWindow(); -virtual void AllAttached(); -virtual void MouseDown(BPoint where); -virtual void KeyDown(const char *bytes, int32 numBytes); -virtual void MakeFocus(bool state); -virtual void MessageReceived(BMessage *msg); -virtual void WindowActivated(bool state); -virtual void MouseUp(BPoint pt); -virtual void MouseMoved(BPoint pt, uint32 code, const BMessage *msg); -virtual void DetachedFromWindow(); -virtual void AllDetached(); -virtual void FrameMoved(BPoint new_position); -virtual void FrameResized(float new_width, float new_height); - - BMenu *Menu() const; - BMenuBar *MenuBar() const; - BMenuItem *MenuItem() const; - -virtual void SetLabel(const char *label); - const char *Label() const; - -virtual void SetEnabled(bool on); - bool IsEnabled() const; - -virtual void SetAlignment(alignment label); - alignment Alignment() const; -virtual void SetDivider(float dividing_line); - float Divider() const; - - void ShowPopUpMarker(); - void HidePopUpMarker(); - -virtual BHandler *ResolveSpecifier(BMessage *msg, - int32 index, - BMessage *specifier, - int32 form, - const char *property); -virtual status_t GetSupportedSuites(BMessage *data); - -virtual void ResizeToPreferred(); -virtual void GetPreferredSize(float *width, float *height); - - -/*----- Private or reserved -----------------------------------------*/ -virtual status_t Perform(perform_code d, void *arg); - -private: -friend class _BMCMenuBar_; - -virtual void _ReservedMenuField1(); -virtual void _ReservedMenuField2(); -virtual void _ReservedMenuField3(); - - BMenuField &operator=(const BMenuField &); - - - void InitObject(const char *label); - void InitObject2(); - void DrawLabel(BRect bounds, BRect update); -static void InitMenu(BMenu *menu); -static long MenuTask(void *arg); - - char *fLabel; - BMenu *fMenu; - BMenuBar *fMenuBar; - alignment fAlign; - float fDivider; - float fStringWidth; - bool fEnabled; - bool fSelected; - bool fTransition; - bool fFixedSizeMB; - thread_id fMenuTaskID; - uint32 _reserved[3]; -}; - -/*-------------------------------------------------------------*/ -/*-------------------------------------------------------------*/ - -#endif /* _MENU_FIELD_H */ diff --git a/headers/build/os/interface/MenuItem.h b/headers/build/os/interface/MenuItem.h deleted file mode 100644 index a77bb36b58..0000000000 --- a/headers/build/os/interface/MenuItem.h +++ /dev/null @@ -1,124 +0,0 @@ -/******************************************************************************* -/ -/ File: MenuItem.h -/ -/ Description: BMenuItem represents a single item in a BMenu. -/ BSeparatorItem is a cosmetic menu item that demarcates -/ groups of other items. -/ -/ Copyright 1994-98, Be Incorporated, All Rights Reserved -/ -*******************************************************************************/ - -#ifndef _MENU_ITEM_H -#define _MENU_ITEM_H - -#include -#include -#include -#include -#include /* For convenience */ - -class BMessage; -class BWindow; - -/*----------------------------------------------------------------*/ -/*----- BMenuItem class ------------------------------------------*/ - -class BMenuItem : public BArchivable, public BInvoker { -public: - BMenuItem( const char *label, - BMessage *message, - char shortcut = 0, - uint32 modifiers = 0); - BMenuItem(BMenu *menu, BMessage *message = NULL); - BMenuItem(BMessage *data); -virtual ~BMenuItem(); -static BArchivable *Instantiate(BMessage *data); -virtual status_t Archive(BMessage *data, bool deep = true) const; - -virtual void SetLabel(const char *name); -virtual void SetEnabled(bool state); -virtual void SetMarked(bool state); -virtual void SetTrigger(char ch); -virtual void SetShortcut(char ch, uint32 modifiers); - - const char *Label() const; - bool IsEnabled() const; - bool IsMarked() const; - char Trigger() const; - char Shortcut(uint32 *modifiers = NULL) const; - - BMenu *Submenu() const; - BMenu *Menu() const; - BRect Frame() const; - -protected: - -virtual void GetContentSize(float *width, float *height); -virtual void TruncateLabel(float max, char *new_label); -virtual void DrawContent(); -virtual void Draw(); -virtual void Highlight(bool on); - bool IsSelected() const; - BPoint ContentLocation() const; - -/*----- Private or reserved -----------------------------------------*/ -private: -friend class BMenu; -friend class BPopUpMenu; -friend class BMenuBar; - -virtual void _ReservedMenuItem1(); -virtual void _ReservedMenuItem2(); -virtual void _ReservedMenuItem3(); -virtual void _ReservedMenuItem4(); - - BMenuItem(const BMenuItem &); - BMenuItem &operator=(const BMenuItem &); - - void InitData(); - void InitMenuData(BMenu *menu); - void Install(BWindow *window); - -/*----- Protected function -----------------------------------------*/ -protected: -virtual status_t Invoke(BMessage *msg = NULL); - -/*----- Private or reserved -----------------------------------------*/ -private: - void Uninstall(); - void SetSuper(BMenu *super); - void Select(bool on); - void DrawMarkSymbol(); - void DrawShortcutSymbol(); - void DrawSubmenuSymbol(); - void DrawControlChar(const char *control); - void SetSysTrigger(char ch); - - char *fLabel; - BMenu *fSubmenu; - BWindow *fWindow; - BMenu *fSuper; - BRect fBounds; - uint32 fModifiers; - float fCachedWidth; - int16 fTriggerIndex; - char fUserTrigger; - char fSysTrigger; - char fShortcutChar; - bool fMark; - bool fEnabled; - bool fSelected; - - uint32 _reserved[4]; -}; - -/*-------------------------------------------------------------*/ -/*-------------------------------------------------------------*/ - -// We moved BSeparatorItem's declaration to its own file, but for source -// compatibility we have to export that class from here too. -#include - -#endif /* _MENU_ITEM_H */ diff --git a/headers/build/os/interface/MultiChannelControl.h b/headers/build/os/interface/MultiChannelControl.h deleted file mode 100644 index 36eb6c1600..0000000000 --- a/headers/build/os/interface/MultiChannelControl.h +++ /dev/null @@ -1,165 +0,0 @@ -/******************************************************************************* -/ -/ File: MultiChannelControl.h -/ -/ Description: BMultiChannelControl is the base class for controls that -/ have several independent values, with minima and maxima. -/ -/ Copyright 1998-99, Be Incorporated, All Rights Reserved -/ -*******************************************************************************/ - -#if !defined(_MULTI_CHANNEL_CONTROL_H) -#define _MULTI_CHANNEL_CONTROL_H - -#include - - -class BMultiChannelControl : - public BControl -{ -public: - BMultiChannelControl( - BRect frame, - const char * name, - const char * label, - BMessage * model, - int32 channel_count = 1, - uint32 resize = B_FOLLOW_LEFT | B_FOLLOW_TOP, - uint32 flags = B_WILL_DRAW); - BMultiChannelControl( - BMessage * from); -virtual ~BMultiChannelControl(); -virtual status_t Archive( - BMessage * into, - bool deep = true) const; - -virtual void Draw( - BRect area) = 0; -virtual void MouseDown( - BPoint where) = 0; -virtual void KeyDown( - const char * bytes, - int32 size) = 0; - -virtual void FrameResized( - float width, - float height); -virtual void SetFont( - const BFont * font, - uint32 mask = B_FONT_ALL); -virtual void AttachedToWindow(); -virtual void DetachedFromWindow(); -virtual void ResizeToPreferred(); -virtual void GetPreferredSize( - float * width, - float * height) = 0; -virtual void MessageReceived( - BMessage * message); - -virtual void SetValue( /* SetValueChannel() determines which channel */ - int32 value); -virtual status_t SetCurrentChannel( - int32 channel); - int32 CurrentChannel() const; - -virtual int32 CountChannels() const; -virtual int32 MaxChannelCount() const = 0; -virtual status_t SetChannelCount( - int32 channel_count); - int32 ValueFor( - int32 channel) const; -virtual int32 GetValues( - int32 * out_values, - int32 from_channel, - int32 channel_count) const; - status_t SetValueFor( - int32 channel, - int32 value); -virtual status_t SetValues( - int32 from_channel, - int32 channel_count, - const int32 * in_values); - status_t SetAllValues( - int32 values); - status_t SetLimitsFor( - int32 channel, - int32 minimum, - int32 maximum); - status_t GetLimitsFor( - int32 channel, - int32 * minimum, - int32 * maximum) const ; -virtual status_t SetLimits( - int32 from_channel, - int32 channel_count, - const int32 * minimum, - const int32 * maximum); -virtual status_t GetLimits( - int32 from_channel, - int32 channel_count, - int32 * minimum, - int32 * maximum) const; - status_t SetAllLimits( - int32 minimum, - int32 maximum); - -virtual status_t SetLimitLabels( - const char * min_label, - const char * max_label); - const char * MinLimitLabel() const; - const char * MaxLimitLabel() const; - -private: - - BMultiChannelControl( /* unimplemented */ - const BMultiChannelControl &); - BMultiChannelControl & operator=( /* unimplemented */ - const BMultiChannelControl &); -virtual status_t _Reserverd_MultiChannelControl_0(void *, ...); -virtual status_t _Reserverd_MultiChannelControl_1(void *, ...); -virtual status_t _Reserverd_MultiChannelControl_2(void *, ...); -virtual status_t _Reserverd_MultiChannelControl_3(void *, ...); -virtual status_t _Reserverd_MultiChannelControl_4(void *, ...); -virtual status_t _Reserverd_MultiChannelControl_5(void *, ...); -virtual status_t _Reserverd_MultiChannelControl_6(void *, ...); -virtual status_t _Reserverd_MultiChannelControl_7(void *, ...); - -protected: - - inline int32 * const & MinLimitList() const; - inline int32 * const & MaxLimitList() const; - inline int32 * const & ValueList() const; - -private: - - int32 _m_channel_count; - int32 _m_value_channel; - int32 * _m_channel_min; - int32 * _m_channel_max; - int32 * _m_channel_val; - char * _m_min_label; - char * _m_max_label; - - uint32 _reserved_[16]; - -}; - -inline int32 * const & BMultiChannelControl::MinLimitList() const -{ - return _m_channel_min; -} - -inline int32 * const & BMultiChannelControl::MaxLimitList() const -{ - return _m_channel_max; -} - -inline int32 * const & BMultiChannelControl::ValueList() const -{ - return _m_channel_val; -} - - -#endif /* _MULTI_CHANNEL_CONTROL_H */ - diff --git a/headers/build/os/interface/OptionControl.h b/headers/build/os/interface/OptionControl.h deleted file mode 100644 index 65966bd6f5..0000000000 --- a/headers/build/os/interface/OptionControl.h +++ /dev/null @@ -1,95 +0,0 @@ -/******************************************************************************* -/ -/ File: OptionControl.h -/ -/ Description: A BOptionControl is an abstract interface for BControls that select -/ between a set of named values; the names are displayed to the user, but the -/ corresponding values are returned in Value(). -/ -/ Copyright 1997-99, Be Incorporated, All Rights Reserved -/ -*******************************************************************************/ - -#if !defined(_OPTION_CONTROL_H) -#define _OPTION_CONTROL_H - -#include -#include - -enum { - B_OPTION_CONTROL_VALUE = '_BMV' -}; - - -class BOptionControl : - public BControl -{ -public: - - BOptionControl( - BRect frame, - const char * name, - const char * label, - BMessage * message, - uint32 resize = B_FOLLOW_LEFT | B_FOLLOW_TOP, - uint32 flags = B_WILL_DRAW); -virtual ~BOptionControl(); - -virtual void MessageReceived( - BMessage * message); - - status_t AddOption( - const char * name, - int32 value); -virtual bool GetOptionAt( - int32 index, - const char ** out_name, - int32 * out_value) = 0; -virtual void RemoveOptionAt( - int32 index) = 0; -virtual int32 CountOptions() const = 0; -virtual status_t AddOptionAt( - const char * name, - int32 value, - int32 index) = 0; -virtual int32 SelectedOption( // index >= 0 returned directly - const char ** name = 0, - int32 * value = 0) const = 0; - -virtual status_t SelectOptionFor( - int32 value); -virtual status_t SelectOptionFor( - const char *name); -protected: - - BMessage * MakeValueMessage( - int32 value); - -private: - - BOptionControl(); /* private unimplemented */ - BOptionControl( - const BOptionControl & clone); - BOptionControl & operator=( - const BOptionControl & clone); - - /* Mmmh, stuffing! */ -virtual status_t _Reserved_OptionControl_0(void *, ...); -virtual status_t _Reserved_OptionControl_1(void *, ...); -virtual status_t _Reserved_OptionControl_2(void *, ...); -virtual status_t _Reserved_OptionControl_3(void *, ...); -virtual status_t _Reserved_OptionControl_4(void *, ...); -virtual status_t _Reserved_OptionControl_5(void *, ...); -virtual status_t _Reserved_OptionControl_6(void *, ...); -virtual status_t _Reserved_OptionControl_7(void *, ...); -virtual status_t _Reserved_OptionControl_8(void *, ...); -virtual status_t _Reserved_OptionControl_9(void *, ...); -virtual status_t _Reserved_OptionControl_10(void *, ...); -virtual status_t _Reserved_OptionControl_11(void *, ...); - - uint32 _reserved_selection_control_[8]; - -}; - - -#endif /* _OPTION_CONTROL_H */ diff --git a/headers/build/os/interface/OptionPopUp.h b/headers/build/os/interface/OptionPopUp.h deleted file mode 100644 index d9497e3925..0000000000 --- a/headers/build/os/interface/OptionPopUp.h +++ /dev/null @@ -1,105 +0,0 @@ -/******************************************************************************* -/ -/ File: OptionPopUp.h -/ -/ Description: A BOptionPopUp is a BControl that has a popup menu. -/ -/ Copyright 1997-99, Be Incorporated, All Rights Reserved -/ -*******************************************************************************/ - - -#if !defined(_OPTION_POP_UP_H) -#define _OPTION_POP_UP_H - -#include - - -class BMenuField; - - - -class BOptionPopUp : - public BOptionControl -{ -public: - BOptionPopUp( - BRect frame, - const char * name, - const char * label, - BMessage * message, - uint32 resize = B_FOLLOW_LEFT | B_FOLLOW_TOP, - uint32 flags = B_WILL_DRAW); - BOptionPopUp( - BRect frame, - const char * name, - const char * label, - BMessage * message, - bool fixed, - uint32 resize = B_FOLLOW_LEFT | B_FOLLOW_TOP, - uint32 flags = B_WILL_DRAW); - ~BOptionPopUp(); - - BMenuField * MenuField(); - -virtual bool GetOptionAt( - int32 index, - const char ** out_name, - int32 * out_value); -virtual void RemoveOptionAt( - int32 index); -virtual int32 CountOptions() const; -virtual status_t AddOptionAt( - const char * name, - int32 value, - int32 index); - -virtual void AllAttached(); -virtual void MessageReceived( - BMessage * message); -virtual void SetLabel( - const char *text); -virtual void SetValue( - int32 value); -virtual void SetEnabled( - bool on); -virtual void GetPreferredSize( - float *width, - float *height); -virtual void ResizeToPreferred(); -virtual int32 SelectedOption( - const char ** outName = 0, - int32 * outValue = 0) const; -private: - - BOptionPopUp(); /* private unimplemented */ - BOptionPopUp( - const BOptionPopUp & clone); - BOptionPopUp & operator=( - const BOptionPopUp & clone); - - /* Mmmh, stuffing! */ -virtual status_t _Reserved_OptionControl_0(void *, ...); -virtual status_t _Reserved_OptionControl_1(void *, ...); -virtual status_t _Reserved_OptionControl_2(void *, ...); -virtual status_t _Reserved_OptionControl_3(void *, ...); - /* Mmmh, stuffing! */ -virtual status_t _Reserved_OptionPopUp_0(void *, ...); -virtual status_t _Reserved_OptionPopUp_1(void *, ...); -virtual status_t _Reserved_OptionPopUp_2(void *, ...); -virtual status_t _Reserved_OptionPopUp_3(void *, ...); -virtual status_t _Reserved_OptionPopUp_4(void *, ...); -virtual status_t _Reserved_OptionPopUp_5(void *, ...); -virtual status_t _Reserved_OptionPopUp_6(void *, ...); -virtual status_t _Reserved_OptionPopUp_7(void *, ...); - - - BMenuField * _mField; - uint32 _reserved_menu_control_[8]; - -}; - - - - -#endif /* _OPTION_POP_UP_H */ diff --git a/headers/build/os/interface/OutlineListView.h b/headers/build/os/interface/OutlineListView.h deleted file mode 100644 index ad6b7337cc..0000000000 --- a/headers/build/os/interface/OutlineListView.h +++ /dev/null @@ -1,156 +0,0 @@ -/******************************************************************************* -/ -/ File: OutlineListView.h -/ -/ Description: BOutlineListView represents a "nestable" list view. -/ -/ Copyright 1997-98, Be Incorporated, All Rights Reserved -/ -*******************************************************************************/ - -#ifndef _OUTLINE_LIST_VIEW_H -#define _OUTLINE_LIST_VIEW_H - -#include -#include - -class BListItem; - -/*----------------------------------------------------------------*/ -/*----- BOutlineListView class -----------------------------------*/ - -class BOutlineListView : public BListView { -public: - BOutlineListView(BRect frame, - const char * name, - list_view_type type = B_SINGLE_SELECTION_LIST, - uint32 resizeMask = B_FOLLOW_LEFT | B_FOLLOW_TOP, - uint32 flags = B_WILL_DRAW | B_FRAME_EVENTS - | B_NAVIGABLE); - BOutlineListView(BMessage *data); -virtual ~BOutlineListView(); - -static BArchivable *Instantiate(BMessage *data); -virtual status_t Archive(BMessage *data, bool deep = true) const; - -virtual void MouseDown(BPoint where); -virtual void KeyDown(const char *bytes, int32 numBytes); -virtual void FrameMoved(BPoint new_position); -virtual void FrameResized(float new_width, float new_height); -virtual void MouseUp(BPoint where); - -virtual bool AddUnder(BListItem *item, BListItem *underItem); - -virtual bool AddItem(BListItem *item); -virtual bool AddItem(BListItem *item, int32 fullListIndex); -virtual bool AddList(BList *newItems); -virtual bool AddList(BList *newItems, int32 fullListIndex); - -virtual bool RemoveItem(BListItem *item); -virtual BListItem *RemoveItem(int32 fullListIndex); -virtual bool RemoveItems(int32 fullListIndex, int32 count); - - -/* The following calls operator on the full outlinelist */ - BListItem *FullListItemAt(int32 fullListIndex) const; - int32 FullListIndexOf(BPoint point) const; - int32 FullListIndexOf(BListItem *item) const; - BListItem *FullListFirstItem() const; - BListItem *FullListLastItem() const; - bool FullListHasItem(BListItem *item) const; - int32 FullListCountItems() const; - int32 FullListCurrentSelection(int32 index = 0) const; -virtual void MakeEmpty(); - bool FullListIsEmpty() const; - void FullListDoForEach(bool (*func)(BListItem *)); - void FullListDoForEach(bool (*func)(BListItem *, void *), void*); - - BListItem *Superitem(const BListItem *item); - - void Expand(BListItem *item); - void Collapse(BListItem *item); - - bool IsExpanded(int32 fullListIndex); - -virtual BHandler *ResolveSpecifier(BMessage *msg, - int32 index, - BMessage *specifier, - int32 form, - const char *property); -virtual status_t GetSupportedSuites(BMessage *data); -virtual status_t Perform(perform_code d, void *arg); - -virtual void ResizeToPreferred(); -virtual void GetPreferredSize(float *width, float *height); -virtual void MakeFocus(bool state = true); -virtual void AllAttached(); -virtual void AllDetached(); -virtual void DetachedFromWindow(); - - - - void FullListSortItems(int (*compareFunc)(const BListItem *, - const BListItem *)); - void SortItemsUnder(BListItem *underItem, - bool oneLevelOnly, - int (*compareFunc)(const BListItem *, - const BListItem*)); - int32 CountItemsUnder(BListItem *under, bool oneLevelOnly) const; - BListItem *EachItemUnder(BListItem *underItem, - bool oneLevelOnly, - BListItem *(*eachFunc)(BListItem *, void *), - void *); - BListItem *ItemUnderAt(BListItem *underItem, - bool oneLevelOnly, - int32 index) const; - -protected: - -virtual bool DoMiscellaneous(MiscCode code, MiscData * data); -virtual void MessageReceived(BMessage *); - -/*----- Private or reserved -----------------------------------------*/ -private: -virtual void _ReservedOutlineListView1(); -virtual void _ReservedOutlineListView2(); -virtual void _ReservedOutlineListView3(); -virtual void _ReservedOutlineListView4(); - -typedef BListView _inherited; - - int32 FullListIndex(int32 index) const; - int32 ListViewIndex(int32 index) const; - -#if !_PR3_COMPATIBLE_ -protected: -#endif -virtual void ExpandOrCollapse(BListItem *underItem, bool expand); - -private: - -virtual BRect LatchRect(BRect itemRect, int32 level) const; -virtual void DrawLatch(BRect itemRect, int32 level, bool collapsed, - bool highlighted, bool misTracked); -virtual void DrawItem(BListItem *i, BRect cRect, bool complete = false); - - BListItem *RemoveCommon(int32 fullListIndex); - BListItem *RemoveOne(int32 fullListIndex); - -static void TrackInLatchItem(void *); -static void TrackOutLatchItem(void *); - - bool OutlineSwapItems(int32 a, int32 b); - bool OutlineMoveItem(int32 from, int32 to); - bool OutlineReplaceItem(int32 index, BListItem *item); - void CommonMoveItems(int32 from, int32 count, int32 to); - BListItem *SuperitemForIndex(int32 fullListIndex, int32 level); - int32 FindPreviousVisibleIndex(int32 fullListIndex); - - BList fullList; - uint32 _reserved[2]; -}; - -/*----------------------------------------------------------------*/ -/*----------------------------------------------------------------*/ - -#endif /* _OUTLINE_LIST_VIEW_H */ diff --git a/headers/build/os/interface/Picture.h b/headers/build/os/interface/Picture.h deleted file mode 100644 index fb3c5d03dd..0000000000 --- a/headers/build/os/interface/Picture.h +++ /dev/null @@ -1,105 +0,0 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2001-2002, OpenBeOS -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -// DEALINGS IN THE SOFTWARE. -// -// File Name: Picture.h -// Author: Marc Flerackers (mflerackers@androme.be) -// Description: BPicture records a series of drawing instructions that can -// be "replayed" later. -//------------------------------------------------------------------------------ - -#ifndef _PICTURE_H -#define _PICTURE_H - -// Standard Includes ----------------------------------------------------------- - -// System Includes ------------------------------------------------------------- -#include -#include -#include -#include - -// Project Includes ------------------------------------------------------------ - -// Local Includes -------------------------------------------------------------- - -// Local Defines --------------------------------------------------------------- - -// Globals --------------------------------------------------------------------- - -class BView; -struct _BPictureExtent_; - -// BPicture class -------------------------------------------------------------- -class BPicture : public BArchivable { -public: - BPicture(); - BPicture(const BPicture &original); - BPicture(BMessage *data); -virtual ~BPicture(); -static BArchivable *Instantiate(BMessage *data); -virtual status_t Archive(BMessage *data, bool deep = true) const; -virtual status_t Perform(perform_code d, void *arg); - - status_t Play(void **callBackTable, - int32 tableEntries, - void *userData); - - status_t Flatten(BDataIO *stream); - status_t Unflatten(BDataIO *stream); - -/*----- Private or reserved -----------------------------------------*/ -private: - -friend class BWindow; -friend class BView; -friend class BPrintJob; - -virtual void _ReservedPicture1(); -virtual void _ReservedPicture2(); -virtual void _ReservedPicture3(); - - BPicture &operator=(const BPicture &); - - void init_data(); - void import_data(const void *data, int32 size, BPicture **subs, int32 subCount); - void import_old_data(const void *data, int32 size); - void set_token(int32 token); - bool assert_local_copy(); - bool assert_old_local_copy(); - bool assert_server_copy(); - - /**Deprecated API**/ - BPicture(const void *data, int32 size); - const void *Data() const; - int32 DataSize() const; - - void usurp(BPicture *lameDuck); - BPicture *step_down(); - - int32 token; - _BPictureExtent_ *extent; - BPicture *usurped; - uint32 _reserved[3]; -}; -//------------------------------------------------------------------------------ - -#endif // _PICTURE_H - diff --git a/headers/build/os/interface/PictureButton.h b/headers/build/os/interface/PictureButton.h deleted file mode 100644 index 995a1ba8a7..0000000000 --- a/headers/build/os/interface/PictureButton.h +++ /dev/null @@ -1,151 +0,0 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2001-2002, OpenBeOS -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -// DEALINGS IN THE SOFTWARE. -// -// File Name: PictureButton.h -// Author: Graham MacDonald (macdonag@btopenworld.com) -// Description: BPictureButton displays and controls a picture button in a -// window. -//------------------------------------------------------------------------------ - -#ifndef _PICTURE_BUTTON_H -#define _PICTURE_BUTTON_H - -// Standard Includes ----------------------------------------------------------- - -// System Includes ------------------------------------------------------------- -#include -#include -#include /* For convenience */ - -// Project Includes ------------------------------------------------------------ - -// Local Includes -------------------------------------------------------------- - -// Local Defines --------------------------------------------------------------- - -// Globals --------------------------------------------------------------------- -enum { - B_ONE_STATE_BUTTON, - B_TWO_STATE_BUTTON -}; - - -// BPictureButton class -------------------------------------------------------- -class BPictureButton : public BControl -{ -public: - BPictureButton (BRect frame, - const char* name, - BPicture *off, - BPicture *on, - BMessage *message, - uint32 behavior = B_ONE_STATE_BUTTON, - uint32 resizeMask = B_FOLLOW_LEFT | B_FOLLOW_TOP, - uint32 flgs = B_WILL_DRAW | B_NAVIGABLE); - BPictureButton (BMessage *data); - - virtual ~BPictureButton (); - - - static BArchivable *Instantiate (BMessage *data); - - virtual status_t Archive (BMessage *data, bool deep = true) const; - - virtual void Draw (BRect updateRect); - - virtual void MouseDown (BPoint point); - virtual void KeyDown (const char *bytes, int32 numBytes); - - virtual void SetEnabledOn (BPicture *on); - virtual void SetEnabledOff (BPicture *off); - virtual void SetDisabledOn (BPicture *on); - virtual void SetDisabledOff (BPicture *off); - - BPicture *EnabledOn () const; - BPicture *EnabledOff () const; - BPicture *DisabledOn () const; - BPicture *DisabledOff () const; - - virtual void SetBehavior (uint32 behavior); - uint32 Behavior () const; - - virtual void MessageReceived (BMessage *msg); - virtual void MouseUp (BPoint point); - virtual void WindowActivated (bool state); - virtual void MouseMoved (BPoint pt, uint32 code, const BMessage *msg); - virtual void AttachedToWindow (); - virtual void DetachedFromWindow (); - virtual void SetValue (int32 value); - virtual status_t Invoke (BMessage *msg = NULL); - virtual void FrameMoved (BPoint new_position); - virtual void FrameResized (float new_width, float new_height); - - virtual BHandler *ResolveSpecifier (BMessage *msg, - int32 index, - BMessage *specifier, - int32 form, - const char *property); - virtual status_t GetSupportedSuites (BMessage *data); - - virtual void ResizeToPreferred (); - virtual void GetPreferredSize (float *width, float *height); - virtual void MakeFocus (bool state = true); - virtual void AllAttached (); - virtual void AllDetached (); - - - // Private or reserved ----------------------------------------------------- - virtual status_t Perform (perform_code d, void *arg); - - -private: - - virtual void _ReservedPictureButton1 (); - virtual void _ReservedPictureButton2 (); - virtual void _ReservedPictureButton3 (); - - BPictureButton &operator= (const BPictureButton &); - - void Redraw (); - void InitData (); - - BPicture *fEnabledOff; - BPicture *fEnabledOn; - BPicture *fDisabledOff; - BPicture *fDisabledOn; - - bool fOutlined; - - uint32 fBehavior; - uint32 _reserved[4]; -}; - -//------------------------------------------------------------------------------ - -#endif /* _PICTURE_BUTTON_H */ - -/* - * $Log $ - * - * $Id $ - * - */ - diff --git a/headers/build/os/interface/Polygon.h b/headers/build/os/interface/Polygon.h deleted file mode 100644 index ed550c51a8..0000000000 --- a/headers/build/os/interface/Polygon.h +++ /dev/null @@ -1,84 +0,0 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2001-2002, OpenBeOS -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -// DEALINGS IN THE SOFTWARE. -// -// File Name: Polygon.h -// Author: Marc Flerackers (mflerackers@androme.be) -// Description: BPolygon represents a n-sided area. -//------------------------------------------------------------------------------ - -#ifndef _POLYGON_H -#define _POLYGON_H - -// Standard Includes ----------------------------------------------------------- - -// System Includes ------------------------------------------------------------- -#include -#include -#include - -// Project Includes ------------------------------------------------------------ - -// Local Includes -------------------------------------------------------------- - -// Local Defines --------------------------------------------------------------- - -// Globals --------------------------------------------------------------------- - -// BPolygon class -------------------------------------------------------------- -class BPolygon { - -public: - BPolygon(const BPoint *ptArray, int32 numPoints); - BPolygon(); - BPolygon(const BPolygon *poly); -virtual ~BPolygon(); - - BPolygon &operator=(const BPolygon &from); - - BRect Frame() const; - void AddPoints(const BPoint *ptArray, int32 numPoints); - int32 CountPoints() const; - void MapTo(BRect srcRect, BRect dstRect); - void PrintToStream() const; - -private: - -friend class BView; - - void compute_bounds(); - void map_pt(BPoint *point, BRect srcRect, BRect dstRect); - void map_rect(BRect *rect, BRect srcRect, BRect dstRect); - - BRect fBounds; - int32 fCount; - BPoint *fPts; -}; -//------------------------------------------------------------------------------ - -#endif // _POLYGON_H_ - -/* - * $Log $ - * - * $Id $ - * - */ - diff --git a/headers/build/os/interface/PopUpMenu.h b/headers/build/os/interface/PopUpMenu.h deleted file mode 100644 index 65aca9952e..0000000000 --- a/headers/build/os/interface/PopUpMenu.h +++ /dev/null @@ -1,105 +0,0 @@ -/******************************************************************************* -/ -/ File: PopUpMenu.h -/ -/ Description: BPopUpMenu represents a menu that pops up when you -/ activate it. -/ -/ Copyright 1994-98, Be Incorporated, All Rights Reserved -/ -*******************************************************************************/ - -#ifndef _POP_UP_MENU_H -#define _POP_UP_MENU_H - -#include -#include - -/*----------------------------------------------------------------*/ -/*----- BPopUpMenu class -----------------------------------------*/ - -class BPopUpMenu : public BMenu -{ -public: - BPopUpMenu( const char *title, - bool radioMode = true, - bool autoRename = true, - menu_layout layout = B_ITEMS_IN_COLUMN - ); - BPopUpMenu(BMessage *data); -virtual ~BPopUpMenu(); -virtual status_t Archive(BMessage *data, bool deep = true) const; -static BArchivable *Instantiate(BMessage *data); - - BMenuItem *Go(BPoint where, - bool delivers_message = false, - bool open_anyway = false, - bool async = false); - BMenuItem *Go(BPoint where, - bool delivers_message, - bool open_anyway, - BRect click_to_open, - bool async = false); - -virtual void MessageReceived(BMessage *msg); -virtual void MouseDown(BPoint pt); -virtual void MouseUp(BPoint pt); -virtual void MouseMoved(BPoint pt, uint32 code, const BMessage *msg); -virtual void AttachedToWindow(); -virtual void DetachedFromWindow(); -virtual void FrameMoved(BPoint new_position); -virtual void FrameResized(float new_width, float new_height); - -virtual BHandler *ResolveSpecifier(BMessage *msg, - int32 index, - BMessage *specifier, - int32 form, - const char *property); -virtual status_t GetSupportedSuites(BMessage *data); - -virtual status_t Perform(perform_code d, void *arg); - -virtual void ResizeToPreferred(); -virtual void GetPreferredSize(float *width, float *height); -virtual void MakeFocus(bool state = true); -virtual void AllAttached(); -virtual void AllDetached(); - - void SetAsyncAutoDestruct(bool state); - bool AsyncAutoDestruct() const; - -protected: -virtual BPoint ScreenLocation(); - -virtual void _ReservedPopUpMenu1(); -virtual void _ReservedPopUpMenu2(); -virtual void _ReservedPopUpMenu3(); - - BPopUpMenu &operator=(const BPopUpMenu &); - -/*----- Private or reserved -----------------------------------------*/ -private: - BMenuItem *_go( BPoint where, - bool autoInvoke, - bool start_opened, - BRect *special_rect, - bool async); -static int32 entry(void *); - BMenuItem *start_track(BPoint where, - bool autoInvoke, - bool start_opened, - BRect *special_rect); - - BPoint fWhere; - bool fUseWhere; - bool fAutoDestruct; - bool _fUnusedBool1; - bool _fUnusedBool2; - thread_id fTrackThread; - uint32 _reserved[3]; -}; - -/*-------------------------------------------------------------*/ -/*-------------------------------------------------------------*/ - -#endif /* _POP_UP_MENU_H */ diff --git a/headers/build/os/interface/PrintJob.h b/headers/build/os/interface/PrintJob.h deleted file mode 100644 index f27a2c9e1e..0000000000 --- a/headers/build/os/interface/PrintJob.h +++ /dev/null @@ -1,123 +0,0 @@ -/******************************************************************************* -/ -/ File: PrintJob.h -/ -/ Description: BPrintJob runs a printing session. -/ -/ Copyright 1996-98, Be Incorporated, All Rights Reserved -/ -*******************************************************************************/ - -#ifndef _PRINTSESSION_H -#define _PRINTSESSION_H - -#include -#include /* For convenience */ -#include - -class BView; - -/*----------------------------------------------------------------*/ -/*----- BPrintJob related structures -----------------------------*/ - -struct print_file_header { - int32 version; - int32 page_count; - off_t first_page; - int32 _reserved_3_; - int32 _reserved_4_; - int32 _reserved_5_; -}; - -struct _page_header_; - -/*----------------------------------------------------------------*/ -/*----- BPrintJob class ------------------------------------------*/ - -class BPrintJob { -public: - - enum // These values are returned by PrinterType() - { - B_BW_PRINTER = 0, - B_COLOR_PRINTER - }; - - - BPrintJob(const char *job_name); -virtual ~BPrintJob(); - - void BeginJob(); - void CommitJob(); - status_t ConfigJob(); - void CancelJob(); - - status_t ConfigPage(); - void SpoolPage(); - - bool CanContinue(); - -virtual void DrawView(BView *a_view, BRect a_rect, BPoint where); - - BMessage *Settings() /* const */ ; - void SetSettings(BMessage *a_msg); - bool IsSettingsMessageValid(BMessage *a_msg) const; - - BRect PaperRect(); - BRect PrintableRect(); - void GetResolution(int32 *xdpi, int32 *ydpi); - - int32 FirstPage() /* const */ ; - int32 LastPage() /* const */ ; - int32 PrinterType(void * = NULL) const; - - -/*----- Private or reserved -----------------------------------------*/ -private: - -virtual void _ReservedPrintJob1(); -virtual void _ReservedPrintJob2(); -virtual void _ReservedPrintJob3(); -virtual void _ReservedPrintJob4(); - - BPrintJob(const BPrintJob &); - BPrintJob &operator=(const BPrintJob &); - - void RecurseView(BView *v, BPoint origin, BPicture *p, BRect r); - void MangleName(char *filename); - void HandlePageSetup(BMessage *setup); - bool HandlePrintSetup(BMessage *setup); - - void NewPage(); - void EndLastPage(); - - void AddSetupSpec(); - void AddPicture(BPicture *picture, BRect *rect, BPoint where); - - char* GetCurrentPrinterName() const; - void LoadDefaultSettings(); - - char * print_job_name; - int32 page_number; - BFile * spoolFile; - print_file_header current_header; - BRect paper_size; - BRect usable_size; - int pr_error; - char spool_file_name[256]; - BMessage *setup_msg; - BMessage *default_setup_msg; - char stop_the_show; - int32 first_page; - int32 last_page; - short v_xres; - short v_yres; - _page_header_ * m_curPageHeader; - off_t m_curPageHeaderOffset; - uint32 _reserved[2]; -}; - -/*-------------------------------------------------------------*/ -/*-------------------------------------------------------------*/ - -#endif /* _PRINTSESSION_H */ diff --git a/headers/build/os/interface/RadioButton.h b/headers/build/os/interface/RadioButton.h deleted file mode 100644 index 0a03a62c12..0000000000 --- a/headers/build/os/interface/RadioButton.h +++ /dev/null @@ -1,118 +0,0 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2001-2002, OpenBeOS -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -// DEALINGS IN THE SOFTWARE. -// -// File Name: RadioButton.cpp -// Author: Marc Flerackers (mflerackers@androme.be) -// Description: BRadioButton represents a single on/off button. All -// sibling BRadioButton objects comprise a single -// "multiple choice" control. -//------------------------------------------------------------------------------ - -#ifndef _RADIO_BUTTON_H -#define _RADIO_BUTTON_H - -// Standard Includes ----------------------------------------------------------- - -// System Includes ------------------------------------------------------------- -#include -#include -#include - -// Project Includes ------------------------------------------------------------ - -// Local Includes -------------------------------------------------------------- - -// Local Defines --------------------------------------------------------------- - -// Globals --------------------------------------------------------------------- - -// BRadioButton class ---------------------------------------------------------- -class BRadioButton : public BControl { - -public: - BRadioButton(BRect frame, - const char *name, - const char *label, - BMessage *message, - uint32 resizMask = B_FOLLOW_LEFT | B_FOLLOW_TOP, - uint32 flags = B_WILL_DRAW | B_NAVIGABLE); - - BRadioButton(BMessage *archive); -virtual ~BRadioButton(); - -static BArchivable *Instantiate(BMessage *archive); -virtual status_t Archive(BMessage *archive, bool deep = true) const; - -virtual void Draw(BRect updateRect); -virtual void MouseDown(BPoint point); -virtual void AttachedToWindow(); -virtual void KeyDown(const char *bytes, int32 numBytes); -virtual void SetValue(int32 value); -virtual void GetPreferredSize(float *width, float *height); -virtual void ResizeToPreferred(); -virtual status_t Invoke(BMessage *message = NULL); - -virtual void MessageReceived(BMessage *message); -virtual void WindowActivated(bool active); -virtual void MouseUp(BPoint point); -virtual void MouseMoved(BPoint point, uint32 transit, const BMessage *message); -virtual void DetachedFromWindow(); -virtual void FrameMoved(BPoint newLocation); -virtual void FrameResized(float width, float height); - -virtual BHandler *ResolveSpecifier(BMessage *message, - int32 index, - BMessage *specifier, - int32 what, - const char *property); - -virtual void MakeFocus(bool focused = true); -virtual void AllAttached(); -virtual void AllDetached(); -virtual status_t GetSupportedSuites(BMessage *message); - -virtual status_t Perform(perform_code d, void *arg); - -private: -friend status_t _init_interface_kit_(); - -virtual void _ReservedRadioButton1(); -virtual void _ReservedRadioButton2(); - - BRadioButton &operator=(const BRadioButton &); - - BRect _KnobFrame() const; - -static BBitmap *sBitmaps[2][3]; - - bool fOutlined; - uint32 _reserved[2]; -}; -//------------------------------------------------------------------------------ - -#endif // _RADIO_BUTTON_H - -/* - * $Log $ - * - * $Id $ - * - */ diff --git a/headers/build/os/interface/Region.h b/headers/build/os/interface/Region.h deleted file mode 100644 index b4d1fab129..0000000000 --- a/headers/build/os/interface/Region.h +++ /dev/null @@ -1,85 +0,0 @@ -/******************************************************************************* -/ -/ File: Region.h -/ -/ Description: BRegion represents an area that's composed of individual -/ rectangles. -/ -/ Copyright 1992-98, Be Incorporated, All Rights Reserved -/ -*******************************************************************************/ - -#ifndef _REGION_H -#define _REGION_H - -#include -#include - -namespace BPrivate { - class ServerLink; -}; - - -/* Integer rect used to define a cliping rectangle. All bounds are included */ -/* Moved from DirectWindow.h */ -typedef struct { - int32 left; - int32 top; - int32 right; - int32 bottom; -} clipping_rect; - - -/*----- BRegion class --------------------------------------------*/ - -class BRegion { -public: - BRegion(); - BRegion(const BRegion ®ion); - BRegion(const BRect rect); -virtual ~BRegion(); - - BRegion &operator=(const BRegion &from); - - BRect Frame() const; -clipping_rect FrameInt() const; - BRect RectAt(int32 index); -clipping_rect RectAtInt(int32 index); - int32 CountRects(); - void Set(BRect newBounds); - void Set(clipping_rect newBounds); - bool Intersects(BRect r) const; - bool Intersects(clipping_rect r) const; - bool Contains(BPoint pt) const; - bool Contains(int32 x, int32 y); - void PrintToStream() const; - void OffsetBy(int32 dh, int32 dv); - void MakeEmpty(); - void Include(BRect r); - void Include(clipping_rect r); - void Include(const BRegion*); - void Exclude(BRect r); - void Exclude(clipping_rect r); - void Exclude(const BRegion*); - void IntersectWith(const BRegion*); - -/*----- Private or reserved -----------------------------------------*/ - class Support; - -private: - friend class BView; - friend class BDirectWindow; - friend class Support; - friend class BPrivate::ServerLink; - - void _AddRect(clipping_rect r); - void set_size(long new_size); - -private: - long count; - long data_size; - clipping_rect bound; - clipping_rect *data; -}; - -#endif /* _REGION_H */ diff --git a/headers/build/os/interface/ScrollBar.h b/headers/build/os/interface/ScrollBar.h deleted file mode 100644 index b7b8a0b5da..0000000000 --- a/headers/build/os/interface/ScrollBar.h +++ /dev/null @@ -1,153 +0,0 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2001-2002, OpenBeOS -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -// DEALINGS IN THE SOFTWARE. -// -// File Name: ScrollBar.h -// Author: Marc Flerackers (mflerackers@androme.be) -// DarkWyrm (bpmagic@columbus.rr.com) -// Description: Client-side class for scrolling -// -//------------------------------------------------------------------------------ -#ifndef _SCROLL_BAR_H -#define _SCROLL_BAR_H - -#include -#include - -//---------------------------------------------------------------- -//----- scroll bar defines --------------------------------------- - -#define B_V_SCROLL_BAR_WIDTH 14.0 -#define B_H_SCROLL_BAR_HEIGHT 14.0 - -#define SCROLL_BAR_MAXIMUM_KNOB_SIZE 50 -#define SCROLL_BAR_MINIMUM_KNOB_SIZE 9 - -//---------------------------------------------------------------- -//----- BScrollBar class ----------------------------------------- - -class BScrollBar : public BView { - -public: - BScrollBar( BRect frame, - const char *name, - BView *target, - float min, - float max, - orientation direction); - BScrollBar(BMessage *data); -virtual ~BScrollBar(); -static BArchivable *Instantiate(BMessage *data); -virtual status_t Archive(BMessage *data, bool deep = true) const; - -virtual void AttachedToWindow(); - void SetValue(float value); - float Value() const; - void SetProportion(float); - float Proportion() const; -virtual void ValueChanged(float newValue); - - void SetRange(float min, float max); - void GetRange(float *min, float *max) const; - void SetSteps(float smallStep, float largeStep); - void GetSteps(float *smallStep, float *largeStep) const; - void SetTarget(BView *target); - void SetTarget(const char *targetName); - BView *Target() const; - orientation Orientation() const; - -virtual void MessageReceived(BMessage *msg); -virtual void MouseDown(BPoint pt); -virtual void MouseUp(BPoint pt); -virtual void MouseMoved(BPoint pt, uint32 code, const BMessage *msg); -virtual void DetachedFromWindow(); -virtual void Draw(BRect updateRect); -virtual void FrameMoved(BPoint new_position); -virtual void FrameResized(float new_width, float new_height); - -virtual BHandler *ResolveSpecifier(BMessage *msg, - int32 index, - BMessage *specifier, - int32 form, - const char *property); - -virtual void ResizeToPreferred(); -virtual void GetPreferredSize(float *width, float *height); -virtual void MakeFocus(bool state = true); -virtual void AllAttached(); -virtual void AllDetached(); -virtual status_t GetSupportedSuites(BMessage *data); - - -//----- Private or reserved ----------------------------------------- -virtual status_t Perform(perform_code d, void *arg); - -private: - class Private; - friend class Private; - - friend status_t control_scrollbar(scroll_bar_info *info, BScrollBar *bar); // for use within the preflet - -virtual void _ReservedScrollBar1(); -virtual void _ReservedScrollBar2(); -virtual void _ReservedScrollBar3(); -virtual void _ReservedScrollBar4(); - - BScrollBar &operator=(const BScrollBar &); - - bool _DoubleArrows() const; - void _UpdateThumbFrame(); - float _ValueFor(BPoint where) const; - int32 _ButtonFor(BPoint where) const; - BRect _ButtonRectFor(int32 button) const; - void _UpdateTargetValue(BPoint where); - void _UpdateArrowButtons(); - void _DrawArrowButton(int32 direction, - BRect frame, bool down); - - -/* void DrawButtons(BRect updateRect); - void DrawArrow(BPoint pos, int32 which, bool pressed = false); - void DrawButton(BRect frame, int32 arrowType, bool pressed = false); - - BRect BarFrame() const; - BRect KnobFrame() const; - float ValueToPosition(float val) const; - float PositionToValue(float pos) const;*/ - - float fMin; - float fMax; - float fSmallStep; - float fLargeStep; - float fValue; - float fProportion; - BView* fTarget; - orientation fOrientation; - char* fTargetName; - - Private* fPrivateData; - - uint32 _reserved[3]; -}; - -//------------------------------------------------------------- -//------------------------------------------------------------- - -#endif // _SCROLL_BAR_H diff --git a/headers/build/os/interface/ScrollView.h b/headers/build/os/interface/ScrollView.h deleted file mode 100644 index 26ae19e510..0000000000 --- a/headers/build/os/interface/ScrollView.h +++ /dev/null @@ -1,92 +0,0 @@ -/* -** Copyright 2004, OpenBeOS. All Rights Reserved. -** Distributed under the terms of the OpenBeOS License. -*/ -#ifndef _SCROLL_VIEW_H -#define _SCROLL_VIEW_H - -/** The BScrollView is a convenience class to add a scrolling - * mechanism to the target view. - */ - -#include - - -class BScrollView : public BView { - public: - BScrollView(const char *name, BView *target, - uint32 resizingMode = B_FOLLOW_LEFT | B_FOLLOW_TOP, - uint32 flags = 0, bool horizontal = false, bool vertical = false, - border_style border = B_FANCY_BORDER); - BScrollView(BMessage *archive); - virtual ~BScrollView(); - - static BArchivable *Instantiate(BMessage *archive); - virtual status_t Archive(BMessage *archive, bool deep = true) const; - - virtual void Draw(BRect updateRect); - virtual void AttachedToWindow(); - - BScrollBar *ScrollBar(orientation posture) const; - - virtual void SetBorder(border_style border); - border_style Border() const; - - virtual status_t SetBorderHighlighted(bool state); - bool IsBorderHighlighted() const; - - void SetTarget(BView *target); - BView *Target() const; - - virtual void MessageReceived(BMessage *message); - virtual void MouseDown(BPoint point); - - virtual void WindowActivated(bool active); - virtual void MouseUp(BPoint point); - virtual void MouseMoved(BPoint point, uint32 code, const BMessage *msg); - - virtual void DetachedFromWindow(); - virtual void AllAttached(); - virtual void AllDetached(); - - virtual void FrameMoved(BPoint position); - virtual void FrameResized(float width, float height); - - virtual BHandler *ResolveSpecifier(BMessage *message, int32 index, - BMessage *specifier, int32 form, const char *property); - - virtual void ResizeToPreferred(); - virtual void GetPreferredSize(float *_width, float *_height); - virtual void MakeFocus(bool state = true); - virtual status_t GetSupportedSuites(BMessage *data); - - // private or reserved methods are following - - virtual status_t Perform(perform_code d, void *arg); - - private: - friend class BView; - - virtual void _ReservedScrollView1(); - virtual void _ReservedScrollView2(); - virtual void _ReservedScrollView3(); - virtual void _ReservedScrollView4(); - - BScrollView &operator=(const BScrollView &); - - static BRect CalcFrame(BView *target, bool h, bool v, border_style); - static float BorderSize(border_style border); - static int32 ModifyFlags(int32 flags, border_style); - - BView *fTarget; - BScrollBar *fHorizontalScrollBar; - BScrollBar *fVerticalScrollBar; - border_style fBorder; - uint16 fPreviousWidth; - uint16 fPreviousHeight; - bool fHighlighted; - - uint32 _reserved[3]; -}; - -#endif /* _SCROLL_VIEW_H */ diff --git a/headers/build/os/interface/SeparatorItem.h b/headers/build/os/interface/SeparatorItem.h deleted file mode 100644 index 636492a54d..0000000000 --- a/headers/build/os/interface/SeparatorItem.h +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef _SEPARATOR_ITEM_H -#define _SEPARATOR_ITEM_H - -#include - -class BMessage; -class BSeparatorItem : public BMenuItem { -public: - BSeparatorItem(); - BSeparatorItem(BMessage *data); - - virtual ~BSeparatorItem(); - virtual status_t Archive(BMessage *data, bool deep = true) const; - - static BArchivable *Instantiate(BMessage *data); - virtual void SetEnabled(bool state); - -protected: - virtual void GetContentSize(float *width, float *height); - virtual void Draw(); - -private: - virtual void _ReservedSeparatorItem1(); - virtual void _ReservedSeparatorItem2(); - - BSeparatorItem &operator=(const BSeparatorItem &); - - uint32 _reserved[1]; -}; - - -#endif /* _SEPARATOR_ITEM_H */ diff --git a/headers/build/os/interface/Shape.h b/headers/build/os/interface/Shape.h deleted file mode 100644 index 40a80288ae..0000000000 --- a/headers/build/os/interface/Shape.h +++ /dev/null @@ -1,98 +0,0 @@ -/******************************************************************************* -/ -/ File: Shape.h -/ -/ Description: BShape encapsulates a Postscript-style "path" -/ -/ Copyright 1992-98, Be Incorporated, All Rights Reserved -/ -*******************************************************************************/ - -#ifndef _SHAPE_H -#define _SHAPE_H - -#include -#include - -namespace BPrivate { - class ServerLink; -}; - - -/*----------------------------------------------------------------*/ -/*----- BShapeIterator class -------------------------------------*/ - -class BShapeIterator { - -public: - BShapeIterator(); -virtual ~BShapeIterator(); - -virtual status_t IterateMoveTo(BPoint *point); -virtual status_t IterateLineTo(int32 lineCount, BPoint *linePts); -virtual status_t IterateBezierTo(int32 bezierCount, BPoint *bezierPts); -virtual status_t IterateClose(); - - status_t Iterate(BShape *shape); - -private: - -virtual void _ReservedShapeIterator1(); -virtual void _ReservedShapeIterator2(); -virtual void _ReservedShapeIterator3(); -virtual void _ReservedShapeIterator4(); - - uint32 reserved[4]; -}; - -/*----------------------------------------------------------------*/ -/*----- BShape class ---------------------------------------------*/ - -class BShape : public BArchivable { - -public: - BShape(); - BShape(const BShape ©From); - BShape(BMessage *data); -virtual ~BShape(); - -virtual status_t Archive(BMessage *into, bool deep = true) const; -static BArchivable *Instantiate(BMessage *data); - - void Clear(); - BRect Bounds() const; - - status_t AddShape(const BShape *other); - - status_t MoveTo(BPoint point); - status_t LineTo(BPoint linePoint); - status_t BezierTo(BPoint controlPoints[3]); - status_t Close(); - -/*----- Private or reserved ---------------*/ -virtual status_t Perform(perform_code d, void *arg); - -private: - -virtual void _ReservedShape1(); -virtual void _ReservedShape2(); -virtual void _ReservedShape3(); -virtual void _ReservedShape4(); - - friend class BShapeIterator; - friend class TPicture; - friend class BView; - friend class BFont; - friend class BPrivate::ServerLink; - - void GetData(int32 *opCount, int32 *ptCount, uint32 **opList, BPoint **ptList); - void SetData(int32 opCount, int32 ptCount, uint32 *opList, BPoint *ptList); - void InitData(); - - uint32 fState; - uint32 fBuildingOp; - void * fPrivateData; - uint32 reserved[4]; -}; - -#endif diff --git a/headers/build/os/interface/Shelf.h b/headers/build/os/interface/Shelf.h deleted file mode 100644 index 7afbd91622..0000000000 --- a/headers/build/os/interface/Shelf.h +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright 2001-2005, Haiku Inc. - * Distributed under the terms of the MIT License. - */ -#ifndef _SHELF_H -#define _SHELF_H - - -#include -#include - -class BDataIO; -class BView; -class BEntry; -struct entry_ref; - -class _rep_data_; - -class BShelf : public BHandler { - public: - BShelf(BView* view, bool allowDrags = true, const char* shelfType = NULL); - BShelf(const entry_ref* ref, BView* view, bool allowDrags = true, - const char* shelfType = NULL); - BShelf(BDataIO* stream, BView* view, bool allowDrags = true, - const char* shelfType = NULL); - BShelf(BMessage *data); - virtual ~BShelf(); - - virtual status_t Archive(BMessage* data, bool deep = true) const; - static BArchivable* Instantiate(BMessage* archive); - - virtual void MessageReceived(BMessage *msg); - status_t Save(); - virtual void SetDirty(bool state); - bool IsDirty() const; - - virtual BHandler* ResolveSpecifier(BMessage *msg, - int32 index, BMessage *specifier, - int32 form, const char *property); - virtual status_t GetSupportedSuites(BMessage* data); - - virtual status_t Perform(perform_code d, void *arg); - bool AllowsDragging() const; - void SetAllowsDragging(bool state); - bool AllowsZombies() const; - void SetAllowsZombies(bool state); - bool DisplaysZombies() const; - void SetDisplaysZombies(bool state); - bool IsTypeEnforced() const; - void SetTypeEnforced(bool state); - - status_t SetSaveLocation(BDataIO *data_io); - status_t SetSaveLocation(const entry_ref *ref); - BDataIO* SaveLocation(entry_ref *ref) const; - - status_t AddReplicant(BMessage *data, BPoint location); - status_t DeleteReplicant(BView *replicant); - status_t DeleteReplicant(BMessage *data); - status_t DeleteReplicant(int32 index); - int32 CountReplicants() const; - BMessage* ReplicantAt(int32 index, - BView **view = NULL, - uint32 *uid = NULL, - status_t *perr = NULL) const; - int32 IndexOf(const BView *replicantView) const; - int32 IndexOf(const BMessage *archive) const; - int32 IndexOf(uint32 id) const; - - protected: - virtual bool CanAcceptReplicantMessage(BMessage*) const; - virtual bool CanAcceptReplicantView(BRect, BView*, BMessage*) const; - virtual BPoint AdjustReplicantBy(BRect, BMessage*) const; - - virtual void ReplicantDeleted(int32 index, const BMessage *archive, - const BView *replicant); - - private: - friend class _TContainerViewFilter_; - - virtual void _ReservedShelf2(); - virtual void _ReservedShelf3(); - virtual void _ReservedShelf4(); - virtual void _ReservedShelf5(); - virtual void _ReservedShelf6(); - virtual void _ReservedShelf7(); - virtual void _ReservedShelf8(); - - BShelf(const BShelf& other); - BShelf& operator=(const BShelf& other); - - status_t _Archive(BMessage* data) const; - void _InitData(BEntry* entry, BDataIO* stream, - BView* view, bool allowDrags); - status_t _DeleteReplicant(_rep_data_* replicant); - status_t _RealAddReplicant(BMessage* data, - BPoint* location, uint32 uniqueID); - status_t _GetProperty(BMessage* message, BMessage* reply); - - private: - BView* fContainerView; - BDataIO* fStream; - BEntry* fEntry; - BList fReplicants; - _TContainerViewFilter_* fFilter; - uint32 fGenCount; - bool fAllowDragging; - bool fDirty; - bool fDisplayZombies; - bool fAllowZombies; - bool fTypeEnforced; - - uint32 _reserved[8]; -}; - -#endif /* _SHELF_H */ diff --git a/headers/build/os/interface/Slider.h b/headers/build/os/interface/Slider.h deleted file mode 100644 index 266229e2c4..0000000000 --- a/headers/build/os/interface/Slider.h +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Copyright 2001-2005, Haiku. - * Distributed under the terms of the MIT License. - * - * Authors: - * Marc Flerackers (mflerackers@androme.be) - */ -#ifndef _SLIDER_H -#define _SLIDER_H - - -#include -#include - - -enum hash_mark_location { - B_HASH_MARKS_NONE = 0, - B_HASH_MARKS_TOP = 1, - B_HASH_MARKS_LEFT = 1, - B_HASH_MARKS_BOTTOM = 2, - B_HASH_MARKS_RIGHT = 2, - B_HASH_MARKS_BOTH = 3 -}; - -enum thumb_style { - B_BLOCK_THUMB, - B_TRIANGLE_THUMB -}; - - -#define USE_OFF_SCREEN_VIEW 0 - - -class BSlider : public BControl { - public: - BSlider(BRect frame, const char *name, const char *label, - BMessage *message, int32 minValue, int32 maxValue, - thumb_style thumbType = B_BLOCK_THUMB, - uint32 resizingMode = B_FOLLOW_LEFT | B_FOLLOW_TOP, - uint32 flags = B_NAVIGABLE | B_WILL_DRAW | B_FRAME_EVENTS); - - BSlider(BRect frame, const char *name, const char *label, - BMessage *message, int32 minValue, int32 maxValue, - orientation posture, thumb_style thumbType = B_BLOCK_THUMB, - uint32 resizingMode = B_FOLLOW_LEFT | B_FOLLOW_TOP, - uint32 flags = B_NAVIGABLE | B_WILL_DRAW | B_FRAME_EVENTS); - - BSlider(BMessage *data); - virtual ~BSlider(); - - static BArchivable *Instantiate(BMessage *data); - virtual status_t Archive(BMessage *data, bool deep = true) const; - virtual status_t Perform(perform_code d, void *arg); - - virtual void WindowActivated(bool state); - virtual void AttachedToWindow(); - virtual void AllAttached(); - virtual void AllDetached(); - virtual void DetachedFromWindow(); - - virtual void MessageReceived(BMessage *msg); - virtual void FrameMoved(BPoint new_position); - virtual void FrameResized(float w,float h); - virtual void KeyDown(const char * bytes, int32 n); - virtual void MouseDown(BPoint); - virtual void MouseUp(BPoint pt); - virtual void MouseMoved(BPoint pt, uint32 c, const BMessage *m); - virtual void Pulse(); - - virtual void SetLabel(const char *label); - virtual void SetLimitLabels(const char *minLabel, - const char *maxLabel); - const char* MinLimitLabel() const; - const char* MaxLimitLabel() const; - virtual void SetValue(int32); - virtual int32 ValueForPoint(BPoint) const; - virtual void SetPosition(float); - float Position() const; - virtual void SetEnabled(bool on); - void GetLimits(int32 * minimum, int32 * maximum); - - virtual void Draw(BRect); - virtual void DrawSlider(); - virtual void DrawBar(); - virtual void DrawHashMarks(); - virtual void DrawThumb(); - virtual void DrawFocusMark(); - virtual void DrawText(); - virtual char* UpdateText() const; - - virtual BRect BarFrame() const; - virtual BRect HashMarksFrame() const; - virtual BRect ThumbFrame() const; - - virtual void SetFlags(uint32 flags); - virtual void SetResizingMode(uint32 mode); - - virtual void GetPreferredSize( float *width, float *height); - virtual void ResizeToPreferred(); - - virtual status_t Invoke(BMessage *msg=NULL); - virtual BHandler* ResolveSpecifier(BMessage *msg, int32 index, - BMessage *specifier, int32 form, - const char *property); - virtual status_t GetSupportedSuites(BMessage* data); - - virtual void SetModificationMessage(BMessage *message); - BMessage* ModificationMessage() const; - - virtual void SetSnoozeAmount(int32); - int32 SnoozeAmount() const; - - virtual void SetKeyIncrementValue(int32 value); - int32 KeyIncrementValue() const; - - virtual void SetHashMarkCount(int32 count); - int32 HashMarkCount() const; - - virtual void SetHashMarks(hash_mark_location where); - hash_mark_location HashMarks() const; - - virtual void SetStyle(thumb_style s); - thumb_style Style() const; - - virtual void SetBarColor(rgb_color); - rgb_color BarColor() const; - virtual void UseFillColor(bool, const rgb_color* c=NULL); - bool FillColor(rgb_color*) const; - - BView* OffscreenView() const; - - orientation Orientation() const; - virtual void SetOrientation(orientation); - - float BarThickness() const; - virtual void SetBarThickness(float thickness); - - virtual void SetFont(const BFont *font, uint32 properties = B_FONT_ALL); - -#ifdef __HAIKU__ - virtual void SetLimits(int32 minimum, int32 maximum); // Was _ReservedSlider4() -#endif - - private: - void _DrawBlockThumb(); - void _DrawTriangleThumb(); - - BPoint _Location() const; - void _SetLocation(BPoint p); - - float _MinPosition() const; - float _MaxPosition() const; - bool _ConstrainPoint(BPoint point, BPoint compare) const; - -#ifndef __HAIKU__ - virtual void _ReservedSlider4(); -#endif - virtual void _ReservedSlider5(); - virtual void _ReservedSlider6(); - virtual void _ReservedSlider7(); - virtual void _ReservedSlider8(); - virtual void _ReservedSlider9(); - virtual void _ReservedSlider10(); - virtual void _ReservedSlider11(); - virtual void _ReservedSlider12(); - - BSlider& operator=(const BSlider &); - - void _InitObject(); - - private: - BMessage* fModificationMessage; - int32 fSnoozeAmount; - - rgb_color fBarColor; - rgb_color fFillColor; - bool fUseFillColor; - - char* fMinLimitStr; - char* fMaxLimitStr; - - int32 fMinValue; - int32 fMaxValue; - int32 fKeyIncrementValue; - - int32 fHashMarkCount; - hash_mark_location fHashMarks; - -#if USE_OFF_SCREEN_VIEW - BBitmap* fOffScreenBits; - BView* fOffScreenView; -#endif - - thumb_style fStyle; - - BPoint fLocation; - BPoint fInitialLocation; - - orientation fOrientation; - float fBarThickness; - -#if USE_OFF_SCREEN_VIEW - uint32 _reserved[8]; -#else - uint32 _reserved[10]; -#endif -}; - -#endif // _SLIDER_H diff --git a/headers/build/os/interface/StatusBar.h b/headers/build/os/interface/StatusBar.h deleted file mode 100644 index 1a0e6de313..0000000000 --- a/headers/build/os/interface/StatusBar.h +++ /dev/null @@ -1,141 +0,0 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2001-2002, OpenBeOS -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -// DEALINGS IN THE SOFTWARE. -// -// File Name: StatusBar.h -// Author: Marc Flerackers (mflerackers@androme.be) -// Description: BStatusBar displays a "percentage-of-completion" gauge. -//------------------------------------------------------------------------------ - -#ifndef _STATUS_BAR_H -#define _STATUS_BAR_H - -// Standard Includes ----------------------------------------------------------- - -// System Includes ------------------------------------------------------------- -#include -#include - -// Project Includes ------------------------------------------------------------ - -// Local Includes -------------------------------------------------------------- - -// Local Defines --------------------------------------------------------------- - -// Globals --------------------------------------------------------------------- - - -// BStatusBar class ------------------------------------------------------------ -class BStatusBar : public BView -{ -public: - BStatusBar(BRect frame, const char *name, const char *label = NULL, - const char *trailingLabel = NULL); - BStatusBar(BMessage *archive); - - virtual ~BStatusBar(); - - static BArchivable *Instantiate(BMessage *archive); - virtual status_t Archive(BMessage *archive, bool deep = true) const; - - virtual void AttachedToWindow(); - virtual void MessageReceived(BMessage *message); - virtual void Draw(BRect updateRect); - - virtual void SetBarColor(rgb_color color); - virtual void SetBarHeight(float height); - virtual void SetText(const char *string); - virtual void SetTrailingText(const char *string); - virtual void SetMaxValue(float max); - - void Update(float delta, const char *text = NULL, const char *trailingText = NULL); - virtual void Reset(const char *label = NULL, const char *trailingLabel = NULL); - - float CurrentValue() const; - float MaxValue() const; - rgb_color BarColor() const; - float BarHeight() const; - const char *Text() const; - const char *TrailingText() const; - const char *Label() const; - const char *TrailingLabel() const; - - virtual void MouseDown(BPoint point); - virtual void MouseUp(BPoint point); - virtual void WindowActivated(bool state); - virtual void MouseMoved(BPoint point, uint32 transit, const BMessage *message); - virtual void DetachedFromWindow(); - virtual void FrameMoved(BPoint new_position); - virtual void FrameResized(float new_width, float new_height); - - virtual BHandler *ResolveSpecifier(BMessage *message, int32 index, BMessage *specifier, - int32 what, const char *property); - - virtual void ResizeToPreferred(); - virtual void GetPreferredSize(float *width, float *height); - virtual void MakeFocus(bool state = true); - virtual void AllAttached(); - virtual void AllDetached(); - virtual status_t GetSupportedSuites(BMessage *data); - - virtual status_t Perform(perform_code d, void *arg); - -private: - virtual void _ReservedStatusBar1(); - virtual void _ReservedStatusBar2(); - virtual void _ReservedStatusBar3(); - virtual void _ReservedStatusBar4(); - - BStatusBar &operator=(const BStatusBar &); - - void InitObject(const char *l, const char *aux_l); - void SetTextData(char **pp, const char *str); - void FillBar(BRect r); - void Resize(); - void _Draw(BRect updateRect, bool bar_only); - - char *fLabel; - char *fTrailingLabel; - char *fText; - char *fTrailingText; - float fMax; - float fCurrent; - float fBarHeight; - float fTrailingWidth; - rgb_color fBarColor; - float fEraseText; - float fEraseTrailingText; - bool fCustomBarHeight; - bool _pad1; - bool _pad2; - bool _pad3; - uint32 _reserved[3]; -}; - -//------------------------------------------------------------------------------ - -#endif // _STATUS_BAR_H - -/* - * $Log $ - * - * $Id $ - * - */ diff --git a/headers/build/os/interface/StringItem.h b/headers/build/os/interface/StringItem.h deleted file mode 100644 index 4fdf4a1f42..0000000000 --- a/headers/build/os/interface/StringItem.h +++ /dev/null @@ -1,58 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -// -// File: StringItem.h -// -// Description: -// -// Copyright 2001, Ulrich Wimboeck -// -//////////////////////////////////////////////////////////////////////////////// - -#ifndef _STRING_ITEM_H -#define _STRING_ITEM_H - -#include - - -#ifdef USE_OPENBEOS_NAMESPACE -namespace OpenBeOS { -#endif - - -//----- BStringItem class ---------------------------------------- - -class BStringItem : public BListItem -{ -public: - BStringItem(const char *text, uint32 outlineLevel = 0, bool expanded = true); - BStringItem(BMessage *data); - virtual ~BStringItem(); - - static BArchivable *Instantiate(BMessage *data); - virtual status_t Archive(BMessage *data, bool deep = true) const; - - virtual void DrawItem(BView *owner, BRect frame, bool complete = false); - virtual void SetText(const char *text); - const char *Text() const; - - virtual void Update(BView *owner, const BFont *font); - - virtual status_t Perform(perform_code code, void *arg); - -private: - virtual void _ReservedStringItem1(); - virtual void _ReservedStringItem2(); - - BStringItem(const BStringItem &); - BStringItem& operator=(const BStringItem &); - - char *fText; - float fBaselineOffset; - uint32 _reserved[2]; -}; - -#ifdef USE_OPENBEOS_NAMESPACE -} -#endif - -#endif /* _STRING_ITEM_H */ diff --git a/headers/build/os/interface/StringView.h b/headers/build/os/interface/StringView.h deleted file mode 100644 index 444f305e4c..0000000000 --- a/headers/build/os/interface/StringView.h +++ /dev/null @@ -1,107 +0,0 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2001-2002, OpenBeOS -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -// DEALINGS IN THE SOFTWARE. -// -// File Name: StringView.h -// Author: Frans van Nispen (xlr8@tref.nl) -// Description: BStringView draw a non-editable text string -//------------------------------------------------------------------------------ - -#ifndef _STRING_VIEW_H -#define _STRING_VIEW_H - -// Standard Includes ----------------------------------------------------------- - -// System Includes ------------------------------------------------------------- -#include -#include - -// Project Includes ------------------------------------------------------------ - -// Local Includes -------------------------------------------------------------- - -// Local Defines --------------------------------------------------------------- - -// Globals --------------------------------------------------------------------- - - -// BStringView class ----------------------------------------------------------- -class BStringView : public BView{ -public: - BStringView(BRect bounds, const char* name, const char* text, - uint32 resizeFlags = B_FOLLOW_LEFT | B_FOLLOW_TOP, - uint32 flags = B_WILL_DRAW); - BStringView(BMessage* data); - virtual ~BStringView(); - static BArchivable *Instantiate(BMessage* data); - virtual status_t Archive(BMessage* data, bool deep = true) const; - - void SetText(const char* text); - const char *Text() const; - void SetAlignment(alignment flag); - alignment Alignment() const; - - virtual void AttachedToWindow(); - virtual void Draw(BRect bounds); - - virtual void MessageReceived(BMessage* msg); - virtual void MouseDown(BPoint pt); - virtual void MouseUp(BPoint pt); - virtual void MouseMoved(BPoint pt, uint32 code, const BMessage* msg); - virtual void DetachedFromWindow(); - virtual void FrameMoved(BPoint new_position); - virtual void FrameResized(float new_width, float new_height); - - virtual BHandler *ResolveSpecifier( BMessage* msg, int32 index, BMessage* specifier, - int32 form, const char* property); - - virtual void ResizeToPreferred(); - virtual void GetPreferredSize(float* width, float* height); - virtual void MakeFocus(bool state = true); - virtual void AllAttached(); - virtual void AllDetached(); - virtual status_t GetSupportedSuites(BMessage* data); - - -// Private or reserved --------------------------------------------------------- - virtual status_t Perform(perform_code d, void* arg); - -private: - virtual void _ReservedStringView1(); - virtual void _ReservedStringView2(); - virtual void _ReservedStringView3(); - - BStringView &operator=(const BStringView&); - - char* fText; - alignment fAlign; - uint32 _reserved[3]; -}; -//------------------------------------------------------------------------------ - -#endif // _STRINGVIEW_H - -/* - * $Log $ - * - * $Id $ - * - */ - diff --git a/headers/build/os/interface/TabView.h b/headers/build/os/interface/TabView.h deleted file mode 100644 index 3b9d001505..0000000000 --- a/headers/build/os/interface/TabView.h +++ /dev/null @@ -1,226 +0,0 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2001-2002, OpenBeOS -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -// DEALINGS IN THE SOFTWARE. -// -// File Name: TabView.h -// Author: Marc Flerackers (mflerackers@androme.be) -// Description: BTab creates individual "tabs" that can be assigned -// to specific views. -// BTabView provides the framework for containing and -// managing groups of BTab objects. -//------------------------------------------------------------------------------ - -#ifndef _TAB_VIEW_H -#define _TAB_VIEW_H - -// Standard Includes ----------------------------------------------------------- - -// System Includes ------------------------------------------------------------- -#include -#include - -// Project Includes ------------------------------------------------------------ - -// Local Includes -------------------------------------------------------------- - -// Local Defines --------------------------------------------------------------- -enum tab_position { - B_TAB_FIRST = 999, - B_TAB_FRONT, - B_TAB_ANY -}; - -// Globals --------------------------------------------------------------------- - - -// BTab class ------------------------------------------------------------------ -class BTab : public BArchivable { - -public: - BTab(BView * tabView = NULL); - virtual ~BTab(); - - BTab(BMessage *archive); -static BArchivable *Instantiate(BMessage *archive); - -virtual status_t Archive(BMessage *archive, bool deep = true) const; -virtual status_t Perform(uint32 d, void *arg); - - const char *Label() const; -virtual void SetLabel(const char *label); - - bool IsSelected() const; -virtual void Select(BView *owner); -virtual void Deselect(); - -virtual void SetEnabled(bool enabled); - bool IsEnabled() const; - - void MakeFocus(bool inFocus = true); - bool IsFocus() const; - - // sets/gets the view to be displayed for this tab -virtual void SetView(BView *view); - BView *View() const; - -virtual void DrawFocusMark(BView *owner, BRect frame); -virtual void DrawLabel(BView *owner, BRect frame); -virtual void DrawTab(BView *owner, BRect frame, tab_position position, - bool full = true); - -private: -virtual void _ReservedTab1(); -virtual void _ReservedTab2(); -virtual void _ReservedTab3(); -virtual void _ReservedTab4(); -virtual void _ReservedTab5(); -virtual void _ReservedTab6(); -virtual void _ReservedTab7(); -virtual void _ReservedTab8(); -virtual void _ReservedTab9(); -virtual void _ReservedTab10(); -virtual void _ReservedTab11(); -virtual void _ReservedTab12(); - - BTab &operator=(const BTab &); - - bool fEnabled; - bool fSelected; - bool fFocus; - BView *fView; - uint32 _reserved[12]; -}; -//------------------------------------------------------------------------------ - - -// BTabView class -------------------------------------------------------------- -class BTabView : public BView -{ -public: - BTabView(BRect frame, const char *name, - button_width width = B_WIDTH_AS_USUAL, - uint32 resizingMode = B_FOLLOW_ALL, - uint32 flags = B_FULL_UPDATE_ON_RESIZE | - B_WILL_DRAW | B_NAVIGABLE_JUMP | - B_FRAME_EVENTS | B_NAVIGABLE); - ~BTabView(); - - BTabView(BMessage *archive); -static BArchivable *Instantiate(BMessage *archive); -virtual status_t Archive(BMessage*, bool deep=true) const; -virtual status_t Perform(perform_code d, void *arg); - -virtual void WindowActivated(bool active); -virtual void AttachedToWindow(); -virtual void AllAttached(); -virtual void AllDetached(); -virtual void DetachedFromWindow(); - -virtual void MessageReceived(BMessage *message); -virtual void FrameMoved(BPoint newLocation); -virtual void FrameResized(float width,float height); -virtual void KeyDown(const char *bytes, int32 numBytes); -virtual void MouseDown(BPoint point); -virtual void MouseUp(BPoint point); -virtual void MouseMoved(BPoint point, uint32 transit, - const BMessage *message); -virtual void Pulse(); - -virtual void Select(int32 tab); - int32 Selection() const; - -virtual void MakeFocus(bool focused = true); -virtual void SetFocusTab(int32 tab, bool focused); - int32 FocusTab() const; - -virtual void Draw(BRect updateRect); -virtual BRect DrawTabs(); -virtual void DrawBox(BRect selTabRect); -virtual BRect TabFrame(int32 tab_index) const; - -virtual void SetFlags(uint32 flags); -virtual void SetResizingMode(uint32 mode); - -virtual void GetPreferredSize(float *width, float *height); -virtual void ResizeToPreferred(); - -virtual BHandler *ResolveSpecifier(BMessage *message, int32 index, - BMessage *specifier, int32 what, const char *property); -virtual status_t GetSupportedSuites(BMessage *message); - -virtual void AddTab(BView *target, BTab *tab = NULL); -#if !_PR3_COMPATIBLE_ -virtual BTab *RemoveTab(int32 tabIndex); -#else -virtual BTab *RemoveTab(int32 tabIndex) const; -#endif - -virtual BTab *TabAt ( int32 tab_index ) const; - -virtual void SetTabWidth(button_width width); - button_width TabWidth() const; - -virtual void SetTabHeight(float height); - float TabHeight() const; - - BView *ContainerView() const; - - int32 CountTabs() const; - BView *ViewForTab(int32 tabIndex) const; - -private: - void _InitObject(); - -virtual void _ReservedTabView1(); -virtual void _ReservedTabView2(); -virtual void _ReservedTabView3(); -virtual void _ReservedTabView4(); -virtual void _ReservedTabView5(); -virtual void _ReservedTabView6(); -virtual void _ReservedTabView7(); -virtual void _ReservedTabView8(); -virtual void _ReservedTabView9(); -virtual void _ReservedTabView10(); -virtual void _ReservedTabView11(); -virtual void _ReservedTabView12(); - - BTabView(const BTabView &); - BTabView &operator=(const BTabView &); - - BList *fTabList; - BView *fContainerView; - button_width fTabWidthSetting; - float fTabWidth; - float fTabHeight; - int32 fSelection; - int32 fInitialSelection; - int32 fFocus; - uint32 _reserved[12]; -}; -//------------------------------------------------------------------------------ - -#endif // _TAB_VIEW_H - -/* - * $Log $ - * - * $Id $ - * - */ diff --git a/headers/build/os/interface/TextControl.h b/headers/build/os/interface/TextControl.h deleted file mode 100644 index a20aac04fe..0000000000 --- a/headers/build/os/interface/TextControl.h +++ /dev/null @@ -1,153 +0,0 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2001-2002, OpenBeOS -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -// DEALINGS IN THE SOFTWARE. -// -// File Name: TextControl.cpp -// Author: Frans van Nispen (xlr8@tref.nl) -// Description: BTextControl displays text that can act like a control. -//------------------------------------------------------------------------------ - -#ifndef _TEXT_CONTROL_H -#define _TEXT_CONTROL_H - -// Standard Includes ----------------------------------------------------------- - -// System Includes ------------------------------------------------------------- -#include -#include -#include /* For convenience */ - -// Project Includes ------------------------------------------------------------ - -// Local Includes -------------------------------------------------------------- - -// Local Defines --------------------------------------------------------------- - -// Globals --------------------------------------------------------------------- - -class _BTextInput_; - -// BTextControl class ---------------------------------------------------------- -class BTextControl : public BControl { - -public: - BTextControl(BRect frame, - const char *name, - const char *label, - const char *initial_text, - BMessage *message, - uint32 rmask = B_FOLLOW_LEFT | B_FOLLOW_TOP, - uint32 flags = B_WILL_DRAW | B_NAVIGABLE); -virtual ~BTextControl(); - - BTextControl(BMessage *data); -static BArchivable *Instantiate(BMessage *data); -virtual status_t Archive(BMessage *data, bool deep = true) const; - -virtual void SetText(const char *text); - const char *Text() const; - -virtual void SetValue(int32 value); -virtual status_t Invoke(BMessage *msg = NULL); - - BTextView *TextView() const; - -virtual void SetModificationMessage(BMessage *message); - BMessage *ModificationMessage() const; - -virtual void SetAlignment(alignment label, alignment text); - void GetAlignment(alignment *label, alignment *text) const; -virtual void SetDivider(float dividing_line); - float Divider() const; - -virtual void Draw(BRect updateRect); -virtual void MouseDown(BPoint where); -virtual void AttachedToWindow(); -virtual void MakeFocus(bool focusState = true); -virtual void SetEnabled(bool state); -virtual void FrameMoved(BPoint new_position); -virtual void FrameResized(float new_width, float new_height); -virtual void WindowActivated(bool active); - -virtual void GetPreferredSize(float *width, float *height); -virtual void ResizeToPreferred(); - -virtual void MessageReceived(BMessage *msg); -virtual BHandler *ResolveSpecifier(BMessage *msg, - int32 index, - BMessage *specifier, - int32 form, - const char *property); - -virtual void MouseUp(BPoint pt); -virtual void MouseMoved(BPoint pt, uint32 code, const BMessage *msg); -virtual void DetachedFromWindow(); - -virtual void AllAttached(); -virtual void AllDetached(); -virtual status_t GetSupportedSuites(BMessage *data); -virtual void SetFlags(uint32 flags); - - -/*----- Private or reserved -----------------------------------------*/ -virtual status_t Perform(perform_code d, void *arg); - -private: -friend class _BTextInput_; - -virtual void _ReservedTextControl1(); -virtual void _ReservedTextControl2(); -virtual void _ReservedTextControl3(); -virtual void _ReservedTextControl4(); - - BTextControl &operator=(const BTextControl &); - - void CommitValue(); - void InitData(const char *label, - const char *initial_text, - BMessage *data = NULL); - - _BTextInput_ *fText; - char *fLabel; - BMessage *fModificationMessage; - alignment fLabelAlign; - float fDivider; - uint16 fPrevWidth; - uint16 fPrevHeight; - uint32 _reserved[3]; /* was 4 */ -#if !_PR3_COMPATIBLE_ - uint32 _more_reserved[4]; -#endif - - bool fClean; - bool fSkipSetFlags; - bool fUnusedBool1; - bool fUnusedBool2; -}; -//------------------------------------------------------------------------------ - -#endif // _TEXT_CONTROL_H - -/* - * $Log $ - * - * $Id $ - * - */ diff --git a/headers/build/os/interface/TextView.h b/headers/build/os/interface/TextView.h deleted file mode 100644 index a49e1f33c2..0000000000 --- a/headers/build/os/interface/TextView.h +++ /dev/null @@ -1,427 +0,0 @@ -/******************************************************************************* -/ -/ File: TextView.h -/ -/ Description: BTextView displays and manages styled text. -/ -/ Copyright 1993-98, Be Incorporated, All Rights Reserved -/ -*******************************************************************************/ - -#ifndef _TEXTVIEW_H -#define _TEXTVIEW_H - -#include -#include - -/*----------------------------------------------------------------*/ -/*----- BTextView structures and definitions ---------------------*/ - -struct text_run { - int32 offset; /* byte offset of first character of run*/ - BFont font; /* font of run*/ - rgb_color color; /* color of run*/ -}; - -struct text_run_array { - int32 count; /* number of text runs*/ - text_run runs[1]; /* array of count number of runs*/ -}; - -enum undo_state { - B_UNDO_UNAVAILABLE, - B_UNDO_TYPING, - B_UNDO_CUT, - B_UNDO_PASTE, - B_UNDO_CLEAR, - B_UNDO_DROP -}; - - -#if _PR2_COMPATIBLE_ -extern "C" void _ReservedTextView2__9BTextViewFv(BTextView *object, - BMessage *drag, - BBitmap **bitmap, - BPoint *point, - BHandler **handler); -#endif - - -class BBitmap; -class BClipboard; -class BFile; -class BList; -class _BTextGapBuffer_; -class _BLineBuffer_; -class _BStyleBuffer_; -class _BWidthBuffer_; -class _BUndoBuffer_; -class _BInlineInput_; -class _BTextTrackState_; -class _BTextChangeResult_; - -extern "C" status_t _init_interface_kit_(); - -/*----------------------------------------------------------------*/ -/*----- BTextView class ------------------------------------------*/ - -class BTextView : public BView { -public: - BTextView(BRect frame, - const char *name, - BRect textRect, - uint32 resizeMask, - uint32 flags = B_WILL_DRAW | B_PULSE_NEEDED); - BTextView(BRect frame, - const char *name, - BRect textRect, - const BFont *initialFont, - const rgb_color *initialColor, - uint32 resizeMask, - uint32 flags); - BTextView(BMessage *data); -virtual ~BTextView(); - -static BArchivable* Instantiate(BMessage *data); -virtual status_t Archive(BMessage *data, bool deep = true) const; - -virtual void AttachedToWindow(); -virtual void DetachedFromWindow(); -virtual void Draw(BRect inRect); -virtual void MouseDown(BPoint where); -virtual void MouseUp(BPoint where); -virtual void MouseMoved(BPoint where, - uint32 code, - const BMessage *message); -virtual void WindowActivated(bool state); -virtual void KeyDown(const char *bytes, int32 numBytes); -virtual void Pulse(); -virtual void FrameResized(float width, float height); -virtual void MakeFocus(bool focusState = true); -virtual void MessageReceived(BMessage *message); -virtual BHandler* ResolveSpecifier(BMessage *message, - int32 index, - BMessage *specifier, - int32 form, - const char *property); -virtual status_t GetSupportedSuites(BMessage *data); -virtual status_t Perform(perform_code d, void *arg); - - void SetText(const char *inText, - const text_run_array *inRuns = NULL); - void SetText(const char *inText, - int32 inLength, - const text_run_array *inRuns = NULL); - void SetText(BFile *inFile, - int32 startOffset, - int32 inLength, - const text_run_array *inRuns = NULL); - - void Insert(const char *inText, - const text_run_array *inRuns = NULL); - void Insert(const char *inText, - int32 inLength, - const text_run_array *inRuns = NULL); - void Insert(int32 startOffset, - const char *inText, - int32 inLength, - const text_run_array *inRuns = NULL); - - void Delete(); - void Delete(int32 startOffset, int32 endOffset); - - const char* Text() const; - int32 TextLength() const; - void GetText(int32 offset, - int32 length, - char *buffer) const; - uchar ByteAt(int32 offset) const; - - int32 CountLines() const; - int32 CurrentLine() const; - void GoToLine(int32 lineNum); - -virtual void Cut(BClipboard *clipboard); -virtual void Copy(BClipboard *clipboard); -virtual void Paste(BClipboard *clipboard); - void Clear(); - -virtual bool AcceptsPaste(BClipboard *clipboard); -virtual bool AcceptsDrop(const BMessage *inMessage); - -virtual void Select(int32 startOffset, int32 endOffset); - void SelectAll(); - void GetSelection(int32 *outStart, int32 *outEnd) const; - - void SetFontAndColor(const BFont *inFont, - uint32 inMode = B_FONT_ALL, - const rgb_color *inColor = NULL); - void SetFontAndColor(int32 startOffset, - int32 endOffset, - const BFont *inFont, - uint32 inMode = B_FONT_ALL, - const rgb_color *inColor = NULL); - - void GetFontAndColor(int32 inOffset, - BFont *outFont, - rgb_color *outColor = NULL) const; - void GetFontAndColor(BFont *outFont, - uint32 *outMode, - rgb_color *outColor = NULL, - bool *outEqColor = NULL) const; - - void SetRunArray(int32 startOffset, - int32 endOffset, - const text_run_array *inRuns); - text_run_array* RunArray(int32 startOffset, - int32 endOffset, - int32 *outSize = NULL) const; - - int32 LineAt(int32 offset) const; - int32 LineAt(BPoint point) const; - BPoint PointAt(int32 inOffset, float *outHeight = NULL) const; - int32 OffsetAt(BPoint point) const; - int32 OffsetAt(int32 line) const; - -virtual void FindWord(int32 inOffset, - int32 *outFromOffset, - int32 *outToOffset); - -virtual bool CanEndLine(int32 offset); - - float LineWidth(int32 lineNum = 0) const; - float LineHeight(int32 lineNum = 0) const; - float TextHeight(int32 startLine, int32 endLine) const; - - void GetTextRegion(int32 startOffset, - int32 endOffset, - BRegion *outRegion) const; - -virtual void ScrollToOffset(int32 inOffset); - void ScrollToSelection(); - - void Highlight(int32 startOffset, int32 endOffset); - - void SetTextRect(BRect rect); - BRect TextRect() const; - void SetStylable(bool stylable); - bool IsStylable() const; - void SetTabWidth(float width); - float TabWidth() const; - void MakeSelectable(bool selectable = true); - bool IsSelectable() const; - void MakeEditable(bool editable = true); - bool IsEditable() const; - void SetWordWrap(bool wrap); - bool DoesWordWrap() const; - void SetMaxBytes(int32 max); - int32 MaxBytes() const; - void DisallowChar(uint32 aChar); - void AllowChar(uint32 aChar); - void SetAlignment(alignment flag); - alignment Alignment() const; - void SetAutoindent(bool state); - bool DoesAutoindent() const; - void SetColorSpace(color_space colors); - color_space ColorSpace() const; - void MakeResizable(bool resize, BView *resizeView = NULL); - bool IsResizable() const; - void SetDoesUndo(bool undo); - bool DoesUndo() const; - void HideTyping(bool enabled); - bool IsTypingHidden(void) const; - -virtual void ResizeToPreferred(); -virtual void GetPreferredSize(float *width, float *height); -virtual void AllAttached(); -virtual void AllDetached(); - -static void* FlattenRunArray(const text_run_array *inArray, - int32 *outSize = NULL); -static text_run_array* UnflattenRunArray(const void *data, - int32 *outSize = NULL); - -protected: -virtual void InsertText(const char *inText, - int32 inLength, - int32 inOffset, - const text_run_array *inRuns); -virtual void DeleteText(int32 fromOffset, int32 toOffset); - -public: -virtual void Undo(BClipboard *clipboard); - undo_state UndoState(bool *isRedo) const; - -protected: -virtual void GetDragParameters(BMessage *drag, - BBitmap **bitmap, - BPoint *point, - BHandler **handler); - -/*----- Private or reserved -----------------------------------------*/ -private: -friend status_t _init_interface_kit_(); -friend class _BTextTrackState_; - -#if _PR2_COMPATIBLE_ -friend void _ReservedTextView2__9BTextViewFv(BTextView *object, - BMessage *drag, - BBitmap **bitmap, - BPoint *point, - BHandler **handler); -#endif - -virtual void _ReservedTextView3(); -virtual void _ReservedTextView4(); -virtual void _ReservedTextView5(); -virtual void _ReservedTextView6(); -virtual void _ReservedTextView7(); -virtual void _ReservedTextView8(); - -#if !_PR3_COMPATIBLE_ -virtual void _ReservedTextView9(); -virtual void _ReservedTextView10(); -virtual void _ReservedTextView11(); -virtual void _ReservedTextView12(); -#endif - - void InitObject(BRect textRect, - const BFont *initialFont, - const rgb_color *initialColor); - - void HandleBackspace(); - void HandleArrowKey(uint32 inArrowKey); - void HandleDelete(); - void HandlePageKey(uint32 inPageKey); - void HandleAlphaKey(const char *bytes, int32 numBytes); - - void Refresh(int32 fromOffset, - int32 toOffset, - bool erase, - bool scroll); - void RecalculateLineBreaks(int32 *startLine, int32 *endLine); - int32 FindLineBreak(int32 fromOffset, - float *outAscent, - float *outDescent, - float *ioWidth); - - float StyledWidth(int32 fromOffset, - int32 length, - float *outAscent = NULL, - float *outDescent = NULL) const; - float ActualTabWidth(float location) const; - - void DoInsertText(const char *inText, - int32 inLength, - int32 inOffset, - const text_run_array *inRuns, - _BTextChangeResult_ *outResult); - void DoDeleteText(int32 fromOffset, - int32 toOffset, - _BTextChangeResult_ *outResult); - - void DrawLines(int32 startLine, - int32 endLine, - int32 startOffset = -1, - bool erase = false); - void DrawCaret(int32 offset); - void InvertCaret(); - void DragCaret(int32 offset); - - void StopMouseTracking(); - bool PerformMouseUp(BPoint where); - bool PerformMouseMoved(BPoint where, - uint32 code); - - void TrackMouse(BPoint where, const BMessage *message, - bool force = false); - - void TrackDrag(BPoint where); - void InitiateDrag(); - bool MessageDropped(BMessage *inMessage, - BPoint where, - BPoint offset); - - void UpdateScrollbars(); - void AutoResize(bool doredraw=true); - - void NewOffscreen(float padding = 0.0F); - void DeleteOffscreen(); - - void Activate(); - void Deactivate(); - - void NormalizeFont(BFont *font); - - uint32 CharClassification(int32 offset) const; - int32 NextInitialByte(int32 offset) const; - int32 PreviousInitialByte(int32 offset) const; - - bool GetProperty(BMessage *specifier, - int32 form, - const char *property, - BMessage *reply); - bool SetProperty(BMessage *specifier, - int32 form, - const char *property, - BMessage *reply); - bool CountProperties(BMessage *specifier, - int32 form, - const char *property, - BMessage *reply); - - void HandleInputMethodChanged(BMessage *message); - void HandleInputMethodLocationRequest(); - void CancelInputMethod(); - -static void LockWidthBuffer(); -static void UnlockWidthBuffer(); - - _BTextGapBuffer_* fText; - _BLineBuffer_* fLines; - _BStyleBuffer_* fStyles; - BRect fTextRect; - int32 fSelStart; - int32 fSelEnd; - bool fCaretVisible; - bigtime_t fCaretTime; - int32 fClickOffset; - int32 fClickCount; - bigtime_t fClickTime; - int32 fDragOffset; - uint8 fCursor; - bool fActive; - bool fStylable; - float fTabWidth; - bool fSelectable; - bool fEditable; - bool fWrap; - int32 fMaxBytes; - BList* fDisallowedChars; - alignment fAlignment; - bool fAutoindent; - BBitmap* fOffscreen; - color_space fColorSpace; - bool fResizable; - BView* fContainerView; - _BUndoBuffer_* fUndo; /* was _reserved[0] */ - _BInlineInput_* fInline; /* was _reserved[1] */ - BMessageRunner * fDragRunner; /* was _reserved[2] */ - BMessageRunner * fClickRunner; /* was _reserved[3] */ - BPoint fWhere; - _BTextTrackState_* fTrackingMouse; /* was _reserved[6] */ - _BTextChangeResult_* fTextChange; /* was _reserved[7] */ - uint32 _reserved[1]; /* was 8 */ -#if !_PR3_COMPATIBLE_ - uint32 _more_reserved[8]; -#endif - -static _BWidthBuffer_* sWidths; -static sem_id sWidthSem; -static int32 sWidthAtom; -}; - -/*-------------------------------------------------------------*/ -/*-------------------------------------------------------------*/ - -#endif /* _TEXT_VIEW_H */ diff --git a/headers/build/os/interface/UnicodeBlockObjects.h b/headers/build/os/interface/UnicodeBlockObjects.h deleted file mode 100644 index 19070e8a12..0000000000 --- a/headers/build/os/interface/UnicodeBlockObjects.h +++ /dev/null @@ -1,125 +0,0 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2001-2002, OpenBeOS -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -// DEALINGS IN THE SOFTWARE. -// -// File Name: UnicodeBlockObjects.h -// Author: Erik Jaesler (erik@cgsoftware.com) -// Description: Predefined unicode_block objects -//------------------------------------------------------------------------------ - -#ifndef _UNICODEBLOCKOBJECTS_H -#define _UNICODEBLOCKOBJECTS_H - -// Standard Includes ----------------------------------------------------------- - -// System Includes ------------------------------------------------------------- -#include - -// Project Includes ------------------------------------------------------------ - -// Local Includes -------------------------------------------------------------- - -// Local Defines --------------------------------------------------------------- - -// Globals --------------------------------------------------------------------- - - -// Unicode block list with their unicode encoding range -const unicode_block B_BASIC_LATIN_BLOCK( /* 0000 - 007F */ 0x0000000000000000LL, 0x0000000000000001LL); -const unicode_block B_LATIN1_SUPPLEMENT_BLOCK( /* 0080 - 00FF */ 0x0000000000000000LL, 0x0000000000000002LL); -const unicode_block B_LATIN_EXTENDED_A_BLOCK( /* 0100 - 017F */ 0x0000000000000000LL, 0x0000000000000004LL); -const unicode_block B_LATIN_EXTENDED_B_BLOCK( /* 0180 - 024F */ 0x0000000000000000LL, 0x0000000000000008LL); -const unicode_block B_IPA_EXTENSIONS_BLOCK( /* 0250 - 02AF */ 0x0000000000000000LL, 0x0000000000000010LL); -const unicode_block B_SPACING_MODIFIER_LETTERS_BLOCK( /* 02B0 - 02FF */ 0x0000000000000000LL, 0x0000000000000020LL); -const unicode_block B_COMBINING_DIACRITICAL_MARKS_BLOCK( /* 0300 - 036F */ 0x0000000000000000LL, 0x0000000000000040LL); -const unicode_block B_BASIC_GREEK_BLOCK( /* 0370 - 03CF */ 0x0000000000000000LL, 0x0000000000000080LL); -const unicode_block B_GREEK_SYMBOLS_AND_COPTIC_BLOCK( /* 03D0 - 03FF */ 0x0000000000000000LL, 0x0000000000000100LL); -const unicode_block B_CYRILLIC_BLOCK( /* 0400 - 04FF */ 0x0000000000000000LL, 0x0000000000000200LL); -const unicode_block B_ARMENIAN_BLOCK( /* 0530 - 058F */ 0x0000000000000000LL, 0x0000000000000400LL); -const unicode_block B_BASIC_HEBREW_BLOCK( /* 0590 - 05CF */ 0x0000000000000000LL, 0x0000000000000800LL); -const unicode_block B_HEBREW_EXTENDED_BLOCK( /* 05D0 - 05FF */ 0x0000000000000000LL, 0x0000000000001000LL); -const unicode_block B_BASIC_ARABIC_BLOCK( /* 0600 - 0670 */ 0x0000000000000000LL, 0x0000000000002000LL); -const unicode_block B_ARABIC_EXTENDED_BLOCK( /* 0671 - 06FF */ 0x0000000000000000LL, 0x0000000000004000LL); -const unicode_block B_DEVANAGARI_BLOCK( /* 0900 - 097F */ 0x0000000000000000LL, 0x0000000000008000LL); -const unicode_block B_BENGALI_BLOCK( /* 0980 - 09FF */ 0x0000000000000000LL, 0x0000000000010000LL); -const unicode_block B_GURMUKHI_BLOCK( /* 0A00 - 0A7F */ 0x0000000000000000LL, 0x0000000000020000LL); -const unicode_block B_GUJARATI_BLOCK( /* 0A80 - 0AFF */ 0x0000000000000000LL, 0x0000000000040000LL); -const unicode_block B_ORIYA_BLOCK( /* 0B00 - 0B7F */ 0x0000000000000000LL, 0x0000000000080000LL); -const unicode_block B_TAMIL_BLOCK( /* 0B80 - 0BFF */ 0x0000000000000000LL, 0x0000000000100000LL); -const unicode_block B_TELUGU_BLOCK( /* 0C00 - 0C7F */ 0x0000000000000000LL, 0x0000000000200000LL); -const unicode_block B_KANNADA_BLOCK( /* 0C80 - 0CFF */ 0x0000000000000000LL, 0x0000000000400000LL); -const unicode_block B_MALAYALAM_BLOCK( /* 0D00 - 0D7F */ 0x0000000000000000LL, 0x0000000000800000LL); -const unicode_block B_THAI_BLOCK( /* 0E00 - 0E7F */ 0x0000000000000000LL, 0x0000000001000000LL); -const unicode_block B_LAO_BLOCK( /* 0E80 - 0EFF */ 0x0000000000000000LL, 0x0000000002000000LL); -const unicode_block B_BASIC_GEORGIAN_BLOCK( /* 10A0 - 10CF */ 0x0000000000000000LL, 0x0000000004000000LL); -const unicode_block B_GEORGIAN_EXTENDED_BLOCK( /* 10D0 - 10FF */ 0x0000000000000000LL, 0x0000000008000000LL); -const unicode_block B_HANGUL_JAMO_BLOCK( /* 1100 - 11FF */ 0x0000000000000000LL, 0x0000000010000000LL); -const unicode_block B_LATIN_EXTENDED_ADDITIONAL_BLOCK( /* 1E00 - 1EFF */ 0x0000000000000000LL, 0x0000000020000000LL); -const unicode_block B_GREEK_EXTENDED_BLOCK( /* 1F00 - 1FFF */ 0x0000000000000000LL, 0x0000000040000000LL); -const unicode_block B_GENERAL_PUNCTUATION_BLOCK( /* 2000 - 206F */ 0x0000000000000000LL, 0x0000000080000000LL); -const unicode_block B_SUPERSCRIPTS_AND_SUBSCRIPTS_BLOCK( /* 2070 - 209F */ 0x0000000000000000LL, 0x0000000100000000LL); -const unicode_block B_CURRENCY_SYMBOLS_BLOCK( /* 20A0 - 20CF */ 0x0000000000000000LL, 0x0000000200000000LL); -const unicode_block B_COMBINING_MARKS_FOR_SYMBOLS_BLOCK( /* 20D0 - 20FF */ 0x0000000000000000LL, 0x0000000400000000LL); -const unicode_block B_LETTERLIKE_SYMBOLS_BLOCK( /* 2100 - 214F */ 0x0000000000000000LL, 0x0000000800000000LL); -const unicode_block B_NUMBER_FORMS_BLOCK( /* 2150 - 218F */ 0x0000000000000000LL, 0x0000001000000000LL); -const unicode_block B_ARROWS_BLOCK( /* 2190 - 21FF */ 0x0000000000000000LL, 0x0000002000000000LL); -const unicode_block B_MATHEMATICAL_OPERATORS_BLOCK( /* 2200 - 22FF */ 0x0000000000000000LL, 0x0000004000000000LL); -const unicode_block B_MISCELLANEOUS_TECHNICAL_BLOCK( /* 2300 - 23FF */ 0x0000000000000000LL, 0x0000008000000000LL); -const unicode_block B_CONTROL_PICTURES_BLOCK( /* 2400 - 243F */ 0x0000000000000000LL, 0x0000010000000000LL); -const unicode_block B_OPTICAL_CHARACTER_RECOGNITION_BLOCK( /* 2440 - 245F */ 0x0000000000000000LL, 0x0000020000000000LL); -const unicode_block B_ENCLOSED_ALPHANUMERICS_BLOCK( /* 2460 - 24FF */ 0x0000000000000000LL, 0x0000040000000000LL); -const unicode_block B_BOX_DRAWING_BLOCK( /* 2500 - 257F */ 0x0000000000000000LL, 0x0000080000000000LL); -const unicode_block B_BLOCK_ELEMENTS_BLOCK( /* 2580 - 259F */ 0x0000000000000000LL, 0x0000100000000000LL); -const unicode_block B_GEOMETRIC_SHAPES_BLOCK( /* 25A0 - 25FF */ 0x0000000000000000LL, 0x0000200000000000LL); -const unicode_block B_MISCELLANEOUS_SYMBOLS_BLOCK( /* 2600 - 26FF */ 0x0000000000000000LL, 0x0000400000000000LL); -const unicode_block B_DINGBATS_BLOCK( /* 2700 - 27BF */ 0x0000000000000000LL, 0x0000800000000000LL); -const unicode_block B_CJK_SYMBOLS_AND_PUNCTUATION_BLOCK( /* 3000 - 303F */ 0x0000000000000000LL, 0x0001000000000000LL); -const unicode_block B_HIRAGANA_BLOCK( /* 3040 - 309F */ 0x0000000000000000LL, 0x0002000000000000LL); -const unicode_block B_KATAKANA_BLOCK( /* 30A0 - 30FF */ 0x0000000000000000LL, 0x0004000000000000LL); -const unicode_block B_BOPOMOFO_BLOCK( /* 3100 - 312F */ 0x0000000000000000LL, 0x0008000000000000LL); -const unicode_block B_HANGUL_COMPATIBILITY_JAMO_BLOCK( /* 3130 - 318F */ 0x0000000000000000LL, 0x0010000000000000LL); -const unicode_block B_CJK_MISCELLANEOUS_BLOCK( /* 3190 - 319F */ 0x0000000000000000LL, 0x0020000000000000LL); -const unicode_block B_ENCLOSED_CJK_LETTERS_AND_MONTHS_BLOCK(/* 3200 - 32FF */ 0x0000000000000000LL, 0x0040000000000000LL); -const unicode_block B_CJK_COMPATIBILITY_BLOCK( /* 3300 - 33FF */ 0x0000000000000000LL, 0x0080000000000000LL); -const unicode_block B_HANGUL_BLOCK( /* AC00 - D7AF */ 0x0000000000000000LL, 0x0100000000000000LL); -const unicode_block B_HIGH_SURROGATES_BLOCK( /* D800 - DBFF */ 0x0000000000000000LL, 0x0200000000000000LL); -const unicode_block B_LOW_SURROGATES_BLOCK( /* DC00 - DFFF */ 0x0000000000000000LL, 0x0400000000000000LL); -const unicode_block B_CJK_UNIFIED_IDEOGRAPHS_BLOCK( /* 4E00 - 9FFF */ 0x0000000000000000LL, 0x0800000000000000LL); -const unicode_block B_PRIVATE_USE_AREA_BLOCK( /* E000 - F8FF */ 0x0000000000000000LL, 0x1000000000000000LL); -const unicode_block B_CJK_COMPATIBILITY_IDEOGRAPHS_BLOCK( /* F900 - FAFF */ 0x0000000000000000LL, 0x2000000000000000LL); -const unicode_block B_ALPHABETIC_PRESENTATION_FORMS_BLOCK( /* FB00 - FB4F */ 0x0000000000000000LL, 0x4000000000000000LL); -const unicode_block B_ARABIC_PRESENTATION_FORMS_A_BLOCK( /* FB50 - FDFF */ 0x0000000000000000LL, 0x8000000000000000LL); -const unicode_block B_COMBINING_HALF_MARKS_BLOCK( /* FE20 - FE2F */ 0x0000000000000001LL, 0x0000000000000000LL); -const unicode_block B_CJK_COMPATIBILITY_FORMS_BLOCK( /* FE30 - FE4F */ 0x0000000000000002LL, 0x0000000000000000LL); -const unicode_block B_SMALL_FORM_VARIANTS_BLOCK( /* FE50 - FE6F */ 0x0000000000000004LL, 0x0000000000000000LL); -const unicode_block B_ARABIC_PRESENTATION_FORMS_B_BLOCK( /* FE70 - FEFE */ 0x0000000000000008LL, 0x0000000000000000LL); -const unicode_block B_HALFWIDTH_AND_FULLWIDTH_FORMS_BLOCK( /* FF00 - FFEF */ 0x0000000000000010LL, 0x0000000000000000LL); -const unicode_block B_SPECIALS_BLOCK( /* FEFF and FFF0 - FFFF */ 0x0000000000000020LL, 0x0000000000000000LL); -const unicode_block B_TIBETAN_BLOCK( /* 0F00 - 0FBF */ 0x0000000000000040LL, 0x0000000000000000LL); - -#endif // _UNICODEBLOCKOBJECTS_H - -/* - * $Log $ - * - * $Id $ - * - */ - diff --git a/headers/build/os/interface/View.h b/headers/build/os/interface/View.h deleted file mode 100644 index c17cb25d98..0000000000 --- a/headers/build/os/interface/View.h +++ /dev/null @@ -1,668 +0,0 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2001-2005, Haiku -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -// DEALINGS IN THE SOFTWARE. -// -// File Name: View.h -// Author: Erik Jaesler (erik@cgsoftware.com) -// Description: BView is the base class for all views (clipped regions -// within a window). -//------------------------------------------------------------------------------ - -#ifndef _VIEW_H -#define _VIEW_H - - -#include -#include -#include -#include -#include - - -// view definitions ------------------------------------------------------------ - -enum { - B_PRIMARY_MOUSE_BUTTON = 0x01, - B_SECONDARY_MOUSE_BUTTON = 0x02, - B_TERTIARY_MOUSE_BUTTON = 0x04 -}; - -enum { - B_ENTERED_VIEW = 0, - B_INSIDE_VIEW, - B_EXITED_VIEW, - B_OUTSIDE_VIEW -}; - -enum { - B_POINTER_EVENTS = 0x00000001, - B_KEYBOARD_EVENTS = 0x00000002 -}; - -enum { - B_LOCK_WINDOW_FOCUS = 0x00000001, - B_SUSPEND_VIEW_FOCUS = 0x00000002, - B_NO_POINTER_HISTORY = 0x00000004 -}; - -enum { - B_TRACK_WHOLE_RECT, - B_TRACK_RECT_CORNER -}; - -enum { - B_FONT_FAMILY_AND_STYLE = 0x00000001, - B_FONT_SIZE = 0x00000002, - B_FONT_SHEAR = 0x00000004, - B_FONT_ROTATION = 0x00000008, - B_FONT_SPACING = 0x00000010, - B_FONT_ENCODING = 0x00000020, - B_FONT_FACE = 0x00000040, - B_FONT_FLAGS = 0x00000080, - B_FONT_ALL = 0x000000FF -}; - -const uint32 B_FULL_UPDATE_ON_RESIZE = 0x80000000UL; /* 31 */ -const uint32 _B_RESERVED1_ = 0x40000000UL; /* 30 */ -const uint32 B_WILL_DRAW = 0x20000000UL; /* 29 */ -const uint32 B_PULSE_NEEDED = 0x10000000UL; /* 28 */ -const uint32 B_NAVIGABLE_JUMP = 0x08000000UL; /* 27 */ -const uint32 B_FRAME_EVENTS = 0x04000000UL; /* 26 */ -const uint32 B_NAVIGABLE = 0x02000000UL; /* 25 */ -const uint32 B_SUBPIXEL_PRECISE = 0x01000000UL; /* 24 */ -const uint32 B_DRAW_ON_CHILDREN = 0x00800000UL; /* 23 */ -const uint32 B_INPUT_METHOD_AWARE = 0x00400000UL; /* 23 */ -const uint32 _B_RESERVED7_ = 0x00200000UL; /* 22 */ -/* -#define _RESIZE_MASK_ ~(B_FULL_UPDATE_ON_RESIZE|_B_RESERVED1_|B_WILL_DRAW|\ - B_PULSE_NEEDED|B_NAVIGABLE_JUMP|B_FRAME_EVENTS|B_NAVIGABLE|\ - B_SUBPIXEL_PRECISE|B_DRAW_ON_CHILDREN|B_INPUT_METHOD_AWARE|_B_RESERVED7_) -*/ -#define _RESIZE_MASK_ ~(B_FULL_UPDATE_ON_RESIZE|_B_RESERVED1_|B_WILL_DRAW|B_PULSE_NEEDED|B_NAVIGABLE_JUMP|B_FRAME_EVENTS|B_NAVIGABLE|B_SUBPIXEL_PRECISE|B_DRAW_ON_CHILDREN|B_INPUT_METHOD_AWARE|_B_RESERVED7_) - -const uint32 _VIEW_TOP_ = 1UL; -const uint32 _VIEW_LEFT_ = 2UL; -const uint32 _VIEW_BOTTOM_ = 3UL; -const uint32 _VIEW_RIGHT_ = 4UL; -const uint32 _VIEW_CENTER_ = 5UL; - -inline uint32 _rule_(uint32 r1, uint32 r2, uint32 r3, uint32 r4) - { return ((r1 << 12) | (r2 << 8) | (r3 << 4) | r4); } - -#define B_FOLLOW_NONE 0 -#define B_FOLLOW_ALL_SIDES _rule_(_VIEW_TOP_, _VIEW_LEFT_, _VIEW_BOTTOM_, _VIEW_RIGHT_) -#define B_FOLLOW_ALL B_FOLLOW_ALL_SIDES - -#define B_FOLLOW_LEFT _rule_(0, _VIEW_LEFT_, 0, _VIEW_LEFT_) -#define B_FOLLOW_RIGHT _rule_(0, _VIEW_RIGHT_, 0, _VIEW_RIGHT_) -#define B_FOLLOW_LEFT_RIGHT _rule_(0, _VIEW_LEFT_, 0, _VIEW_RIGHT_) -#define B_FOLLOW_H_CENTER _rule_(0, _VIEW_CENTER_, 0, _VIEW_CENTER_) - -#define B_FOLLOW_TOP _rule_(_VIEW_TOP_, 0, _VIEW_TOP_, 0) -#define B_FOLLOW_BOTTOM _rule_(_VIEW_BOTTOM_, 0, _VIEW_BOTTOM_, 0) -#define B_FOLLOW_TOP_BOTTOM _rule_(_VIEW_TOP_, 0, _VIEW_BOTTOM_, 0) -#define B_FOLLOW_V_CENTER _rule_(_VIEW_CENTER_, 0, _VIEW_CENTER_, 0) - -class BBitmap; -class BCursor; -class BMessage; -class BPicture; -class BPolygon; -class BRegion; -class BScrollBar; -class BScrollView; -class BShape; -class BShelf; -class BString; -class BWindow; -struct _array_data_; -struct _array_hdr_; -struct overlay_restrictions; - -namespace BPrivate { - class ViewState; -}; - - -class BView : public BHandler { -public: - BView(BRect frame, const char* name, - uint32 resizeMask, uint32 flags); - virtual ~BView(); - - BView(BMessage* data); - static BArchivable* Instantiate(BMessage* data); - virtual status_t Archive(BMessage* data, bool deep = true) const; - - virtual void AttachedToWindow(); - virtual void AllAttached(); - virtual void DetachedFromWindow(); - virtual void AllDetached(); - - virtual void MessageReceived(BMessage* msg); - - void AddChild(BView* child, BView* before = NULL); - bool RemoveChild(BView* child); - int32 CountChildren() const; - BView* ChildAt(int32 index) const; - BView* NextSibling() const; - BView* PreviousSibling() const; - bool RemoveSelf(); - - BWindow *Window() const; - - virtual void Draw(BRect updateRect); - virtual void MouseDown(BPoint where); - virtual void MouseUp(BPoint where); - virtual void MouseMoved(BPoint where, - uint32 code, - const BMessage* a_message); - virtual void WindowActivated(bool state); - virtual void KeyDown(const char* bytes, int32 numBytes); - virtual void KeyUp(const char* bytes, int32 numBytes); - virtual void Pulse(); - virtual void FrameMoved(BPoint new_position); - virtual void FrameResized(float new_width, float new_height); - - virtual void TargetedByScrollView(BScrollView* scroll_view); - void BeginRectTracking(BRect startRect, - uint32 style = B_TRACK_WHOLE_RECT); - void EndRectTracking(); - - void GetMouse(BPoint* location, - uint32* buttons, - bool checkMessageQueue = true); - - void DragMessage(BMessage* aMessage, - BRect dragRect, - BHandler* reply_to = NULL); - void DragMessage(BMessage* aMessage, - BBitmap* anImage, - BPoint offset, - BHandler* reply_to = NULL); - void DragMessage(BMessage* aMessage, - BBitmap* anImage, - drawing_mode dragMode, - BPoint offset, - BHandler* reply_to = NULL); - - BView* FindView(const char* name) const; - BView* Parent() const; - BRect Bounds() const; - BRect Frame() const; - void ConvertToScreen(BPoint* pt) const; - BPoint ConvertToScreen(BPoint pt) const; - void ConvertFromScreen(BPoint* pt) const; - BPoint ConvertFromScreen(BPoint pt) const; - void ConvertToScreen(BRect* r) const; - BRect ConvertToScreen(BRect r) const; - void ConvertFromScreen(BRect* r) const; - BRect ConvertFromScreen(BRect r) const; - void ConvertToParent(BPoint* pt) const; - BPoint ConvertToParent(BPoint pt) const; - void ConvertFromParent(BPoint* pt) const; - BPoint ConvertFromParent(BPoint pt) const; - void ConvertToParent(BRect* r) const; - BRect ConvertToParent(BRect r) const; - void ConvertFromParent(BRect* r) const; - BRect ConvertFromParent(BRect r) const; - BPoint LeftTop() const; - - void GetClippingRegion(BRegion* region) const; - virtual void ConstrainClippingRegion(BRegion* region); - void ClipToPicture(BPicture* picture, - BPoint where = B_ORIGIN, - bool sync = true); - void ClipToInversePicture(BPicture* picture, - BPoint where = B_ORIGIN, - bool sync = true); - - virtual void SetDrawingMode(drawing_mode mode); - drawing_mode DrawingMode() const; - - void SetBlendingMode(source_alpha srcAlpha, - alpha_function alphaFunc); - void GetBlendingMode(source_alpha* srcAlpha, - alpha_function* alphaFunc) const; - - virtual void SetPenSize(float size); - float PenSize() const; - - void SetViewCursor(const BCursor* cursor, bool sync=true); - - virtual void SetViewColor(rgb_color c); - void SetViewColor(uchar r, uchar g, uchar b, uchar a = 255); - rgb_color ViewColor() const; - - void SetViewBitmap(const BBitmap* bitmap, - BRect srcRect, BRect dstRect, - uint32 followFlags = B_FOLLOW_TOP|B_FOLLOW_LEFT, - uint32 options = B_TILE_BITMAP); - void SetViewBitmap(const BBitmap* bitmap, - uint32 followFlags = B_FOLLOW_TOP|B_FOLLOW_LEFT, - uint32 options = B_TILE_BITMAP); - void ClearViewBitmap(); - - status_t SetViewOverlay(const BBitmap* overlay, - BRect srcRect, BRect dstRect, - rgb_color* colorKey, - uint32 followFlags = B_FOLLOW_TOP|B_FOLLOW_LEFT, - uint32 options = 0); - status_t SetViewOverlay(const BBitmap* overlay, rgb_color* colorKey, - uint32 followFlags = B_FOLLOW_TOP|B_FOLLOW_LEFT, - uint32 options = 0); - void ClearViewOverlay(); - - virtual void SetHighColor(rgb_color a_color); - void SetHighColor(uchar r, uchar g, uchar b, uchar a = 255); - rgb_color HighColor() const; - - virtual void SetLowColor(rgb_color a_color); - void SetLowColor(uchar r, uchar g, uchar b, uchar a = 255); - rgb_color LowColor() const; - - void SetLineMode(cap_mode lineCap, - join_mode lineJoin, - float miterLimit = B_DEFAULT_MITER_LIMIT); - join_mode LineJoinMode() const; - cap_mode LineCapMode() const; - float LineMiterLimit() const; - - void SetOrigin(BPoint pt); - void SetOrigin(float x, float y); - BPoint Origin() const; - - void PushState(); - void PopState(); - - void MovePenTo(BPoint pt); - void MovePenTo(float x, float y); - void MovePenBy(float x, float y); - BPoint PenLocation() const; - void StrokeLine(BPoint toPt, - pattern p = B_SOLID_HIGH); - void StrokeLine(BPoint pt0, - BPoint pt1, - pattern p = B_SOLID_HIGH); - void BeginLineArray(int32 count); - void AddLine(BPoint pt0, BPoint pt1, rgb_color col); - void EndLineArray(); - - void StrokePolygon(const BPolygon* aPolygon, - bool closed = true, - pattern p = B_SOLID_HIGH); - void StrokePolygon(const BPoint* ptArray, - int32 numPts, - bool closed = true, - pattern p = B_SOLID_HIGH); - void StrokePolygon(const BPoint* ptArray, - int32 numPts, - BRect bounds, - bool closed = true, - pattern p = B_SOLID_HIGH); - void FillPolygon(const BPolygon* aPolygon, - pattern p = B_SOLID_HIGH); - void FillPolygon(const BPoint* ptArray, - int32 numPts, - pattern p = B_SOLID_HIGH); - void FillPolygon(const BPoint* ptArray, - int32 numPts, - BRect bounds, - pattern p = B_SOLID_HIGH); - - void StrokeTriangle(BPoint pt1, - BPoint pt2, - BPoint pt3, - BRect bounds, - pattern p = B_SOLID_HIGH); - void StrokeTriangle(BPoint pt1, - BPoint pt2, - BPoint pt3, - pattern p = B_SOLID_HIGH); - void FillTriangle(BPoint pt1, - BPoint pt2, - BPoint pt3, - pattern p = B_SOLID_HIGH); - void FillTriangle(BPoint pt1, - BPoint pt2, - BPoint pt3, - BRect bounds, - pattern p = B_SOLID_HIGH); - - void StrokeRect(BRect r, pattern p = B_SOLID_HIGH); - void FillRect(BRect r, pattern p = B_SOLID_HIGH); - void FillRegion(BRegion* a_region, pattern p= B_SOLID_HIGH); - void InvertRect(BRect r); - - void StrokeRoundRect(BRect r, - float xRadius, - float yRadius, - pattern p = B_SOLID_HIGH); - void FillRoundRect(BRect r, - float xRadius, - float yRadius, - pattern p = B_SOLID_HIGH); - - void StrokeEllipse(BPoint center, - float xRadius, - float yRadius, - pattern p = B_SOLID_HIGH); - void StrokeEllipse(BRect r, pattern p = B_SOLID_HIGH); - void FillEllipse(BPoint center, - float xRadius, - float yRadius, - pattern p = B_SOLID_HIGH); - void FillEllipse(BRect r, pattern p = B_SOLID_HIGH); - - void StrokeArc(BPoint center, - float xRadius, - float yRadius, - float start_angle, - float arc_angle, - pattern p = B_SOLID_HIGH); - void StrokeArc(BRect r, - float start_angle, - float arc_angle, - pattern p = B_SOLID_HIGH); - void FillArc(BPoint center, - float xRadius, - float yRadius, - float start_angle, - float arc_angle, - pattern p = B_SOLID_HIGH); - void FillArc(BRect r, - float start_angle, - float arc_angle, - pattern p = B_SOLID_HIGH); - - void StrokeBezier(BPoint* controlPoints, - pattern p = B_SOLID_HIGH); - void FillBezier(BPoint* controlPoints, - pattern p = B_SOLID_HIGH); - - void StrokeShape(BShape* shape, - pattern p = B_SOLID_HIGH); - void FillShape(BShape* shape, - pattern p = B_SOLID_HIGH); - - void CopyBits(BRect src, BRect dst); - void DrawBitmapAsync(const BBitmap* aBitmap, - BRect srcRect, - BRect dstRect); - void DrawBitmapAsync(const BBitmap* aBitmap); - void DrawBitmapAsync(const BBitmap* aBitmap, BPoint where); - void DrawBitmapAsync(const BBitmap* aBitmap, BRect dstRect); - void DrawBitmap(const BBitmap* aBitmap, - BRect srcRect, - BRect dstRect); - void DrawBitmap(const BBitmap* aBitmap); - void DrawBitmap(const BBitmap* aBitmap, BPoint where); - void DrawBitmap(const BBitmap* aBitmap, BRect dstRect); - - void DrawChar(char aChar); - void DrawChar(char aChar, BPoint location); - void DrawString(const char* aString, - escapement_delta* delta = NULL); - void DrawString(const char* aString, BPoint location, - escapement_delta* delta = NULL); - void DrawString(const char* aString, int32 length, - escapement_delta* delta = NULL); - void DrawString(const char* aString, - int32 length, - BPoint location, - escapement_delta* delta = 0L); - - virtual void SetFont(const BFont* font, uint32 mask = B_FONT_ALL); - - #if !_PR3_COMPATIBLE_ - void GetFont(BFont* font) const; - #else - void GetFont(BFont* font); - #endif - void TruncateString(BString* in_out, - uint32 mode, - float width) const; - float StringWidth(const char* string) const; - float StringWidth(const char* string, int32 length) const; - void GetStringWidths(char* stringArray[], - int32 lengthArray[], - int32 numStrings, - float widthArray[]) const; - void SetFontSize(float size); - void ForceFontAliasing(bool enable); - void GetFontHeight(font_height* height) const; - - void Invalidate(BRect invalRect); - void Invalidate(const BRegion* invalRegion); - void Invalidate(); - - void SetDiskMode(char* filename, long offset); - - void BeginPicture(BPicture* a_picture); - void AppendToPicture(BPicture* a_picture); - BPicture* EndPicture(); - - void DrawPicture(const BPicture* a_picture); - void DrawPicture(const BPicture* a_picture, BPoint where); - void DrawPicture(const char* filename, long offset, BPoint where); - void DrawPictureAsync(const BPicture* a_picture); - void DrawPictureAsync(const BPicture* a_picture, BPoint where); - void DrawPictureAsync(const char* filename, long offset, - BPoint where); - - status_t SetEventMask(uint32 mask, uint32 options=0); - uint32 EventMask(); - status_t SetMouseEventMask(uint32 mask, uint32 options=0); - - virtual void SetFlags(uint32 flags); - uint32 Flags() const; - virtual void SetResizingMode(uint32 mode); - uint32 ResizingMode() const; - void MoveBy(float dh, float dv); - void MoveTo(BPoint where); - void MoveTo(float x, float y); - void ResizeBy(float dh, float dv); - void ResizeTo(float width, float height); - void ScrollBy(float dh, float dv); - void ScrollTo(float x, float y); - virtual void ScrollTo(BPoint where); - virtual void MakeFocus(bool focusState = true); - bool IsFocus() const; - - virtual void Show(); - virtual void Hide(); - bool IsHidden() const; - bool IsHidden(const BView* looking_from) const; - - void Flush() const; - void Sync() const; - - virtual void GetPreferredSize(float* width, float* height); - virtual void ResizeToPreferred(); - - BScrollBar* ScrollBar(orientation posture) const; - - virtual BHandler* ResolveSpecifier(BMessage* msg, - int32 index, - BMessage* specifier, - int32 form, - const char* property); - virtual status_t GetSupportedSuites(BMessage* data); - - bool IsPrinting() const; - void SetScale(float scale) const; - -// Private or reserved --------------------------------------------------------- - virtual status_t Perform(perform_code d, void* arg); - - virtual void DrawAfterChildren(BRect r); - - // added by OBOS - DO NOT use this when programming BeOS R5!!! - float Scale() const; - -private: - - friend class BScrollBar; - friend class BWindow; - friend class BBitmap; - friend class BPrintJob; - friend class BShelf; - friend class BTabView; - - virtual void _ReservedView2(); - virtual void _ReservedView3(); - virtual void _ReservedView4(); - virtual void _ReservedView5(); - virtual void _ReservedView6(); - virtual void _ReservedView7(); - virtual void _ReservedView8(); - -#if !_PR3_COMPATIBLE_ - virtual void _ReservedView9(); - virtual void _ReservedView10(); - virtual void _ReservedView11(); - virtual void _ReservedView12(); - virtual void _ReservedView13(); - virtual void _ReservedView14(); - virtual void _ReservedView15(); - virtual void _ReservedView16(); -#endif - - BView(const BView&); - BView& operator=(const BView&); - - void InitData(BRect f, const char* name, uint32 rs, uint32 fl); - status_t ArchiveChildren(BMessage* data, bool deep) const; - status_t UnarchiveChildren(BMessage* data, BWindow* w = NULL); - status_t setViewImage(const BBitmap* bitmap,BRect srcRect, BRect dstRect, - uint32 followFlags, uint32 options); - void BeginPicture_pr(BPicture* a_picture, BRect r); - void SetPattern(pattern pat); - void DoBezier(int32 gr, BPoint* controlPoints, pattern p); - void DoShape(int32 gr, BShape* shape, pattern p); - void DoPictureClip(BPicture* picture, BPoint where, bool invert, - bool sync); - - bool do_owner_check() const; - void _SetOwner(BWindow* newOwner); - void check_lock() const; - void check_lock_no_pick() const; - void movesize(uint32 code, int32 h, int32 v); - void handle_tick(); - char *test_area(int32 length); - void removeCommArray(); - _array_hdr_ *new_comm_array(int32 cnt); - void SetScroller(BScrollBar* sb); - void UnsetScroller(BScrollBar* sb); - void RealScrollTo(BPoint); - void fetch_font(); - uchar font_encoding() const; - BShelf* shelf() const; - void set_shelf(BShelf* shelf); - - void _Activate(bool state); - void _Pulse(); - - void _UpdateStateForRemove(); - void _UpdatePattern(::pattern pattern); - - void deleteView( BView* aView); - bool do_owner_check_no_pick() const; - bool attachView( BView *aView ); - bool _AddChildToList(BView* child, BView* before = NULL); - bool _RemoveChildFromList(BView* child); - void callAttachHooks( BView *aView ); - void callDetachHooks( BView *aView ); - - // Debugging methods - void PrintToStream(); - void PrintTree(); - - int32 server_token; - uint32 fFlags; - BPoint fParentOffset; - BWindow* fOwner; - BView* fParent; - BView* fNextSibling; - BView* fPreviousSibling; - BView* fFirstChild; - - int16 fShowLevel; - bool top_level_view; // used - bool fNoISInteraction; - BPicture* cpicture; // used - _array_data_* comm; // used - - BScrollBar* fVerScroller; // used - BScrollBar* fHorScroller; // used - bool f_is_printing; - bool _unused_bool0; // was: attached; - bool _unused_bool1; - bool _unused_bool2; - BPrivate::ViewState* fPermanentState; // not used - BPrivate::ViewState* fState; - BRect fBounds; - BShelf* fShelf; - void* pr_state; // not used - uint32 fEventMask; - uint32 fEventOptions; - uint32 _reserved[4]; -#if !_PR3_COMPATIBLE_ - uint32 _more_reserved[3]; -#endif -}; - - -// inline definitions ---------------------------------------------------------- - -inline void -BView::ScrollTo(float x, float y) -{ - ScrollTo(BPoint(x, y)); -} - -inline void -BView::SetViewColor(uchar r, uchar g, uchar b, uchar a) -{ - rgb_color color; - color.red = r; color.green = g; - color.blue = b; color.alpha = a; - SetViewColor(color); -} - -inline void -BView::SetHighColor(uchar r, uchar g, uchar b, uchar a) -{ - rgb_color color; - color.red = r; color.green = g; - color.blue = b; color.alpha = a; - SetHighColor(color); -} - -inline void -BView::SetLowColor(uchar r, uchar g, uchar b, uchar a) -{ - rgb_color color; - color.red = r; color.green = g; - color.blue = b; color.alpha = a; - SetLowColor(color); -} - -#endif // _VIEW_H diff --git a/headers/build/os/interface/Window.h b/headers/build/os/interface/Window.h deleted file mode 100644 index e773012db8..0000000000 --- a/headers/build/os/interface/Window.h +++ /dev/null @@ -1,429 +0,0 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2001-2005, Haiku -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -// DEALINGS IN THE SOFTWARE. -// -// File Name: Window.h -// Author: Adrian Oanca (adioanca@mymail.ro) -// Description: BWindow is the base class for all windows (graphic areas -// displayed on-screen). -//------------------------------------------------------------------------------ -#ifndef _WINDOW_H -#define _WINDOW_H - -#include -#include -#include -#include -#include -#include -#include - -namespace BPrivate { - class PortLink; -}; - - -// window definitions ---------------------------------------------------------- - -enum window_type { - B_UNTYPED_WINDOW = 0, - B_TITLED_WINDOW = 1, - B_MODAL_WINDOW = 3, - B_DOCUMENT_WINDOW = 11, - B_BORDERED_WINDOW = 20, - B_FLOATING_WINDOW = 21 -}; - -//---------------------------------------------------------------- - -enum window_look { - B_BORDERED_WINDOW_LOOK = 20, - B_NO_BORDER_WINDOW_LOOK = 19, - B_TITLED_WINDOW_LOOK = 1, - B_DOCUMENT_WINDOW_LOOK = 11, - B_MODAL_WINDOW_LOOK = 3, - B_FLOATING_WINDOW_LOOK = 7 -}; - -//---------------------------------------------------------------- - -enum window_feel { - B_NORMAL_WINDOW_FEEL = 0, - B_MODAL_SUBSET_WINDOW_FEEL = 2, - B_MODAL_APP_WINDOW_FEEL = 1, - B_MODAL_ALL_WINDOW_FEEL = 3, - B_FLOATING_SUBSET_WINDOW_FEEL = 5, - B_FLOATING_APP_WINDOW_FEEL = 4, - B_FLOATING_ALL_WINDOW_FEEL = 6 -}; - -//---------------------------------------------------------------- - -enum window_alignment { - B_BYTE_ALIGNMENT = 0, - B_PIXEL_ALIGNMENT = 1 -}; - -//---------------------------------------------------------------- - -enum { - B_NOT_MOVABLE = 0x00000001, - B_NOT_CLOSABLE = 0x00000020, - B_NOT_ZOOMABLE = 0x00000040, - B_NOT_MINIMIZABLE = 0x00004000, - B_NOT_RESIZABLE = 0x00000002, - B_NOT_H_RESIZABLE = 0x00000004, - B_NOT_V_RESIZABLE = 0x00000008, - B_AVOID_FRONT = 0x00000080, - B_AVOID_FOCUS = 0x00002000, - B_WILL_ACCEPT_FIRST_CLICK = 0x00000010, - B_OUTLINE_RESIZE = 0x00001000, - B_NO_WORKSPACE_ACTIVATION = 0x00000100, - B_NOT_ANCHORED_ON_ACTIVATE = 0x00020000, - B_ASYNCHRONOUS_CONTROLS = 0x00080000, - B_QUIT_ON_WINDOW_CLOSE = 0x00100000 -}; - -#define B_CURRENT_WORKSPACE 0 -#define B_ALL_WORKSPACES 0xffffffff - -//---------------------------------------------------------------- - -class BButton; -class BMenuBar; -class BMenuItem; -class BMessage; -class BMessageRunner; -class BMessenger; -class BView; - -struct message; -struct _cmd_key_; -class ViewAttr; - -// BWindow class --------------------------------------------------------------- -class BWindow : public BLooper { -public: - BWindow(BRect frame, const char* title, - window_type type, uint32 flags, - uint32 workspace = B_CURRENT_WORKSPACE); - BWindow(BRect frame, const char* title, - window_look look, window_feel feel, - uint32 flags, - uint32 workspace = B_CURRENT_WORKSPACE); - virtual ~BWindow(); - - BWindow(BMessage* data); - static BArchivable *Instantiate(BMessage* data); - virtual status_t Archive(BMessage* data, bool deep = true) const; - - virtual void Quit(); - void Close() { Quit(); } - - void AddChild(BView* child, BView* before = NULL); - bool RemoveChild(BView* child); - int32 CountChildren() const; - BView *ChildAt(int32 index) const; - - virtual void DispatchMessage(BMessage* message, BHandler* handler); - virtual void MessageReceived(BMessage* message); - virtual void FrameMoved(BPoint new_position); - virtual void WorkspacesChanged(uint32 old_ws, uint32 new_ws); - virtual void WorkspaceActivated(int32 ws, bool state); - virtual void FrameResized(float new_width, float new_height); - virtual void Minimize(bool minimize); - virtual void Zoom(BPoint origin, float width, float height); - void Zoom(); - void SetZoomLimits(float maxWidth, float maxHeight); - virtual void ScreenChanged(BRect screen_size, color_space depth); - void SetPulseRate(bigtime_t rate); - bigtime_t PulseRate() const; - void AddShortcut(uint32 key, uint32 modifiers, - BMessage *msg); - void AddShortcut(uint32 key, uint32 modifiers, - BMessage *msg, BHandler *target); - void RemoveShortcut(uint32 key, uint32 modifiers); - void SetDefaultButton(BButton* button); - BButton *DefaultButton() const; - virtual void MenusBeginning(); - virtual void MenusEnded(); - bool NeedsUpdate() const; - void UpdateIfNeeded(); - BView *FindView(const char *viewName) const; - BView *FindView(BPoint) const; - BView *CurrentFocus() const; - void Activate(bool = true); - virtual void WindowActivated(bool state); - - void ConvertToScreen(BPoint* pt) const; - BPoint ConvertToScreen(BPoint pt) const; - void ConvertFromScreen(BPoint* pt) const; - BPoint ConvertFromScreen(BPoint pt) const; - void ConvertToScreen(BRect* rect) const; - BRect ConvertToScreen(BRect rect) const; - void ConvertFromScreen(BRect* rect) const; - BRect ConvertFromScreen(BRect rect) const; - - void MoveBy(float dx, float dy); - void MoveTo(BPoint); - void MoveTo(float x, float y); - void ResizeBy(float dx, float dy); - void ResizeTo(float width, float height); - - virtual void Show(); - virtual void Hide(); - bool IsHidden() const; - bool IsMinimized() const; - - void Flush() const; - void Sync() const; - - status_t SendBehind(const BWindow* window); - - void DisableUpdates(); - void EnableUpdates(); - - void BeginViewTransaction(); // referred as OpenViewTransaction() in BeBook - void EndViewTransaction(); // referred as CommitViewTransaction() in BeBook - - BRect Bounds() const; - BRect Frame() const; - const char *Title() const; - void SetTitle(const char* title); - bool IsFront() const; - bool IsActive() const; - void SetKeyMenuBar(BMenuBar* bar); - BMenuBar *KeyMenuBar() const; - void SetSizeLimits(float minWidth, float maxWidth, - float minHeight, float maxHeight); - void GetSizeLimits(float *minWidth, float *maxWidth, - float *minHeight, float *maxHeight); - uint32 Workspaces() const; - void SetWorkspaces(uint32); - BView *LastMouseMovedView() const; - - virtual BHandler *ResolveSpecifier(BMessage* msg, int32 index, - BMessage* specifier, int32 form, const char* property); - virtual status_t GetSupportedSuites(BMessage* data); - - status_t AddToSubset(BWindow* window); - status_t RemoveFromSubset(BWindow* window); - - virtual status_t Perform(perform_code d, void* arg); - - status_t SetType(window_type type); - window_type Type() const; - - status_t SetLook(window_look look); - window_look Look() const; - - status_t SetFeel(window_feel feel); - window_feel Feel() const; - - status_t SetFlags(uint32); - uint32 Flags() const; - - bool IsModal() const; - bool IsFloating() const; - - status_t SetWindowAlignment(window_alignment mode, int32 h, - int32 hOffset = 0, int32 width = 0, int32 widthOffset = 0, - int32 v = 0, int32 vOffset = 0, int32 height = 0, - int32 heightOffset = 0); - status_t GetWindowAlignment(window_alignment* mode = NULL, - int32* h = NULL, int32* hOffset = NULL, - int32* width = NULL, int32* widthOffset = NULL, - int32* v = NULL, int32* vOffset = NULL, - int32* height = NULL, int32* heightOffset = NULL) const; - - virtual bool QuitRequested(); - virtual thread_id Run(); - -// Private or reserved --------------------------------------------------------- -private: - typedef BLooper inherited; - - friend class BApplication; - friend class BBitmap; - friend class BScrollBar; - friend class BView; - friend class BMenuItem; - friend class BWindowScreen; - friend class BDirectWindow; - friend class BFilePanel; - friend class BHandler; - friend class _BEventMask; - friend void _set_menu_sem_(BWindow* w, sem_id sem); - friend status_t _safe_get_server_token_(const BLooper* , int32* ); - - virtual void _ReservedWindow1(); - virtual void _ReservedWindow2(); - virtual void _ReservedWindow3(); - virtual void _ReservedWindow4(); - virtual void _ReservedWindow5(); - virtual void _ReservedWindow6(); - virtual void _ReservedWindow7(); - virtual void _ReservedWindow8(); - - BWindow(); - BWindow(BWindow&); - BWindow &operator=(BWindow&); - - BWindow(BRect frame, int32 bitmapToken); - void InitData(BRect frame, const char* title, - window_look look, window_feel feel, - uint32 flags, uint32 workspace, - int32 bitmapToken = -1); - status_t ArchiveChildren(BMessage* data, bool deep) const; - status_t UnarchiveChildren(BMessage* data); - void BitmapClose(); // to be implemented - virtual void task_looper(); // thread function - it's here where app_server messages are received - /* void start_drag( BMessage* msg, - int32 token, - BPoint offset, - BRect track_rect, - BHandler* reply_to); - void start_drag( BMessage* msg, - int32 token, - BPoint offset, - int32 bitmap_token, - drawing_mode dragMode, - BHandler* reply_to); - */ - void prepareView(BView* aView); // changed from view_builder(BView* a_view); - void attachView(BView* aView); // changed from attach_builder(BView* a_view); - void detachView(BView* aView); // changed from detach_builder(BView* a_view); - //int32 get_server_token() const; - BMessage *extract_drop(BMessage* an_event, BHandler* *target); - //void movesize(uint32 opcode, float h, float v); - - //int32 MessagesWaiting(); - - void handle_activate(BMessage* an_event); - //void do_view_frame(BMessage* an_event); - //void do_value_change(BMessage* an_event, BHandler* handler); - //void do_mouse_down(BMessage* an_event, BView* target); - //void do_mouse_moved(BMessage* an_event, BView* target); - //void do_key_down(BMessage* an_event, BHandler* handler); - //void do_key_up(BMessage* an_event, BHandler* handler); - void do_menu_event(BMessage* an_event); - //void do_draw_views(); - virtual BMessage *ConvertToMessage(void* raw, int32 code); - //_cmd_key_ *allocShortcut(uint32 key, uint32 modifiers); - //_cmd_key_ *FindShortcut(uint32 key, uint32 modifiers); - void AddShortcut(uint32 key, // !!! - and menu shortcuts to list when a menu is added - uint32 modifiers, - BMenuItem* item); - //void post_message(BMessage* message); - //void SetLocalTitle(const char* new_title); - //void enable_pulsing(bool enable); - BHandler *determine_target(BMessage* msg, BHandler* target, bool pref); - //void kb_navigate(); - //void navigate_to_next(int32 direction, bool group = false); - //void set_focus(BView* focus, bool notify_input_server); // what does notify_input_server mean??? why??? - bool InUpdate(); - void DequeueAll(); - //bool find_token_and_handler(BMessage* msg, int32* token, BHandler* *handler); - window_type composeType(window_look look, // changed from: compose_type(...) - window_feel feel) const; - void decomposeType(window_type type, // changed from: decompose_type(...) - window_look* look, - window_feel* feel) const; - - void SetIsFilePanel(bool yes); - bool IsFilePanel() const; - - void BuildTopView(); - void setFocus(BView *focusView, bool notifyIputServer = false); - - // message: B_MOUSE_UP, B_MOUSE_DOWN, B_MOUSE_MOVED - void sendMessageUsingEventMask(int32 message, BPoint where); - BView* sendMessageUsingEventMask2(BView* aView, int32 message, BPoint where); - int32 findShortcut(uint32 key, uint32 modifiers); - bool findHandler(BView* start, BHandler* handler); - BView* findView(BView* aView, const char* viewName) const; - BView* findView(BView* aView, BPoint point) const; - BView* findView(BView* aView, int32 token); - BView* findLastChild(BView *parent); - - BView* _FindNextNavigable(BView *focus, uint32 flags); - BView* _FindPreviousNavigable(BView *focus, uint32 flags); - bool _HandleKeyDown(char key, uint32 modifiers); - void _KeyboardNavigation(); - void handleActivation(bool active); - - void drawAllViews(BView* view); - void DoUpdate(BView* view, BRect& area); - - // Debug - void PrintToStream() const; - - // 3 deprecated calls - //void AddFloater(BWindow* a_floating_window); - //void RemoveFloater(BWindow* a_floating_window); - //window_type WindowType() const; - -private: - char *fTitle; - int32 server_token; // not yet used - bool fInTransaction; - bool fActive; - short fShowLevel; - uint32 fFlags; - - uint32 _unused0[2]; - BView *top_view; - BView *fFocus; - BView *fLastMouseMovedView; - uint32 _unused1; - BMenuBar *fKeyMenuBar; - BButton *fDefaultButton; - BList accelList; - int32 fTopViewToken; - bool fPulseEnabled; - bool fViewsNeedPulse; // not yet used - bool fIsFilePanel; - bool fMaskActivated; - bigtime_t fPulseRate; - bool fWaitingForMenu; - bool fMinimized; - sem_id fMenuSem; - float fMaxZoomHeight; - float fMaxZoomWidth; - float fMinHeight; - float fMinWidth; - float fMaxHeight; - float fMaxWidth; - BRect fFrame; - window_look fLook; - ViewAttr *fCurDrawViewState; // not yet used - window_feel fFeel; - int32 fLastViewToken; - BPrivate::PortLink *fLink; - BMessageRunner *fPulseRunner; - BRect fCurrentFrame; // not yet used - - uint32 _reserved[2]; // was 8 -#if !_PR3_COMPATIBLE_ - uint32 _more_reserved[4]; -#endif -}; - -#endif // _WINDOW_H