Style fixes to IK, focus on docs

This commit is contained in:
John Scipione
2014-06-13 17:27:01 -04:00
parent 4a2260f21a
commit 1f424632be
34 changed files with 1141 additions and 1117 deletions
+19 -19
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2001-2006, Haiku, Inc. All rights reserved.
* Copyright 2001-2014 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _ALERT_H
@@ -9,11 +9,6 @@
#include <Window.h>
class BBitmap;
class BButton;
class BInvoker;
class BTextView;
// enum for flavors of alert
enum alert_type {
B_EMPTY_ALERT = 0,
@@ -29,41 +24,46 @@ enum button_spacing {
};
class BBitmap;
class BButton;
class BInvoker;
class BTextView;
class BAlert : public BWindow {
public:
public:
BAlert(const char* title, const char* text,
const char* button1, const char* button2 = NULL,
const char* button3 = NULL,
button_width width = B_WIDTH_AS_USUAL,
alert_type type = B_INFO_ALERT);
BAlert(const char *title, const char *text,
const char *button1, const char *button2,
const char *button3, button_width width,
BAlert(const char* title, const char* text,
const char* button1, const char* button2,
const char* button3, button_width width,
button_spacing spacing,
alert_type type = B_INFO_ALERT);
virtual ~BAlert();
// Archiving
BAlert(BMessage *data);
static BArchivable *Instantiate(BMessage *data);
virtual status_t Archive(BMessage *data, bool deep = true) const;
BAlert(BMessage* data);
static BArchivable *Instantiate(BMessage* data);
virtual status_t Archive(BMessage* data, bool deep = true) const;
// BAlert guts
void SetShortcut(int32 button_index, char key);
char Shortcut(int32 button_index) const;
int32 Go();
status_t Go(BInvoker *invoker);
status_t Go(BInvoker* invoker);
virtual void MessageReceived(BMessage *an_event);
virtual void MessageReceived(BMessage* message);
virtual void FrameResized(float new_width, float new_height);
BButton* ButtonAt(int32 index) const;
BTextView* TextView() const;
virtual BHandler* ResolveSpecifier(BMessage* message, int32 index,
BMessage* specifier, int32 form,
BMessage* specifier, int32 what,
const char* property);
virtual status_t GetSupportedSuites(BMessage *data);
virtual status_t GetSupportedSuites(BMessage* data);
virtual void DispatchMessage(BMessage* message, BHandler* handler);
virtual void Quit();
@@ -71,9 +71,9 @@ class BAlert : public BWindow {
static BPoint AlertPosition(float width, float height);
virtual status_t Perform(perform_code d, void *arg);
virtual status_t Perform(perform_code d, void* arg);
private:
private:
friend class _BAlertFilter_;
virtual void _ReservedAlert1();
+2 -3
View File
@@ -66,9 +66,9 @@ public:
virtual void ResizeToPreferred();
virtual status_t Invoke(BMessage* message = NULL);
virtual void FrameMoved(BPoint newPosition);
virtual void FrameResized(float width, float height);
virtual void FrameResized(float newWidth, float newHeight);
virtual void MakeFocus(bool focused = true);
virtual void MakeFocus(bool focus = true);
virtual void AllAttached();
virtual void AllDetached();
@@ -78,7 +78,6 @@ public:
virtual status_t GetSupportedSuites(BMessage* message);
virtual status_t Perform(perform_code d, void* arg);
virtual BSize MinSize();
virtual BSize MaxSize();
virtual BSize PreferredSize();
+22 -20
View File
@@ -5,34 +5,36 @@
#ifndef _CHANNEL_CONTROL_H
#define _CHANNEL_CONTROL_H
//! BChannelControl is the base class for controls that have several
// independent values, with minima and maxima.
#include <Control.h>
#include <String.h>
class BChannelControl : public BControl {
public:
BChannelControl(BRect frame, const char* name,
const char* label, BMessage* model,
int32 channelCount = 1,
uint32 resizeFlags
uint32 resizingMode
= B_FOLLOW_LEFT | B_FOLLOW_TOP,
uint32 viewFlags = B_WILL_DRAW);
uint32 flags = B_WILL_DRAW);
BChannelControl(const char* name,
const char* label, BMessage* model,
int32 channelCount = 1,
uint32 viewFlags = B_WILL_DRAW);
uint32 flags = B_WILL_DRAW);
BChannelControl(BMessage* archive);
virtual ~BChannelControl();
virtual status_t Archive(BMessage* into, bool deep = true) const;
virtual status_t Archive(BMessage* data, bool deep = true) const;
virtual void Draw(BRect updateRect) = 0;
virtual void MouseDown(BPoint where) = 0;
virtual void KeyDown(const char* bytes, int32 size) = 0;
virtual void KeyDown(const char* bytes, int32 numBytes) = 0;
virtual void FrameResized(float width, float height);
virtual void FrameResized(float newWidth, float newHeight);
virtual void SetFont(const BFont* font,
uint32 mask = B_FONT_ALL);
@@ -45,14 +47,14 @@ public:
virtual void MessageReceived(BMessage* message);
virtual BHandler* ResolveSpecifier(BMessage* message, int32 index,
BMessage* specifier, int32 form,
BMessage* specifier, int32 what,
const char* property);
virtual status_t GetSupportedSuites(BMessage* data);
virtual void SetModificationMessage(BMessage* message);
BMessage* ModificationMessage() const;
virtual status_t Invoke(BMessage* withMessage = NULL);
virtual status_t Invoke(BMessage* message = NULL);
//! These methods are similar to Invoke() Invoke() and InvokeNotify(), but
// include additional information about all of the channels in the control.
@@ -112,18 +114,18 @@ private:
BChannelControl(const BChannelControl& other);
BChannelControl& operator=(const BChannelControl& other);
virtual void _Reserverd_ChannelControl_0(void *, ...);
virtual void _Reserverd_ChannelControl_1(void *, ...);
virtual void _Reserverd_ChannelControl_2(void *, ...);
virtual void _Reserverd_ChannelControl_3(void *, ...);
virtual void _Reserverd_ChannelControl_4(void *, ...);
virtual void _Reserverd_ChannelControl_5(void *, ...);
virtual void _Reserverd_ChannelControl_6(void *, ...);
virtual void _Reserverd_ChannelControl_7(void *, ...);
virtual void _Reserverd_ChannelControl_8(void *, ...);
virtual void _Reserverd_ChannelControl_9(void *, ...);
virtual void _Reserverd_ChannelControl_10(void *, ...);
virtual void _Reserverd_ChannelControl_11(void *, ...);
virtual void _Reserverd_ChannelControl_0(void*, ...);
virtual void _Reserverd_ChannelControl_1(void*, ...);
virtual void _Reserverd_ChannelControl_2(void*, ...);
virtual void _Reserverd_ChannelControl_3(void*, ...);
virtual void _Reserverd_ChannelControl_4(void*, ...);
virtual void _Reserverd_ChannelControl_5(void*, ...);
virtual void _Reserverd_ChannelControl_6(void*, ...);
virtual void _Reserverd_ChannelControl_7(void*, ...);
virtual void _Reserverd_ChannelControl_8(void*, ...);
virtual void _Reserverd_ChannelControl_9(void*, ...);
virtual void _Reserverd_ChannelControl_10(void*, ...);
virtual void _Reserverd_ChannelControl_11(void*, ...);
protected:
inline int32* const& MinLimitList() const;
+1 -1
View File
@@ -36,7 +36,7 @@ public:
virtual void AllDetached();
virtual void FrameMoved(BPoint newPosition);
virtual void FrameResized(float width, float height);
virtual void FrameResized(float newWidth, float newHeight);
virtual void WindowActivated(bool active);
virtual void MessageReceived(BMessage* message);
+4 -4
View File
@@ -29,11 +29,11 @@ public:
float cellSize, const char* name,
BMessage* message = NULL,
bool useOffscreen = false);
BColorControl(BMessage* archive);
BColorControl(BMessage* data);
virtual ~BColorControl();
static BArchivable* Instantiate(BMessage* archive);
virtual status_t Archive(BMessage* archive,
static BArchivable* Instantiate(BMessage* data);
virtual status_t Archive(BMessage* data,
bool deep = true) const;
virtual void SetLayout(BLayout* layout);
@@ -91,7 +91,7 @@ private:
void _InitData(color_control_layout layout,
float size, bool useOffscreen,
BMessage* archive = NULL);
BMessage* data = NULL);
void _LayoutView();
void _InitOffscreen();
void _InvalidateSelector(int16 ramp,
+1 -1
View File
@@ -45,7 +45,7 @@ public:
virtual void AllDetached();
virtual void MessageReceived(BMessage* message);
virtual void MakeFocus(bool focused = true);
virtual void MakeFocus(bool focus = true);
virtual void KeyDown(const char* bytes, int32 numBytes);
virtual void MouseDown(BPoint where);
+3 -3
View File
@@ -53,8 +53,8 @@ public:
virtual void AllDetached();
virtual void FrameResized(float newWidth, float newHeight);
virtual void FrameMoved(BPoint newPosition);
virtual void TargetedByScrollView(BScrollView* scroller);
virtual void WindowActivated(bool state);
virtual void TargetedByScrollView(BScrollView* view);
virtual void WindowActivated(bool active);
virtual void MessageReceived(BMessage* message);
virtual void KeyDown(const char* bytes, int32 numBytes);
@@ -142,7 +142,7 @@ public:
virtual BHandler* ResolveSpecifier(BMessage* message,
int32 index, BMessage* specifier,
int32 form, const char* property);
int32 what, const char* property);
virtual status_t GetSupportedSuites(BMessage* data);
virtual status_t Perform(perform_code code, void* arg);
+1 -1
View File
@@ -45,7 +45,7 @@ public:
virtual void KeyDown(const char* bytes, int32 numBytes);
virtual void MakeFocus(bool focused);
virtual void MessageReceived(BMessage* message);
virtual void WindowActivated(bool state);
virtual void WindowActivated(bool active);
virtual void MouseUp(BPoint where);
virtual void MouseMoved(BPoint where, uint32 transit,
const BMessage* dragMessage);
+7 -7
View File
@@ -41,11 +41,11 @@ public:
virtual void ResizeToPreferred();
virtual void GetPreferredSize(float* _width,
float* _height);
virtual void FrameMoved(BPoint position);
virtual void FrameResized(float width, float height);
virtual void FrameMoved(BPoint newPosition);
virtual void FrameResized(float newWidth, float newHeight);
virtual void WindowActivated(bool state);
virtual void MakeFocus(bool state = true);
virtual void WindowActivated(bool active);
virtual void MakeFocus(bool focus = true);
virtual void Draw(BRect updateRect);
@@ -53,8 +53,8 @@ public:
virtual void KeyDown(const char* bytes, int32 numBytes);
virtual void MouseDown(BPoint where);
virtual void MouseUp(BPoint where);
virtual void MouseMoved(BPoint where, uint32 transit,
const BMessage* message);
virtual void MouseMoved(BPoint where, uint32 code,
const BMessage* dragMessage);
virtual void SetEnabledOn(BPicture* picture);
virtual void SetEnabledOff(BPicture* picture);
@@ -74,7 +74,7 @@ public:
virtual BHandler* ResolveSpecifier(BMessage* message,
int32 index, BMessage* specifier,
int32 form, const char* property);
int32 what, const char* property);
virtual status_t GetSupportedSuites(BMessage* data);
virtual status_t Perform(perform_code code, void* data);
+2 -2
View File
@@ -46,13 +46,13 @@ public:
const BMessage* dragMessage);
virtual void DetachedFromWindow();
virtual void FrameMoved(BPoint newPosition);
virtual void FrameResized(float width, float height);
virtual void FrameResized(float newWidth, float newHeight);
virtual BHandler* ResolveSpecifier(BMessage* message,
int32 index, BMessage* specifier,
int32 what, const char* property);
virtual void MakeFocus(bool focused = true);
virtual void MakeFocus(bool focus = true);
virtual void AllAttached();
virtual void AllDetached();
virtual status_t GetSupportedSuites(BMessage* message);
+2 -2
View File
@@ -34,8 +34,8 @@ public:
BRegion& operator=(const BRegion& other);
bool operator==(const BRegion& other) const;
void Set(BRect newBounds);
void Set(clipping_rect newBounds);
void Set(BRect rect);
void Set(clipping_rect clipping);
BRect Frame() const;
clipping_rect FrameInt() const;
+33 -25
View File
@@ -33,11 +33,33 @@ public:
virtual status_t Archive(BMessage* archive,
bool deep = true) const;
virtual void AllAttached();
virtual void AllDetached();
virtual void AttachedToWindow();
virtual void DetachedFromWindow();
virtual void Draw(BRect updateRect);
virtual void FrameMoved(BPoint new_position);
virtual void FrameResized(float newWidth, float newHeight);
virtual void MessageReceived(BMessage* message);
virtual void MouseDown(BPoint where);
virtual void MouseUp(BPoint where);
virtual void MouseMoved(BPoint where, uint32 code,
const BMessage* dragMessage);
#if DISABLES_ON_WINDOW_DEACTIVATION
virtual void WindowActivated(bool active);
#endif
void SetValue(float value);
float Value() const;
void SetProportion(float);
float Proportion() const;
virtual void ValueChanged(float newValue);
void SetRange(float min, float max);
@@ -45,10 +67,12 @@ public:
void SetSteps(float smallStep, float largeStep);
void GetSteps(float* _smallStep,
float* _largeStep) const;
void SetTarget(BView *target);
void SetTarget(const char* targetName);
BView* Target() const;
void SetOrientation(orientation orientation);
void SetOrientation(orientation direction);
orientation Orientation() const;
// TODO: Make this a virtual method, it should be one,
@@ -56,39 +80,23 @@ public:
// to be used in case the BScrollBar should draw part of
// the focus indication of the target view for aesthetical
// reasons. BScrollView will forward this method.
status_t SetBorderHighlighted(bool state);
status_t SetBorderHighlighted(bool highlight);
virtual void MessageReceived(BMessage* message);
virtual void MouseDown(BPoint pt);
virtual void MouseUp(BPoint pt);
virtual void MouseMoved(BPoint pt, uint32 code,
const BMessage* dragMessage);
virtual void DetachedFromWindow();
virtual void Draw(BRect updateRect);
virtual void FrameMoved(BPoint new_position);
virtual void FrameResized(float newWidth, float newHeight);
virtual BHandler* ResolveSpecifier(BMessage* message,
int32 index, BMessage* specifier,
int32 form, const char* property);
virtual void ResizeToPreferred();
virtual void GetPreferredSize(float* _width,
float* _height);
virtual void MakeFocus(bool state = true);
virtual void AllAttached();
virtual void AllDetached();
virtual status_t GetSupportedSuites(BMessage* data);
virtual void ResizeToPreferred();
virtual void MakeFocus(bool focus = true);
virtual BSize MinSize();
virtual BSize MaxSize();
virtual BSize PreferredSize();
virtual status_t Perform(perform_code d, void* arg);
virtual status_t GetSupportedSuites(BMessage* message);
virtual BHandler* ResolveSpecifier(BMessage* message,
int32 index, BMessage* specifier,
int32 what, const char* property);
#if DISABLES_ON_WINDOW_DEACTIVATION
virtual void WindowActivated(bool active);
#endif
virtual status_t Perform(perform_code d, void* arg);
private:
class Private;
+33 -26
View File
@@ -1,6 +1,11 @@
/*
* Copyright 2004-2009, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT license.
* Copyright 2004-2009, Axel Dörfler, axeld@pinc-software.de.
* Copyright 2014 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Axel Dörfler, axeld@pinc-software.de
* John Scipione, jscpione@gmail.com
*/
#ifndef _SCROLL_VIEW_H
#define _SCROLL_VIEW_H
@@ -28,43 +33,45 @@ public:
virtual ~BScrollView();
static BArchivable* Instantiate(BMessage* archive);
virtual status_t Archive(BMessage* archive,
bool deep = true) const;
virtual status_t Archive(BMessage* archive, bool deep = true) const;
virtual void AttachedToWindow();
virtual void DetachedFromWindow();
// Hook methods
virtual void AllAttached();
virtual void AllDetached();
virtual void AttachedToWindow();
virtual void DetachedFromWindow();
virtual void Draw(BRect updateRect);
virtual void WindowActivated(bool active);
virtual void MakeFocus(bool state = true);
virtual void GetPreferredSize(float* _width,
float* _height);
virtual BSize MinSize();
virtual BSize MaxSize();
virtual BSize PreferredSize();
virtual void ResizeToPreferred();
virtual void FrameMoved(BPoint position);
virtual void FrameResized(float width, float height);
virtual void FrameMoved(BPoint newPosition);
virtual void FrameResized(float newWidth, float newHeight);
virtual void MessageReceived(BMessage* message);
virtual void MouseDown(BPoint point);
virtual void MouseUp(BPoint point);
virtual void MouseMoved(BPoint point, uint32 code,
virtual void MouseDown(BPoint where);
virtual void MouseMoved(BPoint where, uint32 code,
const BMessage* dragMessage);
virtual void MouseUp(BPoint where);
// BScrollView
virtual void WindowActivated(bool active);
// Size
virtual void GetPreferredSize(float* _width, float* _height);
virtual void ResizeToPreferred();
virtual void MakeFocus(bool focus = true);
virtual BSize MinSize();
virtual BSize MaxSize();
virtual BSize PreferredSize();
// BScrollBar
BScrollBar* ScrollBar(orientation posture) const;
virtual void SetBorder(border_style border);
border_style Border() const;
virtual status_t SetBorderHighlighted(bool state);
virtual status_t SetBorderHighlighted(bool highlight);
bool IsBorderHighlighted() const;
void SetTarget(BView* target);
@@ -73,8 +80,8 @@ public:
// Scripting
virtual BHandler* ResolveSpecifier(BMessage* message,
int32 index, BMessage* specifier,
int32 form, const char* property);
virtual status_t GetSupportedSuites(BMessage* data);
int32 what, const char* property);
virtual status_t GetSupportedSuites(BMessage* message);
virtual status_t Perform(perform_code d, void* arg);
+6 -6
View File
@@ -75,11 +75,11 @@ public:
virtual void MouseUp(BPoint where);
virtual void MouseMoved(BPoint where, uint32 code,
const BMessage* dragMessage);
virtual void WindowActivated(bool state);
virtual void WindowActivated(bool active);
virtual void KeyDown(const char* bytes, int32 numBytes);
virtual void Pulse();
virtual void FrameResized(float width, float height);
virtual void MakeFocus(bool focusState = true);
virtual void FrameResized(float newWidth, float newHeight);
virtual void MakeFocus(bool focus = true);
virtual void MessageReceived(BMessage* message);
virtual BHandler* ResolveSpecifier(BMessage* message,
@@ -114,7 +114,7 @@ public:
int32 CountLines() const;
int32 CurrentLine() const;
void GoToLine(int32 lineIndex);
void GoToLine(int32 lineNumber);
virtual void Cut(BClipboard* clipboard);
virtual void Copy(BClipboard* clipboard);
@@ -159,8 +159,8 @@ public:
virtual bool CanEndLine(int32 offset);
float LineWidth(int32 lineIndex = 0) const;
float LineHeight(int32 lineIndex = 0) const;
float LineWidth(int32 lineNumber = 0) const;
float LineHeight(int32 lineNumber = 0) const;
float TextHeight(int32 startLine,
int32 endLine) const;
+4 -4
View File
@@ -170,7 +170,7 @@ public:
virtual void MouseUp(BPoint where);
virtual void MouseMoved(BPoint where, uint32 code,
const BMessage* dragMessage);
virtual void WindowActivated(bool state);
virtual void WindowActivated(bool active);
virtual void KeyDown(const char* bytes, int32 numBytes);
virtual void KeyUp(const char* bytes, int32 numBytes);
virtual void Pulse();
@@ -285,7 +285,7 @@ public:
void SetFillRule(int32 rule);
int32 FillRule() const;
void SetOrigin(BPoint pt);
void SetOrigin(BPoint where);
void SetOrigin(float x, float y);
BPoint Origin() const;
@@ -522,7 +522,7 @@ public:
void ScrollBy(float dh, float dv);
void ScrollTo(float x, float y);
virtual void ScrollTo(BPoint where);
virtual void MakeFocus(bool focusState = true);
virtual void MakeFocus(bool focus = true);
bool IsFocus() const;
virtual void Show();
@@ -536,7 +536,7 @@ public:
virtual void GetPreferredSize(float* _width, float* _height);
virtual void ResizeToPreferred();
BScrollBar* ScrollBar(orientation posture) const;
BScrollBar* ScrollBar(orientation direction) const;
virtual BHandler* ResolveSpecifier(BMessage* message, int32 index,
BMessage* specifier, int32 form,
+1 -1
View File
@@ -149,7 +149,7 @@ public:
BView* CurrentFocus() const;
void Activate(bool = true);
virtual void WindowActivated(bool state);
virtual void WindowActivated(bool focus);
void ConvertToScreen(BPoint* point) const;
BPoint ConvertToScreen(BPoint point) const;
+14 -10
View File
@@ -1,13 +1,16 @@
/*
* Copyright 2001-2008, Haiku.
* Copyright 2001-2015 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Erik Jaesler (erik@cgsoftware.com)
* Axel Dörfler, axeld@pinc-software.de
* Erik Jaesler, erik@cgsoftware.com
* John Scipione, jscipione@gmail.com
*/
//! BAlert displays a modal alert window.
// BAlert displays a modal alert window.
#include <new>
#include <stdio.h>
@@ -304,13 +307,13 @@ BAlert::Go(BInvoker* invoker)
void
BAlert::MessageReceived(BMessage* msg)
BAlert::MessageReceived(BMessage* message)
{
if (msg->what != kAlertButtonMsg)
return BWindow::MessageReceived(msg);
if (message->what != kAlertButtonMsg)
return BWindow::MessageReceived(message);
int32 which;
if (msg->FindInt32("which", &which) == B_OK) {
if (message->FindInt32("which", &which) == B_OK) {
if (fAlertSem < B_OK) {
// Semaphore hasn't been created; we're running asynchronous
if (fInvoker) {
@@ -361,10 +364,11 @@ BAlert::TextView() const
BHandler*
BAlert::ResolveSpecifier(BMessage* msg, int32 index,
BMessage* specifier, int32 form, const char* property)
BAlert::ResolveSpecifier(BMessage* message, int32 index,
BMessage* specifier, int32 what, const char* property)
{
return BWindow::ResolveSpecifier(msg, index, specifier, form, property);
return BWindow::ResolveSpecifier(message, index, specifier, what,
property);
}
+4 -4
View File
@@ -469,16 +469,16 @@ BButton::FrameMoved(BPoint newPosition)
void
BButton::FrameResized(float width, float height)
BButton::FrameResized(float newWidth, float newHeight)
{
BControl::FrameResized(width, height);
BControl::FrameResized(newWidth, newHeight);
}
void
BButton::MakeFocus(bool focused)
BButton::MakeFocus(bool focus)
{
BControl::MakeFocus(focused);
BControl::MakeFocus(focus);
}
+120 -96
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2005-2009, Haiku Inc. All Rights Reserved.
* Copyright 2005-2014 Haiku Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
@@ -34,9 +34,11 @@ sPropertyInfo[] = {
};
BChannelControl::BChannelControl(BRect frame, const char *name, const char *label,
BMessage *model, int32 channel_count, uint32 resizeMode, uint32 flags)
: BControl(frame, name, label, model, resizeMode, flags),
BChannelControl::BChannelControl(BRect frame, const char* name,
const char* label, BMessage* model, int32 channel_count,
uint32 resizingMode, uint32 flags)
:
BControl(frame, name, label, model, resizingMode, flags),
fChannelCount(channel_count),
fCurrentChannel(0),
fChannelMin(NULL),
@@ -57,10 +59,11 @@ BChannelControl::BChannelControl(BRect frame, const char *name, const char *labe
}
BChannelControl::BChannelControl(const char *name, const char *label,
BMessage *model, int32 channel_count, uint32 flags)
: BControl(name, label, model, flags),
fChannelCount(channel_count),
BChannelControl::BChannelControl(const char* name, const char* label,
BMessage* model, int32 channelCount, uint32 flags)
:
BControl(name, label, model, flags),
fChannelCount(channelCount),
fCurrentChannel(0),
fChannelMin(NULL),
fChannelMax(NULL),
@@ -68,20 +71,21 @@ BChannelControl::BChannelControl(const char *name, const char *label,
fMultiLabels(NULL),
fModificationMsg(NULL)
{
fChannelMin = new int32[channel_count];
memset(fChannelMin, 0, sizeof(int32) * channel_count);
fChannelMin = new int32[channelCount];
memset(fChannelMin, 0, sizeof(int32) * channelCount);
fChannelMax = new int32[channel_count];
for (int32 i = 0; i < channel_count; i++)
fChannelMax = new int32[channelCount];
for (int32 i = 0; i < channelCount; i++)
fChannelMax[i] = 100;
fChannelValues = new int32[channel_count];
memset(fChannelValues, 0, sizeof(int32) * channel_count);
fChannelValues = new int32[channelCount];
memset(fChannelValues, 0, sizeof(int32) * channelCount);
}
BChannelControl::BChannelControl(BMessage *archive)
: BControl(archive),
BChannelControl::BChannelControl(BMessage* archive)
:
BControl(archive),
fChannelCount(0),
fCurrentChannel(0),
fChannelMin(NULL),
@@ -111,18 +115,18 @@ BChannelControl::BChannelControl(BMessage *archive)
}
}
const char *label = NULL;
const char* label = NULL;
if (archive->FindString("be:_m_min_label", &label) == B_OK)
fMinLabel = label;
if (archive->FindString("be:_m_max_label", &label) == B_OK)
fMaxLabel = label;
BMessage *modificationMessage = new BMessage;
BMessage* modificationMessage = new BMessage;
if (archive->FindMessage("_mod_msg", modificationMessage) == B_OK)
fModificationMsg = modificationMessage;
else
delete modificationMessage;
}
@@ -136,28 +140,33 @@ BChannelControl::~BChannelControl()
status_t
BChannelControl::Archive(BMessage *message, bool deep) const
BChannelControl::Archive(BMessage* data, bool deep) const
{
status_t status = BControl::Archive(message, deep);
status_t status = BControl::Archive(data, deep);
if (status == B_OK)
status = message->AddInt32("be:_m_channel_count", fChannelCount);
status = data->AddInt32("be:_m_channel_count", fChannelCount);
if (status == B_OK)
status = message->AddInt32("be:_m_value_channel", fCurrentChannel);
status = data->AddInt32("be:_m_value_channel", fCurrentChannel);
if (status == B_OK)
status = message->AddString("be:_m_min_label", fMinLabel.String());
status = data->AddString("be:_m_min_label", fMinLabel.String());
if (status == B_OK)
status = message->AddString("be:_m_max_label", fMaxLabel.String());
status = data->AddString("be:_m_max_label", fMaxLabel.String());
if (status == B_OK && fChannelValues != NULL
&& fChannelMax != NULL && fChannelMin != NULL) {
for (int32 i = 0; i < fChannelCount; i++) {
status = message->AddInt32("be:_m_channel_min", fChannelMin[i]);
status = data->AddInt32("be:_m_channel_min", fChannelMin[i]);
if (status < B_OK)
break;
status = message->AddInt32("be:_m_channel_max", fChannelMax[i]);
status = data->AddInt32("be:_m_channel_max", fChannelMax[i]);
if (status < B_OK)
break;
status = message->AddInt32("be:_m_channel_val", fChannelValues[i]);
status = data->AddInt32("be:_m_channel_val", fChannelValues[i]);
if (status < B_OK)
break;
}
@@ -168,14 +177,14 @@ BChannelControl::Archive(BMessage *message, bool deep) const
void
BChannelControl::FrameResized(float width, float height)
BChannelControl::FrameResized(float newWidth, float newHeight)
{
BView::FrameResized(width, height);
BView::FrameResized(newWidth, newHeight);
}
void
BChannelControl::SetFont(const BFont *font, uint32 mask)
BChannelControl::SetFont(const BFont* font, uint32 mask)
{
BView::SetFont(font, mask);
}
@@ -203,27 +212,30 @@ BChannelControl::ResizeToPreferred()
void
BChannelControl::MessageReceived(BMessage *message)
BChannelControl::MessageReceived(BMessage* message)
{
BControl::MessageReceived(message);
}
BHandler *
BChannelControl::ResolveSpecifier(BMessage *msg, int32 index, BMessage *specifier,
int32 form, const char *property)
BHandler*
BChannelControl::ResolveSpecifier(BMessage* message, int32 index,
BMessage* specifier, int32 what, const char* property)
{
BHandler *target = this;
BHandler* target = this;
BPropertyInfo propertyInfo(sPropertyInfo);
if (propertyInfo.FindMatch(msg, index, specifier, form, property) < B_OK)
target = BControl::ResolveSpecifier(msg, index, specifier, form, property);
if (propertyInfo.FindMatch(message, index, specifier, what, property)
< B_OK) {
target = BControl::ResolveSpecifier(message, index, specifier,
what, property);
}
return target;
}
status_t
BChannelControl::GetSupportedSuites(BMessage *data)
BChannelControl::GetSupportedSuites(BMessage* data)
{
if (data == NULL)
return B_BAD_VALUE;
@@ -236,19 +248,20 @@ BChannelControl::GetSupportedSuites(BMessage *data)
if (err == B_OK)
return BControl::GetSupportedSuites(data);
return err;
}
void
BChannelControl::SetModificationMessage(BMessage *message)
BChannelControl::SetModificationMessage(BMessage* message)
{
delete fModificationMsg;
fModificationMsg = message;
}
BMessage *
BMessage*
BChannelControl::ModificationMessage() const
{
return fModificationMsg;
@@ -256,13 +269,13 @@ BChannelControl::ModificationMessage() const
status_t
BChannelControl::Invoke(BMessage *msg)
BChannelControl::Invoke(BMessage* message)
{
bool notify = false;
BMessage invokeMessage(InvokeKind(&notify));
if (msg != NULL)
invokeMessage = *msg;
if (message != NULL)
invokeMessage = *message;
else if (Message() != NULL)
invokeMessage = *Message();
@@ -273,25 +286,25 @@ BChannelControl::Invoke(BMessage *msg)
status_t
BChannelControl::InvokeChannel(BMessage *msg, int32 fromChannel,
int32 channelCount, const bool *inMask)
BChannelControl::InvokeChannel(BMessage* message, int32 fromChannel,
int32 channelCount, const bool* _mask)
{
bool notify = false;
BMessage invokeMessage(InvokeKind(&notify));
if (msg != NULL)
invokeMessage = *msg;
if (message != NULL)
invokeMessage = *message;
else if (Message() != NULL)
invokeMessage = *Message();
invokeMessage.AddInt32("be:current_channel", fCurrentChannel);
if (channelCount < 0)
channelCount = fChannelCount - fromChannel;
for (int32 i = 0; i < channelCount; i++) {
invokeMessage.AddInt32("be:channel_value", fChannelValues[fromChannel + i]);
invokeMessage.AddBool("be:channel_changed", inMask ? inMask[i] : true);
invokeMessage.AddInt32("be:channel_value",
fChannelValues[fromChannel + i]);
invokeMessage.AddBool("be:channel_changed", _mask ? _mask[i] : true);
}
return BControl::Invoke(&invokeMessage);
@@ -299,11 +312,11 @@ BChannelControl::InvokeChannel(BMessage *msg, int32 fromChannel,
status_t
BChannelControl::InvokeNotifyChannel(BMessage *msg, uint32 kind,
int32 fromChannel, int32 channelCount, const bool *inMask)
BChannelControl::InvokeNotifyChannel(BMessage* message, uint32 kind,
int32 fromChannel, int32 channelCount, const bool* _mask)
{
BeginInvokeNotify(kind);
status_t status = InvokeChannel(msg, fromChannel, channelCount, inMask);
status_t status = InvokeChannel(message, fromChannel, channelCount, _mask);
EndInvokeNotify();
return status;
@@ -364,9 +377,9 @@ BChannelControl::SetChannelCount(int32 channel_count)
// TODO: Currently we only grow the buffer. Test what BeOS does
if (channel_count > fChannelCount) {
int32 *newMin = new int32[channel_count];
int32 *newMax = new int32[channel_count];
int32 *newVal = new int32[channel_count];
int32* newMin = new int32[channel_count];
int32* newMax = new int32[channel_count];
int32* newVal = new int32[channel_count];
memcpy(newMin, fChannelMin, fChannelCount);
memcpy(newMax, fChannelMax, fChannelCount);
@@ -399,7 +412,7 @@ BChannelControl::ValueFor(int32 channel) const
int32
BChannelControl::GetValue(int32 *outValues, int32 fromChannel,
BChannelControl::GetValue(int32* outValues, int32 fromChannel,
int32 channelCount) const
{
int32 i = 0;
@@ -419,16 +432,16 @@ BChannelControl::SetValueFor(int32 channel, int32 value)
status_t
BChannelControl::SetValue(int32 fromChannel, int32 channelCount,
const int32 *inValues)
const int32* values)
{
return StuffValues(fromChannel, channelCount, inValues);
return StuffValues(fromChannel, channelCount, values);
}
status_t
BChannelControl::SetAllValue(int32 values)
{
int32 *newValues = new int32[fChannelCount];
int32* newValues = new int32[fChannelCount];
for (int32 i = 0; i < fChannelCount; i++) {
int32 limitedValue = max_c(values, MinLimitList()[i]);
limitedValue = min_c(limitedValue, MaxLimitList()[i]);
@@ -452,7 +465,8 @@ BChannelControl::SetLimitsFor(int32 channel, int32 minimum, int32 maximum)
status_t
BChannelControl::GetLimitsFor(int32 channel, int32 *minimum, int32 *maximum) const
BChannelControl::GetLimitsFor(int32 channel, int32* minimum,
int32* maximum) const
{
return GetLimitsFor(channel, 1, minimum, maximum);
}
@@ -460,13 +474,15 @@ BChannelControl::GetLimitsFor(int32 channel, int32 *minimum, int32 *maximum) con
status_t
BChannelControl::SetLimitsFor(int32 fromChannel, int32 channelCount,
const int32 *minimum, const int32 *maximum)
const int32* minimum, const int32* maximum)
{
if (fromChannel + channelCount > CountChannels())
channelCount = CountChannels() - fromChannel;
for (int i=0; i<channelCount; i++) {
for (int i = 0; i < channelCount; i++) {
if (minimum[i] > maximum[i])
return B_BAD_VALUE;
fChannelMin[fromChannel + i] = minimum[i];
fChannelMax[fromChannel + i] = maximum[i];
if (fChannelValues[fromChannel + i] < minimum[i])
@@ -474,13 +490,14 @@ BChannelControl::SetLimitsFor(int32 fromChannel, int32 channelCount,
else if (fChannelValues[fromChannel + i] > maximum[i])
fChannelValues[fromChannel + i] = maximum[i];
}
return B_OK;
}
status_t
BChannelControl::GetLimitsFor(int32 fromChannel, int32 channelCount,
int32 *minimum, int32 *maximum) const
int32* minimum, int32* maximum) const
{
if (minimum == NULL || maximum == NULL)
return B_BAD_VALUE;
@@ -489,7 +506,8 @@ BChannelControl::GetLimitsFor(int32 fromChannel, int32 channelCount,
return B_ERROR;
if (fromChannel + channelCount > CountChannels())
channelCount = CountChannels() - fromChannel;
for (int i=0; i<channelCount; i++) {
for (int i = 0; i < channelCount; i++) {
minimum[i] = fChannelMin[fromChannel + i];
maximum[i] = fChannelMax[fromChannel + i];
}
@@ -520,7 +538,7 @@ BChannelControl::SetLimits(int32 minimum, int32 maximum)
status_t
BChannelControl::GetLimits(int32 *outMinimum, int32 *outMaximum) const
BChannelControl::GetLimits(int32* outMinimum, int32* outMaximum) const
{
if (outMinimum == NULL || outMaximum == NULL)
return B_BAD_VALUE;
@@ -539,7 +557,7 @@ BChannelControl::GetLimits(int32 *outMinimum, int32 *outMaximum) const
status_t
BChannelControl::SetLimitLabels(const char *minLabel, const char *maxLabel)
BChannelControl::SetLimitLabels(const char* minLabel, const char* maxLabel)
{
if (minLabel != fMinLabel)
fMinLabel = minLabel;
@@ -553,14 +571,14 @@ BChannelControl::SetLimitLabels(const char *minLabel, const char *maxLabel)
}
const char *
const char*
BChannelControl::MinLimitLabel() const
{
return fMinLabel.String();
}
const char *
const char*
BChannelControl::MaxLimitLabel() const
{
return fMaxLabel.String();
@@ -568,27 +586,29 @@ BChannelControl::MaxLimitLabel() const
status_t
BChannelControl::SetLimitLabelsFor(int32 channel, const char *minLabel, const char *maxLabel)
BChannelControl::SetLimitLabelsFor(int32 channel, const char* minLabel,
const char* maxLabel)
{
return B_ERROR;
}
status_t
BChannelControl::SetLimitLabelsFor(int32 from_channel, int32 channel_count, const char *minLabel, const char *maxLabel)
BChannelControl::SetLimitLabelsFor(int32 fromChannel, int32 channelCount,
const char* minLabel, const char* maxLabel)
{
return B_ERROR;
}
const char *
const char*
BChannelControl::MinLimitLabelFor(int32 channel) const
{
return NULL;
}
const char *
const char*
BChannelControl::MaxLimitLabelFor(int32 channel) const
{
return NULL;
@@ -597,38 +617,42 @@ BChannelControl::MaxLimitLabelFor(int32 channel) const
status_t
BChannelControl::StuffValues(int32 fromChannel, int32 channelCount,
const int32 *inValues)
const int32* values)
{
if (inValues == NULL)
if (values == NULL)
return B_BAD_VALUE;
if (fromChannel < 0 || fromChannel > fChannelCount
|| fromChannel + channelCount > fChannelCount)
|| fromChannel + channelCount > fChannelCount) {
return B_BAD_INDEX;
for (int32 i = 0; i < channelCount; i++) {
if (inValues[i] <= fChannelMax[fromChannel + i]
&& inValues[i] >= fChannelMin[fromChannel + i])
fChannelValues[fromChannel + i] = inValues[i];
}
// If the current channel was updated, update also the control value
if (fCurrentChannel >= fromChannel && fCurrentChannel <= fromChannel + channelCount)
for (int32 i = 0; i < channelCount; i++) {
if (values[i] <= fChannelMax[fromChannel + i]
&& values[i] >= fChannelMin[fromChannel + i]) {
fChannelValues[fromChannel + i] = values[i];
}
}
// if the current channel was updated, update also the control value
if (fCurrentChannel >= fromChannel
&& fCurrentChannel <= fromChannel + channelCount) {
BControl::SetValue(fChannelValues[fCurrentChannel]);
}
return B_OK;
}
void BChannelControl::_Reserverd_ChannelControl_0(void *, ...) {}
void BChannelControl::_Reserverd_ChannelControl_1(void *, ...) {}
void BChannelControl::_Reserverd_ChannelControl_2(void *, ...) {}
void BChannelControl::_Reserverd_ChannelControl_3(void *, ...) {}
void BChannelControl::_Reserverd_ChannelControl_4(void *, ...) {}
void BChannelControl::_Reserverd_ChannelControl_5(void *, ...) {}
void BChannelControl::_Reserverd_ChannelControl_6(void *, ...) {}
void BChannelControl::_Reserverd_ChannelControl_7(void *, ...) {}
void BChannelControl::_Reserverd_ChannelControl_8(void *, ...) {}
void BChannelControl::_Reserverd_ChannelControl_9(void *, ...) {}
void BChannelControl::_Reserverd_ChannelControl_10(void *, ...) {}
void BChannelControl::_Reserverd_ChannelControl_11(void *, ...) {}
void BChannelControl::_Reserverd_ChannelControl_0(void*, ...) {}
void BChannelControl::_Reserverd_ChannelControl_1(void*, ...) {}
void BChannelControl::_Reserverd_ChannelControl_2(void*, ...) {}
void BChannelControl::_Reserverd_ChannelControl_3(void*, ...) {}
void BChannelControl::_Reserverd_ChannelControl_4(void*, ...) {}
void BChannelControl::_Reserverd_ChannelControl_5(void*, ...) {}
void BChannelControl::_Reserverd_ChannelControl_6(void*, ...) {}
void BChannelControl::_Reserverd_ChannelControl_7(void*, ...) {}
void BChannelControl::_Reserverd_ChannelControl_8(void*, ...) {}
void BChannelControl::_Reserverd_ChannelControl_9(void*, ...) {}
void BChannelControl::_Reserverd_ChannelControl_10(void*, ...) {}
void BChannelControl::_Reserverd_ChannelControl_11(void*, ...) {}
+2 -2
View File
@@ -161,9 +161,9 @@ BCheckBox::FrameMoved(BPoint newPosition)
void
BCheckBox::FrameResized(float width, float height)
BCheckBox::FrameResized(float newWidth, float newHeight)
{
BControl::FrameResized(width, height);
BControl::FrameResized(newWidth, newHeight);
}
+23 -21
View File
@@ -56,19 +56,19 @@ BColorControl::BColorControl(BPoint leftTop, color_control_layout layout,
}
BColorControl::BColorControl(BMessage* archive)
BColorControl::BColorControl(BMessage* data)
:
BControl(archive)
BControl(data)
{
int32 layout;
float cellSize;
bool useOffscreen;
archive->FindInt32("_layout", &layout);
archive->FindFloat("_csize", &cellSize);
archive->FindBool("_use_off", &useOffscreen);
data->FindInt32("_layout", &layout);
data->FindFloat("_csize", &cellSize);
data->FindBool("_use_off", &useOffscreen);
_InitData((color_control_layout)layout, cellSize, useOffscreen, archive);
_InitData((color_control_layout)layout, cellSize, useOffscreen, data);
}
@@ -80,7 +80,7 @@ BColorControl::~BColorControl()
void
BColorControl::_InitData(color_control_layout layout, float size,
bool useOffscreen, BMessage* archive)
bool useOffscreen, BMessage* data)
{
fPaletteMode = BScreen(B_MAIN_SCREEN_ID).ColorSpace() == B_CMAP8;
//TODO: we don't support workspace and colorspace changing for now
@@ -102,13 +102,13 @@ BColorControl::_InitData(color_control_layout layout, float size,
green = gSystemCatalog.GetString(green, "ColorControl");
blue = gSystemCatalog.GetString(blue, "ColorControl");
if (archive != NULL) {
if (data != NULL) {
fRedText = (BTextControl*)FindView("_red");
fGreenText = (BTextControl*)FindView("_green");
fBlueText = (BTextControl*)FindView("_blue");
int32 value = 0;
archive->FindInt32("_val", &value);
data->FindInt32("_val", &value);
SetValue(value);
} else {
@@ -219,26 +219,28 @@ BColorControl::_LayoutView()
BArchivable*
BColorControl::Instantiate(BMessage* archive)
BColorControl::Instantiate(BMessage* data)
{
if (validate_instantiation(archive, "BColorControl"))
return new BColorControl(archive);
if (validate_instantiation(data, "BColorControl"))
return new BColorControl(data);
return NULL;
}
status_t
BColorControl::Archive(BMessage* archive, bool deep) const
BColorControl::Archive(BMessage* data, bool deep) const
{
status_t status = BControl::Archive(archive, deep);
status_t status = BControl::Archive(data, deep);
if (status == B_OK)
status = archive->AddInt32("_layout", Layout());
status = data->AddInt32("_layout", Layout());
if (status == B_OK)
status = archive->AddFloat("_csize", fCellSize);
status = data->AddFloat("_csize", fCellSize);
if (status == B_OK)
status = archive->AddBool("_use_off", fOffscreenView != NULL);
status = data->AddBool("_use_off", fOffscreenView != NULL);
return status;
}
@@ -985,16 +987,16 @@ BColorControl::Invoke(BMessage* message)
void
BColorControl::FrameMoved(BPoint new_position)
BColorControl::FrameMoved(BPoint newPosition)
{
BControl::FrameMoved(new_position);
BControl::FrameMoved(newPosition);
}
void
BColorControl::FrameResized(float new_width, float new_height)
BColorControl::FrameResized(float newWidth, float newHeight)
{
BControl::FrameResized(new_width, new_height);
BControl::FrameResized(newWidth, newHeight);
}
+4 -4
View File
@@ -258,14 +258,14 @@ BControl::MessageReceived(BMessage* message)
void
BControl::MakeFocus(bool focused)
BControl::MakeFocus(bool focus)
{
if (focused == IsFocus())
if (focus == IsFocus())
return;
BView::MakeFocus(focused);
BView::MakeFocus(focus);
if (Window()) {
if (Window() != NULL) {
fFocusChanging = true;
Invalidate(Bounds());
Flush();
+16 -16
View File
@@ -160,22 +160,22 @@ BListView::Instantiate(BMessage* archive)
status_t
BListView::Archive(BMessage* archive, bool deep) const
BListView::Archive(BMessage* data, bool deep) const
{
status_t status = BView::Archive(archive, deep);
status_t status = BView::Archive(data, deep);
if (status < B_OK)
return status;
status = archive->AddInt32("_lv_type", fListType);
status = data->AddInt32("_lv_type", fListType);
if (status == B_OK && deep) {
BListItem* item;
int32 i = 0;
while ((item = ItemAt(i++))) {
while ((item = ItemAt(i++)) != NULL) {
BMessage subData;
status = item->Archive(&subData, true);
if (status >= B_OK)
status = archive->AddMessage("_l_items", &subData);
status = data->AddMessage("_l_items", &subData);
if (status < B_OK)
break;
@@ -183,10 +183,10 @@ BListView::Archive(BMessage* archive, bool deep) const
}
if (status >= B_OK && InvocationMessage() != NULL)
status = archive->AddMessage("_msg", InvocationMessage());
status = data->AddMessage("_msg", InvocationMessage());
if (status == B_OK && fSelectMessage != NULL)
status = archive->AddMessage("_2nd_msg", fSelectMessage);
status = data->AddMessage("_2nd_msg", fSelectMessage);
return status;
}
@@ -250,21 +250,21 @@ BListView::AllDetached()
void
BListView::FrameResized(float width, float height)
BListView::FrameResized(float newWidth, float newHeight)
{
_FixupScrollBar();
}
void
BListView::FrameMoved(BPoint new_position)
BListView::FrameMoved(BPoint newPosition)
{
BView::FrameMoved(new_position);
BView::FrameMoved(newPosition);
}
void
BListView::TargetedByScrollView(BScrollView *view)
BListView::TargetedByScrollView(BScrollView* view)
{
fScrollView = view;
// TODO: We could SetFlags(Flags() | B_FRAME_EVENTS) here, but that
@@ -274,9 +274,9 @@ BListView::TargetedByScrollView(BScrollView *view)
void
BListView::WindowActivated(bool state)
BListView::WindowActivated(bool active)
{
BView::WindowActivated(state);
BView::WindowActivated(active);
}
@@ -1306,12 +1306,12 @@ BListView::ItemFrame(int32 index)
BHandler*
BListView::ResolveSpecifier(BMessage* message, int32 index,
BMessage* specifier, int32 form, const char* property)
BMessage* specifier, int32 what, const char* property)
{
BPropertyInfo propInfo(sProperties);
if (propInfo.FindMatch(message, 0, specifier, form, property) < 0) {
return BView::ResolveSpecifier(message, index, specifier, form,
if (propInfo.FindMatch(message, 0, specifier, what, property) < 0) {
return BView::ResolveSpecifier(message, index, specifier, what,
property);
}
+4 -4
View File
@@ -531,9 +531,9 @@ BMenuField::MessageReceived(BMessage* message)
void
BMenuField::WindowActivated(bool state)
BMenuField::WindowActivated(bool active)
{
BView::WindowActivated(state);
BView::WindowActivated(active);
if (IsFocus())
Invalidate();
@@ -548,9 +548,9 @@ BMenuField::MouseMoved(BPoint point, uint32 code, const BMessage* message)
void
BMenuField::MouseUp(BPoint point)
BMenuField::MouseUp(BPoint where)
{
BView::MouseUp(point);
BView::MouseUp(where);
}
+3 -2
View File
@@ -505,10 +505,11 @@ BOutlineListView::IsExpanded(int32 fullListIndex)
BHandler*
BOutlineListView::ResolveSpecifier(BMessage* msg, int32 index,
BOutlineListView::ResolveSpecifier(BMessage* message, int32 index,
BMessage* specifier, int32 what, const char* property)
{
return BListView::ResolveSpecifier(msg, index, specifier, what, property);
return BListView::ResolveSpecifier(message, index, specifier, what,
property);
}
+12 -11
View File
@@ -175,16 +175,16 @@ BPictureButton::FrameResized(float newWidth, float newHeight)
void
BPictureButton::WindowActivated(bool state)
BPictureButton::WindowActivated(bool active)
{
BControl::WindowActivated(state);
BControl::WindowActivated(active);
}
void
BPictureButton::MakeFocus(bool state)
BPictureButton::MakeFocus(bool focus)
{
BControl::MakeFocus(state);
BControl::MakeFocus(focus);
}
@@ -291,16 +291,16 @@ BPictureButton::MouseUp(BPoint where)
void
BPictureButton::MouseMoved(BPoint where, uint32 transit,
const BMessage* message)
BPictureButton::MouseMoved(BPoint where, uint32 code,
const BMessage* dragMessage)
{
if (IsEnabled() && IsTracking()) {
if (transit == B_EXITED_VIEW)
if (code == B_EXITED_VIEW)
SetValue(B_CONTROL_OFF);
else if (transit == B_ENTERED_VIEW)
else if (code == B_ENTERED_VIEW)
SetValue(B_CONTROL_ON);
} else
BControl::MouseMoved(where, transit, message);
BControl::MouseMoved(where, code, dragMessage);
}
@@ -397,9 +397,10 @@ BPictureButton::Invoke(BMessage* message)
BHandler*
BPictureButton::ResolveSpecifier(BMessage* message, int32 index,
BMessage* specifier, int32 form, const char* property)
BMessage* specifier, int32 what, const char* property)
{
return BControl::ResolveSpecifier(message, index, specifier, form, property);
return BControl::ResolveSpecifier(message, index, specifier,
what, property);
}
+4 -4
View File
@@ -351,10 +351,10 @@ BRadioButton::FrameMoved(BPoint newPosition)
void
BRadioButton::FrameResized(float width, float height)
BRadioButton::FrameResized(float newWidth, float newHeight)
{
Invalidate();
BControl::FrameResized(width, height);
BControl::FrameResized(newWidth, newHeight);
}
@@ -368,9 +368,9 @@ BRadioButton::ResolveSpecifier(BMessage* message, int32 index,
void
BRadioButton::MakeFocus(bool focused)
BRadioButton::MakeFocus(bool focus)
{
BControl::MakeFocus(focused);
BControl::MakeFocus(focus);
}
+20 -9
View File
@@ -117,24 +117,24 @@ BRegion::operator==(const BRegion& other) const
// Set the region to contain just the given BRect.
void
BRegion::Set(BRect newBounds)
BRegion::Set(BRect rect)
{
Set(_Convert(newBounds));
Set(_Convert(rect));
}
//Set the region to contain just the given clipping_rect.
void
BRegion::Set(clipping_rect newBounds)
BRegion::Set(clipping_rect clipping)
{
_SetSize(1);
if (valid_rect(newBounds) && fData) {
if (valid_rect(clipping) && fData != NULL) {
fCount = 1;
// cheap convert to internal rect format
newBounds.right++;
newBounds.bottom++;
fData[0] = fBounds = newBounds;
clipping.right++;
clipping.bottom++;
fData[0] = fBounds = clipping;
} else
MakeEmpty();
}
@@ -425,7 +425,12 @@ BRegion::ExclusiveInclude(const BRegion* region)
// #pragma mark - BRegion private methods
// Takes over the data of a region and marks that region empty.
/*!
\fn void BRegion::_AdoptRegionData(BRegion& region)
\brief Takes over the data of \a region and empties it.
\param region The \a region to adopt data from.
*/
void
BRegion::_AdoptRegionData(BRegion& region)
{
@@ -447,7 +452,13 @@ BRegion::_AdoptRegionData(BRegion& region)
}
// Reallocate the memory in the region.
/*!
\fn bool BRegion::_SetSize(int32 newSize)
\brief Reallocate the memory in the region.
\param newSize The amount of rectangles that the region should be
able to hold.
*/
bool
BRegion::_SetSize(int32 newSize)
{
File diff suppressed because it is too large Load Diff
+172 -184
View File
@@ -1,6 +1,13 @@
/*
* Copyright 2004-2009, Axel Dörfler, axeld@pinc-software.de.
* Copyright 2009 Stephan Aßmus, superstippi@gmx.de.
* Copyright 2014 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus, superstippi@gmx.de
* Axel Dörfler, axeld@pinc-software.de
* John Scipione, jscpione@gmail.com
*/
@@ -14,13 +21,15 @@
#include <binary_compatibility/Interface.h>
static const float kFancyBorderSize = 2;
static const float kPlainBorderSize = 1;
BScrollView::BScrollView(const char *name, BView *target, uint32 resizingMode,
BScrollView::BScrollView(const char* name, BView* target, uint32 resizingMode,
uint32 flags, bool horizontal, bool vertical, border_style border)
: BView(_ComputeFrame(target, horizontal, vertical, border), name,
:
BView(_ComputeFrame(target, horizontal, vertical, border), name,
resizingMode, _ModifyFlags(flags, border)),
fTarget(target),
fBorder(border)
@@ -31,7 +40,8 @@ BScrollView::BScrollView(const char *name, BView *target, uint32 resizingMode,
BScrollView::BScrollView(const char* name, BView* target, uint32 flags,
bool horizontal, bool vertical, border_style border)
: BView(name, _ModifyFlags(flags, border)),
:
BView(name, _ModifyFlags(flags, border)),
fTarget(target),
fBorder(border)
{
@@ -39,15 +49,16 @@ BScrollView::BScrollView(const char* name, BView* target, uint32 flags,
}
BScrollView::BScrollView(BMessage *archive)
: BView(archive),
BScrollView::BScrollView(BMessage* archive)
:
BView(archive),
fHighlighted(false)
{
int32 border;
fBorder = archive->FindInt32("_style", &border) == B_OK ?
(border_style)border : B_FANCY_BORDER;
// In a shallow archive, we may not have a target anymore. We must
// in a shallow archive, we may not have a target anymore. We must
// be prepared for this case
// don't confuse our scroll bars with our (eventual) target
@@ -63,7 +74,7 @@ BScrollView::BScrollView(BMessage *archive)
fHorizontalScrollBar = NULL;
fVerticalScrollBar = NULL;
BView *view;
BView* view;
while ((view = ChildAt(firstBar++)) != NULL) {
BScrollBar *bar = dynamic_cast<BScrollBar *>(view);
if (bar == NULL)
@@ -85,7 +96,7 @@ BScrollView::~BScrollView()
}
// #pragma mark -
// #pragma mark - Archiving
BArchivable*
@@ -121,6 +132,9 @@ BScrollView::Archive(BMessage* archive, bool deep) const
}
// #pragma mark - Hook methods
void
BScrollView::AttachedToWindow()
{
@@ -128,8 +142,9 @@ BScrollView::AttachedToWindow()
if ((fHorizontalScrollBar == NULL && fVerticalScrollBar == NULL)
|| (fHorizontalScrollBar != NULL && fVerticalScrollBar != NULL)
|| Window()->Look() != B_DOCUMENT_WINDOW_LOOK)
|| Window()->Look() != B_DOCUMENT_WINDOW_LOOK) {
return;
}
// If we have only one bar, we need to check if we are in the
// bottom right edge of a window with the B_DOCUMENT_LOOK to
@@ -139,8 +154,9 @@ BScrollView::AttachedToWindow()
BRect windowBounds = Window()->Frame();
if (bounds.right - _BorderSize() != windowBounds.right
|| bounds.bottom - _BorderSize() != windowBounds.bottom)
|| bounds.bottom - _BorderSize() != windowBounds.bottom) {
return;
}
if (fHorizontalScrollBar)
fHorizontalScrollBar->ResizeBy(-B_V_SCROLL_BAR_WIDTH, 0);
@@ -173,16 +189,17 @@ BScrollView::AllDetached()
void
BScrollView::Draw(BRect updateRect)
{
if (be_control_look != NULL) {
uint32 flags = 0;
if (fHighlighted && Window()->IsActive())
flags |= BControlLook::B_FOCUSED;
BRect rect(Bounds());
rgb_color base = ui_color(B_PANEL_BACKGROUND_COLOR);
BRect verticalScrollBarFrame(0, 0, -1, -1);
if (fVerticalScrollBar)
verticalScrollBarFrame = fVerticalScrollBar->Frame();
BRect horizontalScrollBarFrame(0, 0, -1, -1);
if (fHorizontalScrollBar)
horizontalScrollBarFrame = fHorizontalScrollBar->Frame();
@@ -190,43 +207,100 @@ BScrollView::Draw(BRect updateRect)
be_control_look->DrawScrollViewFrame(this, rect, updateRect,
verticalScrollBarFrame, horizontalScrollBarFrame, base, fBorder,
flags);
return;
}
if (fBorder == B_PLAIN_BORDER) {
SetHighColor(tint_color(ui_color(B_PANEL_BACKGROUND_COLOR),
B_DARKEN_2_TINT));
StrokeRect(Bounds());
return;
} else if (fBorder != B_FANCY_BORDER)
return;
BRect bounds = Bounds();
SetHighColor(tint_color(ui_color(B_PANEL_BACKGROUND_COLOR),
B_DARKEN_2_TINT));
StrokeRect(bounds.InsetByCopy(1, 1));
if (fHighlighted && Window()->IsActive()) {
SetHighColor(ui_color(B_NAVIGATION_BASE_COLOR));
StrokeRect(bounds);
} else {
SetHighColor(tint_color(ui_color(B_PANEL_BACKGROUND_COLOR),
B_DARKEN_1_TINT));
StrokeLine(bounds.LeftBottom(), bounds.LeftTop());
bounds.left++;
StrokeLine(bounds.LeftTop(), bounds.RightTop());
SetHighColor(ui_color(B_SHINE_COLOR));
StrokeLine(bounds.LeftBottom(), bounds.RightBottom());
bounds.top++;
bounds.bottom--;
StrokeLine(bounds.RightBottom(), bounds.RightTop());
}
}
// #pragma mark -
void
BScrollView::FrameMoved(BPoint newPosition)
{
BView::FrameMoved(newPosition);
}
void
BScrollView::FrameResized(float newWidth, float newHeight)
{
BView::FrameResized(newWidth, newHeight);
if (fBorder == B_NO_BORDER)
return;
BRect bounds = Bounds();
float border = _BorderSize() - 1;
if (be_control_look && fHorizontalScrollBar && fVerticalScrollBar) {
BRect scrollCorner(bounds);
scrollCorner.left = min_c(
fPreviousWidth - fVerticalScrollBar->Frame().Height(),
fHorizontalScrollBar->Frame().right + 1);
scrollCorner.top = min_c(
fPreviousHeight - fHorizontalScrollBar->Frame().Width(),
fVerticalScrollBar->Frame().bottom + 1);
Invalidate(scrollCorner);
}
// changes in newWidth
if (bounds.Width() > fPreviousWidth) {
// invalidate the region between the old and the new right border
BRect rect = bounds;
rect.left += fPreviousWidth - border;
rect.right--;
Invalidate(rect);
} else if (bounds.Width() < fPreviousWidth) {
// invalidate the region of the new right border
BRect rect = bounds;
rect.left = rect.right - border;
Invalidate(rect);
}
// changes in newHeight
if (bounds.Height() > fPreviousHeight) {
// invalidate the region between the old and the new bottom border
BRect rect = bounds;
rect.top += fPreviousHeight - border;
rect.bottom--;
Invalidate(rect);
} else if (bounds.Height() < fPreviousHeight) {
// invalidate the region of the new bottom border
BRect rect = bounds;
rect.top = rect.bottom - border;
Invalidate(rect);
}
fPreviousWidth = uint16(bounds.Width());
fPreviousHeight = uint16(bounds.Height());
}
void
BScrollView::MessageReceived(BMessage* message)
{
BView::MessageReceived(message);
}
void
BScrollView::MouseDown(BPoint where)
{
BView::MouseDown(where);
}
void
BScrollView::MouseMoved(BPoint where, uint32 code,
const BMessage* dragMessage)
{
BView::MouseMoved(where, code, dragMessage);
}
void
BScrollView::MouseUp(BPoint where)
{
BView::MouseUp(where);
}
void
@@ -239,28 +313,38 @@ BScrollView::WindowActivated(bool active)
}
void
BScrollView::MakeFocus(bool state)
{
BView::MakeFocus(state);
}
// #pragma mark -
// #pragma mark - Size methods
void
BScrollView::GetPreferredSize(float *_width, float *_height)
BScrollView::GetPreferredSize(float* _width, float* _height)
{
BSize size = PreferredSize();
if (_width)
*_width = size.width;
if (_height)
*_height = size.height;
}
void
BScrollView::ResizeToPreferred()
{
if (Window() == NULL)
return;
BView::ResizeToPreferred();
}
void
BScrollView::MakeFocus(bool focus)
{
BView::MakeFocus(focus);
}
BSize
BScrollView::MinSize()
{
@@ -291,120 +375,13 @@ BScrollView::PreferredSize()
}
void
BScrollView::ResizeToPreferred()
{
if (Window() == NULL)
return;
BView::ResizeToPreferred();
}
void
BScrollView::FrameMoved(BPoint position)
{
BView::FrameMoved(position);
}
void
BScrollView::FrameResized(float width, float height)
{
BView::FrameResized(width, height);
if (fBorder == B_NO_BORDER)
return;
BRect bounds = Bounds();
float border = _BorderSize() - 1;
if (be_control_look && fHorizontalScrollBar && fVerticalScrollBar) {
BRect scrollCorner(bounds);
scrollCorner.left = min_c(
fPreviousWidth - fVerticalScrollBar->Frame().Height(),
fHorizontalScrollBar->Frame().right + 1);
scrollCorner.top = min_c(
fPreviousHeight - fHorizontalScrollBar->Frame().Width(),
fVerticalScrollBar->Frame().bottom + 1);
Invalidate(scrollCorner);
}
// changes in width
if (bounds.Width() > fPreviousWidth) {
// invalidate the region between the old and the new right border
BRect rect = bounds;
rect.left += fPreviousWidth - border;
rect.right--;
Invalidate(rect);
} else if (bounds.Width() < fPreviousWidth) {
// invalidate the region of the new right border
BRect rect = bounds;
rect.left = rect.right - border;
Invalidate(rect);
}
// changes in height
if (bounds.Height() > fPreviousHeight) {
// invalidate the region between the old and the new bottom border
BRect rect = bounds;
rect.top += fPreviousHeight - border;
rect.bottom--;
Invalidate(rect);
} else if (bounds.Height() < fPreviousHeight) {
// invalidate the region of the new bottom border
BRect rect = bounds;
rect.top = rect.bottom - border;
Invalidate(rect);
}
fPreviousWidth = uint16(bounds.Width());
fPreviousHeight = uint16(bounds.Height());
}
// #pragma mark -
void
BScrollView::MessageReceived(BMessage* message)
{
switch (message->what) {
default:
BView::MessageReceived(message);
}
}
void
BScrollView::MouseDown(BPoint point)
{
BView::MouseDown(point);
}
void
BScrollView::MouseUp(BPoint point)
{
BView::MouseUp(point);
}
void
BScrollView::MouseMoved(BPoint point, uint32 code, const BMessage *dragMessage)
{
BView::MouseMoved(point, code, dragMessage);
}
// #pragma mark -
// #pragma mark - BScrollView methods
BScrollBar*
BScrollView::ScrollBar(orientation posture) const
BScrollView::ScrollBar(orientation direction) const
{
if (posture == B_HORIZONTAL)
if (direction == B_HORIZONTAL)
return fHorizontalScrollBar;
return fVerticalScrollBar;
@@ -482,21 +459,21 @@ BScrollView::Border() const
status_t
BScrollView::SetBorderHighlighted(bool state)
BScrollView::SetBorderHighlighted(bool highlight)
{
if (fHighlighted == state)
if (fHighlighted == highlight)
return B_OK;
if (fBorder != B_FANCY_BORDER)
// highlighting only works for B_FANCY_BORDER
return B_ERROR;
fHighlighted = state;
fHighlighted = highlight;
if (fHorizontalScrollBar != NULL)
fHorizontalScrollBar->SetBorderHighlighted(state);
fHorizontalScrollBar->SetBorderHighlighted(highlight);
if (fVerticalScrollBar != NULL)
fVerticalScrollBar->SetBorderHighlighted(state);
fVerticalScrollBar->SetBorderHighlighted(highlight);
BRect bounds = Bounds();
if (be_control_look != NULL)
@@ -521,7 +498,7 @@ BScrollView::IsBorderHighlighted() const
void
BScrollView::SetTarget(BView *target)
BScrollView::SetTarget(BView* target)
{
if (fTarget == target)
return;
@@ -560,25 +537,28 @@ BScrollView::Target() const
}
// #pragma mark -
// #pragma mark - Scripting methods
BHandler*
BScrollView::ResolveSpecifier(BMessage* msg, int32 index, BMessage* specifier,
int32 form, const char* property)
BScrollView::ResolveSpecifier(BMessage* message, int32 index,
BMessage* specifier, int32 what, const char* property)
{
return BView::ResolveSpecifier(msg, index, specifier, form, property);
return BView::ResolveSpecifier(message, index, specifier, what, property);
}
status_t
BScrollView::GetSupportedSuites(BMessage *data)
BScrollView::GetSupportedSuites(BMessage* message)
{
return BView::GetSupportedSuites(data);
return BView::GetSupportedSuites(message);
}
// #pragma mark - Perform
status_t
BScrollView::Perform(perform_code code, void* _data)
{
@@ -587,22 +567,27 @@ BScrollView::Perform(perform_code code, void* _data)
((perform_data_min_size*)_data)->return_value
= BScrollView::MinSize();
return B_OK;
case PERFORM_CODE_MAX_SIZE:
((perform_data_max_size*)_data)->return_value
= BScrollView::MaxSize();
return B_OK;
case PERFORM_CODE_PREFERRED_SIZE:
((perform_data_preferred_size*)_data)->return_value
= BScrollView::PreferredSize();
return B_OK;
case PERFORM_CODE_LAYOUT_ALIGNMENT:
((perform_data_layout_alignment*)_data)->return_value
= BScrollView::LayoutAlignment();
return B_OK;
case PERFORM_CODE_HAS_HEIGHT_FOR_WIDTH:
((perform_data_has_height_for_width*)_data)->return_value
= BScrollView::HasHeightForWidth();
return B_OK;
case PERFORM_CODE_GET_HEIGHT_FOR_WIDTH:
{
perform_data_get_height_for_width* data
@@ -611,12 +596,14 @@ BScrollView::Perform(perform_code code, void* _data)
&data->preferred);
return B_OK;
}
case PERFORM_CODE_SET_LAYOUT:
{
perform_data_set_layout* data = (perform_data_set_layout*)_data;
BScrollView::SetLayout(data->layout);
return B_OK;
}
case PERFORM_CODE_LAYOUT_INVALIDATED:
{
perform_data_layout_invalidated* data
@@ -624,6 +611,7 @@ BScrollView::Perform(perform_code code, void* _data)
BScrollView::LayoutInvalidated(data->descendants);
return B_OK;
}
case PERFORM_CODE_DO_LAYOUT:
{
BScrollView::DoLayout();
@@ -635,6 +623,9 @@ BScrollView::Perform(perform_code code, void* _data)
}
// #pragma mark - Protected methods
void
BScrollView::LayoutInvalidated(bool descendants)
{
@@ -644,11 +635,11 @@ BScrollView::LayoutInvalidated(bool descendants)
void
BScrollView::DoLayout()
{
if (!(Flags() & B_SUPPORTS_LAYOUT))
if ((Flags() & B_SUPPORTS_LAYOUT) == 0)
return;
// If the user set a layout, we let the base class version call its hook.
if (GetLayout()) {
if (GetLayout() != NULL) {
BView::DoLayout();
return;
}
@@ -667,9 +658,7 @@ BScrollView::DoLayout()
}
// #pragma mark -
// #pragma mark - Private methods
void
@@ -882,10 +871,10 @@ BScrollView::_ModifyFlags(int32 flags, border_style border)
}
// #pragma mark -
// #pragma mark - FBC and forbidden
BScrollView &
BScrollView&
BScrollView::operator=(const BScrollView &)
{
return *this;
@@ -907,4 +896,3 @@ B_IF_GCC_2(InvalidateLayout__11BScrollViewb,
view->Perform(PERFORM_CODE_LAYOUT_INVALIDATED, &data);
}
+17 -18
View File
@@ -630,7 +630,7 @@ BTextView::MouseUp(BPoint where)
// Hook method that is called whenever the mouse cursor enters, exits
// or moves inside the view.
void
BTextView::MouseMoved(BPoint where, uint32 code, const BMessage* message)
BTextView::MouseMoved(BPoint where, uint32 code, const BMessage* dragMessage)
{
// Check if it's a "click'n'move"
if (_PerformMouseMoved(where, code))
@@ -639,18 +639,17 @@ BTextView::MouseMoved(BPoint where, uint32 code, const BMessage* message)
switch (code) {
case B_ENTERED_VIEW:
case B_INSIDE_VIEW:
_TrackMouse(where, message, true);
_TrackMouse(where, dragMessage, true);
break;
case B_EXITED_VIEW:
_DragCaret(-1);
if (Window()->IsActive() && message == NULL)
if (Window()->IsActive() && dragMessage == NULL)
SetViewCursor(B_CURSOR_SYSTEM_DEFAULT);
break;
default:
BView::MouseMoved(where, code, message);
break;
BView::MouseMoved(where, code, dragMessage);
}
}
@@ -658,11 +657,11 @@ BTextView::MouseMoved(BPoint where, uint32 code, const BMessage* message)
// Hook method that is called when the window becomes the active window
// or gives up that status.
void
BTextView::WindowActivated(bool state)
BTextView::WindowActivated(bool active)
{
BView::WindowActivated(state);
BView::WindowActivated(active);
if (state && IsFocus()) {
if (active && IsFocus()) {
if (!fActive)
_Activate();
} else {
@@ -779,9 +778,9 @@ BTextView::Pulse()
// Hook method that is called when the frame is resized.
void
BTextView::FrameResized(float width, float height)
BTextView::FrameResized(float newWidth, float newHeight)
{
BView::FrameResized(width, height);
BView::FrameResized(newWidth, newHeight);
_UpdateScrollbars();
}
@@ -789,11 +788,11 @@ BTextView::FrameResized(float width, float height)
// Highlight or unhighlight the selection when the view gets or loses its
// focus state.
void
BTextView::MakeFocus(bool focusState)
BTextView::MakeFocus(bool focus)
{
BView::MakeFocus(focusState);
BView::MakeFocus(focus);
if (focusState && Window() && Window()->IsActive()) {
if (focus && Window() != NULL && Window()->IsActive()) {
if (!fActive)
_Activate();
} else {
@@ -1964,12 +1963,12 @@ BTextView::CanEndLine(int32 offset)
// Returns the width of the line at the given index.
float
BTextView::LineWidth(int32 lineNum) const
BTextView::LineWidth(int32 lineNumber) const
{
if (lineNum < 0 || lineNum >= fLines->NumLines())
if (lineNumber < 0 || lineNumber >= fLines->NumLines())
return 0;
STELine* line = (*fLines)[lineNum];
STELine* line = (*fLines)[lineNumber];
int32 length = (line + 1)->offset - line->offset;
// skip newline at the end of the line, if any, as it does no contribute
@@ -1983,9 +1982,9 @@ BTextView::LineWidth(int32 lineNum) const
// Returns the height of the line at the given index.
float
BTextView::LineHeight(int32 lineNum) const
BTextView::LineHeight(int32 lineNumber) const
{
float lineHeight = TextHeight(lineNum, lineNum);
float lineHeight = TextHeight(lineNumber, lineNumber);
if (lineHeight == 0.0) {
// We probably don't have text content yet. Take the initial
// style's font height or fall back to the plain font.
+16 -15
View File
@@ -1328,7 +1328,7 @@ BView::TargetedByScrollView(BScrollView* scroll_view)
void
BView::WindowActivated(bool state)
BView::WindowActivated(bool active)
{
// Hook function
STRACE(("\tHOOK: BView(%s)::WindowActivated()\n", Name()));
@@ -1602,33 +1602,34 @@ BView::GetMouse(BPoint* _location, uint32* _buttons, bool checkMessageQueue)
void
BView::MakeFocus(bool focusState)
BView::MakeFocus(bool focus)
{
if (fOwner) {
// TODO: If this view has focus and focusState==false,
if (fOwner == NULL)
return;
// TODO: If this view has focus and focus == false,
// will there really be no other view with focus? No
// cycling to the next one?
BView* focus = fOwner->CurrentFocus();
if (focusState) {
BView* focusView = fOwner->CurrentFocus();
if (focus) {
// Unfocus a previous focus view
if (focus && focus != this)
focus->MakeFocus(false);
if (focusView != NULL && focusView != this)
focusView->MakeFocus(false);
// if we want to make this view the current focus view
fOwner->_SetFocus(this, true);
} else {
// we want to unfocus this view, but only if it actually has focus
if (focus == this) {
if (focusView == this)
fOwner->_SetFocus(NULL, true);
}
}
}
}
BScrollBar*
BView::ScrollBar(orientation posture) const
BView::ScrollBar(orientation direction) const
{
switch (posture) {
switch (direction) {
case B_VERTICAL:
return fVerScroller;
@@ -1795,9 +1796,9 @@ BView::PopState()
void
BView::SetOrigin(BPoint pt)
BView::SetOrigin(BPoint where)
{
SetOrigin(pt.x, pt.y);
SetOrigin(where.x, where.y);
}
+1 -1
View File
@@ -2008,7 +2008,7 @@ BWindow::Activate(bool active)
void
BWindow::WindowActivated(bool state)
BWindow::WindowActivated(bool focus)
{
// hook function
// does nothing