Big docs cleanup.

* Fixed headers including:
  - All rights reserved not All Rights Reserved.
  - name, [email protected] not name <[email protected]>
  - tabs and spaces
  - Authors: not Documented by:
* Renamed string.dox to String.dox
* Renamed midixxx.dox files to MidiXxx.dox
* Moved images into images subdirectories and updated Doxfile.
* Re-format all files with tabs instead of spaces.
* Fix many spelling mistakes.
* Added all files, classes, structs, and enums to libbe group.
This commit is contained in:
John Scipione
2013-02-07 02:01:19 -05:00
parent 8cf4ba89b6
commit 820dca4df6
109 changed files with 6698 additions and 5170 deletions
+14 -1
View File
@@ -1,3 +1,16 @@
/*
* Copyright 2010 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Alex Wilson, [email protected]
*
* Corresponds to:
* headers/os/interface/AbstractLayout.h rev 39055
* src/kits/inteface/AbstractLayout.cpp rev 39055
*/
/*!
\class BAbstractLayout
\ingroup interface
@@ -6,7 +19,7 @@
\brief BLayout subclass providing convenience methods for derived
implementations.
This class is designed to reduce the amount of boilerplate code required to
write a BLayout subclass. In most cases, you classes should derive from
BAbstractLayout rather than BLayout.
+27 -7
View File
@@ -1,9 +1,10 @@
/*
* Copyright 2011, Haiku inc.
* Copyright 2011 Haiku Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Documentation by:
* John Scipione <[email protected]>
* Authors:
* John Scipione, [email protected]
*
* Corresponds to:
* /trunk/headers/os/interface/Alert.h rev 42274
* /trunk/src/kits/interface/Alert.cpp rev 42274
@@ -12,12 +13,17 @@
/*!
\file Alert.h
\ingroup interface
\ingroup libbe
\brief BAlert class definition and support enums.
*/
/*!
\enum alert_type
\ingroup interface
\ingroup libbe
Determines which icon (if any) is displayed in the alert dialog.
Choose one option. If the constructor doesn't include an
alert_type argument than \c B_EMPTY_ALERT is used.
@@ -25,35 +31,47 @@
/*!
\var alert_type B_EMPTY_ALERT
No icon
*/
/*!
\var alert_type B_INFO_ALERT
\image html http://api.haiku-os.org/images/alert_info_32.png
Info icon
*/
/*!
\var alert_type B_IDEA_ALERT
\image html http://api.haiku-os.org/images/alert_idea_32.png
Idea icon
*/
/*!
\var alert_type B_WARNING_ALERT
\image html http://api.haiku-os.org/images/alert_warning_32.png
Warning icon
*/
/*!
\var alert_type B_STOP_ALERT
\image html http://api.haiku-os.org/images/alert_stop_32.png
Stop icon
*/
/*!
\enum button_spacing
\ingroup interface
\ingroup libbe
Determines how the buttons on the alert dialog are spaced relative
to each other. Choose one option. If the constructor doesn't include a
button_spacing argument than \c B_EVEN_SPACING is used.
@@ -61,12 +79,14 @@
/*!
\var button_spacing B_EVEN_SPACING
If the alert dialog has more than one button than the buttons are
spaced evenly across the bottom of the alert dialog.
*/
/*!
\var button_spacing B_OFFSET_SPACING
If the alert dialog has more than one button than the leftmost button
is offset to the left-hand side of the dialog while the rest of the
buttons are grouped on the right. This is useful to separate off a
@@ -104,13 +124,13 @@
The code used to create and display an alert dialog like the one shown
above is shown below:
\code
\code
BAlert* alert = new BAlert("Close and save dialog", "Save changes to...",
"Cancel", "Don't save", "Save", B_WIDTH_AS_USUAL, B_OFFSET_SPACING,
B_WARNING_ALERT);
"Cancel", "Don't save", "Save", B_WIDTH_AS_USUAL, B_OFFSET_SPACING,
B_WARNING_ALERT);
alert->SetShortcut(0, B_ESCAPE);
int32 button_index = alert->Go();
\endcode
\endcode
The messaged displayed in the dialog window along with the button labels
are set by the strings in the contructor. The Cancel button is offset to
+12 -7
View File
@@ -1,17 +1,21 @@
/*
* Copyright 2011, Haiku inc.
* Distributed under the terms of the MIT Licence.
* Copyright 2011 Haiku Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Axel Dörfler, [email protected]
* John Scipione, [email protected]
*
* Documentation by:
* Axel Dörfler <[email protected]>
* John Scipione <[email protected]>
* Corresponds to:
* /trunk/headers/os/interface/Bitmap.h rev 42274
* /trunk/src/kits/interface/Bitmap.cpp rev 42274
*/
/*!
\file Bitmap.h
\ingroup interface
\ingroup libbe
\brief Defines the BBitmap class and global operators and functions for
handling bitmaps.
*/
@@ -34,10 +38,11 @@
An example of creating a new 32x32 pixel BBitmap object and assigning the
icon of the current application looks like this:
\code
\code
BBitmap iconBitmap = new BBitmap(BRect(0, 0, 31, 31), B_RGBA32));
appFileInfo.GetIcon(iconBitmap, B_LARGE_ICON);
\endcode
\endcode
You can access the properties of a bitmap by calling the Bounds(),
Flags(), ColorSpace(), Area(), Bits(), BitsLength(), BytesPerRow(),
+7 -3
View File
@@ -1,11 +1,12 @@
/*
* Copyright 2010, Haiku inc.
* Distributed under the terms of the MIT Licence.
* Copyright 2011 Haiku Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Documentation by:
* Authors:
* Clark Gaeble
* Adrien Destugues <[email protected]>
* John Scipione <[email protected]>
*
* Corresponds to:
* /trunk/headers/os/interface/Box.h rev 42274
* /trunk/src/kits/interface/Box.cpp rev 42274
@@ -13,6 +14,8 @@
/*!
\file Box.h
\ingroup interface
\ingroup libbe
\brief Defines the BBox class
*/
@@ -20,6 +23,7 @@
/*!
\class BBox
\ingroup interface
\ingroup libbe
\brief A rectangular view with a border and an optional label to group
related subviews visually.
+8 -4
View File
@@ -1,9 +1,10 @@
/*
* Copyright 2011, Haiku inc.
* Copyright 2011 Haiku Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Documentation by:
* Authors:
* John Scipione, [email protected]
*
* Corresponds to:
* /trunk/headers/os/interface/Button.h rev 42794
* /trunk/src/kits/interface/Button.cpp rev 42794
@@ -11,6 +12,8 @@
/*!
\file Button.h
\ingroup interface
\ingroup libbe
\brief Describes the BButton class.
*/
@@ -18,6 +21,7 @@
/*!
\class BButton Button.h
\ingroup interface
\ingroup libbe
\brief A BButton is a labeled on-screen button.
A BButton control is used to initiate an action. An action is activated
@@ -29,8 +33,8 @@
A BButton, unlike other user interface elements such as check boxes and
radio buttons has only a single state. During a click event the
BButton's value is set to \c 1, (\c B_CONTROL_ON) otherwise this value
is \c 0 (\c B_CONTROL_OFF).
BButton's value is set to 1, (\c B_CONTROL_ON) otherwise this value
is 0 (\c B_CONTROL_OFF).
BButton inherits from the BControl class.
*/
+7 -3
View File
@@ -1,18 +1,22 @@
/*
* Copyright 2011, Haiku inc.
* Distributed under the terms of the MIT Licence.
* Copyright 2011 Haiku Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Documentation by:
* Authors:
* Stephan Aßmus, [email protected]
* Marc Flerackers, [email protected]
* John Scipione, [email protected]
*
* Corresponds to:
* /trunk/headers/os/interface/CheckBox.h rev 42794
* /trunk/src/kits/interface/CheckBox.cpp rev 42794
*/
/*!
\file CheckBox.h
\ingroup interface
\ingroup libbe
\brief Defines the BCheckBox class
*/
+21 -9
View File
@@ -1,9 +1,10 @@
/*
* Copyright 2011, Haiku inc.
* Copyright 2011 Haiku Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Documentation by:
* Authors:
* John Scipione, [email protected]
*
* Corresponds to:
* /trunk/headers/os/interface/ColorControl.h rev 42794
* /trunk/src/kits/interface/ColorControl.cpp rev 42794
@@ -12,37 +13,48 @@
/*!
\file ColorControl.h
\ingroup interface
\ingroup libbe
\brief BColorControl class definition and support enums.
*/
/*! \enum color_control_layout
/*!
\enum color_control_layout
\ingroup interface
\ingroup libbe
Enumeration of the color control layout options.
*/
/*!
\var color_control_layout B_CELLS_4x64
cells are arranged in 4 columns, 64 rows.
Cells are arranged in 4 columns, 64 rows.
*/
/*!
\var color_control_layout B_CELLS_8x32
cells are arranged in 8 columns, 32 rows.
Cells are arranged in 8 columns, 32 rows.
*/
/*!
\var color_control_layout B_CELLS_16x16
cells are arranged in 16 columns, 16 rows.
Cells are arranged in 16 columns, 16 rows.
*/
/*!
\var color_control_layout B_CELLS_32x8
cells are arranged in 32 columns, 8 rows.
Cells are arranged in 32 columns, 8 rows.
*/
/*!
\var color_control_layout B_CELLS_64x4
cells are arranged in 64 columns, 4 rows.
Cells are arranged in 64 columns, 4 rows.
*/
@@ -64,7 +76,7 @@
An example of creating a color control looks like this:
\code
colorControl = new BColorControl(BPoint(0, 0), B_CELLS_32x8, 7.0,
"ColorControl", new BMessage(kValueChanged));
"ColorControl", new BMessage(kValueChanged));
colorControl->SetValue(0x336698);
\endcode
+10 -4
View File
@@ -1,29 +1,35 @@
/*
* Copyright 2011, Haiku inc.
* Copyright 2011 Haiku Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Documentation by:
* Authors:
* John Scipione, [email protected]
*
* Corresponds to:
* /trunk/headers/os/interface/Control.h rev 42794
* /trunk/src/kits/interface/Control.cpp rev 42794
*/
/*!
\file Control.h
\ingroup interface
\ingroup libbe
\brief BControl class definition and support enums.
*/
/*!
\var B_CONTROL_ON
Control on
Control on. Value equal to 1.
*/
/*!
\var B_CONTROL_OFF
Control off
Control off. Value equal to 0.
*/
+4 -2
View File
@@ -1,8 +1,8 @@
/*
* Copyright 2012 Haiku inc.
* Copyright 2011 Haiku Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Documentation by:
* Authors:
* John Scipione, [email protected]
*
* Corresponds to:
@@ -12,6 +12,8 @@
/*!
\file Dragger.h
\ingroup interface
\ingroup libbe
\brief Provides the BDragger class.
*/
+105 -25
View File
@@ -1,9 +1,10 @@
/*
* Copyright 2013 Haiku inc.
* Copyright 2013 Haiku Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Documentation by:
* John Scipione <[email protected]>
* Authors:
* John Scipione, [email protected]
*
* Corresponds to:
* /trunk/headers/os/interface/Font.h hrev45178
* /trunk/src/kits/interface/Font.cpp hrev45178
@@ -12,6 +13,8 @@
/*!
\file Font.h
\ingroup interface
\ingroup libbe
\brief BFont class definition, unicode_block class definition, and
font-related struct and enum definitions.
*/
@@ -19,12 +22,14 @@
/*!
\var B_CHAR_SPACING
Position each character without adjustment. Best mode for printing.
*/
/*!
\var B_STRING_SPACING
Optimizes the position of each character within it's space. Collisions
are unlikely but characters may touch each other. Best mode to use when
the screen needs to match what appears on the printed page.
@@ -33,6 +38,7 @@
/*!
\var B_BITMAP_SPACING
The widths of the characters are chosen so that they never collide and
rarely touch. Best mode for drawing small amounts of text.
*/
@@ -40,225 +46,267 @@
/*!
\var B_FIXED_SPACING
Positions characters at a constant width. Best mode for fixed-width fonts.
*/
/*!
\enum font_direction
\ingroup interface
\ingroup libbe
Determines the direction of the text rendered by the font,
left-to-right or right-to-left.
*/
/*!
\var font_direction B_FONT_LEFT_TO_RIGHT
Left to right.
*/
/*!
\var font_direction B_FONT_RIGHT_TO_LEFT
Right to left.
*/
/*!
\var B_DISABLE_ANTIALIASING
Disable antialiasing. Used by BFont::Flags() and BFont::SetFlags().
*/
/*!
\var B_FORCE_ANTIALIASING
Force antialiasing. Used by BFont::Flags() and BFont::SetFlags().
*/
/*!
\var B_TRUNCATE_END
Truncate from the end of the string.
*/
/*!
\var B_TRUNCATE_BEGINNING
Truncate from the beginning of the string.
*/
/*!
\var B_TRUNCATE_MIDDLE
Truncate from the middle of the string.
*/
/*!
\var B_TRUNCATE_SMART
Truncate while keeping each string unique.
*/
/*!
\var B_UNICODE_UTF8
UTF-8 font encoding.
*/
/*!
\var B_ISO_8859_1
ISO 8859-1 aka Latin 1 "Western European" font encoding.
*/
/*!
\var B_ISO_8859_2
ISO 8859-2 aka Latin 2 "Eastern European" font encoding.
*/
/*!
\var B_ISO_8859_3
ISO 8859-3 aka Latin 3 "South European" font encoding.
*/
/*!
\var B_ISO_8859_4
ISO 8859-4 aka Latin 4 "Northern European" font encoding.
*/
/*!
\var B_ISO_8859_5
ISO 8859-5 "Latin/Cyrillic" font encoding.
*/
/*!
\var B_ISO_8859_6
ISO 8859-6 "Latin/Arabic" font encoding.
*/
/*!
\var B_ISO_8859_7
ISO 8859-7 "Latin/Greek" font encoding.
*/
/*!
\var B_ISO_8859_8
ISO 8859-8 "Latin/Hebrew" font encoding.
*/
/*!
\var B_ISO_8859_9
ISO 8859-9 aka Latin 5 "Latin/Turkish" font encoding.
*/
/*!
\var B_ISO_8859_10
ISO 8859-10 aka Latin 6 "Nordic" font encoding.
*/
/*!
\var B_MACINTOSH_ROMAN
Macintosh Roman font encoding.
*/
/*!
\var B_HAS_TUNED_FONT
flags for get_font_family() and get_font_style()
Flags for get_font_family() and get_font_style()
*/
/*!
\var B_IS_FIXED
flags for get_font_family() and get_font_style()
*/
/*!
\var B_ITALIC_FACE
Italic font face flag.
*/
/*!
\var B_UNDERSCORE_FACE
Underscore font face flag.
*/
/*!
\var B_NEGATIVE_FACE
Negative font face flag.
*/
/*!
\var B_OUTLINED_FACE
Outline font face flag.
*/
/*!
\var B_STRIKEOUT_FACE
Strikeout font face flag.
*/
/*!
\var B_BOLD_FACE
Bold font face flag.
*/
/*!
\var B_REGULAR_FACE
Regular font face flag.
*/
/*!
\var B_CONDENSED_FACE
Condensed font face flag. Not in BeOS 5.
*/
/*!
\var B_LIGHT_FACE
Light font face flag. Not in BeOS 5.
*/
/*!
\var B_HEAVY_FACE
Heavy font face flag. Not in BeOS 5.
*/
/*!
\enum font_metric_mode
Font metric mode, screen or printing.
*/
/*!
\var font_metric_mode B_SCREEN_METRIC
Screen font metric mode.
*/
/*!
\var font_metric_mode B_PRINTING_METRIC
Printing font metric mode.
*/
/*!
\enum font_file_format
\ingroup interface
\ingroup libbe
Font file format, TrueType™ or PostScript™ Type1.
\see BFont::FileFormat()
@@ -266,17 +314,21 @@
/*!
\var font_file_format B_TRUETYPE_WINDOWS
TrueType™ font file format.
*/
/*!
\var font_file_format B_POSTSCRIPT_TYPE1_WINDOWS
PostScript™ Type1 font file format.
*/
/*!
\class unicode_block
\ingroup interface
\ingroup libbe
\brief Describes the blocks of Unicode characters supported by a font.
\see BFont::Blocks()
@@ -392,6 +444,8 @@
/*!
\struct edge_info
\ingroup interface
\ingroup libbe
\brief The distance that a character outline is inset from its escapement
boundaries.
@@ -404,20 +458,24 @@
/*!
\var edge_info::left
\brief The distance that the character outline is inset from the left
escapement boundary.
The distance that the character outline is inset from the left
escapement boundary.
*/
/*!
\var edge_info::right
\brief The distance that the character outline is inset from the right
escapement boundary.
The distance that the character outline is inset from the right
escapement boundary.
*/
/*!
\struct font_height
\ingroup interface
\ingroup libbe
\brief The amount of vertical space surrounding a character.
\see BFont::GetHeight()
@@ -426,24 +484,29 @@
/*!
\var font_height::ascent
\brief The distance characters can ascend above the baseline.
The distance characters can ascend above the baseline.
*/
/*!
\var font_height::descent
\brief The distance characters can descend below the baseline.
The distance characters can descend below the baseline.
*/
/*!
\var font_height::leading
\brief The distance between lines, descent above to ascent below.
The distance between lines, descent above to ascent below.
*/
/*!
\struct escapement_delta
\ingroup interface
\ingroup libbe
\brief The amount of horizontal space surrounding a character.
Escapements need to be multiplied by the font size to get the correct
@@ -455,60 +518,72 @@
/*!
\var escapement_delta::nonspace
\brief The amount of space surrounding a character with a visible glyph.
The amount of space surrounding a character with a visible glyph.
*/
/*!
\var escapement_delta::space
\brief The amount of space surrounding a whitespace character, for example
\c B_TAB and \c B_SPACE.
The amount of space surrounding a whitespace character, for example
\c B_TAB and \c B_SPACE.
*/
/*!
\struct font_cache_info
\ingroup interface
\ingroup libbe
\brief Font cache parameters.
*/
/*!
\var font_cache_info::sheared_font_penalty
\brief Sheared font penalty.
Sheared font penalty.
*/
/*!
\var font_cache_info::rotated_font_penalty
\brief Rotated font penalty.
Rotated font penalty.
*/
/*!
\var font_cache_info::oversize_threshold
\brief Oversize threshold.
Oversize threshold.
*/
/*!
\var font_cache_info::oversize_penalty
\brief Oversize penalty.
Oversize penalty.
*/
/*!
\var font_cache_info::cache_size
\brief Cache size.
Cache size.
*/
/*!
\var font_cache_info::spacing_size_threshold
\brief Spacing size threshold.
Spacing size threshold.
*/
/*!
\struct tuned_font_info
\ingroup interface
\ingroup libbe
\brief Tuning information of fonts used to make it look better when
displayed on-screen.
@@ -519,30 +594,35 @@
/*!
\var tuned_font_info::size
\brief Font size.
Font size.
*/
/*!
\var tuned_font_info::shear
\brief Font shear.
Font shear.
*/
/*!
\var tuned_font_info::rotation
\brief Font rotation.
Font rotation.
*/
/*!
\var tuned_font_info::flags
\brief Font flags.
Font flags.
*/
/*!
\var tuned_font_info::face
\brief Font face.
Font face.
*/
+10 -7
View File
@@ -1,17 +1,21 @@
/*
* Copyright 2010, Haiku, Inc. All Rights Reserved.
* Copyright 2010 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Documentation by:
* Alex Wilson <[email protected]>
* Authors:
* Alex Wilson, [email protected]
*
* Corresponds to:
* /trunk/headers/os/interface/GridLayout.h rev 38207
* /trunk/src/kits/interface/GridLayout.cpp rev 38207
* headers/os/interface/GridLayout.h rev 38207
* src/kits/interface/GridLayout.cpp rev 38207
*/
/*!
\file GridLayout.h
\ingroup interface
\ingroup layout
\ingroup libbe
\brief Provides the BGridLayout class.
*/
@@ -21,9 +25,8 @@
\ingroup interface
\ingroup layout
\ingroup libbe
\brief The BGridLayout class a BLayout subclass that arranges the items it
holds in a grid.
holds in a grid.
Each item in a BGridLayout receives a rectangular area which can span more
than a single row or column. The indexing of columns and rows is zero based,
+44 -23
View File
@@ -1,17 +1,21 @@
/*
* Copyright 2010, Haiku, Inc. All Rights Reserved.
* Copyright 2010 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Documentation by:
* Alex Wilson <[email protected]>
* Authors:
* Alex Wilson, [email protected]
*
* Corresponds to:
* /trunk/headers/os/interface/GroupLayout.h rev 38207
* /trunk/src/kits/interface/GroupLayout.cpp rev 38207
* headers/os/interface/GroupLayout.h rev 38207
* src/kits/interface/GroupLayout.cpp rev 38207
*/
/*!
\file GroupLayout.h
\ingroup interface
\ingroup layout
\ingroup libbe
\brief Describes the BGroupLayout class.
*/
@@ -21,7 +25,7 @@
\ingroup layout
\ingroup libbe
\brief The BGroupLayout class is a simple BLayout subclass that
arranges the items it holds within a vertical or horizontal box.
arranges the items it holds within a vertical or horizontal box.
In a horizontal BGroupLayout, each BLayoutItem is given the same vertical
area, but different horizontal areas. In a vertical BGroupLayout, each
@@ -47,7 +51,8 @@
*/
/*! \fn BGroupLayout::BGroupLayout(enum orientation orientation, float spacing)
/*!
\fn BGroupLayout::BGroupLayout(enum orientation orientation, float spacing)
\brief Creates a new BGroupLayout.
\param orientation The #orientation of this BGroupLayout.
@@ -55,52 +60,61 @@
*/
/*! \fn BGroupLayout::~BGroupLayout()
/*!
\fn BGroupLayout::~BGroupLayout()
\brief Destructor method.
Standard Destructor.
*/
/*! \fn BGroupLayout::BGroupLayout(BMessage* from)
/*!
\fn BGroupLayout::BGroupLayout(BMessage* from)
\brief Archive constructor.
\param from The message to construct the BGroupLayout from.
*/
/*! \fn float BGroupLayout::Spacing() const
/*!
\fn float BGroupLayout::Spacing() const
\brief Get the amount of spacing (in pixels) between each item.
*/
/*! \fn void BGroupLayout::SetSpacing(float spacing)
/*!
\fn void BGroupLayout::SetSpacing(float spacing)
\brief Set the amount of spacing (in pixels) between each item.
*/
/*! \fn orientation BGroupLayout::Orientation() const
/*!
\fn orientation BGroupLayout::Orientation() const
\brief Get the #orientation of this BGroupLayout.
*/
/*! \fn void BGroupLayout::SetOrientation(enum orientation orientation)
/*!
\fn void BGroupLayout::SetOrientation(enum orientation orientation)
\brief Set the #orientation of this BGroupLayout.
\param orientation The new #orientation of this BGroupLayout.
*/
/*! \fn float BGroupLayout::ItemWeight(int32 index) const
/*!
\fn float BGroupLayout::ItemWeight(int32 index) const
\brief Get the weight of the item at \a index.
*/
/*! \fn void BGroupLayout::SetItemWeight(int32 index, float weight)
/*!
\fn void BGroupLayout::SetItemWeight(int32 index, float weight)
\brief Set the weight of the item at \a index.
*/
/*! \fn BLayoutItem* BGroupLayout::AddView(BView* child)
/*!
\fn BLayoutItem* BGroupLayout::AddView(BView* child)
\brief Adds \a child to this layout as the last item. In a vertical
BGroupLayout, \a child will be on the right, in a horizontal
BGroupLayout, \a child will be at the bottom.
@@ -109,27 +123,31 @@
*/
/*! \fn BLayoutItem* BGroupLayout::AddView(int32 index, BView* child)
/*!
\fn BLayoutItem* BGroupLayout::AddView(int32 index, BView* child)
\brief Adds \a child to this layout at \a index.
\a child will have a weight of \c 1.0f.
*/
/*! \fn BLayoutItem* BGroupLayout::AddView(BView* child, float weight)
/*!
\fn BLayoutItem* BGroupLayout::AddView(BView* child, float weight)
\brief Adds \a child to the end of this layout with a weight of
\a weight.
*/
/*! \fn BLayoutItem* BGroupLayout::AddView(int32 index, BView* child,
/*!
\fn BLayoutItem* BGroupLayout::AddView(int32 index, BView* child,
float weight)
\brief Adds \a child this layout at \a index with a weight of
\a weight.
*/
/*! \fn bool BGroupLayout::AddItem(BLayoutItem* item)
/*!
\fn bool BGroupLayout::AddItem(BLayoutItem* item)
\brief Adds \a item to this layout as the last item. In a vertical
BGroupLayout, \a item will be on the right, in a horizontal
BGroupLayout, \a item will be at the bottom.
@@ -138,20 +156,23 @@
*/
/*! \fn bool BGroupLayout::AddItem(int32 index, BLayoutItem* item)
/*!
\fn bool BGroupLayout::AddItem(int32 index, BLayoutItem* item)
\brief Adds \a item to this layout at \a index.
\a item will have a weight of \c 1.0f.
*/
/*! \fn bool BGroupLayout::AddItem(BLayoutItem* item, float weight)
/*!
\fn bool BGroupLayout::AddItem(BLayoutItem* item, float weight)
\brief Adds \a item to the end of this layout with a weight of
\a weight.
*/
/*! \fn bool BGroupLayout::AddItem(int32 index, BLayoutItem* item, float weight)
/*!
\fn bool BGroupLayout::AddItem(int32 index, BLayoutItem* item, float weight)
\brief Adds \a item this layout at \a index with a weight of
\a weight.
*/
+8 -5
View File
@@ -1,17 +1,20 @@
/*
* Copyright 2011, Haiku, Inc. All Rights Reserved.
* Copyright 2011 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Documentation by:
* Adrien Destugues <[email protected]>
* Authors:
* Adrien Destugues, [email protected]
*
* Corresponds to:
* /trunk/headers/os/interface/IconUtils.h rev 42600
* /trunk/src/kits/interface/IconUtils.cpp rev 42600
* headers/os/interface/IconUtils.h rev 42600
* src/kits/interface/IconUtils.cpp rev 42600
*/
/*!
\file IconUtils.h
\ingroup interface
\ingroup libbe
\brief Vector icon handling utility class
*/
+39 -6
View File
@@ -1,20 +1,35 @@
/*
* Copyright 2001-2011, Haiku, Inc. All rights reserved.
* Copyright 2011 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* John Scipione, [email protected]
*
* Corresponds to:
* headers/os/interface/InterfaceDefs.h rev 43230
* src/kits/interface/InterfaceDefs.cpp rev 43230
*/
/*!
\file InterfaceDefs.h
\ingroup interface
\ingroup libbe
\brief Defines standard interface definitions for controls.
*/
/*!
\enum border_style
\ingroup interface
\ingroup libbe
Collection of flags that determine the border style drawn around a BBox.
*/
/*! \var border_style B_PLAIN_BORDER
/*!
\var border_style B_PLAIN_BORDER
\image html B_PLAIN_BORDER.png
@@ -23,7 +38,9 @@
is raised slightly above the surrounding surface.
*/
/*! \var border_style B_FANCY_BORDER
/*!
\var border_style B_FANCY_BORDER
\image html B_FANCY_BORDER.png
@@ -31,45 +48,61 @@
in appearance on all four sides. This is the default appearance.
*/
/*! \var border_style B_NO_BORDER
/*!
\var border_style B_NO_BORDER
No border.
*/
/*!
\enum orientation
Orientation flag sets the layout to either horizontal or vertical
Orientation flag sets the layout to either horizontal or vertical
alignment.
*/
/*!
\var orientation B_HORIZONTAL
Horizontal alignment
*/
/*! \var orientation B_VERTICAL
/*!
\var orientation B_VERTICAL
Vertical alignment
*/
/*!
\enum button_width
Collection of flags that determine how wide to draw the buttons in a
BAlert dialog.
*/
/*!
\var button_width B_WIDTH_AS_USUAL
Set the width of each button based on the standard width.
*/
/*!
\var button_width B_WIDTH_FROM_WIDEST
Set the width of each button based on the width of the widest button.
*/
/*!
\var button_width B_WIDTH_FROM_LABEL
Set the width of each button to accomidate the width of the button's
label.
*/
+14 -10
View File
@@ -1,17 +1,21 @@
/*
* Copyright 2010, Haiku, Inc. All Rights Reserved.
* Copyright 2010 Haiku Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Documentation by:
* Alex Wilson <[email protected]>
* Authors:
* Alex Wilson, [email protected]
*
* Corresponds to:
* /trunk/headers/os/interface/Layout.h rev 38207
* /trunk/src/kits/interface/Layout.cpp rev 38207
* headers/os/interface/Layout.h rev 38207
* src/kits/interface/Layout.cpp rev 38207
*/
/*!
\file Layout.h
\ingroup interface
\ingroup layout
\ingroup libbe
\brief Defines the BLayout class.
*/
@@ -72,7 +76,7 @@ topLayout->AddItem(nestedLayoutWithView);
After this constructor has finished, this BLayout holds no
BLayoutItem&apos;s and does not have a target BView.
\warning Because a new BLayout does not have a target BView, calls to the
AddItem() and AddView() will fail methods will fail.
*/
@@ -147,7 +151,7 @@ topLayout->AddItem(nestedLayoutWithView);
this layout.
\a child is added to this BLayout&apos;s target view.
\returns The BLayoutItem created to represent \a child is, or \c NULL if
there was an error.
@@ -208,7 +212,7 @@ topLayout->AddItem(nestedLayoutWithView);
it represents from this BLayout&apos;s target view.
\param item The BLayoutItem to be removed
\warning \a item is not deleted, you must delete it manually, or add it to
another BLayout.
\warning \a item->View(), even when it is removed from the target view,
@@ -255,7 +259,7 @@ topLayout->AddItem(nestedLayoutWithView);
/*!
\fn int32 BLayout::IndexOfView(BView* child) const
\brief Get the index of \a child in this layout.
\note This finds the index of views added through BLayout::AddView(), not
the index of an item which represents \a child that was added through
BLayout::AddItem().
@@ -339,7 +343,7 @@ topLayout->AddItem(nestedLayoutWithView);
\brief If there is no layout currently ongoing, and \a force is \c false,
creates a new BLayoutContext and calls the DoLayout() method
of this BLayout and any BLayout s nested in this BLayout.
This method also guarantees that the owner view of this layout (as returned
by BLayout::Owner()) performs a layout as well (if it is suitable to do so).
+7 -3
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2011, Haiku, Inc. All Rights Reserved.
* Copyright 2011 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
@@ -14,6 +14,9 @@
/*!
\file GroupLayoutBuilder.h
\ingroup interface
\ingroup layout
\ingroup libbe
\brief Provides the BLayoutBuilder::Group<> class.
*/
@@ -22,6 +25,7 @@
\class BLayoutBuilder::Group<>
\ingroup interface
\ingroup layout
\ingroup libbe
\brief BLayoutBuilder::Base subclass for building BGroupLayouts.
*/
@@ -347,7 +351,7 @@
/*!
\fn BView* BLayoutBuilder::Group<ParentBuilder>::View() const
\fn BView* BLayoutBuilder::Group<ParentBuilder>::View() const
\brief Get the BView this builder's BGroupLayout is attached to.
*/
@@ -361,7 +365,7 @@
/*!
\fn ThisBuilder& BLayoutBuilder::Group<ParentBuilder>::GetView(
\fn ThisBuilder& BLayoutBuilder::Group<ParentBuilder>::GetView(
BView** _view)
\brief Get the BView this builder's BGroupLayout is attached to.
\param[out] _view The BView this builder's BGroupLayout is attached to.
+18 -4
View File
@@ -1,13 +1,27 @@
/*
* Copyright 2010, Haiku, Inc. All Rights Reserved.
* Copyright 2010 Haiku Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Documentation by:
* Alex Wilson <[email protected]>
* Authors:
* Alex Wilson, [email protected]
*
* Corresponds to:
* headers/os/interface/LayoutBuilder.h rev 38207
* src/kits/interface/LayoutBuilder.cpp rev 38207
*/
/*! \class BLayoutBuilder::Base<>
/*!
\file LayoutBuilder.h
\ingroup interface
\ingroup layout
\ingroup libbe
\brief Defines the BLayoutBuilder templates.
*/
/*!
\class BLayoutBuilder::Base<>
\ingroup interface
\ingroup layout
\brief Base for all other layout builders in the BLayoutBuilder namespace.
+11 -8
View File
@@ -1,18 +1,22 @@
/*
* Copyright 2010, Haiku, Inc. All Rights Reserved.
* Copyright 2010 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Documentation by:
* Alex Wilson <[email protected]>
* Authors:
* Alex Wilson, [email protected]
*
* Corresponds to:
* /trunk/headers/os/interface/LayoutItem.h rev 38207
* /trunk/src/kits/interface/LayoutItem.cpp rev 38207
* headers/os/interface/LayoutItem.h rev 38207
* src/kits/interface/LayoutItem.cpp rev 38207
*/
/*!
\file LayoutItem.h
\brief Describes the BLayoutItem class
\ingroup interface
\ingroup layout
\ingroup libbe
\brief Describes the BLayoutItem class.
*/
@@ -21,7 +25,6 @@
\ingroup interface
\ingroup layout
\ingroup libbe
\brief Abstract class representing things that are positionable and
resizable by objects of the BLayout class.
@@ -98,7 +101,7 @@
\fn bool BLayoutItem::HasHeightForWidth()
\brief Returns whether or not this BLayoutItem&apos;s height constraints are
dependent on its width.
\note By default, this method returns \c false.
*/
+11 -6
View File
@@ -1,19 +1,22 @@
/*
* Copyright 2011, Haiku inc.
* Distributed under the terms of the MIT Licence.
* Copyright 2011 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Documentation by:
* Authors:
* Stefano Ceccherini, [email protected]
* Axel Dörfler, [email protected]
* John Scipione, [email protected]
*
* Corresponds to:
* /trunk/headers/os/interface/Screen.h rev 42759
* /trunk/src/kits/interface/Screen.cpp rev 42759
* /trunk/headers/os/interface/Screen.h rev 42759
* /trunk/src/kits/interface/Screen.cpp rev 42759
*/
/*!
\file Screen.h
\ingroup interface
\ingroup libbe
\brief Defines the BScreen class and support structures.
*/
@@ -21,6 +24,7 @@
/*!
\class BScreen
\ingroup interface
\ingroup libbe
\brief The BScreen class provides methods to retrieve and change display
settings.
@@ -126,7 +130,8 @@
*/
/*! \fn color_space BScreen::ColorSpace()
/*!
\fn color_space BScreen::ColorSpace()
\brief Gets the color_space of the display.
\return \c B_CMAP8, \c B_RGB15, \c B_RGB32, or \c B_NO_COLOR_SPACE
+9 -6
View File
@@ -1,17 +1,21 @@
/*
* Copyright 2010, Haiku, Inc. All Rights Reserved.
* Copyright 2010 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Documentation by:
* Alex Wilson <[email protected]>
* Authors:
* Alex Wilson, [email protected]
*
* Corresponds to:
* /trunk/headers/os/interface/TwoDimensionalLayout.h rev 38207
* /trunk/src/kits/interface/TwoDimensionalLayout.cpp rev 38207
* headers/os/interface/TwoDimensionalLayout.h rev 38207
* src/kits/interface/TwoDimensionalLayout.cpp rev 38207
*/
/*!
\file TwoDimensionalLayout.h
\ingroup interface
\ingroup layout
\ingroup libbe
\brief Defines the BTwoDimensionalLayout class.
*/
@@ -21,7 +25,6 @@
\ingroup interface
\ingroup layout
\ingroup libbe
\brief Abstract BLayout subclass arranging items within rows and columns.
This class manages all the tricky work of actually positioning/resizing
+8 -6
View File
@@ -1,18 +1,21 @@
/*
* Copyright 2011, Haiku inc.
* Copyright 2011 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Documentation by:
* Authors:
* John Scipione, [email protected]
*
* Corresponds to:
* /trunk/headers/os/interface/View.h rev 42794
* /trunk/src/kits/interface/View.cpp rev 42794
* headers/os/interface/View.h rev 42794
* src/kits/interface/View.cpp rev 42794
*/
/*!
\file View.h
\brief BView class definition and support enums.
\ingroup interface
\ingroup libbe
\brief BView class definition and support data structures.
*/
@@ -20,7 +23,6 @@
\class BView
\ingroup interface
\ingroup libbe
\brief View base class.
*/
+8 -8
View File
@@ -1,26 +1,26 @@
/*
* Copyright 2010, Haiku, Inc. All Rights Reserved.
* Copyright 2010 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Documentation by:
* Alex Wilson <[email protected]>
* Authors:
* Alex Wilson, [email protected]
*/
/*!
\page interface_intro Introduction to the Interface Kit.
The Interface Kit holds all the classes you'll need to develop a GUI.
Building on the messaging facilities provided by the Application Kit,
the Inteface Kit can be used to create a responsive and attractive graphical
user interface.
the Interface Kit can be used to create a responsive and attractive
graphical user interface.
The most important class in the Interface Kit is the BView class, which
The most important class in the Interface Kit is the BView class, which
handles drawing and user interaction. Pointer and keyboard events are
processed in this class.
Another important class is the BWindow class, which holds BViews and makes
them visibile to the user. The BWindow class also handles BView focusing
them visible to the user. The BWindow class also handles BView focusing
and BMessage dispatching, among other things.
A new addition Haiku has added over the BeOS API is the Layout API, which
+15 -17
View File
@@ -1,9 +1,9 @@
/*
* Copyright 2010, Haiku, Inc. All Rights Reserved.
* Copyright 2010 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Documentation by:
* Alex Wilson <[email protected]>
* Authors:
* Alex Wilson, [email protected]
*/
@@ -13,7 +13,8 @@
Haiku's Layout API is centered around the BLayoutItem and BLayout classes.
The BLayoutItem class represents thing that can be managed by a BLayout,
which is itself a BLayoutItem. Before we go any further, it is a good idea
to familiarize yourself with the different BLayouts available in Haiku:
to familiarize yourself with the different BLayout classes available in
Haiku:
\li BGroupLayout
\li BGridLayout
\li BCardLayout
@@ -21,14 +22,14 @@
You'll notice that BSplitView is not actually a BLayout, but a BView. The
BSplitView class uses a custom BLayout behind the scenes, but because it
must also be able to draw, a BView is required. Other BLayouts have
BViews that can be used for convenience.
must also be able to draw, a BView is required. Other BLayout objects have
BView objects that can be used for convenience.
\li BGroupLayout : BGroupView
\li BGridLayout : BGridView
\li BCardLayout : BTabView (also provides on-screen tabs)
Although it is not necessary to use these classes to make use of the
coresponding layouts, it does make things easier.
corresponding layouts, it does make things easier.
Once you have an understanding of what each BLayout does, you can start
designing an interface with them. Let's consider a very simple window,
@@ -39,8 +40,7 @@
So, let's review the BGroupLayout constructor:
\code
BGroupLayout(enum orientation orientation, float spacing
= B_USE_DEFAULT_SPACING)
BGroupLayout(enum orientation orientation, float spacing = B_USE_DEFAULT_SPACING)
\endcode
Because we only have one item in this layout, \c orientation and \c spacing
@@ -67,17 +67,17 @@ group->AddView(MakeStringView("Haiku rocks!"));
That does it! Now we've got a BWindow with a horizontal BGroupLayout holding
a single BView. However, if we want to ensure that our BStringView is always
centered in the window, we should give it an explict BAlignment. So that
centered in the window, we should give it an explicit BAlignment. So the
last line becomes:
\code
BLayoutItem* stringView = group->AddView(MakeStringView("Haiku rocks!"));
stringView->SetExplicitAlignment(BAlignment(B_ALIGN_HORIZONTAL_CENTER,
B_ALIGN_VERTICAL_CENTER);
B_ALIGN_VERTICAL_CENTER);
\endcode
Now our BStringView will always be right in the middle of the space
alloted to it, which at the moment is the whole of \c window.
allotted to it, which at the moment is the whole of \c window.
Now let's take things one step further, and add a BMenuBar into the mix.
@@ -118,8 +118,8 @@ group->AddItem(grid);
\endcode
You'll notice that we've added \c grid directly to \c group. This means that
any BViews we add to \c grid will become children of \c window, but will be
positioned by \c grid.
any BView objects we add to \c grid will become children of \c window, but
will be positioned by \c grid.
\code
grid->AddView(MakeSmallButton(), 0, 0);
@@ -128,7 +128,7 @@ grid->AddView(MakeBigButton(), 0, 1, 2, 1);
grid->AddView(MakeSmallButton(), 1, 2);
\endcode
Now we've got a nice grid of BButtons, let's go over it quickly:
Now we've got a nice grid of BButton objects, let's go over it quickly:
\li \c grid has two columns and three rows.
\li The cells (0, 0), (1, 0), and (1, 2) hold small buttons
\li The cells (0, 1) and (1, 1) hold a single button that spans both
@@ -156,6 +156,4 @@ BLayoutBuilder::Group<>(window, B_VERTICAL)
This is only one way that you could build this layout, but it is probably
the most succinct. Functionally, this is equivalent to all the previous
code in this introduction.
*/

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

-1
View File
@@ -26,7 +26,6 @@
consider using one of the layout-related convenience classes (eg.
BGroupView for BGroupLayout).
\section layout_layout_tips BLayout Tips
\li It is generally better to add BViews and BLayoutItems directly to the