Cleanup only.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26661 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
+166
-195
@@ -20,9 +20,9 @@
|
|||||||
|
|
||||||
// mouse button
|
// mouse button
|
||||||
enum {
|
enum {
|
||||||
B_PRIMARY_MOUSE_BUTTON = 0x01,
|
B_PRIMARY_MOUSE_BUTTON = 0x01,
|
||||||
B_SECONDARY_MOUSE_BUTTON = 0x02,
|
B_SECONDARY_MOUSE_BUTTON = 0x02,
|
||||||
B_TERTIARY_MOUSE_BUTTON = 0x04
|
B_TERTIARY_MOUSE_BUTTON = 0x04
|
||||||
};
|
};
|
||||||
|
|
||||||
// mouse transit
|
// mouse transit
|
||||||
@@ -35,19 +35,19 @@ enum {
|
|||||||
|
|
||||||
// event mask
|
// event mask
|
||||||
enum {
|
enum {
|
||||||
B_POINTER_EVENTS = 0x00000001,
|
B_POINTER_EVENTS = 0x00000001,
|
||||||
B_KEYBOARD_EVENTS = 0x00000002
|
B_KEYBOARD_EVENTS = 0x00000002
|
||||||
};
|
};
|
||||||
|
|
||||||
// event mask options
|
// event mask options
|
||||||
enum {
|
enum {
|
||||||
B_LOCK_WINDOW_FOCUS = 0x00000001,
|
B_LOCK_WINDOW_FOCUS = 0x00000001,
|
||||||
B_SUSPEND_VIEW_FOCUS = 0x00000002,
|
B_SUSPEND_VIEW_FOCUS = 0x00000002,
|
||||||
B_NO_POINTER_HISTORY = 0x00000004,
|
B_NO_POINTER_HISTORY = 0x00000004,
|
||||||
// new in Haiku (unless this flag is
|
// new in Haiku (unless this flag is
|
||||||
// specified, both BWindow and BView::GetMouse()
|
// specified, both BWindow and BView::GetMouse()
|
||||||
// will filter out older mouse moved messages)
|
// will filter out older mouse moved messages)
|
||||||
B_FULL_POINTER_HISTORY = 0x00000008
|
B_FULL_POINTER_HISTORY = 0x00000008
|
||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
@@ -57,16 +57,16 @@ enum {
|
|||||||
|
|
||||||
// set font mask
|
// set font mask
|
||||||
enum {
|
enum {
|
||||||
B_FONT_FAMILY_AND_STYLE = 0x00000001,
|
B_FONT_FAMILY_AND_STYLE = 0x00000001,
|
||||||
B_FONT_SIZE = 0x00000002,
|
B_FONT_SIZE = 0x00000002,
|
||||||
B_FONT_SHEAR = 0x00000004,
|
B_FONT_SHEAR = 0x00000004,
|
||||||
B_FONT_ROTATION = 0x00000008,
|
B_FONT_ROTATION = 0x00000008,
|
||||||
B_FONT_SPACING = 0x00000010,
|
B_FONT_SPACING = 0x00000010,
|
||||||
B_FONT_ENCODING = 0x00000020,
|
B_FONT_ENCODING = 0x00000020,
|
||||||
B_FONT_FACE = 0x00000040,
|
B_FONT_FACE = 0x00000040,
|
||||||
B_FONT_FLAGS = 0x00000080,
|
B_FONT_FLAGS = 0x00000080,
|
||||||
B_FONT_FALSE_BOLD_WIDTH = 0x00000100,
|
B_FONT_FALSE_BOLD_WIDTH = 0x00000100,
|
||||||
B_FONT_ALL = 0x000001FF
|
B_FONT_ALL = 0x000001FF
|
||||||
};
|
};
|
||||||
|
|
||||||
// view flags
|
// view flags
|
||||||
@@ -138,7 +138,7 @@ public:
|
|||||||
BView(const char* name, uint32 flags,
|
BView(const char* name, uint32 flags,
|
||||||
BLayout* layout = NULL);
|
BLayout* layout = NULL);
|
||||||
BView(BRect frame, const char* name,
|
BView(BRect frame, const char* name,
|
||||||
uint32 resizeMask, uint32 flags);
|
uint32 resizeMask, uint32 flags);
|
||||||
virtual ~BView();
|
virtual ~BView();
|
||||||
|
|
||||||
BView(BMessage* data);
|
BView(BMessage* data);
|
||||||
@@ -166,37 +166,30 @@ public:
|
|||||||
virtual void Draw(BRect updateRect);
|
virtual void Draw(BRect updateRect);
|
||||||
virtual void MouseDown(BPoint where);
|
virtual void MouseDown(BPoint where);
|
||||||
virtual void MouseUp(BPoint where);
|
virtual void MouseUp(BPoint where);
|
||||||
virtual void MouseMoved(BPoint where,
|
virtual void MouseMoved(BPoint where, uint32 code,
|
||||||
uint32 code,
|
const BMessage* dragMessage);
|
||||||
const BMessage* a_message);
|
|
||||||
virtual void WindowActivated(bool state);
|
virtual void WindowActivated(bool state);
|
||||||
virtual void KeyDown(const char* bytes, int32 numBytes);
|
virtual void KeyDown(const char* bytes, int32 numBytes);
|
||||||
virtual void KeyUp(const char* bytes, int32 numBytes);
|
virtual void KeyUp(const char* bytes, int32 numBytes);
|
||||||
virtual void Pulse();
|
virtual void Pulse();
|
||||||
virtual void FrameMoved(BPoint new_position);
|
virtual void FrameMoved(BPoint newPosition);
|
||||||
virtual void FrameResized(float new_width, float new_height);
|
virtual void FrameResized(float newWidth, float newHeight);
|
||||||
|
|
||||||
virtual void TargetedByScrollView(BScrollView* scroll_view);
|
virtual void TargetedByScrollView(BScrollView* scrollView);
|
||||||
void BeginRectTracking(BRect startRect,
|
void BeginRectTracking(BRect startRect,
|
||||||
uint32 style = B_TRACK_WHOLE_RECT);
|
uint32 style = B_TRACK_WHOLE_RECT);
|
||||||
void EndRectTracking();
|
void EndRectTracking();
|
||||||
|
|
||||||
void GetMouse(BPoint* location,
|
void GetMouse(BPoint* location, uint32* buttons,
|
||||||
uint32* buttons,
|
bool checkMessageQueue = true);
|
||||||
bool checkMessageQueue = true);
|
|
||||||
|
|
||||||
void DragMessage(BMessage* aMessage,
|
void DragMessage(BMessage* message, BRect dragRect,
|
||||||
BRect dragRect,
|
BHandler* replyTo = NULL);
|
||||||
BHandler* reply_to = NULL);
|
void DragMessage(BMessage* message, BBitmap* bitmap,
|
||||||
void DragMessage(BMessage* aMessage,
|
BPoint offset, BHandler* replyTo = NULL);
|
||||||
BBitmap* anImage,
|
void DragMessage(BMessage* message, BBitmap* bitmap,
|
||||||
BPoint offset,
|
drawing_mode dragMode, BPoint offset,
|
||||||
BHandler* reply_to = NULL);
|
BHandler* replyTo = NULL);
|
||||||
void DragMessage(BMessage* aMessage,
|
|
||||||
BBitmap* anImage,
|
|
||||||
drawing_mode dragMode,
|
|
||||||
BPoint offset,
|
|
||||||
BHandler* reply_to = NULL);
|
|
||||||
|
|
||||||
BView* FindView(const char* name) const;
|
BView* FindView(const char* name) const;
|
||||||
BView* Parent() const;
|
BView* Parent() const;
|
||||||
@@ -223,59 +216,65 @@ public:
|
|||||||
void GetClippingRegion(BRegion* region) const;
|
void GetClippingRegion(BRegion* region) const;
|
||||||
virtual void ConstrainClippingRegion(BRegion* region);
|
virtual void ConstrainClippingRegion(BRegion* region);
|
||||||
void ClipToPicture(BPicture* picture,
|
void ClipToPicture(BPicture* picture,
|
||||||
BPoint where = B_ORIGIN,
|
BPoint where = B_ORIGIN, bool sync = true);
|
||||||
bool sync = true);
|
|
||||||
void ClipToInversePicture(BPicture* picture,
|
void ClipToInversePicture(BPicture* picture,
|
||||||
BPoint where = B_ORIGIN,
|
BPoint where = B_ORIGIN, bool sync = true);
|
||||||
bool sync = true);
|
|
||||||
|
|
||||||
virtual void SetDrawingMode(drawing_mode mode);
|
virtual void SetDrawingMode(drawing_mode mode);
|
||||||
drawing_mode DrawingMode() const;
|
drawing_mode DrawingMode() const;
|
||||||
|
|
||||||
void SetBlendingMode(source_alpha srcAlpha,
|
void SetBlendingMode(source_alpha srcAlpha,
|
||||||
alpha_function alphaFunc);
|
alpha_function alphaFunc);
|
||||||
void GetBlendingMode(source_alpha* srcAlpha,
|
void GetBlendingMode(source_alpha* srcAlpha,
|
||||||
alpha_function* alphaFunc) const;
|
alpha_function* alphaFunc) const;
|
||||||
|
|
||||||
virtual void SetPenSize(float size);
|
virtual void SetPenSize(float size);
|
||||||
float PenSize() const;
|
float PenSize() const;
|
||||||
|
|
||||||
void SetViewCursor(const BCursor* cursor, bool sync=true);
|
void SetViewCursor(const BCursor* cursor,
|
||||||
|
bool sync = true);
|
||||||
|
|
||||||
virtual void SetViewColor(rgb_color c);
|
virtual void SetViewColor(rgb_color c);
|
||||||
void SetViewColor(uchar r, uchar g, uchar b, uchar a = 255);
|
void SetViewColor(uchar r, uchar g, uchar b,
|
||||||
|
uchar a = 255);
|
||||||
rgb_color ViewColor() const;
|
rgb_color ViewColor() const;
|
||||||
|
|
||||||
void SetViewBitmap(const BBitmap* bitmap,
|
void SetViewBitmap(const BBitmap* bitmap,
|
||||||
BRect srcRect, BRect dstRect,
|
BRect srcRect, BRect dstRect,
|
||||||
uint32 followFlags = B_FOLLOW_TOP|B_FOLLOW_LEFT,
|
uint32 followFlags
|
||||||
uint32 options = B_TILE_BITMAP);
|
= B_FOLLOW_TOP | B_FOLLOW_LEFT,
|
||||||
|
uint32 options = B_TILE_BITMAP);
|
||||||
void SetViewBitmap(const BBitmap* bitmap,
|
void SetViewBitmap(const BBitmap* bitmap,
|
||||||
uint32 followFlags = B_FOLLOW_TOP|B_FOLLOW_LEFT,
|
uint32 followFlags
|
||||||
uint32 options = B_TILE_BITMAP);
|
= B_FOLLOW_TOP | B_FOLLOW_LEFT,
|
||||||
|
uint32 options = B_TILE_BITMAP);
|
||||||
void ClearViewBitmap();
|
void ClearViewBitmap();
|
||||||
|
|
||||||
status_t SetViewOverlay(const BBitmap* overlay,
|
status_t SetViewOverlay(const BBitmap* overlay,
|
||||||
BRect srcRect, BRect dstRect,
|
BRect srcRect, BRect dstRect,
|
||||||
rgb_color* colorKey,
|
rgb_color* colorKey,
|
||||||
uint32 followFlags = B_FOLLOW_TOP|B_FOLLOW_LEFT,
|
uint32 followFlags
|
||||||
uint32 options = 0);
|
= B_FOLLOW_TOP | B_FOLLOW_LEFT,
|
||||||
status_t SetViewOverlay(const BBitmap* overlay, rgb_color* colorKey,
|
uint32 options = 0);
|
||||||
uint32 followFlags = B_FOLLOW_TOP|B_FOLLOW_LEFT,
|
status_t SetViewOverlay(const BBitmap* overlay,
|
||||||
uint32 options = 0);
|
rgb_color* colorKey,
|
||||||
|
uint32 followFlags
|
||||||
|
= B_FOLLOW_TOP | B_FOLLOW_LEFT,
|
||||||
|
uint32 options = 0);
|
||||||
void ClearViewOverlay();
|
void ClearViewOverlay();
|
||||||
|
|
||||||
virtual void SetHighColor(rgb_color a_color);
|
virtual void SetHighColor(rgb_color a_color);
|
||||||
void SetHighColor(uchar r, uchar g, uchar b, uchar a = 255);
|
void SetHighColor(uchar r, uchar g, uchar b,
|
||||||
|
uchar a = 255);
|
||||||
rgb_color HighColor() const;
|
rgb_color HighColor() const;
|
||||||
|
|
||||||
virtual void SetLowColor(rgb_color a_color);
|
virtual void SetLowColor(rgb_color a_color);
|
||||||
void SetLowColor(uchar r, uchar g, uchar b, uchar a = 255);
|
void SetLowColor(uchar r, uchar g, uchar b,
|
||||||
|
uchar a = 255);
|
||||||
rgb_color LowColor() const;
|
rgb_color LowColor() const;
|
||||||
|
|
||||||
void SetLineMode(cap_mode lineCap,
|
void SetLineMode(cap_mode lineCap, join_mode lineJoin,
|
||||||
join_mode lineJoin,
|
float miterLimit = B_DEFAULT_MITER_LIMIT);
|
||||||
float miterLimit = B_DEFAULT_MITER_LIMIT);
|
|
||||||
join_mode LineJoinMode() const;
|
join_mode LineJoinMode() const;
|
||||||
cap_mode LineCapMode() const;
|
cap_mode LineCapMode() const;
|
||||||
float LineMiterLimit() const;
|
float LineMiterLimit() const;
|
||||||
@@ -291,151 +290,114 @@ public:
|
|||||||
void MovePenTo(float x, float y);
|
void MovePenTo(float x, float y);
|
||||||
void MovePenBy(float x, float y);
|
void MovePenBy(float x, float y);
|
||||||
BPoint PenLocation() const;
|
BPoint PenLocation() const;
|
||||||
void StrokeLine(BPoint toPt,
|
void StrokeLine(BPoint toPt, pattern p = B_SOLID_HIGH);
|
||||||
pattern p = B_SOLID_HIGH);
|
void StrokeLine(BPoint a, BPoint b,
|
||||||
void StrokeLine(BPoint pt0,
|
pattern p = B_SOLID_HIGH);
|
||||||
BPoint pt1,
|
|
||||||
pattern p = B_SOLID_HIGH);
|
|
||||||
void BeginLineArray(int32 count);
|
void BeginLineArray(int32 count);
|
||||||
void AddLine(BPoint pt0, BPoint pt1, rgb_color col);
|
void AddLine(BPoint a, BPoint b, rgb_color color);
|
||||||
void EndLineArray();
|
void EndLineArray();
|
||||||
|
|
||||||
void StrokePolygon(const BPolygon* aPolygon,
|
void StrokePolygon(const BPolygon* polygon,
|
||||||
bool closed = true,
|
bool closed = true, pattern p = B_SOLID_HIGH);
|
||||||
pattern p = B_SOLID_HIGH);
|
void StrokePolygon(const BPoint* ptArray, int32 numPts,
|
||||||
void StrokePolygon(const BPoint* ptArray,
|
bool closed = true, pattern p = B_SOLID_HIGH);
|
||||||
int32 numPts,
|
void StrokePolygon(const BPoint* ptArray, int32 numPts,
|
||||||
bool closed = true,
|
BRect bounds, bool closed = true,
|
||||||
pattern p = B_SOLID_HIGH);
|
pattern p = B_SOLID_HIGH);
|
||||||
void StrokePolygon(const BPoint* ptArray,
|
void FillPolygon(const BPolygon* polygon,
|
||||||
int32 numPts,
|
pattern p = B_SOLID_HIGH);
|
||||||
BRect bounds,
|
void FillPolygon(const BPoint* ptArray, int32 numPts,
|
||||||
bool closed = true,
|
pattern p = B_SOLID_HIGH);
|
||||||
pattern p = B_SOLID_HIGH);
|
void FillPolygon(const BPoint* ptArray, int32 numPts,
|
||||||
void FillPolygon(const BPolygon* aPolygon,
|
BRect bounds, pattern p = B_SOLID_HIGH);
|
||||||
pattern p = B_SOLID_HIGH);
|
|
||||||
void FillPolygon(const BPoint* ptArray,
|
|
||||||
int32 numPts,
|
|
||||||
pattern p = B_SOLID_HIGH);
|
|
||||||
void FillPolygon(const BPoint* ptArray,
|
|
||||||
int32 numPts,
|
|
||||||
BRect bounds,
|
|
||||||
pattern p = B_SOLID_HIGH);
|
|
||||||
|
|
||||||
void StrokeTriangle(BPoint pt1,
|
void StrokeTriangle(BPoint pt1, BPoint pt2, BPoint pt3,
|
||||||
BPoint pt2,
|
BRect bounds, pattern p = B_SOLID_HIGH);
|
||||||
BPoint pt3,
|
void StrokeTriangle(BPoint pt1, BPoint pt2, BPoint pt3,
|
||||||
BRect bounds,
|
pattern p = B_SOLID_HIGH);
|
||||||
pattern p = B_SOLID_HIGH);
|
void FillTriangle(BPoint pt1, BPoint pt2, BPoint pt3,
|
||||||
void StrokeTriangle(BPoint pt1,
|
pattern p = B_SOLID_HIGH);
|
||||||
BPoint pt2,
|
void FillTriangle(BPoint pt1, BPoint pt2, BPoint pt3,
|
||||||
BPoint pt3,
|
BRect bounds, pattern p = B_SOLID_HIGH);
|
||||||
pattern p = B_SOLID_HIGH);
|
|
||||||
void FillTriangle(BPoint pt1,
|
|
||||||
BPoint pt2,
|
|
||||||
BPoint pt3,
|
|
||||||
pattern p = B_SOLID_HIGH);
|
|
||||||
void FillTriangle(BPoint pt1,
|
|
||||||
BPoint pt2,
|
|
||||||
BPoint pt3,
|
|
||||||
BRect bounds,
|
|
||||||
pattern p = B_SOLID_HIGH);
|
|
||||||
|
|
||||||
void StrokeRect(BRect r, pattern p = B_SOLID_HIGH);
|
void StrokeRect(BRect r, pattern p = B_SOLID_HIGH);
|
||||||
void FillRect(BRect r, pattern p = B_SOLID_HIGH);
|
void FillRect(BRect r, pattern p = B_SOLID_HIGH);
|
||||||
void FillRegion(BRegion* a_region, pattern p= B_SOLID_HIGH);
|
void FillRegion(BRegion* region,
|
||||||
|
pattern p = B_SOLID_HIGH);
|
||||||
void InvertRect(BRect r);
|
void InvertRect(BRect r);
|
||||||
|
|
||||||
void StrokeRoundRect(BRect r,
|
void StrokeRoundRect(BRect r, float xRadius,
|
||||||
float xRadius,
|
float yRadius, pattern p = B_SOLID_HIGH);
|
||||||
float yRadius,
|
void FillRoundRect(BRect r, float xRadius, float yRadius,
|
||||||
pattern p = B_SOLID_HIGH);
|
pattern p = B_SOLID_HIGH);
|
||||||
void FillRoundRect(BRect r,
|
|
||||||
float xRadius,
|
|
||||||
float yRadius,
|
|
||||||
pattern p = B_SOLID_HIGH);
|
|
||||||
|
|
||||||
void StrokeEllipse(BPoint center,
|
void StrokeEllipse(BPoint center, float xRadius,
|
||||||
float xRadius,
|
float yRadius, pattern p = B_SOLID_HIGH);
|
||||||
float yRadius,
|
|
||||||
pattern p = B_SOLID_HIGH);
|
|
||||||
void StrokeEllipse(BRect r, pattern p = B_SOLID_HIGH);
|
void StrokeEllipse(BRect r, pattern p = B_SOLID_HIGH);
|
||||||
void FillEllipse(BPoint center,
|
void FillEllipse(BPoint center, float xRadius,
|
||||||
float xRadius,
|
float yRadius, pattern p = B_SOLID_HIGH);
|
||||||
float yRadius,
|
|
||||||
pattern p = B_SOLID_HIGH);
|
|
||||||
void FillEllipse(BRect r, pattern p = B_SOLID_HIGH);
|
void FillEllipse(BRect r, pattern p = B_SOLID_HIGH);
|
||||||
|
|
||||||
void StrokeArc(BPoint center,
|
void StrokeArc(BPoint center, float xRadius,
|
||||||
float xRadius,
|
float yRadius, float startAngle, float arcAngle,
|
||||||
float yRadius,
|
pattern p = B_SOLID_HIGH);
|
||||||
float start_angle,
|
void StrokeArc(BRect r, float startAngle,
|
||||||
float arc_angle,
|
float arcAngle, pattern p = B_SOLID_HIGH);
|
||||||
pattern p = B_SOLID_HIGH);
|
void FillArc(BPoint center, float xRadius, float yRadius,
|
||||||
void StrokeArc(BRect r,
|
float startAngle, float arcAngle,
|
||||||
float start_angle,
|
pattern p = B_SOLID_HIGH);
|
||||||
float arc_angle,
|
void FillArc(BRect r, float startAngle, float arcAngle,
|
||||||
pattern p = B_SOLID_HIGH);
|
pattern p = B_SOLID_HIGH);
|
||||||
void FillArc(BPoint center,
|
|
||||||
float xRadius,
|
|
||||||
float yRadius,
|
|
||||||
float start_angle,
|
|
||||||
float arc_angle,
|
|
||||||
pattern p = B_SOLID_HIGH);
|
|
||||||
void FillArc(BRect r,
|
|
||||||
float start_angle,
|
|
||||||
float arc_angle,
|
|
||||||
pattern p = B_SOLID_HIGH);
|
|
||||||
|
|
||||||
void StrokeBezier(BPoint* controlPoints,
|
void StrokeBezier(BPoint* controlPoints,
|
||||||
pattern p = B_SOLID_HIGH);
|
pattern p = B_SOLID_HIGH);
|
||||||
void FillBezier(BPoint* controlPoints,
|
void FillBezier(BPoint* controlPoints,
|
||||||
pattern p = B_SOLID_HIGH);
|
pattern p = B_SOLID_HIGH);
|
||||||
|
|
||||||
void StrokeShape(BShape* shape,
|
void StrokeShape(BShape* shape,
|
||||||
pattern p = B_SOLID_HIGH);
|
pattern p = B_SOLID_HIGH);
|
||||||
void FillShape(BShape* shape,
|
void FillShape(BShape* shape, pattern p = B_SOLID_HIGH);
|
||||||
pattern p = B_SOLID_HIGH);
|
|
||||||
|
|
||||||
void CopyBits(BRect src, BRect dst);
|
void CopyBits(BRect src, BRect dst);
|
||||||
|
|
||||||
void DrawBitmapAsync(const BBitmap* aBitmap,
|
void DrawBitmapAsync(const BBitmap* aBitmap,
|
||||||
BRect srcRect,
|
BRect bitmapRect, BRect viewRect);
|
||||||
BRect dstRect);
|
void DrawBitmapAsync(const BBitmap* aBitmap,
|
||||||
|
BRect viewRect);
|
||||||
|
void DrawBitmapAsync(const BBitmap* aBitmap,
|
||||||
|
BPoint where);
|
||||||
void DrawBitmapAsync(const BBitmap* aBitmap);
|
void DrawBitmapAsync(const BBitmap* aBitmap);
|
||||||
void DrawBitmapAsync(const BBitmap* aBitmap, BPoint where);
|
|
||||||
void DrawBitmapAsync(const BBitmap* aBitmap, BRect dstRect);
|
|
||||||
void DrawBitmap(const BBitmap* aBitmap,
|
void DrawBitmap(const BBitmap* aBitmap,
|
||||||
BRect srcRect,
|
BRect bitmapRect, BRect viewRect);
|
||||||
BRect dstRect);
|
void DrawBitmap(const BBitmap* aBitmap,
|
||||||
|
BRect viewRect);
|
||||||
|
void DrawBitmap(const BBitmap* aBitmap,
|
||||||
|
BPoint where);
|
||||||
void DrawBitmap(const BBitmap* aBitmap);
|
void DrawBitmap(const BBitmap* aBitmap);
|
||||||
void DrawBitmap(const BBitmap* aBitmap, BPoint where);
|
|
||||||
void DrawBitmap(const BBitmap* aBitmap, BRect dstRect);
|
|
||||||
|
|
||||||
void DrawChar(char aChar);
|
void DrawChar(char aChar);
|
||||||
void DrawChar(char aChar, BPoint location);
|
void DrawChar(char aChar, BPoint location);
|
||||||
void DrawString(const char* aString,
|
void DrawString(const char* aString,
|
||||||
escapement_delta* delta = NULL);
|
escapement_delta* delta = NULL);
|
||||||
void DrawString(const char* aString, BPoint location,
|
void DrawString(const char* aString, BPoint location,
|
||||||
escapement_delta* delta = NULL);
|
escapement_delta* delta = NULL);
|
||||||
void DrawString(const char* aString, int32 length,
|
void DrawString(const char* aString, int32 length,
|
||||||
escapement_delta* delta = NULL);
|
escapement_delta* delta = NULL);
|
||||||
void DrawString(const char* aString,
|
void DrawString(const char* aString, int32 length,
|
||||||
int32 length,
|
BPoint location, escapement_delta* delta = 0L);
|
||||||
BPoint location,
|
|
||||||
escapement_delta* delta = 0L);
|
|
||||||
|
|
||||||
virtual void SetFont(const BFont* font, uint32 mask = B_FONT_ALL);
|
virtual void SetFont(const BFont* font,
|
||||||
|
uint32 mask = B_FONT_ALL);
|
||||||
|
|
||||||
void GetFont(BFont* font) const;
|
void GetFont(BFont* font) const;
|
||||||
void TruncateString(BString* in_out,
|
void TruncateString(BString* in_out, uint32 mode,
|
||||||
uint32 mode,
|
float width) const;
|
||||||
float width) const;
|
|
||||||
float StringWidth(const char* string) const;
|
float StringWidth(const char* string) const;
|
||||||
float StringWidth(const char* string, int32 length) const;
|
float StringWidth(const char* string, int32 length) const;
|
||||||
void GetStringWidths(char* stringArray[],
|
void GetStringWidths(char* stringArray[],
|
||||||
int32 lengthArray[],
|
int32 lengthArray[], int32 numStrings,
|
||||||
int32 numStrings,
|
float widthArray[]) const;
|
||||||
float widthArray[]) const;
|
|
||||||
void SetFontSize(float size);
|
void SetFontSize(float size);
|
||||||
void ForceFontAliasing(bool enable);
|
void ForceFontAliasing(bool enable);
|
||||||
void GetFontHeight(font_height* height) const;
|
void GetFontHeight(font_height* height) const;
|
||||||
@@ -451,16 +413,19 @@ public:
|
|||||||
BPicture* EndPicture();
|
BPicture* EndPicture();
|
||||||
|
|
||||||
void DrawPicture(const BPicture* a_picture);
|
void DrawPicture(const BPicture* a_picture);
|
||||||
void DrawPicture(const BPicture* a_picture, BPoint where);
|
void DrawPicture(const BPicture* a_picture,
|
||||||
void DrawPicture(const char* filename, long offset, BPoint where);
|
BPoint where);
|
||||||
|
void DrawPicture(const char* filename, long offset,
|
||||||
|
BPoint where);
|
||||||
void DrawPictureAsync(const BPicture* a_picture);
|
void DrawPictureAsync(const BPicture* a_picture);
|
||||||
void DrawPictureAsync(const BPicture* a_picture, BPoint where);
|
void DrawPictureAsync(const BPicture* a_picture,
|
||||||
|
BPoint where);
|
||||||
void DrawPictureAsync(const char* filename, long offset,
|
void DrawPictureAsync(const char* filename, long offset,
|
||||||
BPoint where);
|
BPoint where);
|
||||||
|
|
||||||
status_t SetEventMask(uint32 mask, uint32 options=0);
|
status_t SetEventMask(uint32 mask, uint32 options = 0);
|
||||||
uint32 EventMask();
|
uint32 EventMask();
|
||||||
status_t SetMouseEventMask(uint32 mask, uint32 options=0);
|
status_t SetMouseEventMask(uint32 mask, uint32 options = 0);
|
||||||
|
|
||||||
virtual void SetFlags(uint32 flags);
|
virtual void SetFlags(uint32 flags);
|
||||||
uint32 Flags() const;
|
uint32 Flags() const;
|
||||||
@@ -491,11 +456,9 @@ public:
|
|||||||
|
|
||||||
BScrollBar* ScrollBar(orientation posture) const;
|
BScrollBar* ScrollBar(orientation posture) const;
|
||||||
|
|
||||||
virtual BHandler* ResolveSpecifier(BMessage* msg,
|
virtual BHandler* ResolveSpecifier(BMessage* msg, int32 index,
|
||||||
int32 index,
|
BMessage* specifier, int32 form,
|
||||||
BMessage* specifier,
|
const char* property);
|
||||||
int32 form,
|
|
||||||
const char* property);
|
|
||||||
virtual status_t GetSupportedSuites(BMessage* data);
|
virtual status_t GetSupportedSuites(BMessage* data);
|
||||||
|
|
||||||
bool IsPrinting() const;
|
bool IsPrinting() const;
|
||||||
@@ -595,10 +558,12 @@ private:
|
|||||||
int32 deltaHeight);
|
int32 deltaHeight);
|
||||||
|
|
||||||
void _ConvertToScreen(BPoint* pt, bool checkLock) const;
|
void _ConvertToScreen(BPoint* pt, bool checkLock) const;
|
||||||
void _ConvertFromScreen(BPoint* pt, bool checkLock) const;
|
void _ConvertFromScreen(BPoint* pt,
|
||||||
|
bool checkLock) const;
|
||||||
|
|
||||||
void _ConvertToParent(BPoint* pt, bool checkLock) const;
|
void _ConvertToParent(BPoint* pt, bool checkLock) const;
|
||||||
void _ConvertFromParent(BPoint* pt, bool checkLock) const;
|
void _ConvertFromParent(BPoint* pt,
|
||||||
|
bool checkLock) const;
|
||||||
|
|
||||||
|
|
||||||
void _Activate(bool state);
|
void _Activate(bool state);
|
||||||
@@ -670,8 +635,10 @@ inline void
|
|||||||
BView::SetViewColor(uchar r, uchar g, uchar b, uchar a)
|
BView::SetViewColor(uchar r, uchar g, uchar b, uchar a)
|
||||||
{
|
{
|
||||||
rgb_color color;
|
rgb_color color;
|
||||||
color.red = r; color.green = g;
|
color.red = r;
|
||||||
color.blue = b; color.alpha = a;
|
color.green = g;
|
||||||
|
color.blue = b;
|
||||||
|
color.alpha = a;
|
||||||
SetViewColor(color);
|
SetViewColor(color);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -679,8 +646,10 @@ inline void
|
|||||||
BView::SetHighColor(uchar r, uchar g, uchar b, uchar a)
|
BView::SetHighColor(uchar r, uchar g, uchar b, uchar a)
|
||||||
{
|
{
|
||||||
rgb_color color;
|
rgb_color color;
|
||||||
color.red = r; color.green = g;
|
color.red = r;
|
||||||
color.blue = b; color.alpha = a;
|
color.green = g;
|
||||||
|
color.blue = b;
|
||||||
|
color.alpha = a;
|
||||||
SetHighColor(color);
|
SetHighColor(color);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -688,8 +657,10 @@ inline void
|
|||||||
BView::SetLowColor(uchar r, uchar g, uchar b, uchar a)
|
BView::SetLowColor(uchar r, uchar g, uchar b, uchar a)
|
||||||
{
|
{
|
||||||
rgb_color color;
|
rgb_color color;
|
||||||
color.red = r; color.green = g;
|
color.red = r;
|
||||||
color.blue = b; color.alpha = a;
|
color.green = g;
|
||||||
|
color.blue = b;
|
||||||
|
color.alpha = a;
|
||||||
SetLowColor(color);
|
SetLowColor(color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+38
-40
@@ -2356,68 +2356,76 @@ BView::ConstrainClippingRegion(BRegion* region)
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
BView::DrawBitmapAsync(const BBitmap *bitmap, BRect srcRect, BRect dstRect)
|
BView::DrawBitmapAsync(const BBitmap* bitmap, BRect bitmapRect, BRect viewRect)
|
||||||
{
|
{
|
||||||
if (!bitmap || !srcRect.IsValid() || !dstRect.IsValid())
|
if (bitmap == NULL || fOwner == NULL
|
||||||
|
|| !bitmapRect.IsValid() || !viewRect.IsValid())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (fOwner) {
|
_CheckLockAndSwitchCurrent();
|
||||||
_CheckLockAndSwitchCurrent();
|
|
||||||
|
|
||||||
fOwner->fLink->StartMessage(AS_VIEW_DRAW_BITMAP);
|
fOwner->fLink->StartMessage(AS_VIEW_DRAW_BITMAP);
|
||||||
fOwner->fLink->Attach<int32>(bitmap->_ServerToken());
|
fOwner->fLink->Attach<int32>(bitmap->_ServerToken());
|
||||||
fOwner->fLink->Attach<BRect>(dstRect);
|
fOwner->fLink->Attach<BRect>(viewRect);
|
||||||
fOwner->fLink->Attach<BRect>(srcRect);
|
fOwner->fLink->Attach<BRect>(bitmapRect);
|
||||||
|
|
||||||
_FlushIfNotInTransaction();
|
_FlushIfNotInTransaction();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
BView::DrawBitmapAsync(const BBitmap *bitmap, BRect dstRect)
|
BView::DrawBitmapAsync(const BBitmap* bitmap, BRect viewRect)
|
||||||
{
|
{
|
||||||
DrawBitmapAsync(bitmap, bitmap->Bounds().OffsetToCopy(B_ORIGIN), dstRect);
|
DrawBitmapAsync(bitmap, bitmap->Bounds().OffsetToCopy(B_ORIGIN), viewRect);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
BView::DrawBitmapAsync(const BBitmap *bitmap)
|
BView::DrawBitmapAsync(const BBitmap* bitmap)
|
||||||
{
|
{
|
||||||
DrawBitmapAsync(bitmap, PenLocation());
|
DrawBitmapAsync(bitmap, PenLocation());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
BView::DrawBitmapAsync(const BBitmap *bitmap, BPoint where)
|
BView::DrawBitmapAsync(const BBitmap* bitmap, BPoint where)
|
||||||
{
|
{
|
||||||
if (bitmap == NULL)
|
if (bitmap == NULL || fOwner == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
_CheckLockAndSwitchCurrent();
|
||||||
|
|
||||||
|
BRect bitmapRect = bitmap->Bounds().OffsetToCopy(B_ORIGIN);
|
||||||
|
BRect viewRect = bitmapRect.OffsetToCopy(where);
|
||||||
|
|
||||||
|
fOwner->fLink->StartMessage(AS_VIEW_DRAW_BITMAP);
|
||||||
|
fOwner->fLink->Attach<int32>(bitmap->_ServerToken());
|
||||||
|
fOwner->fLink->Attach<BRect>(viewRect);
|
||||||
|
fOwner->fLink->Attach<BRect>(bitmapRect);
|
||||||
|
|
||||||
|
_FlushIfNotInTransaction();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
BView::DrawBitmap(const BBitmap* bitmap, BRect bitmapRect, BRect viewRect)
|
||||||
|
{
|
||||||
if (fOwner) {
|
if (fOwner) {
|
||||||
_CheckLockAndSwitchCurrent();
|
DrawBitmapAsync(bitmap, bitmapRect, viewRect);
|
||||||
|
Sync();
|
||||||
fOwner->fLink->StartMessage(AS_VIEW_DRAW_BITMAP);
|
|
||||||
fOwner->fLink->Attach<int32>(bitmap->_ServerToken());
|
|
||||||
BRect src = bitmap->Bounds().OffsetToCopy(B_ORIGIN);
|
|
||||||
BRect dst = src.OffsetToCopy(where);
|
|
||||||
fOwner->fLink->Attach<BRect>(dst);
|
|
||||||
fOwner->fLink->Attach<BRect>(src);
|
|
||||||
|
|
||||||
_FlushIfNotInTransaction();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
BView::DrawBitmap(const BBitmap *bitmap)
|
BView::DrawBitmap(const BBitmap* bitmap, BRect viewRect)
|
||||||
{
|
{
|
||||||
DrawBitmap(bitmap, PenLocation());
|
DrawBitmap(bitmap, bitmap->Bounds().OffsetToCopy(B_ORIGIN), viewRect);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
BView::DrawBitmap(const BBitmap *bitmap, BPoint where)
|
BView::DrawBitmap(const BBitmap* bitmap, BPoint where)
|
||||||
{
|
{
|
||||||
if (fOwner) {
|
if (fOwner) {
|
||||||
DrawBitmapAsync(bitmap, where);
|
DrawBitmapAsync(bitmap, where);
|
||||||
@@ -2427,19 +2435,9 @@ BView::DrawBitmap(const BBitmap *bitmap, BPoint where)
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
BView::DrawBitmap(const BBitmap *bitmap, BRect dstRect)
|
BView::DrawBitmap(const BBitmap* bitmap)
|
||||||
{
|
{
|
||||||
DrawBitmap(bitmap, bitmap->Bounds().OffsetToCopy(B_ORIGIN), dstRect);
|
DrawBitmap(bitmap, PenLocation());
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
BView::DrawBitmap(const BBitmap *bitmap, BRect srcRect, BRect dstRect)
|
|
||||||
{
|
|
||||||
if (fOwner) {
|
|
||||||
DrawBitmapAsync(bitmap, srcRect, dstRect);
|
|
||||||
Sync();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user