Remove enum elaborated type specifier

...from orientation params. Elaborated type specifiers are not needed
for C++ code and removing them makes doxygen happy. Verified working
on both gcc2h and gcc4h builds.
This commit is contained in:
John Scipione
2013-07-08 19:29:11 -04:00
parent 5d4ef3e417
commit e724b26f23
30 changed files with 150 additions and 173 deletions
+3 -3
View File
@@ -52,10 +52,10 @@
/*! /*!
\fn BGroupLayout::BGroupLayout(enum orientation orientation, float spacing) \fn BGroupLayout::BGroupLayout(orientation orientation, float spacing)
\brief Creates a new BGroupLayout. \brief Creates a new BGroupLayout.
\param orientation The #orientation of this BGroupLayout. \param orientation The orientation of this BGroupLayout.
\param spacing The spacing between BLayoutItems in this BGroupLayout. \param spacing The spacing between BLayoutItems in this BGroupLayout.
*/ */
@@ -95,7 +95,7 @@
/*! /*!
\fn void BGroupLayout::SetOrientation(enum orientation orientation) \fn void BGroupLayout::SetOrientation(orientation orientation)
\brief Set the #orientation of this BGroupLayout. \brief Set the #orientation of this BGroupLayout.
\param orientation The new #orientation of this BGroupLayout. \param orientation The new #orientation of this BGroupLayout.
*/ */
+4 -8
View File
@@ -64,8 +64,7 @@
/*! /*!
\fn BLayoutBuilder::Group<ParentBuilder>::Group(BWindow *window, \fn BLayoutBuilder::Group<ParentBuilder>::Group(BWindow *window,
enum orientation orientation=B_HORIZONTAL, orientation orientation, float spacing)
float spacing=B_USE_DEFAULT_SPACING)
\brief Creates a new BGroupLayout, and attaches it to a BWindow. \brief Creates a new BGroupLayout, and attaches it to a BWindow.
\note The top BView* in \a window has its ViewColor set to \note The top BView* in \a window has its ViewColor set to
@@ -98,8 +97,7 @@
/*! /*!
\fn BLayoutBuilder::Group<ParentBuilder>::Group( \fn BLayoutBuilder::Group<ParentBuilder>::Group(
enum orientation orientation=B_HORIZONTAL, orientation orientation, float spacing)
float spacing=B_USE_DEFAULT_SPACING)
\brief Creates a new BGroupView and targets it. \brief Creates a new BGroupView and targets it.
Methods called on this builder will be directed to the new BGroupView's Methods called on this builder will be directed to the new BGroupView's
@@ -178,8 +176,7 @@
/*! /*!
\fn GroupBuilder BLayoutBuilder::Group<ParentBuilder>::AddGroup( \fn GroupBuilder BLayoutBuilder::Group<ParentBuilder>::AddGroup(
enum orientation orientation, float spacing=B_USE_DEFAULT_SPACING, orientation orientation, float spacing, float weight)
float weight=1.0f)
\brief Construct and add a viewless BGroupLayout, then return a GroupBuilder \brief Construct and add a viewless BGroupLayout, then return a GroupBuilder
representing the newly added layout. representing the newly added layout.
@@ -264,8 +261,7 @@
/*! /*!
\fn SplitBuilder BLayoutBuilder::Group<ParentBuilder>::AddSplit( \fn SplitBuilder BLayoutBuilder::Group<ParentBuilder>::AddSplit(
enum orientation orientation, float spacing=B_USE_DEFAULT_SPACING, orientation orientation, float spacing, float weight)
float weight=1.0f)
\brief Create and add a new BSplitView with a weight of \c weight, then \brief Create and add a new BSplitView with a weight of \c weight, then
return a SplitBuilder representing the new BSplitView. return a SplitBuilder representing the new BSplitView.
+5 -6
View File
@@ -147,7 +147,7 @@ public:
= B_ALIGN_HORIZONTAL_UNSET, = B_ALIGN_HORIZONTAL_UNSET,
int32 columnCount = 1, int32 rowCount = 1); int32 columnCount = 1, int32 rowCount = 1);
inline GroupBuilder AddGroup(enum orientation orientation, inline GroupBuilder AddGroup(orientation orientation,
float spacing, int32 column, int32 row, float spacing, int32 column, int32 row,
int32 columnCount = 1, int32 rowCount = 1); int32 columnCount = 1, int32 rowCount = 1);
inline GroupBuilder AddGroup(BGroupView* groupView, int32 column, inline GroupBuilder AddGroup(BGroupView* groupView, int32 column,
@@ -168,7 +168,7 @@ public:
int32 column, int32 row, int32 column, int32 row,
int32 columnCount = 1, int32 rowCount = 1); int32 columnCount = 1, int32 rowCount = 1);
inline SplitBuilder AddSplit(enum orientation orientation, inline SplitBuilder AddSplit(orientation orientation,
float spacing, int32 column, int32 row, float spacing, int32 column, int32 row,
int32 columnCount = 1, int32 rowCount = 1); int32 columnCount = 1, int32 rowCount = 1);
inline SplitBuilder AddSplit(BSplitView* splitView, int32 column, inline SplitBuilder AddSplit(BSplitView* splitView, int32 column,
@@ -197,8 +197,7 @@ public:
typedef Split<ThisBuilder> SplitBuilder; typedef Split<ThisBuilder> SplitBuilder;
public: public:
inline Split(enum orientation orientation inline Split(orientation orientation = B_HORIZONTAL,
= B_HORIZONTAL,
float spacing = 0.0f); float spacing = 0.0f);
inline Split(BSplitView* view); inline Split(BSplitView* view);
@@ -211,7 +210,7 @@ public:
inline ThisBuilder& Add(BLayoutItem* item); inline ThisBuilder& Add(BLayoutItem* item);
inline ThisBuilder& Add(BLayoutItem* item, float weight); inline ThisBuilder& Add(BLayoutItem* item, float weight);
inline GroupBuilder AddGroup(enum orientation orientation, inline GroupBuilder AddGroup(orientation orientation,
float spacing = 0.0f, float weight = 1.0f); float spacing = 0.0f, float weight = 1.0f);
inline GroupBuilder AddGroup(BGroupView* groupView, inline GroupBuilder AddGroup(BGroupView* groupView,
float weight = 1.0f); float weight = 1.0f);
@@ -226,7 +225,7 @@ public:
inline GridBuilder AddGrid(BGridLayout* gridLayout, inline GridBuilder AddGrid(BGridLayout* gridLayout,
float weight = 1.0f); float weight = 1.0f);
inline SplitBuilder AddSplit(enum orientation orientation, inline SplitBuilder AddSplit(orientation orientation,
float spacing = 0.0f, float weight = 1.0f); float spacing = 0.0f, float weight = 1.0f);
inline SplitBuilder AddSplit(BSplitView* splitView, inline SplitBuilder AddSplit(BSplitView* splitView,
float weight = 1.0f); float weight = 1.0f);
+4 -4
View File
@@ -56,7 +56,7 @@
/*! /*!
\fn void BTwoDimensionalLayout::AlignLayoutWith( \fn void BTwoDimensionalLayout::AlignLayoutWith(
BTwoDimensionalLayout* other, enum orientation orientation) BTwoDimensionalLayout* other, orientation orientation)
\brief Align the BLayoutItem&apos;s in the specified \a orientation within \brief Align the BLayoutItem&apos;s in the specified \a orientation within
two or more BTwoDimensionalLayout&apos;s. two or more BTwoDimensionalLayout&apos;s.
@@ -114,7 +114,7 @@
/*! /*!
\fn void BTwoDimensionalLayout::PrepareItems(enum orientation orientation) \fn void BTwoDimensionalLayout::PrepareItems(orientation orientation)
\brief Prepare the BLayoutItem in this BTwoDimensionalLayout subclass \brief Prepare the BLayoutItem in this BTwoDimensionalLayout subclass
for layout within a certain \a orientation. for layout within a certain \a orientation.
@@ -158,8 +158,8 @@
/*! /*!
\fn void BTwoDimensionalLayout::GetColumnRowConstraints(enum orientation \fn void BTwoDimensionalLayout::GetColumnRowConstraints(
orientation, int32 index, ColumnRowConstraints* constraints) orientation orientation, int32 index, ColumnRowConstraints* constraints)
\brief Fill in the ColumnRowConstraints for a certain column or row in \brief Fill in the ColumnRowConstraints for a certain column or row in
the BTwoDimensionalLayout. the BTwoDimensionalLayout.
+1 -1
View File
@@ -40,7 +40,7 @@
So, let's review the BGroupLayout constructor: So, let's review the BGroupLayout constructor:
\code \code
BGroupLayout(enum orientation orientation, float spacing = B_USE_DEFAULT_SPACING) BGroupLayout(orientation orientation, float spacing = B_USE_DEFAULT_SPACING)
\endcode \endcode
Because we only have one item in this layout, \c orientation and \c spacing Because we only have one item in this layout, \c orientation and \c spacing
+3 -3
View File
@@ -19,14 +19,14 @@ public:
uint32 flags = B_WILL_DRAW); uint32 flags = B_WILL_DRAW);
BChannelSlider(BRect area, const char* name, BChannelSlider(BRect area, const char* name,
const char* label, BMessage* message, const char* label, BMessage* message,
enum orientation orientation, orientation orientation,
int32 channels = 1, int32 channels = 1,
uint32 resizeMode uint32 resizeMode
= B_FOLLOW_LEFT | B_FOLLOW_TOP, = B_FOLLOW_LEFT | B_FOLLOW_TOP,
uint32 flags = B_WILL_DRAW); uint32 flags = B_WILL_DRAW);
BChannelSlider(const char* name, BChannelSlider(const char* name,
const char* label, BMessage* message, const char* label, BMessage* message,
enum orientation orientation, orientation orientation,
int32 channels = 1, int32 channels = 1,
uint32 flags = B_WILL_DRAW); uint32 flags = B_WILL_DRAW);
BChannelSlider(BMessage* archive); BChannelSlider(BMessage* archive);
@@ -67,7 +67,7 @@ public:
virtual void SetEnabled(bool on); virtual void SetEnabled(bool on);
virtual orientation Orientation() const; virtual orientation Orientation() const;
void SetOrientation(enum orientation orientation); void SetOrientation(orientation orientation);
virtual int32 MaxChannelCount() const; virtual int32 MaxChannelCount() const;
virtual bool SupportsIndividualLimits() const; virtual bool SupportsIndividualLimits() const;
+19 -28
View File
@@ -119,16 +119,14 @@ public:
const rgb_color& base, const rgb_color& base,
uint32 flags = 0, uint32 flags = 0,
uint32 borders = B_ALL_BORDERS, uint32 borders = B_ALL_BORDERS,
enum orientation orientation orientation orientation = B_HORIZONTAL);
= B_HORIZONTAL);
/*virtual*/ void DrawButtonBackground(BView* view, BRect& rect, /*virtual*/ void DrawButtonBackground(BView* view, BRect& rect,
const BRect& updateRect, const BRect& updateRect,
float radius, float radius,
const rgb_color& base, const rgb_color& base,
uint32 flags = 0, uint32 flags = 0,
uint32 borders = B_ALL_BORDERS, uint32 borders = B_ALL_BORDERS,
enum orientation orientation orientation orientation = B_HORIZONTAL);
= B_HORIZONTAL);
/*virtual*/ void DrawButtonBackground(BView* view, BRect& rect, /*virtual*/ void DrawButtonBackground(BView* view, BRect& rect,
const BRect& updateRect, const BRect& updateRect,
float leftTopRadius, float leftTopRadius,
@@ -138,8 +136,7 @@ public:
const rgb_color& base, const rgb_color& base,
uint32 flags = 0, uint32 flags = 0,
uint32 borders = B_ALL_BORDERS, uint32 borders = B_ALL_BORDERS,
enum orientation orientation orientation orientation = B_HORIZONTAL);
= B_HORIZONTAL);
virtual void DrawMenuBarBackground(BView* view, BRect& rect, virtual void DrawMenuBarBackground(BView* view, BRect& rect,
const BRect& updateRect, const BRect& updateRect,
@@ -222,11 +219,11 @@ public:
BRect& rect1, BRect& rect2, BRect& rect1, BRect& rect2,
const BRect& updateRect, const BRect& updateRect,
const rgb_color& base, uint32 flags, const rgb_color& base, uint32 flags,
enum orientation orientation); orientation orientation);
virtual void DrawScrollBarBackground(BView* view, virtual void DrawScrollBarBackground(BView* view,
BRect& rect, const BRect& updateRect, BRect& rect, const BRect& updateRect,
const rgb_color& base, uint32 flags, const rgb_color& base, uint32 flags,
enum orientation orientation); orientation orientation);
/*virtual*/ void DrawScrollViewFrame(BView* view, /*virtual*/ void DrawScrollViewFrame(BView* view,
BRect& rect, const BRect& updateRect, BRect& rect, const BRect& updateRect,
@@ -251,32 +248,32 @@ public:
rgb_color leftFillColor, rgb_color leftFillColor,
rgb_color rightFillColor, rgb_color rightFillColor,
float sliderScale, uint32 flags, float sliderScale, uint32 flags,
enum orientation orientation); orientation orientation);
virtual void DrawSliderBar(BView* view, BRect rect, virtual void DrawSliderBar(BView* view, BRect rect,
const BRect& updateRect, const BRect& updateRect,
const rgb_color& base, rgb_color fillColor, const rgb_color& base, rgb_color fillColor,
uint32 flags, enum orientation orientation); uint32 flags, orientation orientation);
virtual void DrawSliderThumb(BView* view, BRect& rect, virtual void DrawSliderThumb(BView* view, BRect& rect,
const BRect& updateRect, const BRect& updateRect,
const rgb_color& base, uint32 flags, const rgb_color& base, uint32 flags,
enum orientation orientation); orientation orientation);
/*virtual*/ void DrawSliderTriangle(BView* view, BRect& rect, /*virtual*/ void DrawSliderTriangle(BView* view, BRect& rect,
const BRect& updateRect, const BRect& updateRect,
const rgb_color& base, uint32 flags, const rgb_color& base, uint32 flags,
enum orientation orientation); orientation orientation);
virtual void DrawSliderTriangle(BView* view, BRect& rect, virtual void DrawSliderTriangle(BView* view, BRect& rect,
const BRect& updateRect, const BRect& updateRect,
const rgb_color& base, const rgb_color& base,
const rgb_color& fill, uint32 flags, const rgb_color& fill, uint32 flags,
enum orientation orientation); orientation orientation);
virtual void DrawSliderHashMarks(BView* view, BRect& rect, virtual void DrawSliderHashMarks(BView* view, BRect& rect,
const BRect& updateRect, const BRect& updateRect,
const rgb_color& base, int32 count, const rgb_color& base, int32 count,
hash_mark_location location, hash_mark_location location,
uint32 flags, enum orientation orientation); uint32 flags, orientation orientation);
virtual void DrawActiveTab(BView* view, BRect& rect, virtual void DrawActiveTab(BView* view, BRect& rect,
const BRect& updateRect, const BRect& updateRect,
@@ -291,7 +288,7 @@ public:
/*virtual*/ void DrawSplitter(BView* view, BRect& rect, /*virtual*/ void DrawSplitter(BView* view, BRect& rect,
const BRect& updateRect, const BRect& updateRect,
const rgb_color& base, const rgb_color& base,
enum orientation orientation, orientation orientation,
uint32 flags = 0, uint32 flags = 0,
uint32 borders = B_ALL_BORDERS); uint32 borders = B_ALL_BORDERS);
@@ -381,8 +378,7 @@ protected:
const rgb_color& base, const rgb_color& base,
uint32 flags = 0, uint32 flags = 0,
uint32 borders = B_ALL_BORDERS, uint32 borders = B_ALL_BORDERS,
enum orientation orientation orientation orientation = B_HORIZONTAL);
= B_HORIZONTAL);
void _DrawMenuFieldBackgroundOutside(BView* view, void _DrawMenuFieldBackgroundOutside(BView* view,
BRect& rect, const BRect& updateRect, BRect& rect, const BRect& updateRect,
@@ -503,7 +499,7 @@ protected:
const rgb_color& fillShadowColor, const rgb_color& fillShadowColor,
float leftInset, float topInset, float leftInset, float topInset,
float rightInset, float bottomInset, float rightInset, float bottomInset,
enum orientation orientation); orientation orientation);
// Border color methods // Border color methods
rgb_color _EdgeLightColor(const rgb_color& base, rgb_color _EdgeLightColor(const rgb_color& base,
@@ -530,33 +526,28 @@ protected:
void _FillGradient(BView* view, const BRect& rect, void _FillGradient(BView* view, const BRect& rect,
const rgb_color& base, float topTint, const rgb_color& base, float topTint,
float bottomTint, float bottomTint,
enum orientation orientation orientation orientation = B_HORIZONTAL);
= B_HORIZONTAL);
void _FillGlossyGradient(BView* view, void _FillGlossyGradient(BView* view,
const BRect& rect, const rgb_color& base, const BRect& rect, const rgb_color& base,
float topTint, float middle1Tint, float topTint, float middle1Tint,
float middle2Tint, float bottomTint, float middle2Tint, float bottomTint,
enum orientation orientation orientation orientation = B_HORIZONTAL);
= B_HORIZONTAL);
void _MakeGradient(BGradientLinear& gradient, void _MakeGradient(BGradientLinear& gradient,
const BRect& rect, const rgb_color& base, const BRect& rect, const rgb_color& base,
float topTint, float bottomTint, float topTint, float bottomTint,
enum orientation orientation orientation orientation = B_HORIZONTAL) const;
= B_HORIZONTAL) const;
void _MakeGlossyGradient(BGradientLinear& gradient, void _MakeGlossyGradient(BGradientLinear& gradient,
const BRect& rect, const rgb_color& base, const BRect& rect, const rgb_color& base,
float topTint, float middle1Tint, float topTint, float middle1Tint,
float middle2Tint, float bottomTint, float middle2Tint, float bottomTint,
enum orientation orientation orientation orientation = B_HORIZONTAL) const;
= B_HORIZONTAL) const;
void _MakeButtonGradient(BGradientLinear& gradient, void _MakeButtonGradient(BGradientLinear& gradient,
BRect& rect, const rgb_color& base, BRect& rect, const rgb_color& base,
uint32 flags, enum orientation orientation uint32 flags, orientation orientation = B_HORIZONTAL) const;
= B_HORIZONTAL) const;
bool _RadioButtonAndCheckBoxMarkColor( bool _RadioButtonAndCheckBoxMarkColor(
const rgb_color& base, rgb_color& color, const rgb_color& base, rgb_color& color,
+1 -1
View File
@@ -80,7 +80,7 @@ protected:
virtual int32 InternalCountColumns(); virtual int32 InternalCountColumns();
virtual int32 InternalCountRows(); virtual int32 InternalCountRows();
virtual void GetColumnRowConstraints( virtual void GetColumnRowConstraints(
enum orientation orientation, orientation orientation,
int32 index, int32 index,
ColumnRowConstraints* constraints); ColumnRowConstraints* constraints);
virtual void GetItemDimensions(BLayoutItem* item, virtual void GetItemDimensions(BLayoutItem* item,
+4 -4
View File
@@ -9,7 +9,7 @@
class BGroupLayout : public BTwoDimensionalLayout { class BGroupLayout : public BTwoDimensionalLayout {
public: public:
BGroupLayout(enum orientation orientation, BGroupLayout(orientation orientation,
float spacing = B_USE_DEFAULT_SPACING); float spacing = B_USE_DEFAULT_SPACING);
BGroupLayout(BMessage* from); BGroupLayout(BMessage* from);
virtual ~BGroupLayout(); virtual ~BGroupLayout();
@@ -18,7 +18,7 @@ public:
void SetSpacing(float spacing); void SetSpacing(float spacing);
orientation Orientation() const; orientation Orientation() const;
void SetOrientation(enum orientation orientation); void SetOrientation(orientation orientation);
float ItemWeight(int32 index) const; float ItemWeight(int32 index) const;
void SetItemWeight(int32 index, float weight); void SetItemWeight(int32 index, float weight);
@@ -51,12 +51,12 @@ protected:
virtual bool ItemAdded(BLayoutItem* item, int32 atIndex); virtual bool ItemAdded(BLayoutItem* item, int32 atIndex);
virtual void ItemRemoved(BLayoutItem* item, int32 fromIndex); virtual void ItemRemoved(BLayoutItem* item, int32 fromIndex);
virtual void PrepareItems(enum orientation orientation); virtual void PrepareItems(orientation orientation);
virtual int32 InternalCountColumns(); virtual int32 InternalCountColumns();
virtual int32 InternalCountRows(); virtual int32 InternalCountRows();
virtual void GetColumnRowConstraints( virtual void GetColumnRowConstraints(
enum orientation orientation, orientation orientation,
int32 index, int32 index,
ColumnRowConstraints* constraints); ColumnRowConstraints* constraints);
virtual void GetItemDimensions(BLayoutItem* item, virtual void GetItemDimensions(BLayoutItem* item,
+2 -2
View File
@@ -12,7 +12,7 @@
class BGroupLayoutBuilder { class BGroupLayoutBuilder {
public: public:
BGroupLayoutBuilder( BGroupLayoutBuilder(
enum orientation orientation = B_HORIZONTAL, orientation orientation = B_HORIZONTAL,
float spacing = B_USE_DEFAULT_SPACING); float spacing = B_USE_DEFAULT_SPACING);
BGroupLayoutBuilder(BGroupLayout* layout); BGroupLayoutBuilder(BGroupLayout* layout);
BGroupLayoutBuilder(BGroupView* view); BGroupLayoutBuilder(BGroupView* view);
@@ -28,7 +28,7 @@ public:
BGroupLayoutBuilder& Add(BLayoutItem* item); BGroupLayoutBuilder& Add(BLayoutItem* item);
BGroupLayoutBuilder& Add(BLayoutItem* item, float weight); BGroupLayoutBuilder& Add(BLayoutItem* item, float weight);
BGroupLayoutBuilder& AddGroup(enum orientation orientation, BGroupLayoutBuilder& AddGroup(orientation orientation,
float spacing = B_USE_DEFAULT_SPACING, float spacing = B_USE_DEFAULT_SPACING,
float weight = 1.0f); float weight = 1.0f);
BGroupLayoutBuilder& End(); BGroupLayoutBuilder& End();
+2 -2
View File
@@ -13,10 +13,10 @@
class BGroupView : public BView { class BGroupView : public BView {
public: public:
BGroupView( BGroupView(
enum orientation orientation = B_HORIZONTAL, orientation orientation = B_HORIZONTAL,
float spacing = B_USE_DEFAULT_SPACING); float spacing = B_USE_DEFAULT_SPACING);
BGroupView(const char* name, BGroupView(const char* name,
enum orientation orientation = B_HORIZONTAL, orientation orientation = B_HORIZONTAL,
float spacing = B_USE_DEFAULT_SPACING); float spacing = B_USE_DEFAULT_SPACING);
BGroupView(BMessage* from); BGroupView(BMessage* from);
virtual ~BGroupView(); virtual ~BGroupView();
+27 -29
View File
@@ -55,14 +55,13 @@ public:
typedef Split<ThisBuilder> SplitBuilder; typedef Split<ThisBuilder> SplitBuilder;
public: public:
inline Group(enum orientation orientation inline Group(orientation orientation = B_HORIZONTAL,
= B_HORIZONTAL,
float spacing = B_USE_DEFAULT_SPACING); float spacing = B_USE_DEFAULT_SPACING);
inline Group(BWindow* window, inline Group(BWindow* window,
enum orientation orientation = B_HORIZONTAL, orientation orientation = B_HORIZONTAL,
float spacing = B_USE_DEFAULT_SPACING); float spacing = B_USE_DEFAULT_SPACING);
inline Group(BView* view, inline Group(BView* view,
enum orientation orientation = B_HORIZONTAL, orientation orientation = B_HORIZONTAL,
float spacing = B_USE_DEFAULT_SPACING); float spacing = B_USE_DEFAULT_SPACING);
inline Group(BGroupLayout* layout); inline Group(BGroupLayout* layout);
inline Group(BGroupView* view); inline Group(BGroupView* view);
@@ -77,7 +76,7 @@ public:
inline ThisBuilder& Add(BLayoutItem* item); inline ThisBuilder& Add(BLayoutItem* item);
inline ThisBuilder& Add(BLayoutItem* item, float weight); inline ThisBuilder& Add(BLayoutItem* item, float weight);
inline GroupBuilder AddGroup(enum orientation orientation, inline GroupBuilder AddGroup(orientation orientation,
float spacing = B_USE_DEFAULT_SPACING, float spacing = B_USE_DEFAULT_SPACING,
float weight = 1.0f); float weight = 1.0f);
inline GroupBuilder AddGroup(BGroupView* groupView, inline GroupBuilder AddGroup(BGroupView* groupView,
@@ -94,7 +93,7 @@ public:
inline GridBuilder AddGrid(BGridView* gridView, inline GridBuilder AddGrid(BGridView* gridView,
float weight = 1.0f); float weight = 1.0f);
inline SplitBuilder AddSplit(enum orientation orientation, inline SplitBuilder AddSplit(orientation orientation,
float spacing = B_USE_DEFAULT_SPACING, float spacing = B_USE_DEFAULT_SPACING,
float weight = 1.0f); float weight = 1.0f);
inline SplitBuilder AddSplit(BSplitView* splitView, inline SplitBuilder AddSplit(BSplitView* splitView,
@@ -165,7 +164,7 @@ public:
int32 textColumnCount = 1, int32 textColumnCount = 1,
int32 rowCount = 1); int32 rowCount = 1);
inline GroupBuilder AddGroup(enum orientation orientation, inline GroupBuilder AddGroup(orientation orientation,
float spacing, int32 column, int32 row, float spacing, int32 column, int32 row,
int32 columnCount = 1, int32 rowCount = 1); int32 columnCount = 1, int32 rowCount = 1);
inline GroupBuilder AddGroup(BGroupView* groupView, int32 column, inline GroupBuilder AddGroup(BGroupView* groupView, int32 column,
@@ -186,7 +185,7 @@ public:
int32 column, int32 row, int32 column, int32 row,
int32 columnCount = 1, int32 rowCount = 1); int32 columnCount = 1, int32 rowCount = 1);
inline SplitBuilder AddSplit(enum orientation orientation, inline SplitBuilder AddSplit(orientation orientation,
float spacing, int32 column, int32 row, float spacing, int32 column, int32 row,
int32 columnCount = 1, int32 rowCount = 1); int32 columnCount = 1, int32 rowCount = 1);
inline SplitBuilder AddSplit(BSplitView* splitView, int32 column, inline SplitBuilder AddSplit(BSplitView* splitView, int32 column,
@@ -225,8 +224,7 @@ public:
typedef Split<ThisBuilder> SplitBuilder; typedef Split<ThisBuilder> SplitBuilder;
public: public:
inline Split(enum orientation orientation inline Split(orientation orientation = B_HORIZONTAL,
= B_HORIZONTAL,
float spacing = B_USE_DEFAULT_SPACING); float spacing = B_USE_DEFAULT_SPACING);
inline Split(BSplitView* view); inline Split(BSplitView* view);
@@ -239,7 +237,7 @@ public:
inline ThisBuilder& Add(BLayoutItem* item); inline ThisBuilder& Add(BLayoutItem* item);
inline ThisBuilder& Add(BLayoutItem* item, float weight); inline ThisBuilder& Add(BLayoutItem* item, float weight);
inline GroupBuilder AddGroup(enum orientation orientation, inline GroupBuilder AddGroup(orientation orientation,
float spacing = B_USE_DEFAULT_SPACING, float spacing = B_USE_DEFAULT_SPACING,
float weight = 1.0f); float weight = 1.0f);
inline GroupBuilder AddGroup(BGroupView* groupView, inline GroupBuilder AddGroup(BGroupView* groupView,
@@ -256,7 +254,7 @@ public:
inline GridBuilder AddGrid(BGridLayout* gridLayout, inline GridBuilder AddGrid(BGridLayout* gridLayout,
float weight = 1.0f); float weight = 1.0f);
inline SplitBuilder AddSplit(enum orientation orientation, inline SplitBuilder AddSplit(orientation orientation,
float spacing = B_USE_DEFAULT_SPACING, float spacing = B_USE_DEFAULT_SPACING,
float weight = 1.0f); float weight = 1.0f);
inline SplitBuilder AddSplit(BSplitView* splitView, inline SplitBuilder AddSplit(BSplitView* splitView,
@@ -358,7 +356,7 @@ Base<ParentBuilder>::End()
template<typename ParentBuilder> template<typename ParentBuilder>
Group<ParentBuilder>::Group(enum orientation orientation, float spacing) Group<ParentBuilder>::Group(orientation orientation, float spacing)
: :
fLayout((new BGroupView(orientation, spacing))->GroupLayout()) fLayout((new BGroupView(orientation, spacing))->GroupLayout())
{ {
@@ -366,8 +364,8 @@ Group<ParentBuilder>::Group(enum orientation orientation, float spacing)
template<typename ParentBuilder> template<typename ParentBuilder>
Group<ParentBuilder>::Group(BWindow* window, enum orientation orientation, Group<ParentBuilder>::Group(BWindow* window, orientation orientation,
float spacing) float spacing)
: :
fLayout(new BGroupLayout(orientation, spacing)) fLayout(new BGroupLayout(orientation, spacing))
{ {
@@ -379,8 +377,8 @@ Group<ParentBuilder>::Group(BWindow* window, enum orientation orientation,
template<typename ParentBuilder> template<typename ParentBuilder>
Group<ParentBuilder>::Group(BView* view, enum orientation orientation, Group<ParentBuilder>::Group(BView* view, orientation orientation,
float spacing) float spacing)
: :
fLayout(new BGroupLayout(orientation, spacing)) fLayout(new BGroupLayout(orientation, spacing))
{ {
@@ -478,8 +476,8 @@ Group<ParentBuilder>::Add(BLayoutItem* item, float weight)
template<typename ParentBuilder> template<typename ParentBuilder>
typename Group<ParentBuilder>::GroupBuilder typename Group<ParentBuilder>::GroupBuilder
Group<ParentBuilder>::AddGroup(enum orientation orientation, float spacing, Group<ParentBuilder>::AddGroup(orientation orientation, float spacing,
float weight) float weight)
{ {
GroupBuilder builder(new BGroupLayout(orientation, spacing)); GroupBuilder builder(new BGroupLayout(orientation, spacing));
builder.SetParent(this); builder.SetParent(this);
@@ -546,8 +544,8 @@ Group<ParentBuilder>::AddGrid(BGridView* gridView, float weight)
template<typename ParentBuilder> template<typename ParentBuilder>
typename Group<ParentBuilder>::SplitBuilder typename Group<ParentBuilder>::SplitBuilder
Group<ParentBuilder>::AddSplit(enum orientation orientation, float spacing, Group<ParentBuilder>::AddSplit(orientation orientation, float spacing,
float weight) float weight)
{ {
SplitBuilder builder(orientation, spacing); SplitBuilder builder(orientation, spacing);
builder.SetParent(this); builder.SetParent(this);
@@ -800,8 +798,8 @@ Grid<ParentBuilder>::AddTextControl(BTextControl* textControl, int32 column,
template<typename ParentBuilder> template<typename ParentBuilder>
typename Grid<ParentBuilder>::GroupBuilder typename Grid<ParentBuilder>::GroupBuilder
Grid<ParentBuilder>::AddGroup(enum orientation orientation, float spacing, Grid<ParentBuilder>::AddGroup(orientation orientation, float spacing,
int32 column, int32 row, int32 columnCount, int32 rowCount) int32 column, int32 row, int32 columnCount, int32 rowCount)
{ {
GroupBuilder builder(new BGroupLayout(orientation, spacing)); GroupBuilder builder(new BGroupLayout(orientation, spacing));
builder.SetParent(this); builder.SetParent(this);
@@ -860,7 +858,7 @@ Grid<ParentBuilder>::AddGrid(BGridView* gridView, int32 column, int32 row,
template<typename ParentBuilder> template<typename ParentBuilder>
typename Grid<ParentBuilder>::SplitBuilder typename Grid<ParentBuilder>::SplitBuilder
Grid<ParentBuilder>::AddSplit(enum orientation orientation, float spacing, Grid<ParentBuilder>::AddSplit(orientation orientation, float spacing,
int32 column, int32 row, int32 columnCount, int32 rowCount) int32 column, int32 row, int32 columnCount, int32 rowCount)
{ {
SplitBuilder builder(orientation, spacing); SplitBuilder builder(orientation, spacing);
@@ -986,7 +984,7 @@ Grid<ParentBuilder>::operator BGridLayout*()
template<typename ParentBuilder> template<typename ParentBuilder>
Split<ParentBuilder>::Split(enum orientation orientation, float spacing) Split<ParentBuilder>::Split(orientation orientation, float spacing)
: :
fView(new BSplitView(orientation, spacing)) fView(new BSplitView(orientation, spacing))
{ {
@@ -1065,8 +1063,8 @@ Split<ParentBuilder>::Add(BLayoutItem* item, float weight)
template<typename ParentBuilder> template<typename ParentBuilder>
typename Split<ParentBuilder>::GroupBuilder typename Split<ParentBuilder>::GroupBuilder
Split<ParentBuilder>::AddGroup(enum orientation orientation, float spacing, Split<ParentBuilder>::AddGroup(orientation orientation, float spacing,
float weight) float weight)
{ {
GroupBuilder builder(new BGroupLayout(orientation, spacing)); GroupBuilder builder(new BGroupLayout(orientation, spacing));
builder.SetParent(this); builder.SetParent(this);
@@ -1133,8 +1131,8 @@ Split<ParentBuilder>::AddGrid(BGridLayout* layout, float weight)
template<typename ParentBuilder> template<typename ParentBuilder>
typename Split<ParentBuilder>::SplitBuilder typename Split<ParentBuilder>::SplitBuilder
Split<ParentBuilder>::AddSplit(enum orientation orientation, float spacing, Split<ParentBuilder>::AddSplit(orientation orientation, float spacing,
float weight) float weight)
{ {
SplitBuilder builder(orientation, spacing); SplitBuilder builder(orientation, spacing);
builder.SetParent(this); builder.SetParent(this);
+2 -2
View File
@@ -26,7 +26,7 @@ public:
orientation direction); orientation direction);
BScrollBar(const char* name, BView* target, BScrollBar(const char* name, BView* target,
float min, float max, float min, float max,
enum orientation orientation); orientation orientation);
BScrollBar(BMessage* archive); BScrollBar(BMessage* archive);
virtual ~BScrollBar(); virtual ~BScrollBar();
static BArchivable* Instantiate(BMessage* archive); static BArchivable* Instantiate(BMessage* archive);
@@ -48,7 +48,7 @@ public:
void SetTarget(BView *target); void SetTarget(BView *target);
void SetTarget(const char* targetName); void SetTarget(const char* targetName);
BView* Target() const; BView* Target() const;
void SetOrientation(enum orientation orientation); void SetOrientation(orientation orientation);
orientation Orientation() const; orientation Orientation() const;
// TODO: Make this a virtual method, it should be one, // TODO: Make this a virtual method, it should be one,
+7 -11
View File
@@ -13,34 +13,30 @@
class BSeparatorView : public BView { class BSeparatorView : public BView {
public: public:
BSeparatorView(enum orientation orientation, BSeparatorView(orientation orientation,
border_style border = B_PLAIN_BORDER); border_style border = B_PLAIN_BORDER);
BSeparatorView(const char* name, BSeparatorView(const char* name,
const char* label, const char* label,
enum orientation orientation orientation orientation = B_HORIZONTAL,
= B_HORIZONTAL,
border_style border = B_FANCY_BORDER, border_style border = B_FANCY_BORDER,
const BAlignment& alignment const BAlignment& alignment
= BAlignment(B_ALIGN_HORIZONTAL_CENTER, = BAlignment(B_ALIGN_HORIZONTAL_CENTER,
B_ALIGN_VERTICAL_CENTER)); B_ALIGN_VERTICAL_CENTER));
BSeparatorView(const char* name, BSeparatorView(const char* name,
BView* labelView, BView* labelView,
enum orientation orientation orientation orientation = B_HORIZONTAL,
= B_HORIZONTAL,
border_style border = B_FANCY_BORDER, border_style border = B_FANCY_BORDER,
const BAlignment& alignment const BAlignment& alignment
= BAlignment(B_ALIGN_HORIZONTAL_CENTER, = BAlignment(B_ALIGN_HORIZONTAL_CENTER,
B_ALIGN_VERTICAL_CENTER)); B_ALIGN_VERTICAL_CENTER));
BSeparatorView(const char* label = NULL, BSeparatorView(const char* label = NULL,
enum orientation orientation orientation orientation = B_HORIZONTAL,
= B_HORIZONTAL,
border_style border = B_FANCY_BORDER, border_style border = B_FANCY_BORDER,
const BAlignment& alignment const BAlignment& alignment
= BAlignment(B_ALIGN_HORIZONTAL_CENTER, = BAlignment(B_ALIGN_HORIZONTAL_CENTER,
B_ALIGN_VERTICAL_CENTER)); B_ALIGN_VERTICAL_CENTER));
BSeparatorView(BView* labelView, BSeparatorView(BView* labelView,
enum orientation orientation orientation orientation = B_HORIZONTAL,
= B_HORIZONTAL,
border_style border = B_FANCY_BORDER, border_style border = B_FANCY_BORDER,
const BAlignment& alignment const BAlignment& alignment
= BAlignment(B_ALIGN_HORIZONTAL_CENTER, = BAlignment(B_ALIGN_HORIZONTAL_CENTER,
@@ -61,7 +57,7 @@ public:
virtual BSize MaxSize(); virtual BSize MaxSize();
virtual BSize PreferredSize(); virtual BSize PreferredSize();
void SetOrientation(enum orientation orientation); void SetOrientation(orientation orientation);
void SetAlignment(const BAlignment& aligment); void SetAlignment(const BAlignment& aligment);
void SetBorderStyle(border_style border); void SetBorderStyle(border_style border);
@@ -88,7 +84,7 @@ private:
private: private:
void _Init(const char* label, BView* labelView, void _Init(const char* label, BView* labelView,
enum orientation orientation, orientation orientation,
BAlignment alignment, border_style border); BAlignment alignment, border_style border);
float _BorderSize() const; float _BorderSize() const;
+1 -1
View File
@@ -10,7 +10,7 @@
class BSplitLayoutBuilder { class BSplitLayoutBuilder {
public: public:
BSplitLayoutBuilder( BSplitLayoutBuilder(
enum orientation orientation = B_HORIZONTAL, orientation orientation = B_HORIZONTAL,
float spacing = B_USE_DEFAULT_SPACING); float spacing = B_USE_DEFAULT_SPACING);
BSplitLayoutBuilder(BSplitView* view); BSplitLayoutBuilder(BSplitView* view);
+4 -5
View File
@@ -13,8 +13,7 @@ class BSplitLayout;
class BSplitView : public BView { class BSplitView : public BView {
public: public:
BSplitView( BSplitView(
enum orientation orientation orientation orientation = B_HORIZONTAL,
= B_HORIZONTAL,
float spacing = B_USE_DEFAULT_SPACING); float spacing = B_USE_DEFAULT_SPACING);
BSplitView(BMessage* from); BSplitView(BMessage* from);
virtual ~BSplitView(); virtual ~BSplitView();
@@ -30,7 +29,7 @@ public:
void SetSpacing(float spacing); void SetSpacing(float spacing);
orientation Orientation() const; orientation Orientation() const;
void SetOrientation(enum orientation orientation); void SetOrientation(orientation orientation);
float SplitterSize() const; float SplitterSize() const;
void SetSplitterSize(float size); void SetSplitterSize(float size);
@@ -86,7 +85,7 @@ protected:
virtual void DrawSplitter(BRect frame, virtual void DrawSplitter(BRect frame,
const BRect& updateRect, const BRect& updateRect,
enum orientation orientation, orientation orientation,
bool pressed); bool pressed);
private: private:
@@ -109,7 +108,7 @@ private:
static void _DrawDefaultSplitter(BView* view, BRect frame, static void _DrawDefaultSplitter(BView* view, BRect frame,
const BRect& updateRect, const BRect& updateRect,
enum orientation orientation, orientation orientation,
bool pressed); bool pressed);
private: private:
+3 -3
View File
@@ -25,7 +25,7 @@ public:
float* bottom) const; float* bottom) const;
void AlignLayoutWith(BTwoDimensionalLayout* other, void AlignLayoutWith(BTwoDimensionalLayout* other,
enum orientation orientation); orientation orientation);
virtual BSize BaseMinSize(); virtual BSize BaseMinSize();
virtual BSize BaseMaxSize(); virtual BSize BaseMaxSize();
@@ -72,14 +72,14 @@ protected:
float* preferredHeight); float* preferredHeight);
BSize SubtractInsets(BSize size); BSize SubtractInsets(BSize size);
virtual void PrepareItems(enum orientation orientation); virtual void PrepareItems(orientation orientation);
virtual bool HasMultiColumnItems(); virtual bool HasMultiColumnItems();
virtual bool HasMultiRowItems(); virtual bool HasMultiRowItems();
virtual int32 InternalCountColumns() = 0; virtual int32 InternalCountColumns() = 0;
virtual int32 InternalCountRows() = 0; virtual int32 InternalCountRows() = 0;
virtual void GetColumnRowConstraints( virtual void GetColumnRowConstraints(
enum orientation orientation, orientation orientation,
int32 index, int32 index,
ColumnRowConstraints* constraints) = 0; ColumnRowConstraints* constraints) = 0;
virtual void GetItemDimensions(BLayoutItem* item, virtual void GetItemDimensions(BLayoutItem* item,
+3 -3
View File
@@ -83,7 +83,7 @@ BChannelSlider::BChannelSlider(BRect area, const char* name, const char* label,
BChannelSlider::BChannelSlider(BRect area, const char* name, const char* label, BChannelSlider::BChannelSlider(BRect area, const char* name, const char* label,
BMessage* model, enum orientation orientation, int32 channels, BMessage* model, orientation orientation, int32 channels,
uint32 resizeMode, uint32 flags) uint32 resizeMode, uint32 flags)
: BChannelControl(area, name, label, model, channels, resizeMode, flags) : BChannelControl(area, name, label, model, channels, resizeMode, flags)
@@ -94,7 +94,7 @@ BChannelSlider::BChannelSlider(BRect area, const char* name, const char* label,
BChannelSlider::BChannelSlider(const char* name, const char* label, BChannelSlider::BChannelSlider(const char* name, const char* label,
BMessage* model, enum orientation orientation, int32 channels, BMessage* model, orientation orientation, int32 channels,
uint32 flags) uint32 flags)
: BChannelControl(name, label, model, channels, flags) : BChannelControl(name, label, model, channels, flags)
@@ -502,7 +502,7 @@ BChannelSlider::Orientation() const
void void
BChannelSlider::SetOrientation(enum orientation orientation) BChannelSlider::SetOrientation(orientation orientation)
{ {
bool isVertical = orientation == B_VERTICAL; bool isVertical = orientation == B_VERTICAL;
if (isVertical != fIsVertical) { if (isVertical != fIsVertical) {
+19 -19
View File
@@ -143,7 +143,7 @@ BControlLook::DrawButtonFrame(BView* view, BRect& rect,
void void
BControlLook::DrawButtonBackground(BView* view, BRect& rect, BControlLook::DrawButtonBackground(BView* view, BRect& rect,
const BRect& updateRect, const rgb_color& base, uint32 flags, const BRect& updateRect, const rgb_color& base, uint32 flags,
uint32 borders, enum orientation orientation) uint32 borders, orientation orientation)
{ {
_DrawButtonBackground(view, rect, updateRect, 0.0f, 0.0f, 0.0f, 0.0f, _DrawButtonBackground(view, rect, updateRect, 0.0f, 0.0f, 0.0f, 0.0f,
base, flags, borders, orientation); base, flags, borders, orientation);
@@ -153,7 +153,7 @@ BControlLook::DrawButtonBackground(BView* view, BRect& rect,
void void
BControlLook::DrawButtonBackground(BView* view, BRect& rect, BControlLook::DrawButtonBackground(BView* view, BRect& rect,
const BRect& updateRect, float radius, const rgb_color& base, uint32 flags, const BRect& updateRect, float radius, const rgb_color& base, uint32 flags,
uint32 borders, enum orientation orientation) uint32 borders, orientation orientation)
{ {
_DrawButtonBackground(view, rect, updateRect, radius, radius, radius, _DrawButtonBackground(view, rect, updateRect, radius, radius, radius,
radius, base, flags, borders, orientation); radius, base, flags, borders, orientation);
@@ -164,7 +164,7 @@ void
BControlLook::DrawButtonBackground(BView* view, BRect& rect, BControlLook::DrawButtonBackground(BView* view, BRect& rect,
const BRect& updateRect, float leftTopRadius, float rightTopRadius, const BRect& updateRect, float leftTopRadius, float rightTopRadius,
float leftBottomRadius, float rightBottomRadius, const rgb_color& base, float leftBottomRadius, float rightBottomRadius, const rgb_color& base,
uint32 flags, uint32 borders, enum orientation orientation) uint32 flags, uint32 borders, orientation orientation)
{ {
_DrawButtonBackground(view, rect, updateRect, leftTopRadius, _DrawButtonBackground(view, rect, updateRect, leftTopRadius,
rightTopRadius, leftBottomRadius, rightBottomRadius, base, flags, rightTopRadius, leftBottomRadius, rightBottomRadius, base, flags,
@@ -553,7 +553,7 @@ BControlLook::DrawRadioButton(BView* view, BRect& rect, const BRect& updateRect,
void void
BControlLook::DrawScrollBarBackground(BView* view, BRect& rect1, BRect& rect2, BControlLook::DrawScrollBarBackground(BView* view, BRect& rect1, BRect& rect2,
const BRect& updateRect, const rgb_color& base, uint32 flags, const BRect& updateRect, const rgb_color& base, uint32 flags,
enum orientation orientation) orientation orientation)
{ {
DrawScrollBarBackground(view, rect1, updateRect, base, flags, orientation); DrawScrollBarBackground(view, rect1, updateRect, base, flags, orientation);
DrawScrollBarBackground(view, rect2, updateRect, base, flags, orientation); DrawScrollBarBackground(view, rect2, updateRect, base, flags, orientation);
@@ -563,7 +563,7 @@ BControlLook::DrawScrollBarBackground(BView* view, BRect& rect1, BRect& rect2,
void void
BControlLook::DrawScrollBarBackground(BView* view, BRect& rect, BControlLook::DrawScrollBarBackground(BView* view, BRect& rect,
const BRect& updateRect, const rgb_color& base, uint32 flags, const BRect& updateRect, const rgb_color& base, uint32 flags,
enum orientation orientation) orientation orientation)
{ {
if (!rect.IsValid() || !rect.Intersects(updateRect)) if (!rect.IsValid() || !rect.Intersects(updateRect))
return; return;
@@ -818,7 +818,7 @@ BControlLook::SliderBarColor(const rgb_color& base)
void void
BControlLook::DrawSliderBar(BView* view, BRect rect, const BRect& updateRect, BControlLook::DrawSliderBar(BView* view, BRect rect, const BRect& updateRect,
const rgb_color& base, rgb_color leftFillColor, rgb_color rightFillColor, const rgb_color& base, rgb_color leftFillColor, rgb_color rightFillColor,
float sliderScale, uint32 flags, enum orientation orientation) float sliderScale, uint32 flags, orientation orientation)
{ {
if (!rect.IsValid() || !rect.Intersects(updateRect)) if (!rect.IsValid() || !rect.Intersects(updateRect))
return; return;
@@ -875,7 +875,7 @@ BControlLook::DrawSliderBar(BView* view, BRect rect, const BRect& updateRect,
void void
BControlLook::DrawSliderBar(BView* view, BRect rect, const BRect& updateRect, BControlLook::DrawSliderBar(BView* view, BRect rect, const BRect& updateRect,
const rgb_color& base, rgb_color fillColor, uint32 flags, const rgb_color& base, rgb_color fillColor, uint32 flags,
enum orientation orientation) orientation orientation)
{ {
if (!rect.IsValid() || !rect.Intersects(updateRect)) if (!rect.IsValid() || !rect.Intersects(updateRect))
return; return;
@@ -1021,7 +1021,7 @@ BControlLook::DrawSliderBar(BView* view, BRect rect, const BRect& updateRect,
void void
BControlLook::DrawSliderThumb(BView* view, BRect& rect, const BRect& updateRect, BControlLook::DrawSliderThumb(BView* view, BRect& rect, const BRect& updateRect,
const rgb_color& base, uint32 flags, enum orientation orientation) const rgb_color& base, uint32 flags, orientation orientation)
{ {
if (!rect.IsValid() || !rect.Intersects(updateRect)) if (!rect.IsValid() || !rect.Intersects(updateRect))
return; return;
@@ -1106,7 +1106,7 @@ BControlLook::DrawSliderThumb(BView* view, BRect& rect, const BRect& updateRect,
void void
BControlLook::DrawSliderTriangle(BView* view, BRect& rect, BControlLook::DrawSliderTriangle(BView* view, BRect& rect,
const BRect& updateRect, const rgb_color& base, uint32 flags, const BRect& updateRect, const rgb_color& base, uint32 flags,
enum orientation orientation) orientation orientation)
{ {
DrawSliderTriangle(view, rect, updateRect, base, base, flags, orientation); DrawSliderTriangle(view, rect, updateRect, base, base, flags, orientation);
} }
@@ -1115,7 +1115,7 @@ BControlLook::DrawSliderTriangle(BView* view, BRect& rect,
void void
BControlLook::DrawSliderTriangle(BView* view, BRect& rect, BControlLook::DrawSliderTriangle(BView* view, BRect& rect,
const BRect& updateRect, const rgb_color& base, const rgb_color& fill, const BRect& updateRect, const rgb_color& base, const rgb_color& fill,
uint32 flags, enum orientation orientation) uint32 flags, orientation orientation)
{ {
if (!rect.IsValid() || !rect.Intersects(updateRect)) if (!rect.IsValid() || !rect.Intersects(updateRect))
return; return;
@@ -1234,7 +1234,7 @@ BControlLook::DrawSliderTriangle(BView* view, BRect& rect,
void void
BControlLook::DrawSliderHashMarks(BView* view, BRect& rect, BControlLook::DrawSliderHashMarks(BView* view, BRect& rect,
const BRect& updateRect, const rgb_color& base, int32 count, const BRect& updateRect, const rgb_color& base, int32 count,
hash_mark_location location, uint32 flags, enum orientation orientation) hash_mark_location location, uint32 flags, orientation orientation)
{ {
if (!rect.IsValid() || !rect.Intersects(updateRect)) if (!rect.IsValid() || !rect.Intersects(updateRect))
return; return;
@@ -1482,7 +1482,7 @@ BControlLook::DrawInactiveTab(BView* view, BRect& rect, const BRect& updateRect,
void void
BControlLook::DrawSplitter(BView* view, BRect& rect, const BRect& updateRect, BControlLook::DrawSplitter(BView* view, BRect& rect, const BRect& updateRect,
const rgb_color& base, enum orientation orientation, uint32 flags, const rgb_color& base, orientation orientation, uint32 flags,
uint32 borders) uint32 borders)
{ {
if (!rect.IsValid() || !rect.Intersects(updateRect)) if (!rect.IsValid() || !rect.Intersects(updateRect))
@@ -2180,7 +2180,7 @@ void
BControlLook::_DrawButtonBackground(BView* view, BRect& rect, BControlLook::_DrawButtonBackground(BView* view, BRect& rect,
const BRect& updateRect, float leftTopRadius, float rightTopRadius, const BRect& updateRect, float leftTopRadius, float rightTopRadius,
float leftBottomRadius, float rightBottomRadius, const rgb_color& base, float leftBottomRadius, float rightBottomRadius, const rgb_color& base,
uint32 flags, uint32 borders, enum orientation orientation) uint32 flags, uint32 borders, orientation orientation)
{ {
if (!rect.IsValid() || !rect.Intersects(updateRect)) if (!rect.IsValid() || !rect.Intersects(updateRect))
return; return;
@@ -2886,7 +2886,7 @@ BControlLook::_DrawRoundBarCorner(BView* view, BRect& rect,
const rgb_color& frameLightColor, const rgb_color& frameShadowColor, const rgb_color& frameLightColor, const rgb_color& frameShadowColor,
const rgb_color& fillLightColor, const rgb_color& fillShadowColor, const rgb_color& fillLightColor, const rgb_color& fillShadowColor,
float leftInset, float topInset, float rightInset, float bottomInset, float leftInset, float topInset, float rightInset, float bottomInset,
enum orientation orientation) orientation orientation)
{ {
if (!rect.IsValid() || !rect.Intersects(updateRect)) if (!rect.IsValid() || !rect.Intersects(updateRect))
return; return;
@@ -3102,7 +3102,7 @@ BControlLook::_BevelShadowColor(const rgb_color& base, uint32 flags)
void void
BControlLook::_FillGradient(BView* view, const BRect& rect, BControlLook::_FillGradient(BView* view, const BRect& rect,
const rgb_color& base, float topTint, float bottomTint, const rgb_color& base, float topTint, float bottomTint,
enum orientation orientation) orientation orientation)
{ {
BGradientLinear gradient; BGradientLinear gradient;
_MakeGradient(gradient, rect, base, topTint, bottomTint, orientation); _MakeGradient(gradient, rect, base, topTint, bottomTint, orientation);
@@ -3113,7 +3113,7 @@ BControlLook::_FillGradient(BView* view, const BRect& rect,
void void
BControlLook::_FillGlossyGradient(BView* view, const BRect& rect, BControlLook::_FillGlossyGradient(BView* view, const BRect& rect,
const rgb_color& base, float topTint, float middle1Tint, const rgb_color& base, float topTint, float middle1Tint,
float middle2Tint, float bottomTint, enum orientation orientation) float middle2Tint, float bottomTint, orientation orientation)
{ {
BGradientLinear gradient; BGradientLinear gradient;
_MakeGlossyGradient(gradient, rect, base, topTint, middle1Tint, _MakeGlossyGradient(gradient, rect, base, topTint, middle1Tint,
@@ -3125,7 +3125,7 @@ BControlLook::_FillGlossyGradient(BView* view, const BRect& rect,
void void
BControlLook::_MakeGradient(BGradientLinear& gradient, const BRect& rect, BControlLook::_MakeGradient(BGradientLinear& gradient, const BRect& rect,
const rgb_color& base, float topTint, float bottomTint, const rgb_color& base, float topTint, float bottomTint,
enum orientation orientation) const orientation orientation) const
{ {
gradient.AddColor(tint_color(base, topTint), 0); gradient.AddColor(tint_color(base, topTint), 0);
gradient.AddColor(tint_color(base, bottomTint), 255); gradient.AddColor(tint_color(base, bottomTint), 255);
@@ -3141,7 +3141,7 @@ void
BControlLook::_MakeGlossyGradient(BGradientLinear& gradient, const BRect& rect, BControlLook::_MakeGlossyGradient(BGradientLinear& gradient, const BRect& rect,
const rgb_color& base, float topTint, float middle1Tint, const rgb_color& base, float topTint, float middle1Tint,
float middle2Tint, float bottomTint, float middle2Tint, float bottomTint,
enum orientation orientation) const orientation orientation) const
{ {
gradient.AddColor(tint_color(base, topTint), 0); gradient.AddColor(tint_color(base, topTint), 0);
gradient.AddColor(tint_color(base, middle1Tint), 132); gradient.AddColor(tint_color(base, middle1Tint), 132);
@@ -3157,7 +3157,7 @@ BControlLook::_MakeGlossyGradient(BGradientLinear& gradient, const BRect& rect,
void void
BControlLook::_MakeButtonGradient(BGradientLinear& gradient, BRect& rect, BControlLook::_MakeButtonGradient(BGradientLinear& gradient, BRect& rect,
const rgb_color& base, uint32 flags, enum orientation orientation) const const rgb_color& base, uint32 flags, orientation orientation) const
{ {
float topTint = 0.49; float topTint = 0.49;
float middleTint1 = 0.62; float middleTint1 = 0.62;
+1 -1
View File
@@ -665,7 +665,7 @@ BGridLayout::InternalCountRows()
void void
BGridLayout::GetColumnRowConstraints(enum orientation orientation, int32 index, BGridLayout::GetColumnRowConstraints(orientation orientation, int32 index,
ColumnRowConstraints* constraints) ColumnRowConstraints* constraints)
{ {
if (orientation == B_HORIZONTAL) { if (orientation == B_HORIZONTAL) {
+4 -4
View File
@@ -33,7 +33,7 @@ struct BGroupLayout::ItemLayoutData {
}; };
BGroupLayout::BGroupLayout(enum orientation orientation, float spacing) BGroupLayout::BGroupLayout(orientation orientation, float spacing)
: :
BTwoDimensionalLayout(), BTwoDimensionalLayout(),
fOrientation(orientation) fOrientation(orientation)
@@ -85,7 +85,7 @@ BGroupLayout::Orientation() const
void void
BGroupLayout::SetOrientation(enum orientation orientation) BGroupLayout::SetOrientation(orientation orientation)
{ {
if (orientation != fOrientation) { if (orientation != fOrientation) {
fOrientation = orientation; fOrientation = orientation;
@@ -262,7 +262,7 @@ BGroupLayout::ItemRemoved(BLayoutItem* item, int32 fromIndex)
void void
BGroupLayout::PrepareItems(enum orientation orientation) BGroupLayout::PrepareItems(orientation orientation)
{ {
// filter the visible items // filter the visible items
fVisibleItems.MakeEmpty(); fVisibleItems.MakeEmpty();
@@ -290,7 +290,7 @@ BGroupLayout::InternalCountRows()
void void
BGroupLayout::GetColumnRowConstraints(enum orientation orientation, int32 index, BGroupLayout::GetColumnRowConstraints(orientation orientation, int32 index,
ColumnRowConstraints* constraints) ColumnRowConstraints* constraints)
{ {
if (index >= 0 && index < fVisibleItems.CountItems()) { if (index >= 0 && index < fVisibleItems.CountItems()) {
+3 -3
View File
@@ -14,7 +14,7 @@ using std::nothrow;
// constructor // constructor
BGroupLayoutBuilder::BGroupLayoutBuilder(enum orientation orientation, BGroupLayoutBuilder::BGroupLayoutBuilder(orientation orientation,
float spacing) float spacing)
: fRootLayout((new BGroupView(orientation, spacing))->GroupLayout()) : fRootLayout((new BGroupView(orientation, spacing))->GroupLayout())
{ {
@@ -118,8 +118,8 @@ BGroupLayoutBuilder::Add(BLayoutItem* item, float weight)
// AddGroup // AddGroup
BGroupLayoutBuilder& BGroupLayoutBuilder&
BGroupLayoutBuilder::AddGroup(enum orientation orientation, BGroupLayoutBuilder::AddGroup(orientation orientation, float spacing,
float spacing, float weight) float weight)
{ {
if (BGroupLayout* layout = TopLayout()) { if (BGroupLayout* layout = TopLayout()) {
BGroupView* group = new(nothrow) BGroupView(orientation, spacing); BGroupView* group = new(nothrow) BGroupView(orientation, spacing);
+3 -3
View File
@@ -8,7 +8,7 @@
#include <GroupView.h> #include <GroupView.h>
BGroupView::BGroupView(enum orientation orientation, float spacing) BGroupView::BGroupView(orientation orientation, float spacing)
: :
BView(NULL, 0, new BGroupLayout(orientation, spacing)) BView(NULL, 0, new BGroupLayout(orientation, spacing))
{ {
@@ -16,8 +16,8 @@ BGroupView::BGroupView(enum orientation orientation, float spacing)
} }
BGroupView::BGroupView(const char* name, enum orientation orientation, BGroupView::BGroupView(const char* name, orientation orientation,
float spacing) float spacing)
: :
BView(name, 0, new BGroupLayout(orientation, spacing)) BView(name, 0, new BGroupLayout(orientation, spacing))
{ {
+1 -1
View File
@@ -595,7 +595,7 @@ BScrollBar::Target() const
void void
BScrollBar::SetOrientation(enum orientation orientation) BScrollBar::SetOrientation(orientation orientation)
{ {
if (fOrientation == orientation) if (fOrientation == orientation)
return; return;
+7 -8
View File
@@ -24,8 +24,7 @@ static const float kMinBorderLength = 5.0f;
// TODO: More testing, especially archiving. // TODO: More testing, especially archiving.
BSeparatorView::BSeparatorView(enum orientation orientation, BSeparatorView::BSeparatorView(orientation orientation, border_style border)
border_style border)
: :
BView(NULL, B_WILL_DRAW | B_FULL_UPDATE_ON_RESIZE) BView(NULL, B_WILL_DRAW | B_FULL_UPDATE_ON_RESIZE)
{ {
@@ -35,7 +34,7 @@ BSeparatorView::BSeparatorView(enum orientation orientation,
BSeparatorView::BSeparatorView(const char* name, const char* label, BSeparatorView::BSeparatorView(const char* name, const char* label,
enum orientation orientation, border_style border, orientation orientation, border_style border,
const BAlignment& alignment) const BAlignment& alignment)
: :
BView(name, B_WILL_DRAW | B_FULL_UPDATE_ON_RESIZE) BView(name, B_WILL_DRAW | B_FULL_UPDATE_ON_RESIZE)
@@ -45,7 +44,7 @@ BSeparatorView::BSeparatorView(const char* name, const char* label,
BSeparatorView::BSeparatorView(const char* name, BView* labelView, BSeparatorView::BSeparatorView(const char* name, BView* labelView,
enum orientation orientation, border_style border, orientation orientation, border_style border,
const BAlignment& alignment) const BAlignment& alignment)
: :
BView(name, B_WILL_DRAW | B_FULL_UPDATE_ON_RESIZE) BView(name, B_WILL_DRAW | B_FULL_UPDATE_ON_RESIZE)
@@ -55,7 +54,7 @@ BSeparatorView::BSeparatorView(const char* name, BView* labelView,
BSeparatorView::BSeparatorView(const char* label, BSeparatorView::BSeparatorView(const char* label,
enum orientation orientation, border_style border, orientation orientation, border_style border,
const BAlignment& alignment) const BAlignment& alignment)
: :
BView("", B_WILL_DRAW | B_FULL_UPDATE_ON_RESIZE) BView("", B_WILL_DRAW | B_FULL_UPDATE_ON_RESIZE)
@@ -65,7 +64,7 @@ BSeparatorView::BSeparatorView(const char* label,
BSeparatorView::BSeparatorView(BView* labelView, BSeparatorView::BSeparatorView(BView* labelView,
enum orientation orientation, border_style border, orientation orientation, border_style border,
const BAlignment& alignment) const BAlignment& alignment)
: :
BView("", B_WILL_DRAW | B_FULL_UPDATE_ON_RESIZE) BView("", B_WILL_DRAW | B_FULL_UPDATE_ON_RESIZE)
@@ -331,7 +330,7 @@ BSeparatorView::PreferredSize()
void void
BSeparatorView::SetOrientation(enum orientation orientation) BSeparatorView::SetOrientation(orientation orientation)
{ {
if (orientation == fOrientation) if (orientation == fOrientation)
return; return;
@@ -437,7 +436,7 @@ BSeparatorView::DoLayout()
void void
BSeparatorView::_Init(const char* label, BView* labelView, BSeparatorView::_Init(const char* label, BView* labelView,
enum orientation orientation, BAlignment alignment, border_style border) orientation orientation, BAlignment alignment, border_style border)
{ {
fLabel = ""; fLabel = "";
fLabelView = NULL; fLabelView = NULL;
+2 -3
View File
@@ -153,8 +153,7 @@ private:
// #pragma mark - // #pragma mark -
BSplitLayout::BSplitLayout(enum orientation orientation, BSplitLayout::BSplitLayout(orientation orientation, float spacing)
float spacing)
: :
fOrientation(orientation), fOrientation(orientation),
fLeftInset(0), fLeftInset(0),
@@ -319,7 +318,7 @@ BSplitLayout::Orientation() const
void void
BSplitLayout::SetOrientation(enum orientation orientation) BSplitLayout::SetOrientation(orientation orientation)
{ {
if (orientation != fOrientation) { if (orientation != fOrientation) {
fOrientation = orientation; fOrientation = orientation;
+2 -2
View File
@@ -23,7 +23,7 @@ using BPrivate::Layout::LayoutInfo;
class BSplitLayout : public BAbstractLayout { class BSplitLayout : public BAbstractLayout {
public: public:
BSplitLayout(enum orientation orientation, BSplitLayout(orientation orientation,
float spacing = 0.0f); float spacing = 0.0f);
BSplitLayout(BMessage* from); BSplitLayout(BMessage* from);
virtual ~BSplitLayout(); virtual ~BSplitLayout();
@@ -37,7 +37,7 @@ public:
void SetSpacing(float spacing); void SetSpacing(float spacing);
orientation Orientation() const; orientation Orientation() const;
void SetOrientation(enum orientation orientation); void SetOrientation(orientation orientation);
float SplitterSize() const; float SplitterSize() const;
void SetSplitterSize(float size); void SetSplitterSize(float size);
+1 -1
View File
@@ -12,7 +12,7 @@ using std::nothrow;
// constructor // constructor
BSplitLayoutBuilder::BSplitLayoutBuilder(enum orientation orientation, BSplitLayoutBuilder::BSplitLayoutBuilder(orientation orientation,
float spacing) float spacing)
: fView(new BSplitView(orientation, spacing)) : fView(new BSplitView(orientation, spacing))
{ {
+4 -4
View File
@@ -14,7 +14,7 @@
#include "SplitLayout.h" #include "SplitLayout.h"
BSplitView::BSplitView(enum orientation orientation, float spacing) BSplitView::BSplitView(orientation orientation, float spacing)
: :
BView(NULL, BView(NULL,
B_WILL_DRAW | B_FULL_UPDATE_ON_RESIZE | B_INVALIDATE_AFTER_LAYOUT, B_WILL_DRAW | B_FULL_UPDATE_ON_RESIZE | B_INVALIDATE_AFTER_LAYOUT,
@@ -97,7 +97,7 @@ BSplitView::Orientation() const
void void
BSplitView::SetOrientation(enum orientation orientation) BSplitView::SetOrientation(orientation orientation)
{ {
fSplitLayout->SetOrientation(orientation); fSplitLayout->SetOrientation(orientation);
} }
@@ -358,7 +358,7 @@ BSplitView::Instantiate(BMessage* from)
void void
BSplitView::DrawSplitter(BRect frame, const BRect& updateRect, BSplitView::DrawSplitter(BRect frame, const BRect& updateRect,
enum orientation orientation, bool pressed) orientation orientation, bool pressed)
{ {
_DrawDefaultSplitter(this, frame, updateRect, orientation, pressed); _DrawDefaultSplitter(this, frame, updateRect, orientation, pressed);
} }
@@ -366,7 +366,7 @@ BSplitView::DrawSplitter(BRect frame, const BRect& updateRect,
void void
BSplitView::_DrawDefaultSplitter(BView* view, BRect frame, BSplitView::_DrawDefaultSplitter(BView* view, BRect frame,
const BRect& updateRect, enum orientation orientation, bool pressed) const BRect& updateRect, orientation orientation, bool pressed)
{ {
uint32 flags = pressed ? BControlLook::B_ACTIVATED : 0; uint32 flags = pressed ? BControlLook::B_ACTIVATED : 0;
be_control_look->DrawSplitter(view, frame, updateRect, view->ViewColor(), be_control_look->DrawSplitter(view, frame, updateRect, view->ViewColor(),
+8 -8
View File
@@ -56,7 +56,7 @@
// CompoundLayouter // CompoundLayouter
class BTwoDimensionalLayout::CompoundLayouter : public BReferenceable { class BTwoDimensionalLayout::CompoundLayouter : public BReferenceable {
public: public:
CompoundLayouter(enum orientation orientation); CompoundLayouter(orientation orientation);
virtual ~CompoundLayouter(); virtual ~CompoundLayouter();
orientation Orientation(); orientation Orientation();
@@ -167,7 +167,7 @@ public:
float* preferredHeight); float* preferredHeight);
void AlignWith(LocalLayouter* other, void AlignWith(LocalLayouter* other,
enum orientation orientation); orientation orientation);
// Archiving stuff // Archiving stuff
status_t AddAlignedLayoutsToArchive(BArchiver* archiver); status_t AddAlignedLayoutsToArchive(BArchiver* archiver);
@@ -203,7 +203,7 @@ public:
void SetCompoundLayouter( void SetCompoundLayouter(
CompoundLayouter* compoundLayouter, CompoundLayouter* compoundLayouter,
enum orientation orientation); orientation orientation);
void InternalInvalidateLayout( void InternalInvalidateLayout(
CompoundLayouter* compoundLayouter); CompoundLayouter* compoundLayouter);
@@ -336,7 +336,7 @@ BTwoDimensionalLayout::GetInsets(float* left, float* top, float* right,
void void
BTwoDimensionalLayout::AlignLayoutWith(BTwoDimensionalLayout* other, BTwoDimensionalLayout::AlignLayoutWith(BTwoDimensionalLayout* other,
enum orientation orientation) orientation orientation)
{ {
if (!other || other == this) if (!other || other == this)
return; return;
@@ -573,7 +573,7 @@ BTwoDimensionalLayout::SubtractInsets(BSize size)
void void
BTwoDimensionalLayout::PrepareItems(enum orientation orientation) BTwoDimensionalLayout::PrepareItems(orientation orientation)
{ {
} }
@@ -603,7 +603,7 @@ BTwoDimensionalLayout::_ValidateMinMax()
BTwoDimensionalLayout::CompoundLayouter::CompoundLayouter( BTwoDimensionalLayout::CompoundLayouter::CompoundLayouter(
enum orientation orientation) orientation orientation)
: :
fLayouter(NULL), fLayouter(NULL),
fLayoutInfo(NULL), fLayoutInfo(NULL),
@@ -1154,7 +1154,7 @@ BTwoDimensionalLayout::LocalLayouter::InternalGetHeightForWidth(float width,
void void
BTwoDimensionalLayout::LocalLayouter::AlignWith(LocalLayouter* other, BTwoDimensionalLayout::LocalLayouter::AlignWith(LocalLayouter* other,
enum orientation orientation) orientation orientation)
{ {
if (orientation == B_HORIZONTAL) if (orientation == B_HORIZONTAL)
other->fHLayouter->AbsorbCompoundLayouter(fHLayouter); other->fHLayouter->AbsorbCompoundLayouter(fHLayouter);
@@ -1365,7 +1365,7 @@ BTwoDimensionalLayout::LocalLayouter::SetHeightForWidthConstraintsAdded(
void void
BTwoDimensionalLayout::LocalLayouter::SetCompoundLayouter( BTwoDimensionalLayout::LocalLayouter::SetCompoundLayouter(
CompoundLayouter* compoundLayouter, enum orientation orientation) CompoundLayouter* compoundLayouter, orientation orientation)
{ {
CompoundLayouter* oldCompoundLayouter; CompoundLayouter* oldCompoundLayouter;
if (orientation == B_HORIZONTAL) { if (orientation == B_HORIZONTAL) {