bonefish + zooey:
* Fixed a general problem with respect to overriding of the reserved virtual function slots: instead of statically invoking the method that corresponds to the reserved slot on the class that contains the slot, we now invoke the virtual Perform() method. Perform() then dispatches the method invocation to the "proper" class, i.e. the highest class in the hierarchy that actually implements the requested method. This fixes a crash in apps that use liblayout's MSlider class and should fix one or other spurious bug with old apps or libraries, too. * added new header folder 'binary_compatibility' that contains files that define the method codes and data structures required by Perform() * looked for and implemented all used reserved virtual slot functions to invoke Perform() where necessary or to pass on the method call statically (for slots that were already maintained by Be) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28124 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
f00aecf4b6
commit
39fbf5509b
@ -55,7 +55,7 @@ class BSlider : public BControl {
|
||||
|
||||
static BArchivable *Instantiate(BMessage *data);
|
||||
virtual status_t Archive(BMessage *data, bool deep = true) const;
|
||||
virtual status_t Perform(perform_code d, void *arg);
|
||||
virtual status_t Perform(perform_code code, void* data);
|
||||
|
||||
virtual void WindowActivated(bool state);
|
||||
virtual void AttachedToWindow();
|
||||
|
@ -506,7 +506,7 @@ public:
|
||||
float Scale() const;
|
||||
// new for Haiku
|
||||
|
||||
virtual status_t Perform(perform_code d, void* arg);
|
||||
virtual status_t Perform(perform_code code, void* data);
|
||||
|
||||
virtual void DrawAfterChildren(BRect r);
|
||||
|
||||
|
29
headers/private/binary_compatibility/Global.h
Normal file
29
headers/private/binary_compatibility/Global.h
Normal file
@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Copyright 2008, Oliver Tappe, zooey@hirschkaefer.de.
|
||||
* Copyright 2008, Ingo Weinhold, ingo_weinhold@gmx.de.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef _BINARY_COMPATIBILITY_GLOBAL_H_
|
||||
#define _BINARY_COMPATIBILITY__GLOBAL_H_
|
||||
|
||||
|
||||
// method codes
|
||||
enum {
|
||||
// app kit
|
||||
|
||||
// interface kit
|
||||
PERFORM_CODE_MIN_SIZE = 1000,
|
||||
PERFORM_CODE_MAX_SIZE = 1001,
|
||||
PERFORM_CODE_PREFERRED_SIZE = 1002,
|
||||
PERFORM_CODE_LAYOUT_ALIGNMENT = 1003,
|
||||
PERFORM_CODE_HAS_HEIGHT_FOR_WIDTH = 1004,
|
||||
PERFORM_CODE_GET_HEIGHT_FOR_WIDTH = 1005,
|
||||
PERFORM_CODE_SET_LAYOUT = 1006,
|
||||
PERFORM_CODE_INVALIDATE_LAYOUT = 1007,
|
||||
PERFORM_CODE_DO_LAYOUT = 1008
|
||||
|
||||
// support kit
|
||||
};
|
||||
|
||||
|
||||
#endif // _BINARY_COMPATIBILITY__GLOBAL_H_
|
49
headers/private/binary_compatibility/Interface.h
Normal file
49
headers/private/binary_compatibility/Interface.h
Normal file
@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright 2008, Oliver Tappe, zooey@hirschkaefer.de.
|
||||
* Copyright 2008, Ingo Weinhold, ingo_weinhold@gmx.de.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef _BINARY_COMPATIBILITY_INTERFACE_H_
|
||||
#define _BINARY_COMPATIBILITY_INTERFACE_H_
|
||||
|
||||
|
||||
#include <binary_compatibility/Global.h>
|
||||
|
||||
|
||||
struct perform_data_min_size {
|
||||
BSize return_value;
|
||||
};
|
||||
|
||||
struct perform_data_max_size {
|
||||
BSize return_value;
|
||||
};
|
||||
|
||||
struct perform_data_preferred_size {
|
||||
BSize return_value;
|
||||
};
|
||||
|
||||
struct perform_data_layout_alignment {
|
||||
BAlignment return_value;
|
||||
};
|
||||
|
||||
struct perform_data_has_height_for_width {
|
||||
bool return_value;
|
||||
};
|
||||
|
||||
struct perform_data_get_height_for_width {
|
||||
float width;
|
||||
float min;
|
||||
float max;
|
||||
float preferred;
|
||||
};
|
||||
|
||||
struct perform_data_set_layout {
|
||||
BLayout* layout;
|
||||
};
|
||||
|
||||
struct perform_data_invalidate_layout {
|
||||
bool descendants;
|
||||
};
|
||||
|
||||
|
||||
#endif /* _BINARY_COMPATIBILITY_INTERFACE_H_ */
|
@ -662,9 +662,16 @@ BHandler::SetLooper(BLooper *looper)
|
||||
}
|
||||
|
||||
|
||||
#ifdef __INTEL__
|
||||
#if __GNUC__ < 3
|
||||
// binary compatibility with R4.5
|
||||
extern "C" void _ReservedHandler1__8BHandler(void) {}
|
||||
|
||||
extern "C" void
|
||||
_ReservedHandler1__8BHandler(BHandler* handler, uint32 what,
|
||||
const BMessage* notice)
|
||||
{
|
||||
handler->BHandler::SendNotices(what, notice);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void BHandler::_ReservedHandler2() {}
|
||||
|
@ -9,6 +9,10 @@
|
||||
|
||||
//! BAlert displays a modal alert window.
|
||||
|
||||
#include <new>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <Alert.h>
|
||||
#include <Autolock.h>
|
||||
#include <Beep.h>
|
||||
@ -28,9 +32,8 @@
|
||||
#include <TextView.h>
|
||||
#include <View.h>
|
||||
|
||||
#include <new>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <binary_compatibility/Interface.h>
|
||||
|
||||
|
||||
//#define DEBUG_ALERT
|
||||
#ifdef DEBUG_ALERT
|
||||
@ -417,9 +420,18 @@ BAlert::AlertPosition(float width, float height)
|
||||
|
||||
|
||||
status_t
|
||||
BAlert::Perform(perform_code d, void* arg)
|
||||
BAlert::Perform(perform_code code, void* _data)
|
||||
{
|
||||
return BWindow::Perform(d, arg);
|
||||
switch (code) {
|
||||
case PERFORM_CODE_SET_LAYOUT:
|
||||
{
|
||||
perform_data_set_layout* data = (perform_data_set_layout*)_data;
|
||||
BAlert::SetLayout(data->layout);
|
||||
return B_OK;
|
||||
}
|
||||
}
|
||||
|
||||
return BWindow::Perform(code, _data);
|
||||
}
|
||||
|
||||
|
||||
|
@ -21,6 +21,8 @@
|
||||
#include <Message.h>
|
||||
#include <Region.h>
|
||||
|
||||
#include <binary_compatibility/Interface.h>
|
||||
|
||||
|
||||
struct BBox::LayoutData {
|
||||
LayoutData()
|
||||
@ -449,9 +451,58 @@ BBox::GetSupportedSuites(BMessage *message)
|
||||
|
||||
|
||||
status_t
|
||||
BBox::Perform(perform_code d, void *arg)
|
||||
BBox::Perform(perform_code code, void* _data)
|
||||
{
|
||||
return BView::Perform(d, arg);
|
||||
switch (code) {
|
||||
case PERFORM_CODE_MIN_SIZE:
|
||||
((perform_data_min_size*)_data)->return_value
|
||||
= BBox::MinSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_MAX_SIZE:
|
||||
((perform_data_max_size*)_data)->return_value
|
||||
= BBox::MaxSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_PREFERRED_SIZE:
|
||||
((perform_data_preferred_size*)_data)->return_value
|
||||
= BBox::PreferredSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_LAYOUT_ALIGNMENT:
|
||||
((perform_data_layout_alignment*)_data)->return_value
|
||||
= BBox::LayoutAlignment();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_HAS_HEIGHT_FOR_WIDTH:
|
||||
((perform_data_has_height_for_width*)_data)->return_value
|
||||
= BBox::HasHeightForWidth();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_GET_HEIGHT_FOR_WIDTH:
|
||||
{
|
||||
perform_data_get_height_for_width* data
|
||||
= (perform_data_get_height_for_width*)_data;
|
||||
BBox::GetHeightForWidth(data->width, &data->min, &data->max,
|
||||
&data->preferred);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_SET_LAYOUT:
|
||||
{
|
||||
perform_data_set_layout* data = (perform_data_set_layout*)_data;
|
||||
BBox::SetLayout(data->layout);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_INVALIDATE_LAYOUT:
|
||||
{
|
||||
perform_data_invalidate_layout* data
|
||||
= (perform_data_invalidate_layout*)_data;
|
||||
BBox::InvalidateLayout(data->descendants);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_DO_LAYOUT:
|
||||
{
|
||||
BBox::DoLayout();
|
||||
return B_OK;
|
||||
}
|
||||
}
|
||||
|
||||
return BView::Perform(code, _data);
|
||||
}
|
||||
|
||||
|
||||
|
@ -18,6 +18,8 @@
|
||||
#include <String.h>
|
||||
#include <Window.h>
|
||||
|
||||
#include <binary_compatibility/Interface.h>
|
||||
|
||||
|
||||
BButton::BButton(BRect frame, const char *name, const char *label, BMessage *message,
|
||||
uint32 resizingMode, uint32 flags)
|
||||
@ -705,9 +707,58 @@ BButton::GetSupportedSuites(BMessage *message)
|
||||
|
||||
|
||||
status_t
|
||||
BButton::Perform(perform_code d, void *arg)
|
||||
BButton::Perform(perform_code code, void* _data)
|
||||
{
|
||||
return BControl::Perform(d, arg);
|
||||
switch (code) {
|
||||
case PERFORM_CODE_MIN_SIZE:
|
||||
((perform_data_min_size*)_data)->return_value
|
||||
= BButton::MinSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_MAX_SIZE:
|
||||
((perform_data_max_size*)_data)->return_value
|
||||
= BButton::MaxSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_PREFERRED_SIZE:
|
||||
((perform_data_preferred_size*)_data)->return_value
|
||||
= BButton::PreferredSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_LAYOUT_ALIGNMENT:
|
||||
((perform_data_layout_alignment*)_data)->return_value
|
||||
= BButton::LayoutAlignment();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_HAS_HEIGHT_FOR_WIDTH:
|
||||
((perform_data_has_height_for_width*)_data)->return_value
|
||||
= BButton::HasHeightForWidth();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_GET_HEIGHT_FOR_WIDTH:
|
||||
{
|
||||
perform_data_get_height_for_width* data
|
||||
= (perform_data_get_height_for_width*)_data;
|
||||
BButton::GetHeightForWidth(data->width, &data->min, &data->max,
|
||||
&data->preferred);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_SET_LAYOUT:
|
||||
{
|
||||
perform_data_set_layout* data = (perform_data_set_layout*)_data;
|
||||
BButton::SetLayout(data->layout);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_INVALIDATE_LAYOUT:
|
||||
{
|
||||
perform_data_invalidate_layout* data
|
||||
= (perform_data_invalidate_layout*)_data;
|
||||
BButton::InvalidateLayout(data->descendants);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_DO_LAYOUT:
|
||||
{
|
||||
BButton::DoLayout();
|
||||
return B_OK;
|
||||
}
|
||||
}
|
||||
|
||||
return BControl::Perform(code, _data);
|
||||
}
|
||||
|
||||
|
||||
|
@ -14,6 +14,8 @@
|
||||
#include <LayoutUtils.h>
|
||||
#include <Window.h>
|
||||
|
||||
#include <binary_compatibility/Interface.h>
|
||||
|
||||
|
||||
BCheckBox::BCheckBox(BRect frame, const char *name, const char *label,
|
||||
BMessage *message, uint32 resizingMode, uint32 flags)
|
||||
@ -442,9 +444,58 @@ BCheckBox::AllDetached()
|
||||
|
||||
|
||||
status_t
|
||||
BCheckBox::Perform(perform_code d, void *arg)
|
||||
BCheckBox::Perform(perform_code code, void* _data)
|
||||
{
|
||||
return BControl::Perform(d, arg);
|
||||
switch (code) {
|
||||
case PERFORM_CODE_MIN_SIZE:
|
||||
((perform_data_min_size*)_data)->return_value
|
||||
= BCheckBox::MinSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_MAX_SIZE:
|
||||
((perform_data_max_size*)_data)->return_value
|
||||
= BCheckBox::MaxSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_PREFERRED_SIZE:
|
||||
((perform_data_preferred_size*)_data)->return_value
|
||||
= BCheckBox::PreferredSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_LAYOUT_ALIGNMENT:
|
||||
((perform_data_layout_alignment*)_data)->return_value
|
||||
= BCheckBox::LayoutAlignment();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_HAS_HEIGHT_FOR_WIDTH:
|
||||
((perform_data_has_height_for_width*)_data)->return_value
|
||||
= BCheckBox::HasHeightForWidth();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_GET_HEIGHT_FOR_WIDTH:
|
||||
{
|
||||
perform_data_get_height_for_width* data
|
||||
= (perform_data_get_height_for_width*)_data;
|
||||
BCheckBox::GetHeightForWidth(data->width, &data->min, &data->max,
|
||||
&data->preferred);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_SET_LAYOUT:
|
||||
{
|
||||
perform_data_set_layout* data = (perform_data_set_layout*)_data;
|
||||
BCheckBox::SetLayout(data->layout);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_INVALIDATE_LAYOUT:
|
||||
{
|
||||
perform_data_invalidate_layout* data
|
||||
= (perform_data_invalidate_layout*)_data;
|
||||
BCheckBox::InvalidateLayout(data->descendants);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_DO_LAYOUT:
|
||||
{
|
||||
BCheckBox::DoLayout();
|
||||
return B_OK;
|
||||
}
|
||||
}
|
||||
|
||||
return BControl::Perform(code, _data);
|
||||
}
|
||||
|
||||
|
||||
|
@ -21,6 +21,8 @@
|
||||
#include <Screen.h>
|
||||
#include <Window.h>
|
||||
|
||||
#include <binary_compatibility/Interface.h>
|
||||
|
||||
|
||||
static const uint32 kMsgColorEntered = 'ccol';
|
||||
static const uint32 kMinCellSize = 6;
|
||||
@ -857,9 +859,58 @@ BColorControl::AllDetached()
|
||||
|
||||
|
||||
status_t
|
||||
BColorControl::Perform(perform_code d, void *arg)
|
||||
BColorControl::Perform(perform_code code, void* _data)
|
||||
{
|
||||
return BControl::Perform(d, arg);
|
||||
switch (code) {
|
||||
case PERFORM_CODE_MIN_SIZE:
|
||||
((perform_data_min_size*)_data)->return_value
|
||||
= BColorControl::MinSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_MAX_SIZE:
|
||||
((perform_data_max_size*)_data)->return_value
|
||||
= BColorControl::MaxSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_PREFERRED_SIZE:
|
||||
((perform_data_preferred_size*)_data)->return_value
|
||||
= BColorControl::PreferredSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_LAYOUT_ALIGNMENT:
|
||||
((perform_data_layout_alignment*)_data)->return_value
|
||||
= BColorControl::LayoutAlignment();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_HAS_HEIGHT_FOR_WIDTH:
|
||||
((perform_data_has_height_for_width*)_data)->return_value
|
||||
= BColorControl::HasHeightForWidth();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_GET_HEIGHT_FOR_WIDTH:
|
||||
{
|
||||
perform_data_get_height_for_width* data
|
||||
= (perform_data_get_height_for_width*)_data;
|
||||
BColorControl::GetHeightForWidth(data->width, &data->min, &data->max,
|
||||
&data->preferred);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_SET_LAYOUT:
|
||||
{
|
||||
perform_data_set_layout* data = (perform_data_set_layout*)_data;
|
||||
BColorControl::SetLayout(data->layout);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_INVALIDATE_LAYOUT:
|
||||
{
|
||||
perform_data_invalidate_layout* data
|
||||
= (perform_data_invalidate_layout*)_data;
|
||||
BColorControl::InvalidateLayout(data->descendants);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_DO_LAYOUT:
|
||||
{
|
||||
BColorControl::DoLayout();
|
||||
return B_OK;
|
||||
}
|
||||
}
|
||||
|
||||
return BControl::Perform(code, _data);
|
||||
}
|
||||
|
||||
|
||||
|
@ -9,12 +9,14 @@
|
||||
/*! BControl is the base class for user-event handling objects. */
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <Control.h>
|
||||
#include <PropertyInfo.h>
|
||||
#include <Window.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <binary_compatibility/Interface.h>
|
||||
|
||||
|
||||
static property_info sPropertyList[] = {
|
||||
@ -452,9 +454,58 @@ BControl::AllDetached()
|
||||
|
||||
|
||||
status_t
|
||||
BControl::Perform(perform_code d, void *arg)
|
||||
BControl::Perform(perform_code code, void* _data)
|
||||
{
|
||||
return BView::Perform(d, arg);
|
||||
switch (code) {
|
||||
case PERFORM_CODE_MIN_SIZE:
|
||||
((perform_data_min_size*)_data)->return_value
|
||||
= BControl::MinSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_MAX_SIZE:
|
||||
((perform_data_max_size*)_data)->return_value
|
||||
= BControl::MaxSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_PREFERRED_SIZE:
|
||||
((perform_data_preferred_size*)_data)->return_value
|
||||
= BControl::PreferredSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_LAYOUT_ALIGNMENT:
|
||||
((perform_data_layout_alignment*)_data)->return_value
|
||||
= BControl::LayoutAlignment();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_HAS_HEIGHT_FOR_WIDTH:
|
||||
((perform_data_has_height_for_width*)_data)->return_value
|
||||
= BControl::HasHeightForWidth();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_GET_HEIGHT_FOR_WIDTH:
|
||||
{
|
||||
perform_data_get_height_for_width* data
|
||||
= (perform_data_get_height_for_width*)_data;
|
||||
BControl::GetHeightForWidth(data->width, &data->min, &data->max,
|
||||
&data->preferred);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_SET_LAYOUT:
|
||||
{
|
||||
perform_data_set_layout* data = (perform_data_set_layout*)_data;
|
||||
BControl::SetLayout(data->layout);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_INVALIDATE_LAYOUT:
|
||||
{
|
||||
perform_data_invalidate_layout* data
|
||||
= (perform_data_invalidate_layout*)_data;
|
||||
BControl::InvalidateLayout(data->descendants);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_DO_LAYOUT:
|
||||
{
|
||||
BControl::DoLayout();
|
||||
return B_OK;
|
||||
}
|
||||
}
|
||||
|
||||
return BView::Perform(code, _data);
|
||||
}
|
||||
|
||||
|
||||
|
@ -9,9 +9,8 @@
|
||||
//! BDragger represents a replicant "handle".
|
||||
|
||||
|
||||
#include <AppServerLink.h>
|
||||
#include <ServerProtocol.h>
|
||||
#include <ViewPrivate.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <Alert.h>
|
||||
#include <Autolock.h>
|
||||
@ -24,10 +23,12 @@
|
||||
#include <Shelf.h>
|
||||
#include <Window.h>
|
||||
|
||||
#include "ZombieReplicantView.h"
|
||||
#include <AppServerLink.h>
|
||||
#include <binary_compatibility/Interface.h>
|
||||
#include <ServerProtocol.h>
|
||||
#include <ViewPrivate.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "ZombieReplicantView.h"
|
||||
|
||||
|
||||
bool BDragger::sVisible;
|
||||
@ -378,9 +379,58 @@ BDragger::GetSupportedSuites(BMessage* data)
|
||||
|
||||
|
||||
status_t
|
||||
BDragger::Perform(perform_code d, void* arg)
|
||||
BDragger::Perform(perform_code code, void* _data)
|
||||
{
|
||||
return BView::Perform(d, arg);
|
||||
switch (code) {
|
||||
case PERFORM_CODE_MIN_SIZE:
|
||||
((perform_data_min_size*)_data)->return_value
|
||||
= BDragger::MinSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_MAX_SIZE:
|
||||
((perform_data_max_size*)_data)->return_value
|
||||
= BDragger::MaxSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_PREFERRED_SIZE:
|
||||
((perform_data_preferred_size*)_data)->return_value
|
||||
= BDragger::PreferredSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_LAYOUT_ALIGNMENT:
|
||||
((perform_data_layout_alignment*)_data)->return_value
|
||||
= BDragger::LayoutAlignment();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_HAS_HEIGHT_FOR_WIDTH:
|
||||
((perform_data_has_height_for_width*)_data)->return_value
|
||||
= BDragger::HasHeightForWidth();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_GET_HEIGHT_FOR_WIDTH:
|
||||
{
|
||||
perform_data_get_height_for_width* data
|
||||
= (perform_data_get_height_for_width*)_data;
|
||||
BDragger::GetHeightForWidth(data->width, &data->min, &data->max,
|
||||
&data->preferred);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_SET_LAYOUT:
|
||||
{
|
||||
perform_data_set_layout* data = (perform_data_set_layout*)_data;
|
||||
BDragger::SetLayout(data->layout);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_INVALIDATE_LAYOUT:
|
||||
{
|
||||
perform_data_invalidate_layout* data
|
||||
= (perform_data_invalidate_layout*)_data;
|
||||
BDragger::InvalidateLayout(data->descendants);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_DO_LAYOUT:
|
||||
{
|
||||
BDragger::DoLayout();
|
||||
return B_OK;
|
||||
}
|
||||
}
|
||||
|
||||
return BView::Perform(code, _data);
|
||||
}
|
||||
|
||||
|
||||
@ -620,3 +670,15 @@ BDragger::_ShowPopUp(BView *target, BPoint where)
|
||||
|
||||
fPopUp->Go(point, true, false, rect, true);
|
||||
}
|
||||
|
||||
|
||||
#if __GNUC__ < 3
|
||||
|
||||
extern "C" BBitmap*
|
||||
_ReservedDragger1__8BDragger(BDragger* dragger, BPoint* offset,
|
||||
drawing_mode* mode)
|
||||
{
|
||||
return dragger->BDragger::DragBitmap(offset, mode);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -13,6 +13,8 @@
|
||||
|
||||
#include <ListView.h>
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <Autolock.h>
|
||||
#include <LayoutUtils.h>
|
||||
#include <PropertyInfo.h>
|
||||
@ -20,7 +22,7 @@
|
||||
#include <ScrollView.h>
|
||||
#include <Window.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <binary_compatibility/Interface.h>
|
||||
|
||||
|
||||
struct track_data {
|
||||
@ -1062,12 +1064,61 @@ BListView::GetSupportedSuites(BMessage* data)
|
||||
return err;
|
||||
}
|
||||
|
||||
// Perform
|
||||
status_t
|
||||
BListView::Perform(perform_code d, void *arg)
|
||||
BListView::Perform(perform_code code, void* _data)
|
||||
{
|
||||
return BView::Perform(d, arg);
|
||||
switch (code) {
|
||||
case PERFORM_CODE_MIN_SIZE:
|
||||
((perform_data_min_size*)_data)->return_value
|
||||
= BListView::MinSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_MAX_SIZE:
|
||||
((perform_data_max_size*)_data)->return_value
|
||||
= BListView::MaxSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_PREFERRED_SIZE:
|
||||
((perform_data_preferred_size*)_data)->return_value
|
||||
= BListView::PreferredSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_LAYOUT_ALIGNMENT:
|
||||
((perform_data_layout_alignment*)_data)->return_value
|
||||
= BListView::LayoutAlignment();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_HAS_HEIGHT_FOR_WIDTH:
|
||||
((perform_data_has_height_for_width*)_data)->return_value
|
||||
= BListView::HasHeightForWidth();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_GET_HEIGHT_FOR_WIDTH:
|
||||
{
|
||||
perform_data_get_height_for_width* data
|
||||
= (perform_data_get_height_for_width*)_data;
|
||||
BListView::GetHeightForWidth(data->width, &data->min, &data->max,
|
||||
&data->preferred);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_SET_LAYOUT:
|
||||
{
|
||||
perform_data_set_layout* data = (perform_data_set_layout*)_data;
|
||||
BListView::SetLayout(data->layout);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_INVALIDATE_LAYOUT:
|
||||
{
|
||||
perform_data_invalidate_layout* data
|
||||
= (perform_data_invalidate_layout*)_data;
|
||||
BListView::InvalidateLayout(data->descendants);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_DO_LAYOUT:
|
||||
{
|
||||
BListView::DoLayout();
|
||||
return B_OK;
|
||||
}
|
||||
}
|
||||
|
||||
return BView::Perform(code, _data);
|
||||
}
|
||||
|
||||
|
||||
// WindowActivated
|
||||
void
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include <Window.h>
|
||||
|
||||
#include <AppServerLink.h>
|
||||
#include <binary_compatibility/Interface.h>
|
||||
#include <BMCPrivate.h>
|
||||
#include <MenuPrivate.h>
|
||||
#include <MenuWindow.h>
|
||||
@ -34,6 +35,7 @@
|
||||
|
||||
#include "utf8_functions.h"
|
||||
|
||||
|
||||
#define USE_CACHED_MENUWINDOW 1
|
||||
|
||||
using std::nothrow;
|
||||
@ -1094,9 +1096,58 @@ BMenu::GetSupportedSuites(BMessage *data)
|
||||
|
||||
|
||||
status_t
|
||||
BMenu::Perform(perform_code d, void *arg)
|
||||
BMenu::Perform(perform_code code, void* _data)
|
||||
{
|
||||
return BView::Perform(d, arg);
|
||||
switch (code) {
|
||||
case PERFORM_CODE_MIN_SIZE:
|
||||
((perform_data_min_size*)_data)->return_value
|
||||
= BMenu::MinSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_MAX_SIZE:
|
||||
((perform_data_max_size*)_data)->return_value
|
||||
= BMenu::MaxSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_PREFERRED_SIZE:
|
||||
((perform_data_preferred_size*)_data)->return_value
|
||||
= BMenu::PreferredSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_LAYOUT_ALIGNMENT:
|
||||
((perform_data_layout_alignment*)_data)->return_value
|
||||
= BMenu::LayoutAlignment();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_HAS_HEIGHT_FOR_WIDTH:
|
||||
((perform_data_has_height_for_width*)_data)->return_value
|
||||
= BMenu::HasHeightForWidth();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_GET_HEIGHT_FOR_WIDTH:
|
||||
{
|
||||
perform_data_get_height_for_width* data
|
||||
= (perform_data_get_height_for_width*)_data;
|
||||
BMenu::GetHeightForWidth(data->width, &data->min, &data->max,
|
||||
&data->preferred);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_SET_LAYOUT:
|
||||
{
|
||||
perform_data_set_layout* data = (perform_data_set_layout*)_data;
|
||||
BMenu::SetLayout(data->layout);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_INVALIDATE_LAYOUT:
|
||||
{
|
||||
perform_data_invalidate_layout* data
|
||||
= (perform_data_invalidate_layout*)_data;
|
||||
BMenu::InvalidateLayout(data->descendants);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_DO_LAYOUT:
|
||||
{
|
||||
BMenu::DoLayout();
|
||||
return B_OK;
|
||||
}
|
||||
}
|
||||
|
||||
return BView::Perform(code, _data);
|
||||
}
|
||||
|
||||
|
||||
|
@ -18,11 +18,13 @@
|
||||
#include <Window.h>
|
||||
|
||||
#include <AppMisc.h>
|
||||
#include <binary_compatibility/Interface.h>
|
||||
#include <MenuPrivate.h>
|
||||
#include <TokenSpace.h>
|
||||
|
||||
#include "BMCPrivate.h"
|
||||
|
||||
|
||||
using BPrivate::gDefaultTokens;
|
||||
|
||||
|
||||
@ -325,9 +327,58 @@ BMenuBar::AllDetached()
|
||||
|
||||
|
||||
status_t
|
||||
BMenuBar::Perform(perform_code d, void *arg)
|
||||
BMenuBar::Perform(perform_code code, void* _data)
|
||||
{
|
||||
return BMenu::Perform(d, arg);
|
||||
switch (code) {
|
||||
case PERFORM_CODE_MIN_SIZE:
|
||||
((perform_data_min_size*)_data)->return_value
|
||||
= BMenuBar::MinSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_MAX_SIZE:
|
||||
((perform_data_max_size*)_data)->return_value
|
||||
= BMenuBar::MaxSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_PREFERRED_SIZE:
|
||||
((perform_data_preferred_size*)_data)->return_value
|
||||
= BMenuBar::PreferredSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_LAYOUT_ALIGNMENT:
|
||||
((perform_data_layout_alignment*)_data)->return_value
|
||||
= BMenuBar::LayoutAlignment();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_HAS_HEIGHT_FOR_WIDTH:
|
||||
((perform_data_has_height_for_width*)_data)->return_value
|
||||
= BMenuBar::HasHeightForWidth();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_GET_HEIGHT_FOR_WIDTH:
|
||||
{
|
||||
perform_data_get_height_for_width* data
|
||||
= (perform_data_get_height_for_width*)_data;
|
||||
BMenuBar::GetHeightForWidth(data->width, &data->min, &data->max,
|
||||
&data->preferred);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_SET_LAYOUT:
|
||||
{
|
||||
perform_data_set_layout* data = (perform_data_set_layout*)_data;
|
||||
BMenuBar::SetLayout(data->layout);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_INVALIDATE_LAYOUT:
|
||||
{
|
||||
perform_data_invalidate_layout* data
|
||||
= (perform_data_invalidate_layout*)_data;
|
||||
BMenuBar::InvalidateLayout(data->descendants);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_DO_LAYOUT:
|
||||
{
|
||||
BMenuBar::DoLayout();
|
||||
return B_OK;
|
||||
}
|
||||
}
|
||||
|
||||
return BMenu::Perform(code, _data);
|
||||
}
|
||||
|
||||
|
||||
|
@ -19,6 +19,8 @@
|
||||
#include <BMCPrivate.h>
|
||||
#include <Window.h>
|
||||
|
||||
#include <binary_compatibility/Interface.h>
|
||||
|
||||
|
||||
//#define TRACE_MENU_FIELD
|
||||
#ifdef TRACE_MENU_FIELD
|
||||
@ -721,9 +723,58 @@ BMenuField::CreateMenuBarLayoutItem()
|
||||
|
||||
|
||||
status_t
|
||||
BMenuField::Perform(perform_code d, void *arg)
|
||||
BMenuField::Perform(perform_code code, void* _data)
|
||||
{
|
||||
return BView::Perform(d, arg);
|
||||
switch (code) {
|
||||
case PERFORM_CODE_MIN_SIZE:
|
||||
((perform_data_min_size*)_data)->return_value
|
||||
= BMenuField::MinSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_MAX_SIZE:
|
||||
((perform_data_max_size*)_data)->return_value
|
||||
= BMenuField::MaxSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_PREFERRED_SIZE:
|
||||
((perform_data_preferred_size*)_data)->return_value
|
||||
= BMenuField::PreferredSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_LAYOUT_ALIGNMENT:
|
||||
((perform_data_layout_alignment*)_data)->return_value
|
||||
= BMenuField::LayoutAlignment();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_HAS_HEIGHT_FOR_WIDTH:
|
||||
((perform_data_has_height_for_width*)_data)->return_value
|
||||
= BMenuField::HasHeightForWidth();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_GET_HEIGHT_FOR_WIDTH:
|
||||
{
|
||||
perform_data_get_height_for_width* data
|
||||
= (perform_data_get_height_for_width*)_data;
|
||||
BMenuField::GetHeightForWidth(data->width, &data->min, &data->max,
|
||||
&data->preferred);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_SET_LAYOUT:
|
||||
{
|
||||
perform_data_set_layout* data = (perform_data_set_layout*)_data;
|
||||
BMenuField::SetLayout(data->layout);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_INVALIDATE_LAYOUT:
|
||||
{
|
||||
perform_data_invalidate_layout* data
|
||||
= (perform_data_invalidate_layout*)_data;
|
||||
BMenuField::InvalidateLayout(data->descendants);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_DO_LAYOUT:
|
||||
{
|
||||
BMenuField::DoLayout();
|
||||
return B_OK;
|
||||
}
|
||||
}
|
||||
|
||||
return BView::Perform(code, _data);
|
||||
}
|
||||
|
||||
|
||||
|
@ -18,6 +18,9 @@
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include <binary_compatibility/Interface.h>
|
||||
|
||||
|
||||
struct ListItemComparator {
|
||||
ListItemComparator(int (*compareFunc)(const BListItem *, const BListItem *))
|
||||
: fCompareFunc(compareFunc)
|
||||
@ -546,9 +549,58 @@ BOutlineListView::GetSupportedSuites(BMessage* data)
|
||||
|
||||
|
||||
status_t
|
||||
BOutlineListView::Perform(perform_code d, void* arg)
|
||||
BOutlineListView::Perform(perform_code code, void* _data)
|
||||
{
|
||||
return BListView::Perform(d, arg);
|
||||
switch (code) {
|
||||
case PERFORM_CODE_MIN_SIZE:
|
||||
((perform_data_min_size*)_data)->return_value
|
||||
= BOutlineListView::MinSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_MAX_SIZE:
|
||||
((perform_data_max_size*)_data)->return_value
|
||||
= BOutlineListView::MaxSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_PREFERRED_SIZE:
|
||||
((perform_data_preferred_size*)_data)->return_value
|
||||
= BOutlineListView::PreferredSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_LAYOUT_ALIGNMENT:
|
||||
((perform_data_layout_alignment*)_data)->return_value
|
||||
= BOutlineListView::LayoutAlignment();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_HAS_HEIGHT_FOR_WIDTH:
|
||||
((perform_data_has_height_for_width*)_data)->return_value
|
||||
= BOutlineListView::HasHeightForWidth();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_GET_HEIGHT_FOR_WIDTH:
|
||||
{
|
||||
perform_data_get_height_for_width* data
|
||||
= (perform_data_get_height_for_width*)_data;
|
||||
BOutlineListView::GetHeightForWidth(data->width, &data->min, &data->max,
|
||||
&data->preferred);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_SET_LAYOUT:
|
||||
{
|
||||
perform_data_set_layout* data = (perform_data_set_layout*)_data;
|
||||
BOutlineListView::SetLayout(data->layout);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_INVALIDATE_LAYOUT:
|
||||
{
|
||||
perform_data_invalidate_layout* data
|
||||
= (perform_data_invalidate_layout*)_data;
|
||||
BOutlineListView::InvalidateLayout(data->descendants);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_DO_LAYOUT:
|
||||
{
|
||||
BOutlineListView::DoLayout();
|
||||
return B_OK;
|
||||
}
|
||||
}
|
||||
|
||||
return BListView::Perform(code, _data);
|
||||
}
|
||||
|
||||
|
||||
|
@ -11,6 +11,8 @@
|
||||
|
||||
#include <PictureButton.h>
|
||||
|
||||
#include <binary_compatibility/Interface.h>
|
||||
|
||||
|
||||
BPictureButton::BPictureButton(BRect frame, const char* name,
|
||||
BPicture *off, BPicture *on, BMessage *message,
|
||||
@ -408,9 +410,58 @@ BPictureButton::AllDetached()
|
||||
|
||||
|
||||
status_t
|
||||
BPictureButton::Perform(perform_code d, void *arg)
|
||||
BPictureButton::Perform(perform_code code, void* _data)
|
||||
{
|
||||
return BControl::Perform(d, arg);
|
||||
switch (code) {
|
||||
case PERFORM_CODE_MIN_SIZE:
|
||||
((perform_data_min_size*)_data)->return_value
|
||||
= BPictureButton::MinSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_MAX_SIZE:
|
||||
((perform_data_max_size*)_data)->return_value
|
||||
= BPictureButton::MaxSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_PREFERRED_SIZE:
|
||||
((perform_data_preferred_size*)_data)->return_value
|
||||
= BPictureButton::PreferredSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_LAYOUT_ALIGNMENT:
|
||||
((perform_data_layout_alignment*)_data)->return_value
|
||||
= BPictureButton::LayoutAlignment();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_HAS_HEIGHT_FOR_WIDTH:
|
||||
((perform_data_has_height_for_width*)_data)->return_value
|
||||
= BPictureButton::HasHeightForWidth();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_GET_HEIGHT_FOR_WIDTH:
|
||||
{
|
||||
perform_data_get_height_for_width* data
|
||||
= (perform_data_get_height_for_width*)_data;
|
||||
BPictureButton::GetHeightForWidth(data->width, &data->min, &data->max,
|
||||
&data->preferred);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_SET_LAYOUT:
|
||||
{
|
||||
perform_data_set_layout* data = (perform_data_set_layout*)_data;
|
||||
BPictureButton::SetLayout(data->layout);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_INVALIDATE_LAYOUT:
|
||||
{
|
||||
perform_data_invalidate_layout* data
|
||||
= (perform_data_invalidate_layout*)_data;
|
||||
BPictureButton::InvalidateLayout(data->descendants);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_DO_LAYOUT:
|
||||
{
|
||||
BPictureButton::DoLayout();
|
||||
return B_OK;
|
||||
}
|
||||
}
|
||||
|
||||
return BControl::Perform(code, _data);
|
||||
}
|
||||
|
||||
|
||||
|
@ -16,6 +16,8 @@
|
||||
|
||||
#include <new>
|
||||
|
||||
#include <binary_compatibility/Interface.h>
|
||||
|
||||
|
||||
struct popup_menu_data {
|
||||
BPopUpMenu *object;
|
||||
@ -172,9 +174,58 @@ BPopUpMenu::GetSupportedSuites(BMessage *data)
|
||||
|
||||
|
||||
status_t
|
||||
BPopUpMenu::Perform(perform_code d, void *arg)
|
||||
BPopUpMenu::Perform(perform_code code, void* _data)
|
||||
{
|
||||
return BMenu::Perform(d, arg);
|
||||
switch (code) {
|
||||
case PERFORM_CODE_MIN_SIZE:
|
||||
((perform_data_min_size*)_data)->return_value
|
||||
= BPopUpMenu::MinSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_MAX_SIZE:
|
||||
((perform_data_max_size*)_data)->return_value
|
||||
= BPopUpMenu::MaxSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_PREFERRED_SIZE:
|
||||
((perform_data_preferred_size*)_data)->return_value
|
||||
= BPopUpMenu::PreferredSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_LAYOUT_ALIGNMENT:
|
||||
((perform_data_layout_alignment*)_data)->return_value
|
||||
= BPopUpMenu::LayoutAlignment();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_HAS_HEIGHT_FOR_WIDTH:
|
||||
((perform_data_has_height_for_width*)_data)->return_value
|
||||
= BPopUpMenu::HasHeightForWidth();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_GET_HEIGHT_FOR_WIDTH:
|
||||
{
|
||||
perform_data_get_height_for_width* data
|
||||
= (perform_data_get_height_for_width*)_data;
|
||||
BPopUpMenu::GetHeightForWidth(data->width, &data->min, &data->max,
|
||||
&data->preferred);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_SET_LAYOUT:
|
||||
{
|
||||
perform_data_set_layout* data = (perform_data_set_layout*)_data;
|
||||
BPopUpMenu::SetLayout(data->layout);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_INVALIDATE_LAYOUT:
|
||||
{
|
||||
perform_data_invalidate_layout* data
|
||||
= (perform_data_invalidate_layout*)_data;
|
||||
BPopUpMenu::InvalidateLayout(data->descendants);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_DO_LAYOUT:
|
||||
{
|
||||
BPopUpMenu::DoLayout();
|
||||
return B_OK;
|
||||
}
|
||||
}
|
||||
|
||||
return BMenu::Perform(code, _data);
|
||||
}
|
||||
|
||||
|
||||
|
@ -20,6 +20,8 @@
|
||||
#include <LayoutUtils.h>
|
||||
#include <Window.h>
|
||||
|
||||
#include <binary_compatibility/Interface.h>
|
||||
|
||||
|
||||
BRadioButton::BRadioButton(BRect frame, const char* name, const char* label,
|
||||
BMessage* message, uint32 resizMask, uint32 flags)
|
||||
@ -480,9 +482,58 @@ BRadioButton::GetSupportedSuites(BMessage* message)
|
||||
|
||||
|
||||
status_t
|
||||
BRadioButton::Perform(perform_code d, void* arg)
|
||||
BRadioButton::Perform(perform_code code, void* _data)
|
||||
{
|
||||
return BControl::Perform(d, arg);
|
||||
switch (code) {
|
||||
case PERFORM_CODE_MIN_SIZE:
|
||||
((perform_data_min_size*)_data)->return_value
|
||||
= BRadioButton::MinSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_MAX_SIZE:
|
||||
((perform_data_max_size*)_data)->return_value
|
||||
= BRadioButton::MaxSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_PREFERRED_SIZE:
|
||||
((perform_data_preferred_size*)_data)->return_value
|
||||
= BRadioButton::PreferredSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_LAYOUT_ALIGNMENT:
|
||||
((perform_data_layout_alignment*)_data)->return_value
|
||||
= BRadioButton::LayoutAlignment();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_HAS_HEIGHT_FOR_WIDTH:
|
||||
((perform_data_has_height_for_width*)_data)->return_value
|
||||
= BRadioButton::HasHeightForWidth();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_GET_HEIGHT_FOR_WIDTH:
|
||||
{
|
||||
perform_data_get_height_for_width* data
|
||||
= (perform_data_get_height_for_width*)_data;
|
||||
BRadioButton::GetHeightForWidth(data->width, &data->min, &data->max,
|
||||
&data->preferred);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_SET_LAYOUT:
|
||||
{
|
||||
perform_data_set_layout* data = (perform_data_set_layout*)_data;
|
||||
BRadioButton::SetLayout(data->layout);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_INVALIDATE_LAYOUT:
|
||||
{
|
||||
perform_data_invalidate_layout* data
|
||||
= (perform_data_invalidate_layout*)_data;
|
||||
BRadioButton::InvalidateLayout(data->descendants);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_DO_LAYOUT:
|
||||
{
|
||||
BRadioButton::DoLayout();
|
||||
return B_OK;
|
||||
}
|
||||
}
|
||||
|
||||
return BControl::Perform(code, _data);
|
||||
}
|
||||
|
||||
|
||||
|
@ -22,6 +22,8 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <binary_compatibility/Interface.h>
|
||||
|
||||
//#define TRACE_SCROLLBAR
|
||||
#ifdef TRACE_SCROLLBAR
|
||||
# define TRACE(x...) printf(x)
|
||||
@ -1153,9 +1155,58 @@ BScrollBar::PreferredSize()
|
||||
|
||||
|
||||
status_t
|
||||
BScrollBar::Perform(perform_code d, void* arg)
|
||||
BScrollBar::Perform(perform_code code, void* _data)
|
||||
{
|
||||
return BView::Perform(d, arg);
|
||||
switch (code) {
|
||||
case PERFORM_CODE_MIN_SIZE:
|
||||
((perform_data_min_size*)_data)->return_value
|
||||
= BScrollBar::MinSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_MAX_SIZE:
|
||||
((perform_data_max_size*)_data)->return_value
|
||||
= BScrollBar::MaxSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_PREFERRED_SIZE:
|
||||
((perform_data_preferred_size*)_data)->return_value
|
||||
= BScrollBar::PreferredSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_LAYOUT_ALIGNMENT:
|
||||
((perform_data_layout_alignment*)_data)->return_value
|
||||
= BScrollBar::LayoutAlignment();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_HAS_HEIGHT_FOR_WIDTH:
|
||||
((perform_data_has_height_for_width*)_data)->return_value
|
||||
= BScrollBar::HasHeightForWidth();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_GET_HEIGHT_FOR_WIDTH:
|
||||
{
|
||||
perform_data_get_height_for_width* data
|
||||
= (perform_data_get_height_for_width*)_data;
|
||||
BScrollBar::GetHeightForWidth(data->width, &data->min, &data->max,
|
||||
&data->preferred);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_SET_LAYOUT:
|
||||
{
|
||||
perform_data_set_layout* data = (perform_data_set_layout*)_data;
|
||||
BScrollBar::SetLayout(data->layout);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_INVALIDATE_LAYOUT:
|
||||
{
|
||||
perform_data_invalidate_layout* data
|
||||
= (perform_data_invalidate_layout*)_data;
|
||||
BScrollBar::InvalidateLayout(data->descendants);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_DO_LAYOUT:
|
||||
{
|
||||
BScrollBar::DoLayout();
|
||||
return B_OK;
|
||||
}
|
||||
}
|
||||
|
||||
return BView::Perform(code, _data);
|
||||
}
|
||||
|
||||
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include <Message.h>
|
||||
#include <Window.h>
|
||||
|
||||
#include <binary_compatibility/Interface.h>
|
||||
|
||||
static const float kFancyBorderSize = 2;
|
||||
static const float kPlainBorderSize = 1;
|
||||
@ -634,9 +635,58 @@ BScrollView::PreferredSize()
|
||||
|
||||
|
||||
status_t
|
||||
BScrollView::Perform(perform_code d, void *arg)
|
||||
BScrollView::Perform(perform_code code, void* _data)
|
||||
{
|
||||
return BView::Perform(d, arg);
|
||||
switch (code) {
|
||||
case PERFORM_CODE_MIN_SIZE:
|
||||
((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
|
||||
= (perform_data_get_height_for_width*)_data;
|
||||
BScrollView::GetHeightForWidth(data->width, &data->min, &data->max,
|
||||
&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_INVALIDATE_LAYOUT:
|
||||
{
|
||||
perform_data_invalidate_layout* data
|
||||
= (perform_data_invalidate_layout*)_data;
|
||||
BScrollView::InvalidateLayout(data->descendants);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_DO_LAYOUT:
|
||||
{
|
||||
BScrollView::DoLayout();
|
||||
return B_OK;
|
||||
}
|
||||
}
|
||||
|
||||
return BView::Perform(code, _data);
|
||||
}
|
||||
|
||||
|
||||
|
@ -99,10 +99,6 @@ static property_info sReplicantPropertyList[] = {
|
||||
};
|
||||
|
||||
|
||||
extern "C" void _ReservedShelf1__6BShelfFv(BShelf *const, int32,
|
||||
const BMessage*, const BView*);
|
||||
|
||||
|
||||
namespace BPrivate {
|
||||
|
||||
struct replicant_data {
|
||||
@ -1018,9 +1014,10 @@ BShelf::ReplicantDeleted(int32 index, const BMessage *archive,
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
extern "C" void
|
||||
_ReservedShelf1__6BShelfFv(BShelf *const, int32, const BMessage*, const BView*)
|
||||
{
|
||||
// is not contained in BeOS R5's libbe, so we leave it empty
|
||||
}
|
||||
|
||||
|
||||
|
@ -12,7 +12,6 @@
|
||||
#include <Slider.h>
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
@ -24,6 +23,8 @@
|
||||
#include <String.h>
|
||||
#include <Window.h>
|
||||
|
||||
#include <binary_compatibility/Interface.h>
|
||||
|
||||
|
||||
BSlider::BSlider(BRect frame, const char* name, const char* label,
|
||||
BMessage* message, int32 minValue, int32 maxValue,
|
||||
@ -285,9 +286,58 @@ BSlider::Archive(BMessage *archive, bool deep) const
|
||||
|
||||
|
||||
status_t
|
||||
BSlider::Perform(perform_code d, void *arg)
|
||||
BSlider::Perform(perform_code code, void* _data)
|
||||
{
|
||||
return BControl::Perform(d, arg);
|
||||
switch (code) {
|
||||
case PERFORM_CODE_MIN_SIZE:
|
||||
((perform_data_min_size*)_data)->return_value
|
||||
= BSlider::MinSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_MAX_SIZE:
|
||||
((perform_data_max_size*)_data)->return_value
|
||||
= BSlider::MaxSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_PREFERRED_SIZE:
|
||||
((perform_data_preferred_size*)_data)->return_value
|
||||
= BSlider::PreferredSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_LAYOUT_ALIGNMENT:
|
||||
((perform_data_layout_alignment*)_data)->return_value
|
||||
= BSlider::LayoutAlignment();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_HAS_HEIGHT_FOR_WIDTH:
|
||||
((perform_data_has_height_for_width*)_data)->return_value
|
||||
= BSlider::HasHeightForWidth();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_GET_HEIGHT_FOR_WIDTH:
|
||||
{
|
||||
perform_data_get_height_for_width* data
|
||||
= (perform_data_get_height_for_width*)_data;
|
||||
BSlider::GetHeightForWidth(data->width, &data->min, &data->max,
|
||||
&data->preferred);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_SET_LAYOUT:
|
||||
{
|
||||
perform_data_set_layout* data = (perform_data_set_layout*)_data;
|
||||
BSlider::SetLayout(data->layout);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_INVALIDATE_LAYOUT:
|
||||
{
|
||||
perform_data_invalidate_layout* data
|
||||
= (perform_data_invalidate_layout*)_data;
|
||||
BSlider::InvalidateLayout(data->descendants);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_DO_LAYOUT:
|
||||
{
|
||||
BSlider::DoLayout();
|
||||
return B_OK;
|
||||
}
|
||||
}
|
||||
|
||||
return BControl::Perform(code, _data);
|
||||
}
|
||||
|
||||
|
||||
@ -2018,8 +2068,29 @@ _ReservedSlider5__7BSlider(BSlider *slider)
|
||||
return slider->BSlider::MaxUpdateTextWidth();
|
||||
}
|
||||
|
||||
extern "C" void _ReservedSlider1__7BSlider() {}
|
||||
extern "C" void _ReservedSlider2__7BSlider() {}
|
||||
extern "C" void _ReservedSlider3__7BSlider() {}
|
||||
|
||||
extern "C"
|
||||
void
|
||||
_ReservedSlider1__7BSlider(BSlider* slider, orientation _orientation)
|
||||
{
|
||||
slider->BSlider::SetOrientation(_orientation);
|
||||
}
|
||||
|
||||
|
||||
extern "C"
|
||||
void
|
||||
_ReservedSlider2__7BSlider(BSlider* slider, float thickness)
|
||||
{
|
||||
slider->BSlider::SetBarThickness(thickness);
|
||||
}
|
||||
|
||||
|
||||
extern "C"
|
||||
void
|
||||
_ReservedSlider3__7BSlider(BSlider* slider, const BFont* font,
|
||||
uint32 properties)
|
||||
{
|
||||
slider->BSlider::SetFont(font, properties);
|
||||
}
|
||||
|
||||
#endif // __GNUC__ < 3
|
||||
|
@ -21,6 +21,8 @@
|
||||
#include <Layout.h>
|
||||
#include <LayoutUtils.h>
|
||||
|
||||
#include <binary_compatibility/Interface.h>
|
||||
|
||||
|
||||
static const rgb_color kDefaultBarColor = {50, 150, 255, 255};
|
||||
|
||||
@ -644,9 +646,58 @@ BStatusBar::PreferredSize()
|
||||
|
||||
|
||||
status_t
|
||||
BStatusBar::Perform(perform_code d, void* arg)
|
||||
BStatusBar::Perform(perform_code code, void* _data)
|
||||
{
|
||||
return BView::Perform(d, arg);
|
||||
switch (code) {
|
||||
case PERFORM_CODE_MIN_SIZE:
|
||||
((perform_data_min_size*)_data)->return_value
|
||||
= BStatusBar::MinSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_MAX_SIZE:
|
||||
((perform_data_max_size*)_data)->return_value
|
||||
= BStatusBar::MaxSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_PREFERRED_SIZE:
|
||||
((perform_data_preferred_size*)_data)->return_value
|
||||
= BStatusBar::PreferredSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_LAYOUT_ALIGNMENT:
|
||||
((perform_data_layout_alignment*)_data)->return_value
|
||||
= BStatusBar::LayoutAlignment();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_HAS_HEIGHT_FOR_WIDTH:
|
||||
((perform_data_has_height_for_width*)_data)->return_value
|
||||
= BStatusBar::HasHeightForWidth();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_GET_HEIGHT_FOR_WIDTH:
|
||||
{
|
||||
perform_data_get_height_for_width* data
|
||||
= (perform_data_get_height_for_width*)_data;
|
||||
BStatusBar::GetHeightForWidth(data->width, &data->min, &data->max,
|
||||
&data->preferred);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_SET_LAYOUT:
|
||||
{
|
||||
perform_data_set_layout* data = (perform_data_set_layout*)_data;
|
||||
BStatusBar::SetLayout(data->layout);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_INVALIDATE_LAYOUT:
|
||||
{
|
||||
perform_data_invalidate_layout* data
|
||||
= (perform_data_invalidate_layout*)_data;
|
||||
BStatusBar::InvalidateLayout(data->descendants);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_DO_LAYOUT:
|
||||
{
|
||||
BStatusBar::DoLayout();
|
||||
return B_OK;
|
||||
}
|
||||
}
|
||||
|
||||
return BView::Perform(code, _data);
|
||||
}
|
||||
|
||||
|
||||
|
@ -22,6 +22,8 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <binary_compatibility/Interface.h>
|
||||
|
||||
|
||||
BStringView::BStringView(BRect frame, const char* name, const char* text,
|
||||
uint32 resizeMask, uint32 flags)
|
||||
@ -335,10 +337,60 @@ BStringView::PreferredSize()
|
||||
|
||||
|
||||
status_t
|
||||
BStringView::Perform(perform_code d, void* arg)
|
||||
BStringView::Perform(perform_code code, void* _data)
|
||||
{
|
||||
return B_ERROR;
|
||||
switch (code) {
|
||||
case PERFORM_CODE_MIN_SIZE:
|
||||
((perform_data_min_size*)_data)->return_value
|
||||
= BStringView::MinSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_MAX_SIZE:
|
||||
((perform_data_max_size*)_data)->return_value
|
||||
= BStringView::MaxSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_PREFERRED_SIZE:
|
||||
((perform_data_preferred_size*)_data)->return_value
|
||||
= BStringView::PreferredSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_LAYOUT_ALIGNMENT:
|
||||
((perform_data_layout_alignment*)_data)->return_value
|
||||
= BStringView::LayoutAlignment();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_HAS_HEIGHT_FOR_WIDTH:
|
||||
((perform_data_has_height_for_width*)_data)->return_value
|
||||
= BStringView::HasHeightForWidth();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_GET_HEIGHT_FOR_WIDTH:
|
||||
{
|
||||
perform_data_get_height_for_width* data
|
||||
= (perform_data_get_height_for_width*)_data;
|
||||
BStringView::GetHeightForWidth(data->width, &data->min, &data->max,
|
||||
&data->preferred);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_SET_LAYOUT:
|
||||
{
|
||||
perform_data_set_layout* data = (perform_data_set_layout*)_data;
|
||||
BStringView::SetLayout(data->layout);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_INVALIDATE_LAYOUT:
|
||||
{
|
||||
perform_data_invalidate_layout* data
|
||||
= (perform_data_invalidate_layout*)_data;
|
||||
BStringView::InvalidateLayout(data->descendants);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_DO_LAYOUT:
|
||||
{
|
||||
BStringView::DoLayout();
|
||||
return B_OK;
|
||||
}
|
||||
}
|
||||
|
||||
return BView::Perform(code, _data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void BStringView::_ReservedStringView1() {}
|
||||
|
@ -20,6 +20,8 @@
|
||||
#include <TextControl.h>
|
||||
#include <Window.h>
|
||||
|
||||
#include <binary_compatibility/Interface.h>
|
||||
|
||||
#include "TextInput.h"
|
||||
|
||||
|
||||
@ -794,9 +796,58 @@ BTextControl::DoLayout()
|
||||
|
||||
|
||||
status_t
|
||||
BTextControl::Perform(perform_code d, void *arg)
|
||||
BTextControl::Perform(perform_code code, void* _data)
|
||||
{
|
||||
return BControl::Perform(d, arg);
|
||||
switch (code) {
|
||||
case PERFORM_CODE_MIN_SIZE:
|
||||
((perform_data_min_size*)_data)->return_value
|
||||
= BTextControl::MinSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_MAX_SIZE:
|
||||
((perform_data_max_size*)_data)->return_value
|
||||
= BTextControl::MaxSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_PREFERRED_SIZE:
|
||||
((perform_data_preferred_size*)_data)->return_value
|
||||
= BTextControl::PreferredSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_LAYOUT_ALIGNMENT:
|
||||
((perform_data_layout_alignment*)_data)->return_value
|
||||
= BTextControl::LayoutAlignment();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_HAS_HEIGHT_FOR_WIDTH:
|
||||
((perform_data_has_height_for_width*)_data)->return_value
|
||||
= BTextControl::HasHeightForWidth();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_GET_HEIGHT_FOR_WIDTH:
|
||||
{
|
||||
perform_data_get_height_for_width* data
|
||||
= (perform_data_get_height_for_width*)_data;
|
||||
BTextControl::GetHeightForWidth(data->width, &data->min, &data->max,
|
||||
&data->preferred);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_SET_LAYOUT:
|
||||
{
|
||||
perform_data_set_layout* data = (perform_data_set_layout*)_data;
|
||||
BTextControl::SetLayout(data->layout);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_INVALIDATE_LAYOUT:
|
||||
{
|
||||
perform_data_invalidate_layout* data
|
||||
= (perform_data_invalidate_layout*)_data;
|
||||
BTextControl::InvalidateLayout(data->descendants);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_DO_LAYOUT:
|
||||
{
|
||||
BTextControl::DoLayout();
|
||||
return B_OK;
|
||||
}
|
||||
}
|
||||
|
||||
return BControl::Perform(code, _data);
|
||||
}
|
||||
|
||||
|
||||
|
@ -40,6 +40,8 @@
|
||||
#include <TextView.h>
|
||||
#include <Window.h>
|
||||
|
||||
#include <binary_compatibility/Interface.h>
|
||||
|
||||
#include "InlineInput.h"
|
||||
#include "LineBuffer.h"
|
||||
#include "StyleBuffer.h"
|
||||
@ -47,6 +49,7 @@
|
||||
#include "UndoBuffer.h"
|
||||
#include "WidthBuffer.h"
|
||||
|
||||
|
||||
using namespace std;
|
||||
|
||||
#undef TRACE
|
||||
@ -1040,9 +1043,58 @@ BTextView::GetSupportedSuites(BMessage *data)
|
||||
|
||||
|
||||
status_t
|
||||
BTextView::Perform(perform_code d, void *arg)
|
||||
BTextView::Perform(perform_code code, void* _data)
|
||||
{
|
||||
return BView::Perform(d, arg);
|
||||
switch (code) {
|
||||
case PERFORM_CODE_MIN_SIZE:
|
||||
((perform_data_min_size*)_data)->return_value
|
||||
= BTextView::MinSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_MAX_SIZE:
|
||||
((perform_data_max_size*)_data)->return_value
|
||||
= BTextView::MaxSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_PREFERRED_SIZE:
|
||||
((perform_data_preferred_size*)_data)->return_value
|
||||
= BTextView::PreferredSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_LAYOUT_ALIGNMENT:
|
||||
((perform_data_layout_alignment*)_data)->return_value
|
||||
= BTextView::LayoutAlignment();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_HAS_HEIGHT_FOR_WIDTH:
|
||||
((perform_data_has_height_for_width*)_data)->return_value
|
||||
= BTextView::HasHeightForWidth();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_GET_HEIGHT_FOR_WIDTH:
|
||||
{
|
||||
perform_data_get_height_for_width* data
|
||||
= (perform_data_get_height_for_width*)_data;
|
||||
BTextView::GetHeightForWidth(data->width, &data->min, &data->max,
|
||||
&data->preferred);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_SET_LAYOUT:
|
||||
{
|
||||
perform_data_set_layout* data = (perform_data_set_layout*)_data;
|
||||
BTextView::SetLayout(data->layout);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_INVALIDATE_LAYOUT:
|
||||
{
|
||||
perform_data_invalidate_layout* data
|
||||
= (perform_data_invalidate_layout*)_data;
|
||||
BTextView::InvalidateLayout(data->descendants);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_DO_LAYOUT:
|
||||
{
|
||||
BTextView::DoLayout();
|
||||
return B_OK;
|
||||
}
|
||||
}
|
||||
|
||||
return BView::Perform(code, _data);
|
||||
}
|
||||
|
||||
|
||||
|
@ -9,16 +9,10 @@
|
||||
* Ingo Weinhold <bonefish@cs.tu-berlin.de>
|
||||
*/
|
||||
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <AppMisc.h>
|
||||
#include <AppServerLink.h>
|
||||
#include <MessagePrivate.h>
|
||||
#include <MessageUtils.h>
|
||||
#include <PortLink.h>
|
||||
#include <ServerProtocol.h>
|
||||
#include <ShapePrivate.h>
|
||||
#include <TokenSpace.h>
|
||||
#include <ViewPrivate.h>
|
||||
#include <new>
|
||||
|
||||
#include <Application.h>
|
||||
#include <Bitmap.h>
|
||||
@ -50,9 +44,16 @@
|
||||
#include <GradientDiamond.h>
|
||||
#include <GradientConic.h>
|
||||
|
||||
#include <math.h>
|
||||
#include <new>
|
||||
#include <stdio.h>
|
||||
#include <AppMisc.h>
|
||||
#include <AppServerLink.h>
|
||||
#include <binary_compatibility/Interface.h>
|
||||
#include <MessagePrivate.h>
|
||||
#include <MessageUtils.h>
|
||||
#include <PortLink.h>
|
||||
#include <ServerProtocol.h>
|
||||
#include <ShapePrivate.h>
|
||||
#include <TokenSpace.h>
|
||||
#include <ViewPrivate.h>
|
||||
|
||||
|
||||
using std::nothrow;
|
||||
@ -4279,9 +4280,58 @@ BView::MessageReceived(BMessage* msg)
|
||||
|
||||
|
||||
status_t
|
||||
BView::Perform(perform_code d, void* arg)
|
||||
BView::Perform(perform_code code, void* _data)
|
||||
{
|
||||
return B_BAD_VALUE;
|
||||
switch (code) {
|
||||
case PERFORM_CODE_MIN_SIZE:
|
||||
((perform_data_min_size*)_data)->return_value
|
||||
= BView::MinSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_MAX_SIZE:
|
||||
((perform_data_max_size*)_data)->return_value
|
||||
= BView::MaxSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_PREFERRED_SIZE:
|
||||
((perform_data_preferred_size*)_data)->return_value
|
||||
= BView::PreferredSize();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_LAYOUT_ALIGNMENT:
|
||||
((perform_data_layout_alignment*)_data)->return_value
|
||||
= BView::LayoutAlignment();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_HAS_HEIGHT_FOR_WIDTH:
|
||||
((perform_data_has_height_for_width*)_data)->return_value
|
||||
= BView::HasHeightForWidth();
|
||||
return B_OK;
|
||||
case PERFORM_CODE_GET_HEIGHT_FOR_WIDTH:
|
||||
{
|
||||
perform_data_get_height_for_width* data
|
||||
= (perform_data_get_height_for_width*)_data;
|
||||
BView::GetHeightForWidth(data->width, &data->min, &data->max,
|
||||
&data->preferred);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_SET_LAYOUT:
|
||||
{
|
||||
perform_data_set_layout* data = (perform_data_set_layout*)_data;
|
||||
BView::SetLayout(data->layout);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_INVALIDATE_LAYOUT:
|
||||
{
|
||||
perform_data_invalidate_layout* data
|
||||
= (perform_data_invalidate_layout*)_data;
|
||||
BView::InvalidateLayout(data->descendants);
|
||||
return B_OK;
|
||||
}
|
||||
case PERFORM_CODE_DO_LAYOUT:
|
||||
{
|
||||
BView::DoLayout();
|
||||
return B_OK;
|
||||
}
|
||||
}
|
||||
|
||||
return BHandler::Perform(code, _data);
|
||||
}
|
||||
|
||||
|
||||
@ -5305,16 +5355,106 @@ BView::_SwitchServerCurrentView() const
|
||||
}
|
||||
|
||||
|
||||
extern "C" void _ReservedView1__5BView() {}
|
||||
extern "C" void _ReservedView2__5BView() {}
|
||||
extern "C" void _ReservedView3__5BView() {}
|
||||
extern "C" void _ReservedView4__5BView() {}
|
||||
extern "C" void _ReservedView5__5BView() {}
|
||||
extern "C" void _ReservedView6__5BView() {}
|
||||
extern "C" void _ReservedView7__5BView() {}
|
||||
extern "C" void _ReservedView8__5BView() {}
|
||||
extern "C" void _ReservedView9__5BView() {}
|
||||
extern "C" void _ReservedView10__5BView() {}
|
||||
extern "C" void
|
||||
_ReservedView1__5BView(BView* view, BRect rect)
|
||||
{
|
||||
view->BView::DrawAfterChildren(rect);
|
||||
}
|
||||
|
||||
|
||||
extern "C" void
|
||||
_ReservedView2__5BView(BView* view)
|
||||
{
|
||||
// MinSize()
|
||||
perform_data_min_size data;
|
||||
view->Perform(PERFORM_CODE_MIN_SIZE, &data);
|
||||
}
|
||||
|
||||
|
||||
extern "C" void
|
||||
_ReservedView3__5BView(BView* view)
|
||||
{
|
||||
// MaxSize()
|
||||
perform_data_max_size data;
|
||||
view->Perform(PERFORM_CODE_MAX_SIZE, &data);
|
||||
}
|
||||
|
||||
|
||||
extern "C" BSize
|
||||
_ReservedView4__5BView(BView* view)
|
||||
{
|
||||
// PreferredSize()
|
||||
perform_data_preferred_size data;
|
||||
view->Perform(PERFORM_CODE_PREFERRED_SIZE, &data);
|
||||
return data.return_value;
|
||||
}
|
||||
|
||||
|
||||
extern "C" BAlignment
|
||||
_ReservedView5__5BView(BView* view)
|
||||
{
|
||||
// LayoutAlignment()
|
||||
perform_data_layout_alignment data;
|
||||
view->Perform(PERFORM_CODE_LAYOUT_ALIGNMENT, &data);
|
||||
return data.return_value;
|
||||
}
|
||||
|
||||
|
||||
extern "C" bool
|
||||
_ReservedView6__5BView(BView* view)
|
||||
{
|
||||
// HasHeightForWidth()
|
||||
perform_data_has_height_for_width data;
|
||||
view->Perform(PERFORM_CODE_HAS_HEIGHT_FOR_WIDTH, &data);
|
||||
return data.return_value;
|
||||
}
|
||||
|
||||
|
||||
extern "C" void
|
||||
_ReservedView7__5BView(BView* view, float width, float* min, float* max,
|
||||
float* preferred)
|
||||
{
|
||||
// GetHeightForWidth()
|
||||
perform_data_get_height_for_width data;
|
||||
data.width = width;
|
||||
view->Perform(PERFORM_CODE_GET_HEIGHT_FOR_WIDTH, &data);
|
||||
if (min != NULL)
|
||||
*min = data.min;
|
||||
if (max != NULL)
|
||||
*max = data.max;
|
||||
if (preferred != NULL)
|
||||
*preferred = data.preferred;
|
||||
}
|
||||
|
||||
|
||||
extern "C" void
|
||||
_ReservedView8__5BView(BView* view, BLayout* layout)
|
||||
{
|
||||
// SetLayout()
|
||||
perform_data_set_layout data;
|
||||
data.layout = layout;
|
||||
view->Perform(PERFORM_CODE_SET_LAYOUT, &data);
|
||||
}
|
||||
|
||||
|
||||
extern "C" void
|
||||
_ReservedView9__5BView(BView* view, bool descendants)
|
||||
{
|
||||
// InvalidateLayout()
|
||||
perform_data_invalidate_layout data;
|
||||
data.descendants = descendants;
|
||||
view->Perform(PERFORM_CODE_INVALIDATE_LAYOUT, &data);
|
||||
}
|
||||
|
||||
|
||||
extern "C" void
|
||||
_ReservedView10__5BView(BView* view)
|
||||
{
|
||||
// DoLayout()
|
||||
view->Perform(PERFORM_CODE_DO_LAYOUT, NULL);
|
||||
}
|
||||
|
||||
|
||||
void BView::_ReservedView11(){}
|
||||
void BView::_ReservedView12(){}
|
||||
void BView::_ReservedView13(){}
|
||||
|
@ -33,6 +33,7 @@
|
||||
#include <AppMisc.h>
|
||||
#include <AppServerLink.h>
|
||||
#include <ApplicationPrivate.h>
|
||||
#include <binary_compatibility/Interface.h>
|
||||
#include <DirectMessageTarget.h>
|
||||
#include <input_globals.h>
|
||||
#include <InputServerTypes.h>
|
||||
@ -2013,9 +2014,18 @@ BWindow::RemoveFromSubset(BWindow *window)
|
||||
|
||||
|
||||
status_t
|
||||
BWindow::Perform(perform_code d, void *arg)
|
||||
BWindow::Perform(perform_code code, void* _data)
|
||||
{
|
||||
return BLooper::Perform(d, arg);
|
||||
switch (code) {
|
||||
case PERFORM_CODE_SET_LAYOUT:
|
||||
{
|
||||
perform_data_set_layout* data = (perform_data_set_layout*)_data;
|
||||
BWindow::SetLayout(data->layout);
|
||||
return B_OK;
|
||||
}
|
||||
}
|
||||
|
||||
return BLooper::Perform(code, _data);
|
||||
}
|
||||
|
||||
|
||||
@ -3624,9 +3634,12 @@ BWindow::IsFilePanel() const
|
||||
|
||||
|
||||
extern "C" void
|
||||
_ReservedWindow1__7BWindow()
|
||||
_ReservedWindow1__7BWindow(BWindow* window, BLayout* layout)
|
||||
{
|
||||
// SetLayout()
|
||||
perform_data_set_layout data;
|
||||
data.layout = layout;
|
||||
window->Perform(PERFORM_CODE_SET_LAYOUT, &data);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user