Documented ServerCursor

Other documentation tweaks


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2494 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
DarkWyrm 2003-01-18 20:32:45 +00:00
parent e3bb08007b
commit 94cd5349e1
5 changed files with 34 additions and 29 deletions

View File

@ -31,8 +31,7 @@
extern FTC_Manager ftmanager;
/*!
\fn FontStyle(const char *filepath, FT_Face face)
\brief FontStyle Constructor
\brief Constructor
\param path to a font file
\param face FreeType handle for the font file after it is loaded - for its info only
*/
@ -55,8 +54,7 @@ FontStyle::FontStyle(const char *filepath, FT_Face face)
}
/*!
\fn ~FontStyle(void)
\brief FontStyle Destructor
\brief Destructor
Frees all data allocated on the heap. All child ServerFonts are marked as having
a NULL style so that each ServerFont knows that it is running on borrowed time.
@ -86,7 +84,6 @@ FontStyle::~FontStyle(void)
}
/*!
\fn const char *FontStyle::Name(void)
\brief Returns the name of the style as a string
\return The style's name
*/
@ -96,7 +93,6 @@ const char *FontStyle::Name(void)
}
/*!
\fn FT_Face FontStyle::GetFace(void)
\brief Returns a handle to the style in question, straight from FreeType's cache
\return FreeType face handle or NULL if there was an internal error
*/
@ -107,7 +103,6 @@ FT_Face FontStyle::GetFace(void)
}
/*!
\fn const char *FontStyle::GetPath(void)
\brief Returns the path to the style's font file
\return The style's font file path
*/
@ -117,7 +112,6 @@ const char *FontStyle::GetPath(void)
}
/*!
\fn int16 FontStyle::ConvertToUnicode(uint16 c)
\brief Converts an ASCII character to Unicode for the style
\param An ASCII character
\return A Unicode value for the character
@ -132,7 +126,6 @@ int16 FontStyle::ConvertToUnicode(uint16 c)
}
/*!
\fn ServerFont *FontStyle::Instantiate(float size, float rotation=0.0, float shear=90.0)
\brief Creates a new ServerFont object for the style, given size, shear, and rotation.
\param character size in points
\param rotation in degrees
@ -147,7 +140,6 @@ ServerFont *FontStyle::Instantiate(float size, float rotation=0.0, float shear=9
}
/*!
\fn FontFamily(const char *namestr)
\brief Constructor
\param Name of the family
*/
@ -158,7 +150,6 @@ FontFamily::FontFamily(const char *namestr)
}
/*!
\fn ~FontFamily(void)
\brief Destructor
Deletes all child styles. Note that a FontFamily should not be deleted unless
@ -181,7 +172,6 @@ FontFamily::~FontFamily(void)
}
/*!
\fn const char *FontFamily::Name(void)
\brief Returns the name of the family
\return The family's name
*/
@ -191,7 +181,6 @@ const char *FontFamily::Name(void)
}
/*!
\fn void FontFamily::AddStyle(const char *path,FT_Face face)
\brief Adds the style to the family
\param full path to the style's font file
\param FreeType face handle used to obtain info about the font
@ -220,7 +209,6 @@ void FontFamily::AddStyle(const char *path,FT_Face face)
}
/*!
\fn void FontFamily::RemoveStyle(const char *style)
\brief Removes a style from the family and deletes it
\param Name of the style to be removed from the family
*/
@ -247,7 +235,6 @@ void FontFamily::RemoveStyle(const char *style)
}
/*!
\fn int32 FontFamily::CountStyles(void)
\brief Returns the number of styles in the family
\return The number of styles in the family
*/
@ -257,7 +244,6 @@ int32 FontFamily::CountStyles(void)
}
/*!
\fn bool FontFamily::HasStyle(const char *style)
\brief Determines whether the style belongs to the family
\param Name of the style being checked
\return True if it belongs, false if not
@ -278,7 +264,6 @@ bool FontFamily::HasStyle(const char *style)
}
/*!
\fn const char *FontFamily::GetStyle(int32 index)
\brief Returns the name of a style in the family
\param list index of the style to be found
\return name of the style or NULL if the index is not valid
@ -292,7 +277,6 @@ const char *FontFamily::GetStyle(int32 index)
}
/*!
\fn FontStyle *FontFamily::GetStyle(const char *style)
\brief Get the FontStyle object for the name given
\param Name of the style to be obtained
\return The FontStyle object or NULL if none was found.

View File

@ -26,6 +26,15 @@
//------------------------------------------------------------------------------
#include "ServerCursor.h"
/*!
\brief Constructor
\param Size of the cursor
\param Color space of the cursor
\param ServerBitmap flags. See Bitmap.h.
\param Hotspot of the cursor
\param Bytes per row for the cursor. See ServerBitmap::ServerBitmap()
*/
ServerCursor::ServerCursor(BRect r, color_space cspace, int32 flags, BPoint hotspot, int32 bytesperrow=-1, screen_id screen=B_MAIN_SCREEN_ID)
: ServerBitmap(r,cspace,flags,bytesperrow,screen)
{
@ -35,6 +44,10 @@ ServerCursor::ServerCursor(BRect r, color_space cspace, int32 flags, BPoint hots
_AllocateBuffer();
}
/*!
\brief Constructor
\param pointer to 68-byte cursor data array. See BeBook entry for BCursor for details
*/
ServerCursor::ServerCursor(int8 *data)
: ServerBitmap(BRect(0,0,15,15),B_RGBA32,0,64)
{
@ -89,6 +102,10 @@ ServerCursor::ServerCursor(int8 *data)
}
}
/*!
\brief Copy constructor
\param cursor to copy
*/
ServerCursor::ServerCursor(const ServerCursor *cursor)
: ServerBitmap(cursor)
{
@ -103,11 +120,16 @@ ServerCursor::ServerCursor(const ServerCursor *cursor)
}
}
//! Frees the heap space allocated for the cursor's image data
ServerCursor::~ServerCursor(void)
{
_FreeBuffer();
}
/*!
\brief Sets the cursor's hotspot
\param New location of hotspot, constrained to the cursor's boundaries.
*/
void ServerCursor::SetHotSpot(BPoint pt)
{
_hotspot=pt;

View File

@ -30,6 +30,15 @@
#include <Point.h>
#include "ServerBitmap.h"
/*!
\class ServerCursor ServerCursor.h
\brief Class to handle all cursor capabilities for the system
Although descended from ServerBitmaps, ServerCursors are not handled by
the BitmapManager - they are allocated like any other object. Unlike BeOS
R5, cursors can be any size or color space, and this class accomodates and
expands the R5 API.
*/
class ServerCursor : public ServerBitmap
{
public:

View File

@ -29,7 +29,6 @@
/*!
\fn ServerFont(FontStyle *style, float size, float rotation, float shear, uint16 flags, uint8 spacing)
\brief Constructor
\param Style object to which the ServerFont belongs
\param Character size in points
@ -57,7 +56,6 @@ ServerFont::ServerFont(FontStyle *style, float size, float rotation, float shear
}
/*!
\fn ServerFont(FontStyle *style, float size, float rotation, float shear, uint16 flags, uint8 spacing)
\brief Copy Constructor
\param ServerFont to copy
*/
@ -79,10 +77,7 @@ ServerFont::ServerFont(const ServerFont &font)
}
/*!
\fn ServerFont(FontStyle *style, float size, float rotation, float shear, uint16 flags, uint8 spacing)
\brief Destructor
Removes itself as a dependency of its owning style.
\brief Removes itself as a dependency of its owning style.
*/
ServerFont::~ServerFont(void)
{
@ -91,7 +86,6 @@ ServerFont::~ServerFont(void)
}
/*!
\fn int32 ServerFont::CountTuned(void)
\brief Returns the number of strikes in the font
\return The number of strikes in the font
*/
@ -104,7 +98,6 @@ int32 ServerFont::CountTuned(void)
}
/*!
\fn font_file_format ServerFont::FileFormat(void)
\brief Returns the file format of the font. Currently unimplemented.
\return B_TRUETYPE_WINDOWS
*/
@ -115,7 +108,6 @@ font_file_format ServerFont::FileFormat(void)
}
/*!
\fn BRect ServerFont::BoundingBox(void)
\brief Returns a BRect which encloses the entire font
\return A BRect which encloses the entire font
*/
@ -125,7 +117,6 @@ BRect ServerFont::BoundingBox(void)
}
/*!
\fn void ServerFont::Height(font_height *fh)
\brief Obtains the height values for characters in the font in its current state
\param pointer to a font_height object to receive the values for the font
*/

View File

@ -38,7 +38,6 @@
rgb_color system_palette[256];
/*!
\fn void GenerateSystemPalette(rgb_color *palette)
\brief Takes a 256-element rgb_color array and places the BeOS System
palette in it.
*/