Merge branch 'master' into sam460ex

This commit is contained in:
François Revol
2013-09-14 01:16:51 +02:00
874 changed files with 158863 additions and 20947 deletions
+67 -43
View File
@@ -506,7 +506,8 @@
\struct escapement_delta
\ingroup interface
\ingroup libbe
\brief The amount of horizontal space surrounding a character.
\brief A struct that allows you to specify extra horizontal space to surround
each character with.
Escapements need to be multiplied by the font size to get the correct
value for the font.
@@ -518,15 +519,15 @@
/*!
\var escapement_delta::nonspace
The amount of space surrounding a character with a visible glyph.
The amount of horizontal space to surround a visible glyph character with.
*/
/*!
\var escapement_delta::space
The amount of space surrounding a whitespace character, for example
\c B_TAB and \c B_SPACE.
The amount of horizontal space to surround a whitespace character with, for
example \c B_TAB or \c B_SPACE.
*/
@@ -915,6 +916,28 @@
- \c B_ISO_8859_10 aka Latin 6 aka "Nordic".
- \c B_MACINTOSH_ROMAN
UTF-8 is the standard encoding used by classes in the Interface Kit. It
is part of the Unicode® standard and allows Haiku to represent characters
from all over the world while maintaining backwards compatibility with
7-bit ASCII codes.
Each of the encodings extend the ASCII codes and differ from each other
only when the highest bit is set to 1, in other words, the value is
greater than 127. Furthermore each of the encodings except for UTF-8
are represented by a single byte and consequently encompass a limited set
of characters. Most of the encodings are in the ISO/IEC 8859 family of
character codes with the notable exception of Macintosh Roman which is
the standard encoding used by the classic Mac OS®.
If the value of the first byte of a UTF-8 character is greater than 127
it indicates that the character is a multibyte character and therefore you
must look at the next byte (and possibly the third byte, or rarely even
forth byte) to get the whole character.
Setting the character encoding on a view determines how BView::DrawString()
interprets the values passed to it and also how BView::KeyDown() interprets
the values representing the keys that the user presses.
\param encoding The character encoding to set the font to.
*/
@@ -1253,14 +1276,14 @@
\fn void BFont::GetEscapements(const char charArray[], int32 numChars,
escapement_delta *delta, float escapementArray[]) const
\brief Determines the escapements for each char in \a charArray and writes
the result in \a escapementArray with consideration to the provided
escapement \a delta.
the result in \a escapementArray with consideration to the horizontal
space provided by the escapement \a delta.
The escapement_delta structure contains the following values:
- \c nonspace The amount of space surrounding a character with a visible
glyph.
- \c space The amount of space surrounding a whitespace character, for
example \c B_TAB and \c B_SPACE.
- \c nonspace The amount of horizontal space to surround a visible glyph
character with.
- \c space The amount of horizontal space to surround a whitespace character
with, for example \c B_TAB or \c B_SPACE.
\param charArray The source character array.
\param numChars The number of characters to consider in \a charArray.
@@ -1274,13 +1297,14 @@
escapement_delta *delta, BPoint escapementArray[]) const
\brief Determines the escapements for each char in \a charArray and writes
the result in \a escapementArray as an array of BPoint objects
with consideration to the provided escapement \a delta.
with consideration to the horizontal space provided by the escapement
\a delta.
The escapement_delta structure contains the following values:
- \c nonspace The amount of space surrounding a character with a visible
glyph.
- \c space The amount of space surrounding a whitespace character, for
example \c B_TAB and \c B_SPACE.
- \c nonspace The amount of horizontal space to surround a visible glyph
character with.
- \c space The amount of horizontal space to surround a whitespace character
with, for example \c B_TAB or \c B_SPACE.
\param charArray The source character array.
\param numChars The number of characters to consider in \a charArray.
@@ -1296,14 +1320,14 @@
BPoint offsetArray[]) const
\brief Determines the escapements for each char in \a charArray and writes
the result in \a escapementArray as an array of BPoint objects
with consideration to the provided escapement \a delta
and writes offsets to \a offsetArray.
with consideration to the horizontal space provided by the escapement
\a delta and writes the offsets to \a offsetArray.
The escapement_delta structure contains the following values:
- \c nonspace The amount of space surrounding a character with a visible
glyph.
- \c space The amount of space surrounding a whitespace character, for
example \c B_TAB and \c B_SPACE.
- \c nonspace The amount of horizontal space to surround a visible glyph
character with.
- \c space The amount of horizontal space to surround a whitespace character
with, for example \c B_TAB or \c B_SPACE.
\param charArray The source character array.
\param numChars The number of characters to consider in \a charArray.
@@ -1370,9 +1394,9 @@
\fn void BFont::GetBoundingBoxesAsString(const char charArray[],
int32 numChars, font_metric_mode mode, escapement_delta *delta,
BRect boundingBoxArray[]) const
\brief Writes an array of BRect objects to \a boundingBoxArray
representing the bounding rectangles of each character in
\a charArray with consideration to the provided escapement
\brief Writes an array of BRect objects to \a boundingBoxArray representing
the bounding rectangles of each character in \a charArray with
consideration to the horizontal space provided by the escapement
\a delta.
Each BRect object corresponds to the glyph of one character.
@@ -1381,15 +1405,15 @@
- \c B_SCREEN_METRIC The bounding boxes should use the screen metric.
- \c B_PRINTING_METRIC The bounding boxes should use the print metric.
Escapement deltas are applied as part of the bounding box calculations.
This lets you specify a character spacing is looser or tighter than
normal.
The provided escapement \a delta is applied as part of the bounding box
calculations. This lets you specify a character spacing is looser or
tighter than normal.
The escapement_delta structure contains the following values:
- \c nonspace The amount of space surrounding a character with a visible
glyph.
- \c space The amount of space surrounding a whitespace character, for
example \c B_TAB and \c B_SPACE.
- \c nonspace The amount of horizontal space to surround a visible glyph
character with.
- \c space The amount of horizontal space to surround a whitespace character
with, for example \c B_TAB or \c B_SPACE.
\param charArray The source character array.
\param numChars The number of characters to consider in \a charArray.
@@ -1403,10 +1427,10 @@
\fn void BFont::GetBoundingBoxesForStrings(const char *stringArray[],
int32 numStrings, font_metric_mode mode, escapement_delta deltas[],
BRect boundingBoxArray[]) const
\brief Writes an array of BRect objects to \a boundingBoxArray
representing the bounding rectangles of each string in
\a stringArray with consideration to the provided escapement
\a delta.
\brief Writes an array of BRect objects to \a boundingBoxArray representing
the bounding rectangles of each string in \a stringArray with
consideration to the horizontal space provided by the escapement
\a deltas.
Each BRect object corresponds to the bounding box of the entire string.
@@ -1414,15 +1438,15 @@
- \c B_SCREEN_METRIC The bounding boxes should use the screen metric.
- \c B_PRINTING_METRIC The bounding boxes should use the print metric.
Escapement deltas are applied as part of the bounding box calculations.
This lets you specify a character spacing is looser or tighter than
normal.
The provided escapement \a deltas are applied as part of the bounding box
calculations. This lets you specify a character spacing is looser or tighter
than normal.
The escapement_delta structures should contain the following values:
- \c nonspace The amount of space surrounding a character with a visible
glyph.
- \c space The amount of space surrounding a whitespace character, for
example \c B_TAB and \c B_SPACE.
The escapement_delta structure contains the following values:
- \c nonspace The amount of horizontal space to surround a visible glyph
character with.
- \c space The amount of horizontal space to surround a whitespace character
with, for example \c B_TAB or \c B_SPACE.
\param stringArray The source string array.
\param numStrings The number of strings to consider in \a stringArray.
+93
View File
@@ -0,0 +1,93 @@
/*
* Copyright 2013 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* John Scipione, [email protected]
*
* Corresponds to:
* headers/os/interface/GraphicsDefs.h hrev45737
* src/kits/interface/GraphicsDefs.cpp hrev45737
*/
/*!
\file GraphicsDefs.h
\ingroup interface
\ingroup libbe
\brief Graphics-related functions and variables used by the Interface Kit.
*/
/*!
\struct pattern
\ingroup interface
\ingroup libbe
\brief A pattern to use when drawing.
*/
/*!
\var B_SOLID_HIGH
Draw using the view's high color.
*/
/*!
\var B_MIXED_COLORS
Draw a pattern of the view's high and low colors.
*/
/*!
\var B_SOLID_LOW
Draw using the view's low color.
*/
/*!
\enum source_alpha
\ingroup interface
Blending alpha mode constants.
*/
/*!
\var source_alpha B_PIXEL_ALPHA
Use the alpha value of each pixel when drawing a bitmap.
*/
/*!
\var source_alpha B_CONSTANT_ALPHA
Use the alpha channel of the view's high color.
*/
/*!
\enum alpha_function
\ingroup interface
Blending alpha function constants.
*/
/*!
\var alpha_function B_ALPHA_OVERLAY
Used for drawing a image with transparency over an opaque background.
*/
/*!
\var alpha_function B_ALPHA_COMPOSITE
Used to composite two or more transparent images together offscreen to
produce a new image drawn using \c B_ALPHA_OVERLAY mode.
*/
+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.
\param orientation The #orientation of this BGroupLayout.
\param orientation The orientation of 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.
\param orientation The new #orientation of this BGroupLayout.
*/
+82 -3
View File
@@ -1,13 +1,13 @@
/*
* Copyright 2011 Haiku, Inc. All rights reserved.
* Copyright 2011-2013 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
* headers/os/interface/InterfaceDefs.h hrev45737
* src/kits/interface/InterfaceDefs.cpp hrev45737
*/
@@ -107,6 +107,85 @@
*/
// Line join and cap modes
/*!
\enum join_mode
PostScript-style line join modes used by BView::SetLineMode()
*/
/*!
\var join_mode B_ROUND_JOIN
Round join mode.
*/
/*!
\var join_mode B_MITER_JOIN
Miter join mode.
*/
/*!
\var join_mode B_BEVEL_JOIN
Bevel join mode.
*/
/*!
\var join_mode B_BUTT_JOIN
Butt join mode.
*/
/*!
\var join_mode B_SQUARE_JOIN
Square join mode.
*/
/*!
\enum cap_mode
PostScript-style line cap modes used by BView::SetLineMode()
*/
/*!
\var cap_mode B_ROUND_CAP
Round cap mode.
*/
/*!
\var cap_mode B_BUTT_CAP
Butt cap mode.
*/
/*!
\var cap_mode B_SQUARE_CAP
Square cap mode.
*/
/*!
\var B_DEFAULT_MITER_LIMIT
Default miter limit used to calculate the angle cut off for miter joins.
*/
///// Keyboard related functions
+3 -1
View File
@@ -528,10 +528,12 @@ topLayout->AddItem(nestedLayoutWithView);
/*!
\fn void BLayout::LayoutInvalidated() = 0
\fn void BLayout::LayoutInvalidated(bool children)
Hook method called when this layout becomes invalid. This is a good place
to clear any caches your object might hold.
\param children Whether or not child layouts have also been invalidated.
*/
+4 -8
View File
@@ -64,8 +64,7 @@
/*!
\fn BLayoutBuilder::Group<ParentBuilder>::Group(BWindow *window,
enum orientation orientation=B_HORIZONTAL,
float spacing=B_USE_DEFAULT_SPACING)
orientation orientation, float spacing)
\brief Creates a new BGroupLayout, and attaches it to a BWindow.
\note The top BView* in \a window has its ViewColor set to
@@ -98,8 +97,7 @@
/*!
\fn BLayoutBuilder::Group<ParentBuilder>::Group(
enum orientation orientation=B_HORIZONTAL,
float spacing=B_USE_DEFAULT_SPACING)
orientation orientation, float spacing)
\brief Creates a new BGroupView and targets it.
Methods called on this builder will be directed to the new BGroupView's
@@ -178,8 +176,7 @@
/*!
\fn GroupBuilder BLayoutBuilder::Group<ParentBuilder>::AddGroup(
enum orientation orientation, float spacing=B_USE_DEFAULT_SPACING,
float weight=1.0f)
orientation orientation, float spacing, float weight)
\brief Construct and add a viewless BGroupLayout, then return a GroupBuilder
representing the newly added layout.
@@ -264,8 +261,7 @@
/*!
\fn SplitBuilder BLayoutBuilder::Group<ParentBuilder>::AddSplit(
enum orientation orientation, float spacing=B_USE_DEFAULT_SPACING,
float weight=1.0f)
orientation orientation, float spacing, float weight)
\brief Create and add a new BSplitView with a weight of \c weight, then
return a SplitBuilder representing the new BSplitView.
+5 -6
View File
@@ -147,7 +147,7 @@ public:
= B_ALIGN_HORIZONTAL_UNSET,
int32 columnCount = 1, int32 rowCount = 1);
inline GroupBuilder AddGroup(enum orientation orientation,
inline GroupBuilder AddGroup(orientation orientation,
float spacing, int32 column, int32 row,
int32 columnCount = 1, int32 rowCount = 1);
inline GroupBuilder AddGroup(BGroupView* groupView, int32 column,
@@ -168,7 +168,7 @@ public:
int32 column, int32 row,
int32 columnCount = 1, int32 rowCount = 1);
inline SplitBuilder AddSplit(enum orientation orientation,
inline SplitBuilder AddSplit(orientation orientation,
float spacing, int32 column, int32 row,
int32 columnCount = 1, int32 rowCount = 1);
inline SplitBuilder AddSplit(BSplitView* splitView, int32 column,
@@ -197,8 +197,7 @@ public:
typedef Split<ThisBuilder> SplitBuilder;
public:
inline Split(enum orientation orientation
= B_HORIZONTAL,
inline Split(orientation orientation = B_HORIZONTAL,
float spacing = 0.0f);
inline Split(BSplitView* view);
@@ -211,7 +210,7 @@ public:
inline ThisBuilder& Add(BLayoutItem* item);
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);
inline GroupBuilder AddGroup(BGroupView* groupView,
float weight = 1.0f);
@@ -226,7 +225,7 @@ public:
inline GridBuilder AddGrid(BGridLayout* gridLayout,
float weight = 1.0f);
inline SplitBuilder AddSplit(enum orientation orientation,
inline SplitBuilder AddSplit(orientation orientation,
float spacing = 0.0f, float weight = 1.0f);
inline SplitBuilder AddSplit(BSplitView* splitView,
float weight = 1.0f);
+1 -1
View File
@@ -67,7 +67,7 @@
/*!
\fn void DrawItem(BView* owner, BRect frame, bool complete)
\fn void BListItem::DrawItem(BView* owner, BRect frame, bool complete)
\brief Hook method called when the item is drawn.
\param owner The view that the list item is a child of.
+5 -14
View File
@@ -267,17 +267,6 @@
*/
/*!
\fn void BListView::KeyUp(const char* bytes, int32 numBytes)
\brief Hook method that is called when a keyboard key is released.
\param bytes The \a bytes representing the keys released.
\param numBytes The size of \a bytes.
\see BView::KeyUp()
*/
/*!
\fn void BListView::MouseDown(BPoint point)
\brief Hook method that is called when a mouse button is pushed down while
@@ -475,7 +464,7 @@
/*!
\fn bool BListView::AddList(BList* list)
\fn Add a \a list of list items to the end of the list view.
\brief Add a \a list of list items to the end of the list view.
\param list The \a list of list items to add.
@@ -698,7 +687,7 @@
/*!
\fn void BListView::DoForEach(bool (*func)(BListItem*))
\fn void BListView::DoForEach(bool (*func)(BListItem* item))
\brief Calls the specified function on each item in the list.
The \a func is called on the items in order starting with the item at index 0
@@ -712,7 +701,8 @@
/*!
\fn void BListView::DoForEach(bool (*func)(BListItem*, void*), void* arg)
\fn void BListView::DoForEach(bool (*func)(BListItem* item, void* arg),
void* arg)
\brief Calls the specified function on each item in the list.
The \a func is called on the items in order starting with the item at index 0
@@ -723,6 +713,7 @@
as the second argument.
\param func The function to call on each item.
\param arg The second argument of the function.
*/
+7 -23
View File
@@ -398,7 +398,8 @@
set in the BTextView with the font and color formats set by \a runs.
\param text The text to set.
\param runs The text styling to set, can be \c NULL.
\param runs Set the font and color formats of the new text if provided. Only
applies if the BTextView permits multiple character formats.
*/
@@ -413,8 +414,9 @@
to 0 to clear the text from the BTextView.
\param text The text to set.
\param length The number of bytes of text to set.
\param runs The text styling to use, can be \c NULL.
\param length The maximum number of bytes of \a text to use.
\param runs Set the font and color formats of the new text if provided. Only
applies if the BTextView permits multiple character formats.
*/
@@ -428,7 +430,8 @@
\param file The file to set the text from.
\param offset The position in the file to start reading text.
\param length The number of bytes of text to read from the file.
\param runs The text styling to use, can be \c NULL.
\param runs Set the font and color formats of the new text if provided. Only
applies if the BTextView permits multiple character formats.
*/
@@ -489,25 +492,6 @@
*/
//! @{
/*!
\fn void BTextView::SetText(const char* text, const text_run_array* runs)
*/
/*!
\fn void BTextView::SetText(const char* text, int32 length,
const text_run_array* runs)
*/
/*!
\fn void BTextView::SetText(BFile* file, int32 offset, int32 length,
const text_run_array* runs)
*/
//! @}
+4 -4
View File
@@ -56,7 +56,7 @@
/*!
\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
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
for layout within a certain \a orientation.
@@ -158,8 +158,8 @@
/*!
\fn void BTwoDimensionalLayout::GetColumnRowConstraints(enum orientation
orientation, int32 index, ColumnRowConstraints* constraints)
\fn void BTwoDimensionalLayout::GetColumnRowConstraints(
orientation orientation, int32 index, ColumnRowConstraints* constraints)
\brief Fill in the ColumnRowConstraints for a certain column or row in
the BTwoDimensionalLayout.
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -40,7 +40,7 @@
So, let's review the BGroupLayout constructor:
\code
BGroupLayout(enum orientation orientation, float spacing = B_USE_DEFAULT_SPACING)
BGroupLayout(orientation orientation, float spacing = B_USE_DEFAULT_SPACING)
\endcode
Because we only have one item in this layout, \c orientation and \c spacing