Removed old source tree.

This commit is contained in:
jetsoni
2003-12-21 21:14:31 +00:00
parent c24f802cfe
commit e00969c6e6
179 changed files with 0 additions and 73464 deletions

View File

@@ -1,151 +0,0 @@
## OpenBeOS Generic Jamfile v1.0 ##
## Fill in this file to specify the project being created, and the referenced
## Jamfile-engine will do all of the hard work for you. This handles both
## Intel and PowerPC builds of the (Open)BeOS.
## Application Specific Settings ---------------------------------------------
# Specify the name of the binary
# If the name has spaces, you must quote it: "My App"
NAME = "libbepascal.so" ;
# Specify the type of binary
# APP: Application
# SHARED: Shared library or add-on
# STATIC: Static library archive
# DRIVER: Kernel Driver
TYPE = SHARED ;
# Specify the source files to use
# Full paths or paths relative to the Jamfile can be included.
# All files, regardless of directory, will have their object
# files created in the common object directory.
# Note that this means this Jamfile will not work correctly
# if two source files with the same name (source.c or source.cpp)
# are included from different directories.
# Ex: SRCS = file1.cpp file2.cpp file3.cpp ;
SRCS = be/bepas_kernel/beobj.cpp
be/app/Application.cpp
be/app/Clipboard.cpp
be/app/Handler.cpp
be/app/Invoker.cpp
be/app/Looper.cpp
be/app/Message.cpp
be/app/Messenger.cpp
be/app/Roster.cpp
be/device/Joystick.cpp
be/device/SerialPort.cpp
be/hey/hey.cpp
be/interface/Alert.cpp
be/interface/Box.cpp
be/interface/Button.cpp
be/interface/CheckBox.cpp
be/interface/Control.cpp
be/interface/Font.cpp
be/interface/ListItem.cpp
be/interface/ListView.cpp
be/interface/Menu.cpp
be/interface/MenuBar.cpp
be/interface/MenuItem.cpp
be/interface/OutlineListView.cpp
be/interface/Point.cpp
be/interface/Rect.cpp
be/interface/RadioButton.cpp
be/interface/ScrollBar.cpp
be/interface/ScrollView.cpp
be/interface/StatusBar.cpp
be/interface/StringView.cpp
be/interface/TabView.cpp
be/interface/TextControl.cpp
be/interface/TextView.cpp
be/interface/View.cpp
be/interface/Window.cpp
be/mail/E-mail.cpp
be/storage/Volume.cpp
be/storage/VolumeRoster.cpp
be/support/Archivable.cpp
be/support/DataIO.cpp
be/support/Flattenable.cpp
be/support/List.cpp
be/support/String.cpp ;
# Specify the resource files to use
# Full path or a relative path to the resource file can be used.
RSRCS = ;
# Specify additional libraries to link against
# There are two acceptable forms of library specifications
# - if your library follows the naming pattern of:
# libXXX.so or libXXX.a you can simply specify XXX
# library: libbe.so entry: be
#
# - if your library does not follow the standard library
# naming scheme you need to specify the path to the library
# and it's name
# library: my_lib.a entry: my_lib.a or path/my_lib.a
LIBS = be mail device ;
# Specify additional paths to directories following the standard
# libXXX.so or libXXX.a naming scheme. You can specify full paths
# or paths relative to the Jamfile. The paths included may not
# be recursive, so include all of the paths where libraries can
# be found. Directories where source files are found are
# automatically included.
LIBPATHS = ;
# Additional paths to look for system headers
# These use the form: #include <header>
# source file directories are NOT auto-included here
SYSTEM_INCLUDE_PATHS = be/app
be/bepas_kernel
be/interface
be/support ;
# Additional paths to look for local headers
# thes use the form: #include "header"
# source file directories are automatically included
LOCAL_INCLUDE_PATHS = ;
# Specify the level of optimization that you desire
# NONE, SOME, FULL
OPTIMIZE = NONE ;
# Specify any preprocessor symbols to be defined. The symbols will not
# have their values set automatically; you must supply the value (if any)
# to use. For example, setting DEFINES to "DEBUG=1" will cause the
# compiler option "-DDEBUG=1" to be used. Setting DEFINES to "DEBUG"
# would pass "-DDEBUG" on the compiler's command line.
DEFINES = "DEBUG" ;
# Specify special warning levels
# if unspecified default warnings will be used
# NONE = supress all warnings
# ALL = enable all warnings
WARNINGS = ALL ;
# Specify whether image symbols will be created
# so that stack crawls in the debugger are meaningful
# if TRUE symbols will be created
SYMBOLS = TRUE ;
# Specify debug settings
# if TRUE will allow application to be run from a source-level
# debugger. Note that this will disable all optimzation.
DEBUGGER = TRUE ;
# Specify additional compiler flags for all files
COMPILER_FLAGS = ;
# Specify additional linker flags
LINKER_FLAGS = ;
# (for TYPE == DRIVER only) Specify desired location of driver in the /dev
# hierarchy. Used by the driverinstall rule. E.g., DRIVER_PATH = video/usb will
# instruct the driverinstall rule to place a symlink to your driver's binary in
# ~/add-ons/kernel/drivers/dev/video/usb, so that your driver will appear at
# /dev/video/usb when loaded. Default is "misc".
DRIVER_PATH = ;
## Include the Jamfile-engine
include $(BUILDHOME)/etc/Jamfile-engine ;

View File

@@ -1,25 +0,0 @@
/* BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _APPKIT_CPP_
#define _APPKIT_CPP_
#include <Application.cpp>
#include <message.h>
#endif /* _APPKIT_CPP_ */

View File

@@ -1,24 +0,0 @@
/* BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _BE_CPP_
#define _BE_CPP_
#include <AppKit.cpp>
#endif /* _BE_CPP_ */

View File

@@ -1,170 +0,0 @@
/* BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _APPLICATION_CPP_
#define _APPLICATION_CPP_
#include <Application.h>
#include <Archivable.h>
#include <Message.h>
#include <application.h>
// #include <Control.cpp>
#include <window.h>
#include <view.h>
#include <point.h>
#include <rect.h>
#include <handler.h>
#include <looper.h>
#include <archivable.h>
#include <message.h>
#include <beobj.h>
// definition of callback function in BApplication
typedef void (*BApplication_AppActivated_hook) (TPasObject PasObject, bool active);
typedef void (*BApplication_ReadyToRun_hook) (TPasObject PasObject);
// typedef bool (*BApplication_QuitRequested_hook) (TPasObject PasObject);
// typedef void (*BApplication_MessageReceived_hook) (TPasObject PasObject, TCPlusObject message);
#if defined(__cplusplus)
extern "C" {
#endif
BApplication_AppActivated_hook Application_AppActivated_hook;
BApplication_ReadyToRun_hook Application_ReadyToRun_hook;
//BApplication_QuitRequested_hook Application_QuitRequested_hook;
//BApplication_MessageReceived_hook Application_MessageReceived_hook;
BMessenger *be_app_messengerCPlus;
#if defined(__cplusplus)
}
#endif
BPApplication::BPApplication(TPasObject PasObject, const char *signature)
: BApplication(signature), BPHandler(PasObject), BPLooper(PasObject),
BPasObject(PasObject)
{
be_app_messengerCPlus = &be_app_messenger;
}
BPApplication::BPApplication(TPasObject PasObject, const char *signature,
status_t *error) : BApplication(signature, error),
BPHandler(PasObject),
BPLooper(PasObject),
BPasObject(PasObject)
{
be_app_messengerCPlus = &be_app_messenger;
}
void BPApplication::AppActivated(bool active)
{
AppActivated_hookCall(active);
BApplication::AppActivated(active);
}
void BPApplication::AppActivated_hookCall(bool active)
{
Application_AppActivated_hook(GetPasObject(), active);
}
void BPApplication::ReadyToRun(void)
{
ReadyToRun_hookCall();
BApplication::ReadyToRun();
}
void BPApplication::ReadyToRun_hookCall(void)
{
Application_ReadyToRun_hook(GetPasObject());
}
bool BPApplication::QuitRequested(void)
{
return QuitRequested_hookCall();
// return BApplication::QuitRequested();
}
void BPApplication::MessageReceived(BMessage *message)
{
MessageReceived_hookCall(message);
BApplication::MessageReceived(message);
}
void BPApplication::DispatchMessage(BMessage *message, BHandler *target)
{
DispatchMessage_hookCall(message, target);
// message->PrintToStream();
BApplication::DispatchMessage(message, target);
}
#if defined(__cplusplus)
extern "C" {
#endif
TCPlusObject BApplication_Create_1(TPasObject PasObject)
{
return new BPApplication(PasObject, "application/x-vnd.RuBe");
}
TCPlusObject BApplication_Create_2(TPasObject PasObject, const char *Signature)
{
return new BPApplication(PasObject, Signature);
}
TCPlusObject BApplication_Create_3(TPasObject PasObject, const char *Signature,
status_t *error)
{
return new BPApplication(PasObject, Signature, error);
}
void BApplication_Free(TCPlusObject Application)
{
delete Application;
}
void BApplication_HideCursor(TCPlusObject Application)
{
reinterpret_cast<BApplication*>(Application)->HideCursor();
}
void BApplication_ShowCursor(TCPlusObject Application)
{
reinterpret_cast<BApplication*>(Application)->ShowCursor();
}
thread_id BApplication_Run(TCPlusObject Application)
{
return reinterpret_cast<BApplication*>(Application)->Run();
}
void BApplication_Quit(TCPlusObject Application)
{
reinterpret_cast<BApplication*>(Application)->Quit();
}
#if defined(__cplusplus)
}
#endif
#endif /* _APPLICATION_CPP_ */

View File

@@ -1,273 +0,0 @@
#ifndef _CLIPBOARD_CPP_
#define _CLIPBOARD_CPP_
/***********************************************************************
* AUTHOR: nobody <baron>
* FILE: Clipboard.cpp
* DATE: Fri Sep 27 23:26:07 2002
* DESCR:
***********************************************************************/
#include "Clipboard.h"
#include <beobj.h>
#if defined(__cplusplus)
extern "C" {
#endif
/*
* Method: BClipboard::BClipboard()
* Descr:
*/
TCPlusObject BClipboard_Create(const char *name,
bool transient)
{
return new BClipboard(name,
transient);
}
/*
* Method: BClipboard::~BClipboard()
* Descr:
*/
void BClipboard_Free(BClipboard *Clipboard)
{
delete Clipboard;
}
/*
* Method: BClipboard::Name()
* Descr:
*/
const char *
BClipboard_Name(BClipboard *Clipboard)
{
return Clipboard->Name();
}
/*
* Method: BClipboard::LocalCount()
* Descr:
*/
uint32
BClipboard_LocalCount(BClipboard *Clipboard)
{
return Clipboard->LocalCount();
}
/*
* Method: BClipboard::SystemCount()
* Descr:
*/
uint32
BClipboard_SystemCount(BClipboard *Clipboard)
{
return Clipboard->SystemCount();
}
/*
* Method: BClipboard::StartWatching()
* Descr:
*/
status_t
BClipboard_StartWatching(BClipboard *Clipboard, BMessenger target)
{
return Clipboard->StartWatching(target);
}
/*
* Method: BClipboard::StopWatching()
* Descr:
*/
status_t
BClipboard_StopWatching(BClipboard *Clipboard, BMessenger target)
{
return Clipboard->StopWatching(target);
}
/*
* Method: BClipboard::Lock()
* Descr:
*/
bool
BClipboard_Lock(BClipboard *Clipboard)
{
return Clipboard->Lock();
}
/*
* Method: BClipboard::Unlock()
* Descr:
*/
void
BClipboard_Unlock(BClipboard *Clipboard)
{
Clipboard->Unlock();
}
/*
* Method: BClipboard::IsLocked()
* Descr:
*/
bool
BClipboard_IsLocked(BClipboard *Clipboard)
{
return Clipboard->IsLocked();
}
/*
* Method: BClipboard::Clear()
* Descr:
*/
status_t
BClipboard_Clear(BClipboard *Clipboard)
{
return Clipboard->Clear();
}
/*
* Method: BClipboard::Commit()
* Descr:
*/
status_t
BClipboard_Commit(BClipboard *Clipboard)
{
return Clipboard->Commit();
}
/*
* Method: BClipboard::Revert()
* Descr:
*/
status_t
BClipboard_Revert(BClipboard *Clipboard)
{
return Clipboard->Revert();
}
/*
* Method: BClipboard::DataSource()
* Descr:
*/
BMessenger
BClipboard_DataSource(BClipboard *Clipboard)
{
return Clipboard->DataSource();
}
/*
* Method: BClipboard::Data()
* Descr:
*/
BMessage *
BClipboard_Data(BClipboard *Clipboard)
{
return Clipboard->Data();
}
/*
* Method: BClipboard::BClipboard()
* Descr:
*/
/*TCPlusObject BClipboard_Create(TPasObject PasObject, const BClipboard &)
{
return new BPClipboard(PasObject, );
}*/
/*
* Method: BClipboard::operator=()
* Descr:
*/
/*BClipboard &
BClipboard_operator=(BClipboard *Clipboard, const BClipboard &)
{
return Clipboard->operator=();
}*/
/*
* Method: BClipboard::_ReservedClipboard1()
* Descr:
*/
/*void
BClipboard__ReservedClipboard1(BClipboard *Clipboard)
{
Clipboard->_ReservedClipboard1();
}*/
/*
* Method: BClipboard::_ReservedClipboard2()
* Descr:
*/
/*void
BClipboard__ReservedClipboard2(BClipboard *Clipboard)
{
Clipboard->_ReservedClipboard2();
}*/
/*
* Method: BClipboard::_ReservedClipboard3()
* Descr:
*/
/*void
BClipboard__ReservedClipboard3(BClipboard *Clipboard)
{
Clipboard->_ReservedClipboard3();
}*/
/*
* Method: BClipboard::AssertLocked()
* Descr:
*/
/*bool
BClipboard_AssertLocked(BClipboard *Clipboard)
{
return Clipboard->AssertLocked();
}*/
/*
* Method: BClipboard::DownloadFromSystem()
* Descr:
*/
/*status_t
BClipboard_DownloadFromSystem(BClipboard *Clipboard, bool force)
{
return Clipboard->DownloadFromSystem(force);
}*/
/*
* Method: BClipboard::UploadToSystem()
* Descr:
*/
/*status_t
BClipboard_UploadToSystem(BClipboard *Clipboard)
{
return Clipboard->UploadToSystem();
}*/
#if defined(__cplusplus)
}
#endif
#endif /* _CLIPBOARD_CPP_ */

View File

@@ -1,78 +0,0 @@
/* BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _HANDLER_CPP_
#define _HANDLER_CPP_
#include <Handler.h>
#include <handler.h>
#include <beobj.h>
#if defined(__cplusplus)
extern "C" {
#endif
BHandler_MessageReceived_hook Handler_MessageReceived_hook;
#if defined(__cplusplus)
}
#endif
BPHandler::BPHandler(TPasObject PasObject, const char *name)
: BHandler(name), BPasObject(PasObject)
{
}
BPHandler::BPHandler(TPasObject PasObject, BMessage *archive)
: BHandler(archive), BPasObject(PasObject)
{
}
BPHandler::~BPHandler()
{
}
void BPHandler::MessageReceived(BMessage *message)
{
MessageReceived_hookCall(message);
BHandler::MessageReceived(message);
}
void BPHandler::MessageReceived_hookCall(BMessage *message)
{
Handler_MessageReceived_hook(GetPasObject(), message);
}
#if defined(__cplusplus)
extern "C" {
#endif
TCPlusObject BHandler_Create(TPasObject PasObject, const char *name)
{
return new BPHandler(PasObject, name);
}
#if defined(__cplusplus)
}
#endif
#endif /* _HANDLER_CPP_ */

View File

@@ -1,352 +0,0 @@
#ifndef _INVOKER_CPP_
#define _INVOKER_CPP_
/***********************************************************************
* AUTHOR: nobody <baron>
* FILE: Invoker.cpp
* DATE: Sat Nov 30 01:48:14 2002
* DESCR:
***********************************************************************/
#include "Invoker.h"
#include <beobj.h>
#if defined(__cplusplus)
extern "C" {
#endif
/***********************************************************************
* Method: BInvoker::BInvoker
* Params:
* Effects:
***********************************************************************/
TCPlusObject BInvoker_Create(TPasObject PasObject)
{
return new BInvoker();
}
/***********************************************************************
* Method: BInvoker::BInvoker
* Params: BMessage *message, const BHandler *handler, const BLooper *looper
* Effects:
***********************************************************************/
TCPlusObject BInvoker_Create_1
(TPasObject PasObject, BMessage *message, const BHandler *handler, const BLooper *looper)
{
return new BInvoker(message, handler, looper);
}
/***********************************************************************
* Method: BInvoker::BInvoker
* Params: BMessage *message, BMessenger target
* Effects:
***********************************************************************/
TCPlusObject BInvoker_Create_2
(TPasObject PasObject, BMessage *message, BMessenger target)
{
return new BInvoker(message, target);
}
/***********************************************************************
* Method: BInvoker::~BInvoker
* Params:
* Effects:
***********************************************************************/
void BInvoker_Free(BInvoker *Invoker)
{
delete Invoker;
}
/***********************************************************************
* Method: BInvoker::SetMessage
* Params: BMessage *message
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BInvoker_SetMessage(BInvoker *Invoker, BMessage *message)
{
return Invoker->SetMessage(message);
}
/***********************************************************************
* Method: BInvoker::Message
* Params:
* Returns: BMessage *
* Effects:
***********************************************************************/
BMessage *
BInvoker_Message(BInvoker *Invoker)
{
return Invoker->Message();
}
/***********************************************************************
* Method: BInvoker::Command
* Params:
* Returns: uint32
* Effects:
***********************************************************************/
uint32
BInvoker_Command(BInvoker *Invoker)
{
return Invoker->Command();
}
/***********************************************************************
* Method: BInvoker::SetTarget
* Params: const BHandler *h, const BLooper *loop
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BInvoker_SetTarget(BInvoker *Invoker, const BHandler *h, const BLooper *loop)
{
return Invoker->SetTarget(h, loop);
}
/***********************************************************************
* Method: BInvoker::SetTarget
* Params: BMessenger messenger
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BInvoker_SetTarget_1
(BInvoker *Invoker, BMessenger messenger)
{
return Invoker->SetTarget(messenger);
}
/***********************************************************************
* Method: BInvoker::IsTargetLocal
* Params:
* Returns: bool
* Effects:
***********************************************************************/
bool
BInvoker_IsTargetLocal(BInvoker *Invoker)
{
return Invoker->IsTargetLocal();
}
/***********************************************************************
* Method: BInvoker::Target
* Params: BLooper **looper
* Returns: BHandler *
* Effects:
***********************************************************************/
BHandler *
BInvoker_Target(BInvoker *Invoker, BLooper **looper)
{
return Invoker->Target(looper);
}
/***********************************************************************
* Method: BInvoker::Messenger
* Params:
* Returns: BMessenger
* Effects:
***********************************************************************/
BMessenger
BInvoker_Messenger(BInvoker *Invoker)
{
return Invoker->Messenger();
}
/***********************************************************************
* Method: BInvoker::SetHandlerForReply
* Params: BHandler *handler
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BInvoker_SetHandlerForReply(BInvoker *Invoker, BHandler *handler)
{
return Invoker->SetHandlerForReply(handler);
}
/***********************************************************************
* Method: BInvoker::HandlerForReply
* Params:
* Returns: BHandler *
* Effects:
***********************************************************************/
BHandler *
BInvoker_HandlerForReply(BInvoker *Invoker)
{
return Invoker->HandlerForReply();
}
/***********************************************************************
* Method: BInvoker::Invoke
* Params: BMessage *msg
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BInvoker_Invoke(BInvoker *Invoker, BMessage *msg)
{
return Invoker->Invoke(msg);
}
/***********************************************************************
* Method: BInvoker::InvokeNotify
* Params: BMessage *msg, uint32 kind
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BInvoker_InvokeNotify_1
(BInvoker *Invoker, BMessage *msg, uint32 kind)
{
return Invoker->InvokeNotify(msg, kind);
}
/***********************************************************************
* Method: BInvoker::SetTimeout
* Params: bigtime_t timeout
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BInvoker_SetTimeout(BInvoker *Invoker, bigtime_t timeout)
{
return Invoker->SetTimeout(timeout);
}
/***********************************************************************
* Method: BInvoker::Timeout
* Params:
* Returns: bigtime_t
* Effects:
***********************************************************************/
bigtime_t
BInvoker_Timeout(BInvoker *Invoker)
{
return Invoker->Timeout();
}
// protected
/***********************************************************************
* Method: BInvoker::InvokeKind
* Params: bool *notify
* Returns: uint32
* Effects:
***********************************************************************/
/* uint32
BInvoker_InvokeKind(BInvoker *Invoker, bool *notify)
{
return Invoker->InvokeKind(notify);
}
*/
/***********************************************************************
* Method: BInvoker::BeginInvokeNotify
* Params: uint32 kind
* Returns: void
* Effects:
***********************************************************************/
/*void
BInvoker_BeginInvokeNotify(BInvoker *Invoker, uint32 kind)
{
Invoker->BeginInvokeNotify(kind);
}
*/
/***********************************************************************
* Method: BInvoker::EndInvokeNotify
* Params:
* Returns: void
* Effects:
***********************************************************************/
/*void
BInvoker_EndInvokeNotify(BInvoker *Invoker)
{
Invoker->EndInvokeNotify();
}
*/
///***********************************************************************
// * Method: BInvoker::_ReservedInvoker1
// * Params:
// * Returns: void
// * Effects:
// ***********************************************************************/
//void
//BInvoker__ReservedInvoker1(BInvoker *Invoker)
//{
// Invoker->_ReservedInvoker1();
//}
//
//
///***********************************************************************
// * Method: BInvoker::_ReservedInvoker2
// * Params:
// * Returns: void
// * Effects:
// ***********************************************************************/
//void
//BInvoker__ReservedInvoker2(BInvoker *Invoker)
//{
// Invoker->_ReservedInvoker2();
//}
//
//
///***********************************************************************
// * Method: BInvoker::_ReservedInvoker3
// * Params:
// * Returns: void
// * Effects:
// ***********************************************************************/
//void
//BInvoker__ReservedInvoker3(BInvoker *Invoker)
//{
// Invoker->_ReservedInvoker3();
//}
//
//
///***********************************************************************
// * Method: BInvoker::BInvoker
// * Params: const BInvoker &
// * Effects:
// ***********************************************************************/
//TCPlusObject BInvoker_Create(TPasObject PasObject, const BInvoker &)
//{
// return new BPInvoker(PasObject, );
//}
//
//
///***********************************************************************
// * Method: BInvoker::operator=
// * Params: const BInvoker &
// * Returns: BInvoker &
// * Effects:
// ***********************************************************************/
//BInvoker &
//BInvoker_operator=(BInvoker *Invoker, const BInvoker &)
//{
// return Invoker->operator=();
//}
#if defined(__cplusplus)
}
#endif
#endif /* _INVOKER_CPP_ */

View File

@@ -1,131 +0,0 @@
/* BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _LOOPER_CPP_
#define _LOOPER_CPP_
#include <Looper.h>
#include <Message.h>
#include <OS.h>
#include <beobj.h>
#include <looper.h>
#include <handler.h>
// definition of callback function in BLooper
typedef void (*BLooper_DispatchMessage_hook) (TPasObject PasObject,
TCPlusObject message,
TCPlusObject target);
typedef bool(*BLooper_QuitRequested_hook) (TPasObject PasObject);
#if defined(__cplusplus)
extern "C" {
#endif
BLooper_DispatchMessage_hook Looper_DispatchMessage_hook;
BLooper_QuitRequested_hook Looper_QuitRequested_hook;
#if defined(__cplusplus)
}
#endif
BPLooper::BPLooper(TPasObject PasObject, const char *name = NULL,
int32 priority = B_NORMAL_PRIORITY,
int32 portCapacity = B_LOOPER_PORT_DEFAULT_CAPACITY)
: BLooper(name, priority, portCapacity),
BPHandler(PasObject, name),
BPasObject(PasObject)
{
}
BPLooper::~BPLooper()
{
}
void BPLooper::DispatchMessage(BMessage *message, BHandler *target)
{
DispatchMessage_hookCall(message, target);
BLooper::DispatchMessage(message, target);
}
void BPLooper::DispatchMessage_hookCall(BMessage *message, BHandler *target)
{
Looper_DispatchMessage_hook(GetPasObject(), message, target);
}
bool BPLooper::QuitRequested(void)
{
QuitRequested_hookCall();
return Looper_QuitRequested_hook(GetPasObject());
}
bool BPLooper::QuitRequested_hookCall(void)
{
return Looper_QuitRequested_hook(GetPasObject());
}
void BPLooper::MessageReceived(BMessage *message)
{
MessageReceived_hookCall(message);
BLooper::MessageReceived(message);
}
#if defined(__cplusplus)
extern "C" {
#endif
TCPlusObject BLooper_Create(TPasObject PasObject, const char *name,
int32 priority,
int32 portCapacity)
{
return new BPLooper(PasObject, name, priority, portCapacity);
}
status_t BLooper_GetSupportedSuites(TCPlusObject Looper, BMessage *message)
{
return reinterpret_cast<BLooper*>(Looper)->GetSupportedSuites(message);
}
bool BLooper_LockLooper(TCPlusObject Looper)
{
return reinterpret_cast<BLooper*>(Looper)->LockLooper();
}
status_t BLooper_LockLooperWithTimeout(TCPlusObject Looper, bigtime_t timeout)
{
return reinterpret_cast<BLooper*>(Looper)->LockLooperWithTimeout(timeout);
}
void BLooper_UnlockLooper(TCPlusObject Looper)
{
reinterpret_cast<BLooper*>(Looper)->UnlockLooper();
}
status_t BLooper_PostMessage_2(TCPlusObject Looper, uint32 command)
{
return reinterpret_cast<BLooper*>(Looper)->PostMessage(command);
}
#if defined(__cplusplus)
}
#endif
#endif /* _LOOPER_CPP_ */

File diff suppressed because it is too large Load Diff

View File

@@ -1,280 +0,0 @@
#ifndef _MESSENGER_CPP_
#define _MESSENGER_CPP_
/***********************************************************************
* AUTHOR: nobody <baron>
* FILE: Messenger.cpp
* DATE: Sat Nov 30 02:32:17 2002
* DESCR:
***********************************************************************/
#include "Messenger.h"
#include "Application.h"
#include <beobj.h>
#if defined(__cplusplus)
extern "C" {
#endif
/***********************************************************************
* Method: BMessenger::BMessenger
* Params:
* Effects:
***********************************************************************/
TCPlusObject BMessenger_Create(TPasObject PasObject)
{
return new BMessenger();
}
/***********************************************************************
* Method: BMessenger::BMessenger
* Params: const char *mime_sig, team_id team, status_t *perr
* Effects:
***********************************************************************/
TCPlusObject BMessenger_Create_1
(TPasObject PasObject, const char *mime_sig, team_id team, status_t *perr)
{
return new BMessenger(mime_sig, team, perr);
}
/***********************************************************************
* Method: BMessenger::BMessenger
* Params: const BHandler *handler, const BLooper *looper, status_t *perr
* Effects:
***********************************************************************/
TCPlusObject BMessenger_Create_2
(TPasObject PasObject, const BHandler *handler, const BLooper *looper, status_t *perr)
{
return new BMessenger(handler, looper, perr);
}
/***********************************************************************
* Method: BMessenger::BMessenger
* Params: const BMessenger &from
* Effects:
***********************************************************************/
TCPlusObject BMessenger_Create_3
(TPasObject PasObject, const BMessenger &from)
{
return new BMessenger(from);
}
/***********************************************************************
* Method: BMessenger::~BMessenger
* Params:
* Effects:
***********************************************************************/
void BMessenger_Free(BMessenger *Messenger)
{
delete Messenger;
}
/***********************************************************************
* Method: BMessenger::IsTargetLocal
* Params:
* Returns: bool
* Effects:
***********************************************************************/
bool
BMessenger_IsTargetLocal(BMessenger *Messenger)
{
return Messenger->IsTargetLocal();
}
/***********************************************************************
* Method: BMessenger::Target
* Params: BLooper **looper
* Returns: BHandler *
* Effects:
***********************************************************************/
BHandler *
BMessenger_Target(BMessenger *Messenger, BLooper **looper)
{
return Messenger->Target(looper);
}
/***********************************************************************
* Method: BMessenger::LockTarget
* Params:
* Returns: bool
* Effects:
***********************************************************************/
bool
BMessenger_LockTarget(BMessenger *Messenger)
{
return Messenger->LockTarget();
}
/***********************************************************************
* Method: BMessenger::LockTargetWithTimeout
* Params: bigtime_t timeout
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BMessenger_LockTargetWithTimeout_1
(BMessenger *Messenger, bigtime_t timeout)
{
return Messenger->LockTargetWithTimeout(timeout);
}
/***********************************************************************
* Method: BMessenger::SendMessage
* Params: uint32 command, BHandler *reply_to
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BMessenger_SendMessage(BMessenger *Messenger, uint32 command, BHandler *reply_to)
{
return Messenger->SendMessage(command, reply_to);
}
/***********************************************************************
* Method: BMessenger::SendMessage
* Params: BMessage *a_message, BHandler *reply_to, bigtime_t timeout
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BMessenger_SendMessage_1
(BMessenger *Messenger, BMessage *a_message, BHandler *reply_to, bigtime_t timeout)
{
return Messenger->SendMessage(a_message, reply_to, timeout);
}
/***********************************************************************
* Method: BMessenger::SendMessage
* Params: BMessage *a_message, BMessenger reply_to, bigtime_t timeout
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BMessenger_SendMessage_2
(BMessenger *Messenger, BMessage *a_message, BMessenger reply_to, bigtime_t timeout)
{
return Messenger->SendMessage(a_message, reply_to, timeout);
}
/***********************************************************************
* Method: BMessenger::SendMessage
* Params: uint32 command, BMessage *reply
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BMessenger_SendMessage_3
(BMessenger *Messenger, uint32 command, BMessage *reply)
{
return Messenger->SendMessage(command, reply);
}
/***********************************************************************
* Method: BMessenger::SendMessage
* Params: BMessage *a_message, BMessage *reply, bigtime_t send_timeout, bigtime_t reply_timeout
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BMessenger_SendMessage_4
(BMessenger *Messenger, BMessage *a_message, BMessage *reply, bigtime_t send_timeout, bigtime_t reply_timeout)
{
return Messenger->SendMessage(a_message, reply, send_timeout, reply_timeout);
}
///***********************************************************************
// * Method: BMessenger::operator=
// * Params: const BMessenger &from
// * Returns: BMessenger &
// * Effects:
// ***********************************************************************/
//BMessenger &
//BMessenger_operator=(BMessenger *Messenger, const BMessenger &from)
//{
// return Messenger->operator=(from);
//}
//
//
///***********************************************************************
// * Method: BMessenger::operator==
// * Params: const BMessenger &other
// * Returns: bool
// * Effects:
// ***********************************************************************/
//bool
//BMessenger_operator==_1
//(BMessenger *Messenger, const BMessenger &other) const
//{
// return Messenger->operator==(other);
//}
/***********************************************************************
* Method: BMessenger::IsValid
* Params:
* Returns: bool
* Effects:
***********************************************************************/
bool
BMessenger_IsValid(BMessenger *Messenger)
{
return Messenger->IsValid();
}
/***********************************************************************
* Method: BMessenger::Team
* Params:
* Returns: team_id
* Effects:
***********************************************************************/
team_id
BMessenger_Team(BMessenger *Messenger)
{
return Messenger->Team();
}
///***********************************************************************
// * Method: BMessenger::BMessenger
// * Params: team_id team, port_id port, int32 token, bool preferred
// * Effects:
// ***********************************************************************/
//TCPlusObject BMessenger_Create_4(TPasObject PasObject, team_id team, port_id port, int32 token, bool preferred)
//{
// return new BMessenger(team, port, token, preferred);
//}
///***********************************************************************
// * Method: BMessenger::InitData
// * Params: const char *mime_sig, team_id team, status_t *perr
// * Returns: void
// * Effects:
// ***********************************************************************/
//void
//BMessenger_InitData(BMessenger *Messenger, const char *mime_sig, team_id team, status_t *perr)
//{
// Messenger->InitData(mime_sig, team, perr);
//}
#if defined(__cplusplus)
}
#endif
#endif /* _MESSENGER_CPP_ */

View File

@@ -1,744 +0,0 @@
/* BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _ROSTER_CPP_
#define _ROSTER_CPP_
#include <Roster.h>
#include <Message.h>
#include <beobj.h>
#include <roster.h>
#if defined(__cplusplus)
extern "C" {
#endif
const TCPlusObject Get_be_roster(void)
{
// Pas très propre ! Si quelqu'un a mieux...
return TCPlusObject(be_roster);
}
TCPlusObject BRoster_Create(TPasObject PasObject)
{
return new BRoster();
}
void BRoster_Destroy(TPasObject PasObject)
{
delete PasObject;
}
//status_t BRoster_Broadcast(TCPlusObject Roster, TCPlusObject *message)
//{
// return reinterpret_cast<BRoster*>(Roster)->Broadcast(reinterpret_cast<BMessage*>(message));
//}
/***********************************************************************
* Method: BRoster::IsRunning
* Params: const char *mime_sig
* Returns: bool
* Effects:
***********************************************************************/
bool
BRoster_IsRunning(BRoster *Roster, const char *mime_sig)
{
return Roster->IsRunning(mime_sig);
}
/***********************************************************************
* Method: BRoster::IsRunning
* Params: entry_ref *ref
* Returns: bool
* Effects:
***********************************************************************/
bool
BRoster_IsRunning_1
(BRoster *Roster, entry_ref *ref)
{
return Roster->IsRunning(ref);
}
/***********************************************************************
* Method: BRoster::TeamFor
* Params: const char *mime_sig
* Returns: team_id
* Effects:
***********************************************************************/
team_id
BRoster_TeamFor(BRoster *Roster, const char *mime_sig)
{
return Roster->TeamFor(mime_sig);
}
/***********************************************************************
* Method: BRoster::TeamFor
* Params: entry_ref *ref
* Returns: team_id
* Effects:
***********************************************************************/
team_id
BRoster_TeamFor_1
(BRoster *Roster, entry_ref *ref)
{
return Roster->TeamFor(ref);
}
/***********************************************************************
* Method: BRoster::GetAppList
* Params: BList *team_id_list
* Returns: void
* Effects:
***********************************************************************/
void
BRoster_GetAppList(BRoster *Roster, BList *team_id_list)
{
Roster->GetAppList(team_id_list);
}
/***********************************************************************
* Method: BRoster::GetAppList
* Params: const char *sig, BList *team_id_list
* Returns: void
* Effects:
***********************************************************************/
void
BRoster_GetAppList_1
(BRoster *Roster, const char *sig, BList *team_id_list)
{
Roster->GetAppList(sig, team_id_list);
}
/***********************************************************************
* Method: BRoster::GetAppInfo
* Params: const char *sig, app_info *info
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BRoster_GetAppInfo(BRoster *Roster, const char *sig, app_info *info)
{
return Roster->GetAppInfo(sig, info);
}
/***********************************************************************
* Method: BRoster::GetAppInfo
* Params: entry_ref *ref, app_info *info
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BRoster_GetAppInfo_1
(BRoster *Roster, entry_ref *ref, app_info *info)
{
return Roster->GetAppInfo(ref, info);
}
/***********************************************************************
* Method: BRoster::GetRunningAppInfo
* Params: team_id team, app_info *info
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BRoster_GetRunningAppInfo(BRoster *Roster, team_id team, app_info *info)
{
return Roster->GetRunningAppInfo(team, info);
}
/***********************************************************************
* Method: BRoster::GetActiveAppInfo
* Params: app_info *info
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BRoster_GetActiveAppInfo(BRoster *Roster, app_info *info)
{
return Roster->GetActiveAppInfo(info);
}
/***********************************************************************
* Method: BRoster::FindApp
* Params: const char *mime_type, entry_ref *app
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BRoster_FindApp(BRoster *Roster, const char *mime_type, entry_ref *app)
{
return Roster->FindApp(mime_type, app);
}
/***********************************************************************
* Method: BRoster::FindApp
* Params: entry_ref *ref, entry_ref *app
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BRoster_FindApp_1
(BRoster *Roster, entry_ref *ref, entry_ref *app)
{
return Roster->FindApp(ref, app);
}
/***********************************************************************
* Method: BRoster::Broadcast
* Params: BMessage *msg
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BRoster_Broadcast(BRoster *Roster, BMessage *msg)
{
return Roster->Broadcast(msg);
}
/***********************************************************************
* Method: BRoster::Broadcast
* Params: BMessage *msg, BMessenger reply_to
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BRoster_Broadcast_1
(BRoster *Roster, BMessage *msg, BMessenger reply_to)
{
return Roster->Broadcast(msg, reply_to);
}
/***********************************************************************
* Method: BRoster::StopWatching
* Params: BMessenger target
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BRoster_StopWatching(BRoster *Roster, BMessenger target)
{
return Roster->StopWatching(target);
}
/***********************************************************************
* Method: BRoster::ActivateApp
* Params: team_id team
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BRoster_ActivateApp(BRoster *Roster, team_id team)
{
return Roster->ActivateApp(team);
}
/***********************************************************************
* Method: BRoster::Launch
* Params: const char *mime_type, BMessage *initial_msgs, team_id *app_team
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BRoster_Launch(BRoster *Roster, const char *mime_type, BMessage *initial_msgs, team_id *app_team)
{
return Roster->Launch(mime_type, initial_msgs, app_team);
}
/***********************************************************************
* Method: BRoster::Launch
* Params: const char *mime_type, BList *message_list, team_id *app_team
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BRoster_Launch_1
(BRoster *Roster, const char *mime_type, BList *message_list, team_id *app_team)
{
return Roster->Launch(mime_type, message_list, app_team);
}
/***********************************************************************
* Method: BRoster::Launch
* Params: const char *mime_type, int argc, char **args, team_id *app_team
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BRoster_Launch_2
(BRoster *Roster, const char *mime_type, int argc, char **args, team_id *app_team)
{
return Roster->Launch(mime_type, argc, args, app_team);
}
/***********************************************************************
* Method: BRoster::Launch
* Params: const entry_ref *ref, const BMessage *initial_message, team_id *app_team
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BRoster_Launch_3
(BRoster *Roster, const entry_ref *ref, const BMessage *initial_message, team_id *app_team)
{
return Roster->Launch(ref, initial_message, app_team);
}
/***********************************************************************
* Method: BRoster::Launch
* Params: const entry_ref *ref, const BList *message_list, team_id *app_team
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BRoster_Launch_4
(BRoster *Roster, const entry_ref *ref, const BList *message_list, team_id *app_team)
{
return Roster->Launch(ref, message_list, app_team);
}
/***********************************************************************
* Method: BRoster::Launch
* Params: const entry_ref *ref, int argc, const char *const *args, team_id *app_team
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BRoster_Launch_5
(BRoster *Roster, const entry_ref *ref, int argc, const char *const *args, team_id *app_team)
{
return Roster->Launch(ref, argc, args, app_team);
}
/***********************************************************************
* Method: BRoster::GetRecentDocuments
* Params: BMessage *refList, int32 maxCount, const char *ofType, const char *openedByAppSig
* Returns: void
* Effects:
***********************************************************************/
void
BRoster_GetRecentDocuments(BRoster *Roster, BMessage *refList, int32 maxCount, const char *ofType, const char *openedByAppSig)
{
Roster->GetRecentDocuments(refList, maxCount, ofType, openedByAppSig);
}
/***********************************************************************
* Method: BRoster::GetRecentDocuments
* Params: BMessage *refList, int32 maxCount, const char *ofTypeList[], int32 ofTypeListCount, const char *openedByAppSig
* Returns: void
* Effects:
***********************************************************************/
void
BRoster_GetRecentDocuments_1
(BRoster *Roster, BMessage *refList, int32 maxCount, const char *ofTypeList[], int32 ofTypeListCount, const char *openedByAppSig)
{
// Roster->GetRecentDocuments(refList, maxCount, ofTypeList[], ofTypeListCount, openedByAppSig);
}
/***********************************************************************
* Method: BRoster::GetRecentFolders
* Params: BMessage *refList, int32 maxCount, const char *openedByAppSig
* Returns: void
* Effects:
***********************************************************************/
void
BRoster_GetRecentFolders(BRoster *Roster, BMessage *refList, int32 maxCount, const char *openedByAppSig)
{
Roster->GetRecentFolders(refList, maxCount, openedByAppSig);
}
/***********************************************************************
* Method: BRoster::GetRecentApps
* Params: BMessage *refList, int32 maxCount
* Returns: void
* Effects:
***********************************************************************/
void
BRoster_GetRecentApps(BRoster *Roster, BMessage *refList, int32 maxCount)
{
Roster->GetRecentApps(refList, maxCount);
}
/***********************************************************************
* Method: BRoster::AddToRecentDocuments
* Params: const entry_ref *doc, const char *appSig
* Returns: void
* Effects:
***********************************************************************/
void
BRoster_AddToRecentDocuments(BRoster *Roster, const entry_ref *doc, const char *appSig)
{
Roster->AddToRecentDocuments(doc, appSig);
}
/***********************************************************************
* Method: BRoster::AddToRecentFolders
* Params: const entry_ref *folder, const char *appSig
* Returns: void
* Effects:
***********************************************************************/
void
BRoster_AddToRecentFolders(BRoster *Roster, const entry_ref *folder, const char *appSig)
{
Roster->AddToRecentFolders(folder, appSig);
}
/***********************************************************************
* Method: BRoster::_StartWatching
* Params: mtarget t, BMessenger *roster_mess, uint32 what, BMessenger notify, uint32 event_mask
* Returns: status_t
* Effects:
***********************************************************************/
/*status_t
BRoster__StartWatching(BRoster *Roster, mtarget t, BMessenger *roster_mess, uint32 what, BMessenger notify, uint32 event_mask) const
{
return Roster->_StartWatching(t, roster_mess, what, notify, event_mask);
}
*/
/***********************************************************************
* Method: BRoster::_StopWatching
* Params: mtarget t, BMessenger *roster_mess, uint32 what, BMessenger notify
* Returns: status_t
* Effects:
***********************************************************************/
/*status_t
BRoster__StopWatching(BRoster *Roster, mtarget t, BMessenger *roster_mess, uint32 what, BMessenger notify) const
{
return Roster->_StopWatching(t, roster_mess, what, notify);
}
*/
/***********************************************************************
* Method: BRoster::AddApplication
* Params: const char *mime_sig, entry_ref *ref, uint32 flags, team_id team, thread_id thread, port_id port, bool full_reg
* Returns: uint32
* Effects:
***********************************************************************/
/*uint32
BRoster_AddApplication(BRoster *Roster, const char *mime_sig, entry_ref *ref, uint32 flags, team_id team, thread_id thread, port_id port, bool full_reg) const
{
return Roster->AddApplication(mime_sig, ref, flags, team, thread, port, full_reg);
}
*/
/***********************************************************************
* Method: BRoster::SetSignature
* Params: team_id team, const char *mime_sig
* Returns: void
* Effects:
***********************************************************************/
/*void
BRoster_SetSignature(BRoster *Roster, team_id team, const char *mime_sig) const
{
Roster->SetSignature(team, mime_sig);
}
*/
/***********************************************************************
* Method: BRoster::SetThread
* Params: team_id team, thread_id tid
* Returns: void
* Effects:
***********************************************************************/
/*void
BRoster_SetThread(BRoster *Roster, team_id team, thread_id tid) const
{
Roster->SetThread(team, tid);
}
*/
/***********************************************************************
* Method: BRoster::SetThreadAndTeam
* Params: uint32 entry_token, thread_id tid, team_id team
* Returns: void
* Effects:
***********************************************************************/
/*void
BRoster_SetThreadAndTeam_1
(BRoster *Roster, uint32 entry_token, thread_id tid, team_id team) const
{
Roster->SetThreadAndTeam(entry_token, tid, team);
}
*/
/***********************************************************************
* Method: BRoster::CompleteRegistration
* Params: team_id team, thread_id, port_id port
* Returns: void
* Effects:
***********************************************************************/
/*void
BRoster_CompleteRegistration(BRoster *Roster, team_id team, thread_id, port_id port) const
{
Roster->CompleteRegistration(team, , port);
}
*/
/***********************************************************************
* Method: BRoster::IsAppPreRegistered
* Params: entry_ref *ref, team_id team, app_info *info
* Returns: bool
* Effects:
***********************************************************************/
/*bool
BRoster_IsAppPreRegistered(BRoster *Roster, entry_ref *ref, team_id team, app_info *info) const
{
return Roster->IsAppPreRegistered(ref, team, info);
}
*/
/***********************************************************************
* Method: BRoster::RemovePreRegApp
* Params: uint32 entry_token
* Returns: void
* Effects:
***********************************************************************/
/*void
BRoster_RemovePreRegApp(BRoster *Roster, uint32 entry_token) const
{
Roster->RemovePreRegApp(entry_token);
}
*/
/***********************************************************************
* Method: BRoster::RemoveApp
* Params: team_id team
* Returns: void
* Effects:
***********************************************************************/
/*void
BRoster_RemoveApp(BRoster *Roster, team_id team) const
{
Roster->RemoveApp(team);
}
*/
/***********************************************************************
* Method: BRoster::xLaunchAppPrivate
* Params: const char *mime_sig, const entry_ref *ref, BList *msg_list, int cargs, char **args, team_id *app_team
* Returns: status_t
* Effects:
***********************************************************************/
/*status_t
BRoster_xLaunchAppPrivate(BRoster *Roster, const char *mime_sig, const entry_ref *ref, BList *msg_list, int cargs, char **args, team_id *app_team) const
{
return Roster->xLaunchAppPrivate(mime_sig, ref, msg_list, cargs, args, app_team);
}
*/
/***********************************************************************
* Method: BRoster::UpdateActiveApp
* Params: team_id team
* Returns: bool
* Effects:
***********************************************************************/
/*bool
BRoster_UpdateActiveApp(BRoster *Roster, team_id team) const
{
return Roster->UpdateActiveApp(team);
}
*/
/***********************************************************************
* Method: BRoster::SetAppFlags
* Params: team_id team, uint32 flags
* Returns: void
* Effects:
***********************************************************************/
/*void
BRoster_SetAppFlags(BRoster *Roster, team_id team, uint32 flags) const
{
Roster->SetAppFlags(team, flags);
}
*/
/***********************************************************************
* Method: BRoster::DumpRoster
* Params:
* Returns: void
* Effects:
***********************************************************************/
/*void
BRoster_DumpRoster(BRoster *Roster) const
{
Roster->DumpRoster();
}
*/
/***********************************************************************
* Method: BRoster::resolve_app
* Params: const char *in_type, const entry_ref *ref, entry_ref *app_ref, char *app_sig, uint32 *app_flags, bool *was_document
* Returns: status_t
* Effects:
***********************************************************************/
/*status_t
BRoster_resolve_app(BRoster *Roster, const char *in_type, const entry_ref *ref, entry_ref *app_ref, char *app_sig, uint32 *app_flags, bool *was_document) const
{
return Roster->resolve_app(in_type, ref, app_ref, app_sig, app_flags, was_document);
}
*/
/***********************************************************************
* Method: BRoster::translate_ref
* Params: const entry_ref *ref, BMimeType *app_meta, entry_ref *app_ref, BFile *app_file, char *app_sig, bool *was_document
* Returns: status_t
* Effects:
***********************************************************************/
/*status_t
BRoster_translate_ref(BRoster *Roster, const entry_ref *ref, BMimeType *app_meta, entry_ref *app_ref, BFile *app_file, char *app_sig, bool *was_document) const
{
return Roster->translate_ref(ref, app_meta, app_ref, app_file, app_sig, was_document);
}
*/
/***********************************************************************
* Method: BRoster::translate_type
* Params: const char *mime_type, BMimeType *meta, entry_ref *app_ref, BFile *app_file, char *app_sig
* Returns: status_t
* Effects:
***********************************************************************/
/*status_t
BRoster_translate_type(BRoster *Roster, const char *mime_type, BMimeType *meta, entry_ref *app_ref, BFile *app_file, char *app_sig) const
{
return Roster->translate_type(mime_type, meta, app_ref, app_file, app_sig);
}
*/
/***********************************************************************
* Method: BRoster::sniff_file
* Params: const entry_ref *file, BNodeInfo *finfo, char *mime_type
* Returns: status_t
* Effects:
***********************************************************************/
/*status_t
BRoster_sniff_file(BRoster *Roster, const entry_ref *file, BNodeInfo *finfo, char *mime_type) const
{
return Roster->sniff_file(file, finfo, mime_type);
}
*/
/***********************************************************************
* Method: BRoster::is_wildcard
* Params: const char *sig
* Returns: bool
* Effects:
***********************************************************************/
/*bool
BRoster_is_wildcard(BRoster *Roster, const char *sig) const
{
return Roster->is_wildcard(sig);
}
*/
/***********************************************************************
* Method: BRoster::get_unique_supporting_app
* Params: const BMessage *apps, char *out_sig
* Returns: status_t
* Effects:
***********************************************************************/
/*status_t
BRoster_get_unique_supporting_app(BRoster *Roster, const BMessage *apps, char *out_sig) const
{
return Roster->get_unique_supporting_app(apps, out_sig);
}
*/
/***********************************************************************
* Method: BRoster::get_random_supporting_app
* Params: const BMessage *apps, char *out_sig
* Returns: status_t
* Effects:
***********************************************************************/
/*status_t
BRoster_get_random_supporting_app(BRoster *Roster, const BMessage *apps, char *out_sig) const
{
return Roster->get_random_supporting_app(apps, out_sig);
}
*/
/***********************************************************************
* Method: BRoster::build_arg_vector
* Params: char **args, int *pargs, const entry_ref *app_ref, const entry_ref *doc_ref
* Returns: char **
* Effects:
***********************************************************************/
/*char **
BRoster_build_arg_vector(BRoster *Roster, char **args, int *pargs, const entry_ref *app_ref, const entry_ref *doc_ref) const
{
return Roster->build_arg_vector(args, pargs, app_ref, doc_ref);
}
*/
/***********************************************************************
* Method: BRoster::send_to_running
* Params: team_id tema, const entry_ref *app_ref, int cargs, char **args, const BList *msg_list, const entry_ref *ref
* Returns: status_t
* Effects:
***********************************************************************/
/*status_t
BRoster_send_to_running(BRoster *Roster, team_id tema, const entry_ref *app_ref, int cargs, char **args, const BList *msg_list, const entry_ref *ref) const
{
return Roster->send_to_running(tema, app_ref, cargs, args, msg_list, ref);
}
*/
/***********************************************************************
* Method: BRoster::InitMessengers
* Params:
* Returns: void
* Effects:
***********************************************************************/
/*void
BRoster_InitMessengers(BRoster *Roster)
{
Roster->InitMessengers();
}
*/
#if defined(__cplusplus)
}
#endif
#endif /* _ROSTER_CPP_ */

View File

@@ -1,302 +0,0 @@
{ BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
}
unit appdefs;
interface
const
// System Messages Codes
_B_ABOUT_REQUESTED : array[0..3] of Char = ('_', 'A', 'B', 'R');
_B_WINDOW_ACTIVATED : array[0..3] of Char = ('_', 'A', 'C', 'T');
_B_APP_ACTIVATED : array[0..3] of Char = ('_', 'A', 'C', 'T'); //* Same as B_WINDOW_ACTIVATED */
_B_ARGV_RECEIVED : array[0..3] of Char = ('_', 'A', 'R', 'G');
_B_QUIT_REQUESTED : array[0..3] of Char = ('_', 'Q', 'R', 'Q');
_B_CLOSE_REQUESTED : array[0..3] of Char = ('_', 'Q', 'R', 'Q'); //* Obsolete; use B_QUIT_REQUESTED */
_B_CANCEL : array[0..3] of Char = ('_', 'C', 'N', 'C');
_B_KEY_DOWN : array[0..3] of Char = ('_', 'K', 'Y', 'D');
_B_KEY_UP : array[0..3] of Char = ('_', 'K', 'Y', 'U');
_B_UNMAPPED_KEY_DOWN : array[0..3] of Char = ('_', 'U', 'K', 'D');
_B_UNMAPPED_KEY_UP : array[0..3] of Char = ('_', 'U', 'K', 'U');
_B_MODIFIERS_CHANGED : array[0..3] of Char = ('_', 'M', 'C', 'H');
_B_MINIMIZE : array[0..3] of Char = ('_', 'W', 'M', 'N');
_B_MOUSE_DOWN : array[0..3] of Char = ('_', 'M', 'D', 'N');
_B_MOUSE_MOVED : array[0..3] of Char = ('_', 'M', 'M', 'V');
_B_MOUSE_ENTER_EXIT : array[0..3] of Char = ('_', 'M', 'E', 'X');
_B_MOUSE_UP : array[0..3] of Char = ('_', 'M', 'U', 'P');
_B_MOUSE_WHEEL_CHANGED : array[0..3] of Char = ('_', 'M', 'W', 'C');
_B_OPEN_IN_WORKSPACE : array[0..3] of Char = ('_', 'O', 'W', 'S');
_B_PRINTER_CHANGED : array[0..3] of Char = ('_', 'P', 'C', 'H');
_B_PULSE : array[0..3] of Char = ('_', 'P', 'U', 'L');
_B_READY_TO_RUN : array[0..3] of Char = ('_', 'R', 'T', 'R');
_B_REFS_RECEIVED : array[0..3] of Char = ('_', 'R', 'R', 'C');
_B_RELEASE_OVERLAY_LOCK : array[0..3] of Char = ('_', 'R', 'O', 'V');
_B_ACQUIRE_OVERLAY_LOCK : array[0..3] of Char = ('_', 'A', 'O', 'V');
_B_SCREEN_CHANGED : array[0..3] of Char = ('_', 'S', 'C', 'H');
_B_VALUE_CHANGED : array[0..3] of Char = ('_', 'V', 'C', 'H');
_B_VIEW_MOVED : array[0..3] of Char = ('_', 'V', 'M', 'V');
_B_VIEW_RESIZED : array[0..3] of Char = ('_', 'V', 'R', 'S');
_B_WINDOW_MOVED : array[0..3] of Char = ('_', 'W', 'M', 'V');
_B_WINDOW_RESIZED : array[0..3] of Char = ('_', 'W', 'R', 'S');
_B_WORKSPACES_CHANGED : array[0..3] of Char = ('_', 'W', 'C', 'G');
_B_WORKSPACE_ACTIVATED : array[0..3] of Char = ('_', 'W', 'A', 'C');
_B_ZOOM : array[0..3] of Char = ('_', 'W', 'Z', 'M');
__APP_MENU_ : array[0..3] of Char = ('_', 'A', 'M', 'N');
__BROWSER_MENUS_ : array[0..3] of Char = ('_', 'B', 'R', 'M');
__MENU_EVENT_ : array[0..3] of Char = ('_', 'M', 'E', 'V');
__PING_ : array[0..3] of Char = ('_', 'P', 'B', 'L');
__QUIT_ : array[0..3] of Char = ('_', 'Q', 'I', 'T');
__VOLUME_MOUNTED_ : array[0..3] of Char = ('_', 'N', 'V', 'L');
__VOLUME_UNMOUNTED_ : array[0..3] of Char = ('_', 'V', 'R', 'M');
__MESSAGE_DROPPED_ : array[0..3] of Char = ('_', 'M', 'D', 'P');
__DISPOSE_DRAG_ : array[0..3] of Char = ('_', 'D', 'P', 'D');
__MENUS_DONE_ : array[0..3] of Char = ('_', 'M', 'N', 'D');
__SHOW_DRAG_HANDLES_ : array[0..3] of Char = ('_', 'S', 'D', 'H');
__EVENTS_PENDING_ : array[0..3] of Char = ('_', 'E', 'V', 'P');
__UPDATE_ : array[0..3] of Char = ('_', 'U', 'P', 'D');
__UPDATE_IF_NEEDED_ : array[0..3] of Char = ('_', 'U', 'P', 'N');
__PRINTER_INFO_ : array[0..3] of Char = ('_', 'P', 'I', 'N');
__SETUP_PRINTER_ : array[0..3] of Char = ('_', 'S', 'U', 'P');
__SELECT_PRINTER_ : array[0..3] of Char = ('_', 'P', 'S', 'L');
// Other Commands
_B_SET_PROPERTY : array[0..3] of Char = ('P', 'S', 'E', 'T');
_B_GET_PROPERTY : array[0..3] of Char = ('P', 'G', 'E', 'T');
_B_CREATE_PROPERTY : array[0..3] of Char = ('P', 'C', 'R', 'T');
_B_DELETE_PROPERTY : array[0..3] of Char = ('P', 'D', 'E', 'L');
_B_COUNT_PROPERTIES : array[0..3] of Char = ('P', 'C', 'N', 'T');
_B_EXECUTE_PROPERTY : array[0..3] of Char = ('P', 'E', 'X', 'E');
_B_GET_SUPPORTED_SUITES : array[0..3] of Char = ('S', 'U', 'I', 'T');
_B_UNDO : array[0..3] of Char = ('U', 'N', 'D', 'O');
_B_CUT : array[0..3] of Char = ('C', 'C', 'U', 'T');
_B_COPY : array[0..3] of Char = ('C', 'O', 'P', 'Y');
_B_PASTE : array[0..3] of Char = ('P', 'S', 'T', 'E');
_B_SELECT_ALL : array[0..3] of Char = ('S', 'A', 'L', 'L');
_B_SAVE_REQUESTED : array[0..3] of Char = ('S', 'A', 'V', 'E');
_B_MESSAGE_NOT_UNDERSTOOD : array[0..3] of Char = ('M', 'N', 'O', 'T');
_B_NO_REPLY : array[0..3] of Char = ('N', 'O', 'N', 'E');
_B_REPLY : array[0..3] of Char = ('R', 'P', 'L', 'Y');
_B_SIMPLE_DATA : array[0..3] of Char = ('D', 'A', 'T', 'A');
_B_MIME_DATA : array[0..3] of Char = ('M', 'I', 'M', 'E');
_B_ARCHIVED_OBJECT : array[0..3] of Char = ('A', 'R', 'C', 'V');
_B_UPDATE_STATUS_BAR : array[0..3] of Char = ('S', 'B', 'U', 'P');
_B_RESET_STATUS_BAR : array[0..3] of Char = ('S', 'B', 'R', 'S');
_B_NODE_MONITOR : array[0..3] of Char = ('N', 'D', 'M', 'N');
_B_QUERY_UPDATE : array[0..3] of Char = ('Q', 'U', 'P', 'D');
_B_ENDORSABLE : array[0..3] of Char = ('E', 'N', 'D', 'O');
_B_COPY_TARGET : array[0..3] of Char = ('D', 'D', 'C', 'P');
_B_MOVE_TARGET : array[0..3] of Char = ('D', 'D', 'M', 'V');
_B_TRASH_TARGET : array[0..3] of Char = ('D', 'D', 'R', 'M');
_B_LINK_TARGET : array[0..3] of Char = ('D', 'D', 'L', 'N');
_B_INPUT_DEVICES_CHANGED : array[0..3] of Char = ('I', 'D', 'C', 'H');
_B_INPUT_METHOD_EVENT : array[0..3] of Char = ('I', 'M', 'E', 'V');
_B_WINDOW_MOVE_TO : array[0..3] of Char = ('W', 'D', 'M', 'T');
_B_WINDOW_MOVE_BY : array[0..3] of Char = ('W', 'D', 'M', 'B');
_B_SILENT_RELAUNCH : array[0..3] of Char = ('A', 'R', 'E', 'L');
_B_OBSERVER_NOTICE_CHANGE : array[0..3] of Char = ('N', 'T', 'C', 'H');
_B_CONTROL_INVOKED : array[0..3] of Char = ('C', 'I', 'V', 'K');
_B_CONTROL_MODIFIED : array[0..3] of Char = ('C', 'M', 'O', 'D');
//* Media Kit reserves all reserved codes starting in 'TRI' */
var
B_ABOUT_REQUESTED : Cardinal;
B_WINDOW_ACTIVATED : Cardinal;
B_APP_ACTIVATED : Cardinal;
B_ARGV_RECEIVED : Cardinal;
B_QUIT_REQUESTED : Cardinal;
B_CLOSE_REQUESTED : Cardinal;
B_CANCEL : Cardinal;
B_KEY_DOWN : Cardinal;
B_KEY_UP : Cardinal;
B_UNMAPPED_KEY_DOWN : Cardinal;
B_UNMAPPED_KEY_UP : Cardinal;
B_MODIFIERS_CHANGED : Cardinal;
B_MINIMIZE : Cardinal;
B_MOUSE_DOWN : Cardinal;
B_MOUSE_MOVED : Cardinal;
B_MOUSE_ENTER_EXIT : Cardinal;
B_MOUSE_UP : Cardinal;
B_MOUSE_WHEEL_CHANGED : Cardinal;
B_OPEN_IN_WORKSPACE : Cardinal;
B_PRINTER_CHANGED : Cardinal;
B_PULSE : Cardinal;
B_READY_TO_RUN : Cardinal;
B_REFS_RECEIVED : Cardinal;
B_RELEASE_OVERLAY_LOCK : Cardinal;
B_ACQUIRE_OVERLAY_LOCK : Cardinal;
B_SCREEN_CHANGED : Cardinal;
B_VALUE_CHANGED : Cardinal;
B_VIEW_MOVED : Cardinal;
B_VIEW_RESIZED : Cardinal;
B_WINDOW_MOVED : Cardinal;
B_WINDOW_RESIZED : Cardinal;
B_WORKSPACES_CHANGED : Cardinal;
B_WORKSPACE_ACTIVATED : Cardinal;
B_ZOOM : Cardinal;
_APP_MENU_ : Cardinal;
_BROWSER_MENUS_ : Cardinal;
_MENU_EVENT_ : Cardinal;
_PING_ : Cardinal;
_QUIT_ : Cardinal;
_VOLUME_MOUNTED_ : Cardinal;
_VOLUME_UNMOUNTED_ : Cardinal;
_MESSAGE_DROPPED_ : Cardinal;
_DISPOSE_DRAG_ : Cardinal;
_MENUS_DONE_ : Cardinal;
_SHOW_DRAG_HANDLES_ : Cardinal;
_EVENTS_PENDING_ : Cardinal;
_UPDATE_ : Cardinal;
_UPDATE_IF_NEEDED_ : Cardinal;
_PRINTER_INFO_ : Cardinal;
_SETUP_PRINTER_ : Cardinal;
_SELECT_PRINTER_ : Cardinal;
// Other Commands
B_SET_PROPERTY : Cardinal;
B_GET_PROPERTY : Cardinal;
B_CREATE_PROPERTY : Cardinal;
B_DELETE_PROPERTY : Cardinal;
B_COUNT_PROPERTIES : Cardinal;
B_EXECUTE_PROPERTY : Cardinal;
B_GET_SUPPORTED_SUITES : Cardinal;
B_UNDO : Cardinal;
B_CUT : Cardinal;
B_COPY : Cardinal;
B_PASTE : Cardinal;
B_SELECT_ALL : Cardinal;
B_SAVE_REQUESTED : Cardinal;
B_MESSAGE_NOT_UNDERSTOOD : Cardinal;
B_NO_REPLY : Cardinal;
B_REPLY : Cardinal;
B_SIMPLE_DATA : Cardinal;
B_MIME_DATA : Cardinal;
B_ARCHIVED_OBJECT : Cardinal;
B_UPDATE_STATUS_BAR : Cardinal;
B_RESET_STATUS_BAR : Cardinal;
B_NODE_MONITOR : Cardinal;
B_QUERY_UPDATE : Cardinal;
B_ENDORSABLE : Cardinal;
B_COPY_TARGET : Cardinal;
B_MOVE_TARGET : Cardinal;
B_TRASH_TARGET : Cardinal;
B_LINK_TARGET : Cardinal;
B_INPUT_DEVICES_CHANGED : Cardinal;
B_INPUT_METHOD_EVENT : Cardinal;
B_WINDOW_MOVE_TO : Cardinal;
B_WINDOW_MOVE_BY : Cardinal;
B_SILENT_RELAUNCH : Cardinal;
B_OBSERVER_NOTICE_CHANGE : Cardinal;
B_CONTROL_INVOKED : Cardinal;
B_CONTROL_MODIFIED : Cardinal;
implementation
initialization
// System Messages Codes
B_ABOUT_REQUESTED := Cardinal(_B_ABOUT_REQUESTED);
B_WINDOW_ACTIVATED := Cardinal(_B_WINDOW_ACTIVATED);
B_APP_ACTIVATED := Cardinal(_B_APP_ACTIVATED);
B_ARGV_RECEIVED := Cardinal(_B_ARGV_RECEIVED);
B_QUIT_REQUESTED := Cardinal(_B_QUIT_REQUESTED);
B_CLOSE_REQUESTED := Cardinal(_B_CLOSE_REQUESTED);
B_CANCEL := Cardinal(_B_CANCEL);
B_KEY_DOWN := Cardinal(_B_KEY_DOWN);
B_KEY_UP := Cardinal(_B_KEY_UP);
B_UNMAPPED_KEY_DOWN := Cardinal(_B_UNMAPPED_KEY_DOWN);
B_UNMAPPED_KEY_UP := Cardinal(_B_UNMAPPED_KEY_UP);
B_MODIFIERS_CHANGED := Cardinal(_B_MODIFIERS_CHANGED);
B_MINIMIZE := Cardinal(_B_MINIMIZE);
B_MOUSE_DOWN := Cardinal(_B_MOUSE_DOWN);
B_MOUSE_MOVED := Cardinal(_B_MOUSE_MOVED);
B_MOUSE_ENTER_EXIT := Cardinal(_B_MOUSE_ENTER_EXIT);
B_MOUSE_UP := Cardinal(_B_MOUSE_UP);
B_MOUSE_WHEEL_CHANGED := Cardinal(_B_MOUSE_WHEEL_CHANGED);
B_OPEN_IN_WORKSPACE := Cardinal(_B_OPEN_IN_WORKSPACE);
B_PRINTER_CHANGED := Cardinal(_B_PRINTER_CHANGED);
B_PULSE := Cardinal(_B_PULSE);
B_READY_TO_RUN := Cardinal(_B_READY_TO_RUN);
B_REFS_RECEIVED := Cardinal(_B_REFS_RECEIVED);
B_RELEASE_OVERLAY_LOCK := Cardinal(_B_RELEASE_OVERLAY_LOCK);
B_ACQUIRE_OVERLAY_LOCK := Cardinal(_B_ACQUIRE_OVERLAY_LOCK);
B_SCREEN_CHANGED := Cardinal(_B_SCREEN_CHANGED);
B_VALUE_CHANGED := Cardinal(_B_VALUE_CHANGED);
B_VIEW_MOVED := Cardinal(_B_VIEW_MOVED);
B_VIEW_RESIZED := Cardinal(_B_VIEW_RESIZED);
B_WINDOW_MOVED := Cardinal(_B_WINDOW_MOVED);
B_WINDOW_RESIZED := Cardinal(_B_WINDOW_RESIZED);
B_WORKSPACES_CHANGED := Cardinal(_B_WORKSPACES_CHANGED);
B_WORKSPACE_ACTIVATED := Cardinal(_B_WORKSPACE_ACTIVATED);
B_ZOOM := Cardinal(_B_ZOOM);
_APP_MENU_ := Cardinal(__APP_MENU_);
_BROWSER_MENUS_ := Cardinal(__BROWSER_MENUS_);
_MENU_EVENT_ := Cardinal(__MENU_EVENT_);
_PING_ := Cardinal(__PING_);
_QUIT_ := Cardinal(__QUIT_);
_VOLUME_MOUNTED_ := Cardinal(__VOLUME_MOUNTED_);
_VOLUME_UNMOUNTED_ := Cardinal(__VOLUME_UNMOUNTED_);
_MESSAGE_DROPPED_ := Cardinal(__MESSAGE_DROPPED_);
_DISPOSE_DRAG_ := Cardinal(__DISPOSE_DRAG_);
_MENUS_DONE_ := Cardinal(__MENUS_DONE_);
_SHOW_DRAG_HANDLES_ := Cardinal(__SHOW_DRAG_HANDLES_);
_EVENTS_PENDING_ := Cardinal(__EVENTS_PENDING_);
_UPDATE_ := Cardinal(__UPDATE_);
_UPDATE_IF_NEEDED_ := Cardinal(__UPDATE_IF_NEEDED_);
_PRINTER_INFO_ := Cardinal(__PRINTER_INFO_);
_SETUP_PRINTER_ := Cardinal(__SETUP_PRINTER_);
_SELECT_PRINTER_ := Cardinal(__SELECT_PRINTER_);
// Other Commands
B_SET_PROPERTY := Cardinal(_B_SET_PROPERTY);
B_GET_PROPERTY := Cardinal(_B_GET_PROPERTY);
B_CREATE_PROPERTY := Cardinal(_B_CREATE_PROPERTY);
B_DELETE_PROPERTY := Cardinal(_B_DELETE_PROPERTY);
B_COUNT_PROPERTIES := Cardinal(_B_COUNT_PROPERTIES);
B_EXECUTE_PROPERTY := Cardinal(_B_EXECUTE_PROPERTY);
B_GET_SUPPORTED_SUITES := Cardinal(_B_GET_SUPPORTED_SUITES);
B_UNDO := Cardinal(_B_UNDO);
B_CUT := Cardinal(_B_CUT);
B_COPY := Cardinal(_B_COPY);
B_PASTE := Cardinal(_B_PASTE);
B_SELECT_ALL := Cardinal(_B_SELECT_ALL);
B_SAVE_REQUESTED := Cardinal(_B_SAVE_REQUESTED);
B_MESSAGE_NOT_UNDERSTOOD := Cardinal(_B_MESSAGE_NOT_UNDERSTOOD);
B_NO_REPLY := Cardinal(_B_NO_REPLY);
B_REPLY := Cardinal(_B_REPLY);
B_SIMPLE_DATA := Cardinal(_B_SIMPLE_DATA);
B_MIME_DATA := Cardinal(_B_MIME_DATA);
B_ARCHIVED_OBJECT := Cardinal(_B_ARCHIVED_OBJECT);
B_UPDATE_STATUS_BAR := Cardinal(_B_UPDATE_STATUS_BAR);
B_RESET_STATUS_BAR := Cardinal(_B_RESET_STATUS_BAR);
B_NODE_MONITOR := Cardinal(_B_NODE_MONITOR);
B_QUERY_UPDATE := Cardinal(_B_QUERY_UPDATE);
B_ENDORSABLE := Cardinal(_B_ENDORSABLE);
B_COPY_TARGET := Cardinal(_B_COPY_TARGET);
B_MOVE_TARGET := Cardinal(_B_MOVE_TARGET);
B_TRASH_TARGET := Cardinal(_B_TRASH_TARGET);
B_LINK_TARGET := Cardinal(_B_LINK_TARGET);
B_INPUT_DEVICES_CHANGED := Cardinal(_B_INPUT_DEVICES_CHANGED);
B_INPUT_METHOD_EVENT := Cardinal(_B_INPUT_METHOD_EVENT);
B_WINDOW_MOVE_TO := Cardinal(_B_WINDOW_MOVE_TO);
B_WINDOW_MOVE_BY := Cardinal(_B_WINDOW_MOVE_BY);
B_SILENT_RELAUNCH := Cardinal(_B_SILENT_RELAUNCH);
B_OBSERVER_NOTICE_CHANGE := Cardinal(_B_OBSERVER_NOTICE_CHANGE);
B_CONTROL_INVOKED := Cardinal(_B_CONTROL_INVOKED);
B_CONTROL_MODIFIED := Cardinal(_B_CONTROL_MODIFIED);
end.

View File

@@ -1,56 +0,0 @@
/* BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _APPLICATION_H_
#define _APPLICATION_H_
#include <Application.h>
#include <Archivable.h>
#include <Message.h>
// #include <Control.cpp>
#include <window.h>
#include <view.h>
#include <point.h>
#include <rect.h>
#include <roster.h>
#include <looper.h>
#include <handler.h>
#include <archivable.h>
#include <message.h>
#include <beobj.h>
class BPApplication : public BApplication, public virtual BPLooper
{
public:
BPApplication(TPasObject PasObject, const char *signature);
BPApplication(TPasObject PasObject, const char *signature,
status_t *error);
virtual void AppActivated(bool active);
virtual void ReadyToRun(void);
virtual bool QuitRequested(void);
virtual void MessageReceived(BMessage *message);
virtual void DispatchMessage(BMessage *message, BHandler *target);
virtual void AppActivated_hookCall(bool active);
virtual void ReadyToRun_hookCall(void);
private:
};
#endif /* _APPLICATION_H_ */

View File

@@ -1,182 +0,0 @@
{ BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
}
unit Application;
interface
uses
beobj, looper, appdefs, supportdefs, message, os, fdblib;
type
TApplication = class(TLooper)
private
public
constructor Create; override;
constructor Create(Signature : PChar); virtual;
constructor Create(Signature : PChar; error : PStatus_t); virtual;
destructor Destroy; override;
procedure ShowCursor;
procedure HideCursor;
function Run : TThread_id;
procedure Quit;
// Hook functions
procedure AppActivated(Active : boolean); virtual;
procedure ReadyToRun; virtual;
end;
function BApplication_Create(AObject : TObject) : TCPlusObject; cdecl; external BePascalLibName name 'BApplication_Create_1';
function BApplication_Create(AObject : TObject; Signature : PChar) : TCPlusObject; cdecl; external BePascalLibName name 'BApplication_Create_2';
function BApplication_Create(AObject : TObject; Signature : PChar; error : PStatus_t) : TCPlusObject; cdecl; external BePascalLibName name 'BApplication_Create_3';
procedure BApplication_Free(Application : TCPlusObject); cdecl; external BePascalLibName;
procedure BApplication_HideCursor(Application : TCPlusObject); cdecl; external BePascalLibName;
procedure BApplication_ShowCursor(Application : TCPlusObject); cdecl; external BePascalLibName;
function BApplication_Run(Application : TCPlusObject) : TThread_id; cdecl; external BePascalLibName;
procedure BApplication_Quit(Application : TCPlusObject); cdecl; external BePascalLibName;
function get_be_app_messenger : TCPlusObject; cdecl; external BePascalLibName name 'get_be_app_messenger';
var
be_app : TApplication;
implementation
uses
Messenger;
var
Application_AppActivated_hook : Pointer; cvar; external;
Application_ReadyToRun_hook : Pointer; cvar; external;
// start TApplication
constructor TApplication.Create;
begin
inherited;
CPlusObject := BApplication_Create(Self, PChar('application/x-vnd.BePascal'));
be_app := Self;
be_app_TMessenger := TMessenger.Wrap(be_app_messengerCPlus);
end;
constructor TApplication.Create(Signature : PChar);
begin
inherited Create;
CPlusObject := BApplication_Create(Self, Signature);
be_app := Self;
be_app_TMessenger := TMessenger.Wrap(be_app_messengerCPlus);
end;
constructor TApplication.Create(Signature : PChar; error : PStatus_t);
begin
inherited Create;
CPlusObject := BApplication_Create(Self, Signature, error);
be_app := Self;
be_app_TMessenger := TMessenger.Wrap(be_app_messengerCPlus);
end;
destructor TApplication.Destroy;
begin
if CPlusObject <> nil then
BApplication_Free(CPlusObject);
if Assigned(be_app_TMessenger) then
be_app_TMessenger.UnWrap;
inherited;
end;
// Hook functions
procedure Application_AppActivated_hook_func(Application : TApplication; Active : boolean); cdecl;
begin
if Application <> nil then
Application.AppActivated(Active);
end;
procedure TApplication.AppActivated(Active : boolean);
begin
{$IFDEF DEBUG}
SendText(Active);
if Active then
SendText('Application activée !')
else
SendText('Application désactivée !');
{$ENDIF}
end;
procedure Application_ReadyToRun_hook_func(Application : TApplication); cdecl;
begin
{$IFDEF DEBUG}
SendText('Hook ReadyToRun !');
{$ENDIF}
if Application <> nil then
Application.ReadyToRun;
end;
procedure Application_MessageReceived_hook_func(Application : TApplication; aMessage : TCPlusObject); cdecl;
var
Message : TMessage;
begin
{$IFDEF DEBUG}
SendText('Hook MessageReceived !');
{$ENDIF}
Message := TMessage.Wrap(aMessage);
try
if Application <> nil then
Application.MessageReceived(Message);
finally
Message.UnWrap;
end;
end;
procedure TApplication.ReadyToRun;
begin
{$IFDEF DEBUG}
SendText('Prêt à démarer !');
{$ENDIF}
end;
procedure TApplication.ShowCursor;
begin
BApplication_ShowCursor(CPlusObject);
end;
procedure TApplication.HideCursor;
begin
BApplication_HideCursor(CPlusObject);
end;
function TApplication.Run : TThread_id;
begin
Result := BApplication_Run(CPlusObject);
end;
procedure TApplication.Quit;
begin
BApplication_Quit(CPlusObject);
end;
// end TApplication
initialization
be_app := nil;
Application_AppActivated_hook := @Application_AppActivated_hook_func;
Application_ReadyToRun_hook := @Application_ReadyToRun_hook_func;
finalization
Application_AppActivated_hook := nil;
Application_ReadyToRun_hook := nil;
be_app := nil;
end.

View File

@@ -1,41 +0,0 @@
/* BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _HANDLER_H_
#define _HANDLER_H_
#include <Handler.h>
#include <beobj.h>
// definition of callback function in BHandler
typedef void (*BHandler_MessageReceived_hook) (TPasObject PasObject, TCPlusObject message);
class BPHandler : public BHandler, public virtual BPasObject
{
public:
BPHandler(TPasObject PasObject, const char *name = NULL);
BPHandler(TPasObject PasObject, BMessage *archive);
virtual ~BPHandler(void);
virtual void MessageReceived(BMessage *message);
virtual void MessageReceived_hookCall(BMessage *message);
private:
};
#endif /* _HANDLER_H_ */

View File

@@ -1,80 +0,0 @@
{ BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
}
unit handler;
interface
uses
beobj, archivable, message, fdblib;
type
THandler = class(TArchivable)
public
procedure MessageReceived(aMessage : TMessage); virtual;
end;
implementation
uses
SysUtils;
var
Handler_MessageReceived_hook : Pointer; cvar; external;
procedure THandler.MessageReceived(aMessage : TMessage);
begin
{$IFDEF DEBUG}
SendText(ClassName + '.MessageReceived');
SendText('Message reçue');
aMessage.PrintToStream;
{$ENDIF}
end;
procedure Handler_MessageReceived_hook_func(Handler : THandler; aMessage : TCPlusObject); cdecl;
var
Message : TMessage;
begin
try
{$IFDEF DEBUG}
SendText('Hook MessageReceived !');
{$ENDIF}
Message := TMessage.Wrap(aMessage);
try
if Handler <> nil then
Handler.MessageReceived(Message);
finally
Message.UnWrap;
end;
except
on e : exception do
begin
{$IFDEF DEBUG}
SendText(e.Message + 'Handler_MessageReceived');
{$ENDIF}
end;
end
end;
initialization
Handler_MessageReceived_hook := @Handler_MessageReceived_hook_func;
finalization
Handler_MessageReceived_hook := nil;
end.

View File

@@ -1,271 +0,0 @@
{ BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
Eric Jourde
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
}
unit invoker;
interface
uses
beobj, Message, Handler, Looper, SupportDefs, Messenger;
type
TInvoker = class(TBeObject)
private
public
constructor Create; override;
constructor Create(aMessage : TMessage; handler : THandler; looper : TLooper);
constructor Create(aMessage : TMessage; aTarget : TMessenger);
destructor Destroy; override;
function SetMessage(aMessage : TMessage) : TStatus_t;
function Message : TMessage;
function Command : Cardinal;
function SetTarget(h : THandler; loop : TLooper) : TStatus_t;
function SetTarget(aMessenger : TMessenger) : TStatus_t;
function IsTargetLocal : boolean;
function Target(looper : TLooper) : THandler;
function Messenger : TMessenger;
function SetHandlerForReply(handler : THandler) : TStatus_t;
function HandlerForReply : THandler;
function Invoke(msg : TMessage) : TStatus_t;
// function InvokeNotify(msg : TMessage; kind : Cardinal) : TStatus_t;
function SetTimeout(aTimeout : TBigtime_t) : TStatus_t;
function Timeout : TBigtime_t;
// function InvokeKind(notify : boolean) : Cardinal;
// procedure BeginInvokeNotify(kind : Cardinal);
// procedure EndInvokeNotify;
// procedure _ReservedInvoker1;
// procedure _ReservedInvoker2;
// procedure _ReservedInvoker3;
constructor Create(aInvoker : TInvoker);
// function operator=( : TInvoker) : TInvoker;
// procedure BMessage *fMessage;
// procedure BMessenger fMessenger;
// procedure BHandler *fReplyTo;
// procedure uint32 fTimeout;
// procedure uint32 fNotifyKind;
// procedure uint32 _reserved[2];
end;
function BInvoker_Create(AObject : TBeObject) : TCplusObject; cdecl; external BePascalLibName name 'BInvoker_Create';
function BInvoker_Create(AObject : TBeObject; message : TCplusObject; handler : TCplusObject; looper : TCPlusObject) : TCplusObject; cdecl; external BePascalLibName name 'BInvoker_Create_1';
function BInvoker_Create(AObject : TBeObject; message : TCplusObject; target : TCplusObject) : TCplusObject; cdecl; external BePascalLibName name 'BInvoker_Create_2';
procedure BInvoker_Free(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BInvoker_Free';
function BInvoker_SetMessage(AObject : TCPlusObject; message : TCplusObject) : TStatus_t; cdecl; external BePascalLibName name 'BInvoker_SetMessage';
function BInvoker_Message(AObject : TCPlusObject) : TCPlusObject; cdecl; external BePascalLibName name 'BInvoker_Message';
function BInvoker_Command(AObject : TCPlusObject) : Cardinal; cdecl; external BePascalLibName name 'BInvoker_Command';
function BInvoker_SetTarget(AObject : TCPlusObject; h : TCPlusObject; loop : TCPlusObject) : TStatus_t; cdecl; external BePascalLibName name 'BInvoker_SetTarget';
function BInvoker_SetTarget(AObject : TCPlusObject; messenger : TCplusObject) : TStatus_t; cdecl; external BePascalLibName name 'BInvoker_SetTarget_1';
function BInvoker_IsTargetLocal(AObject : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BInvoker_IsTargetLocal';
function BInvoker_Target(AObject : TCPlusObject; looper : TCplusObject) : THandler; cdecl; external BePascalLibName name 'BInvoker_Target';
function BInvoker_Messenger(AObject : TCPlusObject) : TCPlusObject; cdecl; external BePascalLibName name 'BInvoker_Messenger';
function BInvoker_SetHandlerForReply(AObject : TCPlusObject; handler : TCplusObject) : TStatus_t; cdecl; external BePascalLibName name 'BInvoker_SetHandlerForReply';
function BInvoker_HandlerForReply(AObject : TCPlusObject) : THandler; cdecl; external BePascalLibName name 'BInvoker_HandlerForReply';
function BInvoker_Invoke(AObject : TCPlusObject; msg : TCplusObject) : TStatus_t; cdecl; external BePascalLibName name 'BInvoker_Invoke';
//function BInvoker_InvokeNotify(AObject : TCPlusObject; msg : TCplusObject; kind : Cardinal) : TStatus_t; cdecl; external BePascalLibName name 'BInvoker_InvokeNotify';
function BInvoker_SetTimeout(AObject : TCPlusObject; timeout : TBigtime_t) : TStatus_t; cdecl; external BePascalLibName name 'BInvoker_SetTimeout';
function BInvoker_Timeout(AObject : TCPlusObject) : TBigtime_t; cdecl; external BePascalLibName name 'BInvoker_Timeout';
//function BInvoker_InvokeKind(AObject : TCPlusObject; notify : boolean) : Cardinal; cdecl; external BePascalLibName name 'BInvoker_InvokeKind';
//procedure BInvoker_BeginInvokeNotify(AObject : TCPlusObject; kind : Cardinal); cdecl; external BePascalLibName name 'BInvoker_BeginInvokeNotify';
//procedure BInvoker_EndInvokeNotify(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BInvoker_EndInvokeNotify';
//procedure BInvoker__ReservedInvoker1(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BInvoker__ReservedInvoker1';
//procedure BInvoker__ReservedInvoker2(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BInvoker__ReservedInvoker2';
//procedure BInvoker__ReservedInvoker3(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BInvoker__ReservedInvoker3';
function BInvoker_Create(AObject : TBeObject; aInvoker : TCPlusObject) : TCplusObject; cdecl; external BePascalLibName name 'BInvoker_Create';
//function BInvoker_operator=(AObject : TCPlusObject; : TInvoker) : TInvoker; cdecl; external BePascalLibName name 'BInvoker_operator=';
//procedure BInvoker_BMessage *fMessage(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BInvoker_BMessage *fMessage';
//procedure BInvoker_BMessenger fMessenger(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BInvoker_BMessenger fMessenger';
//procedure BInvoker_BHandler *fReplyTo(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BInvoker_BHandler *fReplyTo';
//procedure BInvoker_uint32 fTimeout(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BInvoker_uint32 fTimeout';
//procedure BInvoker_uint32 fNotifyKind(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BInvoker_uint32 fNotifyKind';
//procedure BInvoker_uint32 _reserved[2](AObject : TCPlusObject); cdecl; external BePascalLibName name 'BInvoker_uint32 _reserved[2]';
implementation
constructor TInvoker.Create;
begin
BInvoker_Create(Self);
end;
constructor TInvoker.Create(aMessage : TMessage; handler : THandler; looper : TLooper);
begin
CPlusObject := BInvoker_Create(Self, aMessage.CPlusObject, handler, looper);
end;
constructor TInvoker.Create(aMessage : TMessage; aTarget : TMessenger);
begin
CPlusObject := BInvoker_Create(Self, aMessage.CPlusObject, aTarget.CPlusObject);
end;
destructor TInvoker.Destroy;
begin
BInvoker_Free(CPlusObject);
end;
function TInvoker.SetMessage(aMessage : TMessage) : TStatus_t;
begin
Result := BInvoker_SetMessage(CPlusObject, aMessage.CPlusObject);
end;
function TInvoker.Message : TMessage;
begin
Result := TMessage.Wrap(BInvoker_Message(CPlusObject));
end;
function TInvoker.Command : Cardinal;
begin
Result := BInvoker_Command(CPlusObject);
end;
function TInvoker.SetTarget(h : THandler; loop : TLooper) : TStatus_t;
begin
if loop <> nil then
begin
Result := BInvoker_SetTarget(CPlusObject, h.CPlusObject, loop.CPlusObject);
end
else if h <> nil then
begin
// Result := BInvoker_SetTarget(CPlusObject, h.CPlusObject, nil);
end
else
begin
Result := BInvoker_SetTarget(CPlusObject, nil, nil);
end;
end;
function TInvoker.SetTarget(aMessenger : TMessenger) : TStatus_t;
begin
Result := BInvoker_SetTarget(CPlusObject, aMessenger.CPlusObject);
end;
function TInvoker.IsTargetLocal : boolean;
begin
Result := BInvoker_IsTargetLocal(CPlusObject);
end;
function TInvoker.Target(looper : TLooper) : THandler;
begin
Result := BInvoker_Target(CPlusObject, looper.CPlusObject);
end;
function TInvoker.Messenger : TMessenger;
begin
Result := TMessenger.Wrap(BInvoker_Messenger(CPlusObject));
end;
function TInvoker.SetHandlerForReply(handler : THandler) : TStatus_t;
begin
Result := BInvoker_SetHandlerForReply(CPlusObject, handler.CPlusObject);
end;
function TInvoker.HandlerForReply : THandler;
begin
Result := BInvoker_HandlerForReply(CPlusObject);
end;
function TInvoker.Invoke(msg : TMessage) : TStatus_t;
begin
Result := BInvoker_Invoke(CPlusObject, msg.CPlusObject);
end;
//function TInvoker.InvokeNotify(msg : TMessage; kind : Cardinal) : TStatus_t;
//begin
// BInvoker_InvokeNotify(CPlusObject, msg.CPlusObject, kind);
//end;
function TInvoker.SetTimeout(aTimeout : TBigtime_t) : TStatus_t;
begin
Result := BInvoker_SetTimeout(CPlusObject, timeout);
end;
function TInvoker.Timeout : TBigtime_t;
begin
Result := BInvoker_Timeout(CPlusObject);
end;
//function TInvoker.InvokeKind(notify : boolean) : Cardinal;
//begin
// BInvoker_InvokeKind(CPlusObject, notify);
//end;
//
//procedure TInvoker.BeginInvokeNotify(kind : Cardinal);
//begin
// BInvoker_BeginInvokeNotify(CPlusObject, kind);
//end;
//
//procedure TInvoker.EndInvokeNotify;
//begin
// BInvoker_EndInvokeNotify(CPlusObject);
//end;
//procedure TInvoker._ReservedInvoker1;
//begin
// BInvoker__ReservedInvoker1(CPlusObject);
//end;
//
//procedure TInvoker._ReservedInvoker2;
//begin
// BInvoker__ReservedInvoker2(CPlusObject);
//end;
//
//procedure TInvoker._ReservedInvoker3;
//begin
// BInvoker__ReservedInvoker3(CPlusObject);
//end;
constructor TInvoker.Create(ainvoker : TInvoker);
begin
BInvoker_Create(Self, aInvoker);
end;
//function TInvoker.operator=( : TInvoker) : TInvoker;
//begin
// BInvoker_operator=(CPlusObject, );
//end;
//procedure TInvoker.BMessage *fMessage;
//begin
// BInvoker_BMessage *fMessage(CPlusObject);
//end;
//
//procedure TInvoker.BMessenger fMessenger;
//begin
// BInvoker_BMessenger fMessenger(CPlusObject);
//end;
//
//procedure TInvoker.BHandler *fReplyTo;
//begin
// BInvoker_BHandler *fReplyTo(CPlusObject);
//end;
//
//procedure TInvoker.uint32 fTimeout;
//begin
// BInvoker_uint32 fTimeout(CPlusObject);
//end;
//
//procedure TInvoker.uint32 fNotifyKind;
//begin
// BInvoker_uint32 fNotifyKind(CPlusObject);
//end;
//
//procedure TInvoker.uint32 _reserved[2];
//begin
// BInvoker_uint32 _reserved[2](CPlusObject);
//end;
end.

View File

@@ -1,46 +0,0 @@
/* BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _LOOPER_H_
#define _LOOPER_H_
#include <Looper.h>
#include <Message.h>
#include <OS.h>
#include <beobj.h>
#include <handler.h>
class BPLooper : public BLooper, public virtual BPHandler
{
public:
BPLooper(TPasObject PasObject, const char *name = NULL,
int32 priority = B_NORMAL_PRIORITY,
int32 portCapacity = B_LOOPER_PORT_DEFAULT_CAPACITY);
virtual ~BPLooper();
virtual void DispatchMessage(BMessage *message, BHandler *target);
virtual bool QuitRequested(void);
virtual void MessageReceived(BMessage *message);
virtual void DispatchMessage_hookCall(BMessage *message, BHandler *target);
virtual bool QuitRequested_hookCall(void);
private:
};
#endif /* _LOOPER_H_ */

View File

@@ -1,103 +0,0 @@
{ BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
}
unit looper;
interface
uses
beobj, handler, message, os, SupportDefs;
const
B_LOOPER_PORT_DEFAULT_CAPACITY = 100;
type
TLooper = class(THandler)
private
public
procedure DispatchMessage(aMessage : TMessage; aTarget : THandler); virtual;
function QuitRequested() : boolean; virtual;
function GetSupportedSuites(aMessage : TMessage) : TStatus_t;
function PostMessage(command : Cardinal) : TStatus_t;
end;
//function BLooper_Create(AObject : TObject);
function BLooper_GetSupportedSuites(Looper : TCplusObject; aMessage : TCPlusObject) : TStatus_t; cdecl; external BePascalLibName name 'BLooper_GetSupportedSuites';
function BLooper_PostMessage(Looper : TCPlusObject; command : Cardinal) : TStatus_t; cdecl; external BePascalLibName name 'BLooper_PostMessage_2';
implementation
var
Looper_DispatchMessage_hook : Pointer; cvar; external;
Looper_QuitRequested_hook : Pointer; cvar; external;
procedure TLooper.DispatchMessage(aMessage : TMessage; aTarget : THandler);
begin
end;
function TLooper.QuitRequested() : boolean;
begin
Result := True;
end;
function TLooper.GetSupportedSuites(aMessage : TMessage) : TStatus_t;
begin
result := BLooper_GetSupportedSuites(CPlusObject, aMessage.CPlusObject);
end;
function TLooper.PostMessage(command : Cardinal) : TStatus_t;
begin
result := BLooper_PostMessage(CPlusObject, command);
end;
// hooks
procedure Looper_DispatchMessage_hook_func(Looper : TLooper;
aMessage : TCPlusObject; aTarget : TCPlusObject); cdecl;
var
Message : TMessage;
Target : THandler;
begin
Message := TMessage.Wrap(aMessage);
try
Target := THandler.Wrap(aTarget);
try
Looper.DispatchMessage(Message, Target);
finally
Target.UnWrap;
end;
finally
Message.UnWrap;
end;
end;
function Looper_QuitRequested_hook_func(Looper : TLooper) : boolean; cdecl;
begin
if Looper <> nil then
Result := Looper.QuitRequested();
end;
initialization
Looper_DispatchMessage_hook := @Looper_DispatchMessage_hook_func;
Looper_QuitRequested_hook := @Looper_QuitRequested_hook_func;
finalization
Looper_DispatchMessage_hook := nil;
Looper_QuitRequested_hook := nil;
end.

View File

@@ -1,38 +0,0 @@
/* BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _MESSAGE_H_
#define _MESSAGE_H_
#include <Application.h>
#include <Message.h>
#include <SupportDefs.h>
#include <beobj.h>
class BPMessage : public BMessage, private BPasObject
{
public:
BPMessage(TPasObject PasObject);
BPMessage(TPasObject PasObject, uint32 what);
BPMessage(TPasObject PasObject, TCPlusObject message);
private:
};
#endif /* _MESSAGE_H_ */

View File

@@ -1,281 +0,0 @@
{ BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
}
unit message;
interface
uses
beobj, supportdefs, typeconstants;
const
B_NO_SPECIFIER = 0;
B_DIRECT_SPECIFIER = 1;
B_INDEX_SPECIFIER = 2;
B_REVERSE_INDEX_SPECIFIER = 3;
B_RANGE_SPECIFIER = 4;
B_REVERSE_RANGE_SPECIFIER = 5;
B_NAME_SPECIFIER = 6;
B_ID_SPECIFIER = 7;
B_SPECIFIERS_END = 128;
B_FIELD_NAME_LENGTH = 255;
B_PROPERTY_NAME_LENGTH = 255;
type
TMessage = class(TBeObject)
private
function GetWhat : Cardinal;
procedure SetWhat(aWhat : Cardinal);
public
constructor Create; override;
constructor Create(Command : Cardinal); virtual;
constructor Create(var Message : TMessage); virtual;
destructor Destroy; override;
function AddData(const Name : PChar; aType : TType_Code; const Data : Pointer; FixedSize : Cardinal; NumItems : Integer) : TStatus_t;
function AddBool(const Name : PChar; aBool : boolean) : TStatus_t;
function AddInt8(const Name : PChar; anInt8 : Shortint) : TStatus_t;
function FindInt8(const Name : PChar; var anInt8 : Shortint) : TStatus_t;
function AddInt16(const Name : PChar; anInt16 : Smallint) : TStatus_t;
function AddInt32(const Name : PChar; anInt32 : Integer) : TStatus_t;
function AddInt64(const Name : PChar; anInt64 : int64) : TStatus_t;
function AddFloat(const Name : PChar; aFloat : Single) : TStatus_t;
function AddDouble(const Name : PChar; aDouble : Double) : TStatus_t;
function AddString(const Name : PChar; aString : PChar) : TStatus_t;
function FindString(const Name : PChar; var aString : PChar) : TStatus_t;
function AddMessage(const Name : PChar; aMessage : TCPlusObject) : TStatus_t;
function CountNames(aType : TType_Code) : Integer;
function HasSpecifiers : boolean;
function IsSystem : boolean;
function MakeEmpty : TStatus_t;
function IsEmpty : boolean;
function RemoveName(const Name : PChar) : TStatus_t;
procedure PrintToStream;
function RemoveData(const name : PChar; index : Integer) : TStatus_t;
function WasDelivered : boolean;
function IsSourceRemote : boolean;
function IsSourceWaiting : boolean;
function IsReply : boolean;
function Previous : TMessage;
function WasDropped : boolean;
property What : Cardinal read GetWhat write SetWhat;
end;
function BMessage_Create(AObject : TObject) : TCPlusObject; cdecl; external BePascalLibName name 'BMessage_Create_1';
function BMessage_Create(AObject : TObject; command : Cardinal) : TCPlusObject; cdecl; external BePascalLibName name 'BMessage_Create_2';
function BMessage_Create(AObject : TObject; var Message : TCPlusObject) : TCPlusObject; cdecl; external BePascalLibName name 'BMessage_Create_3';
procedure BMessage_Free(Message : TCPlusObject); cdecl; external BePascalLibName;
function BMessage_GetWhat(Message : TCPlusObject) : Cardinal; cdecl; external BePascalLibName name 'BMessage_Getwhat';
procedure BMessage_SetWhat(Message : TCPlusObject; What : Cardinal); cdecl; external BePascalLibName name 'BMessage_Setwhat';
function BMessage_AddData(Message : TCPlusObject; const Name : PChar; aType : TType_Code; const Data : Pointer; FixedSize : Cardinal; NumItems : Integer) : TStatus_t; cdecl; external BePascalLibName;
function BMessage_AddBool(Message : TCPlusObject; const Name : PChar; aBool : boolean) : TStatus_t; cdecl; external BePascalLibName;
function BMessage_AddInt8(Message : TCPlusObject; const Name : PChar; anInt8 : Shortint) : TStatus_t; cdecl; external BePascalLibName;
function BMessage_FindInt8(Message : TCPlusObject; const Name : PChar; var anInt8 : Shortint) : TStatus_t; cdecl; external BePascalLibName;
function BMessage_AddInt16(Message : TCPlusObject; const Name : PChar; anInt16 : Smallint) : TStatus_t; cdecl; external BePascalLibName;
function BMessage_AddInt32(Message : TCPlusObject; const Name : PChar; anInt32 : Integer) : TStatus_t; cdecl; external BePascalLibName;
function BMessage_AddInt64(Message : TCPlusObject; const Name : PChar; anInt64 : int64) : TStatus_t; cdecl; external BePascalLibName;
function BMessage_AddFloat(Message : TCPlusObject; const Name : PChar; aFloat : Single) : TStatus_t; cdecl; external BePascalLibName;
function BMessage_AddDouble(Message : TCPlusObject; const Name : PChar; aDouble : Double) : TStatus_t; cdecl; external BePascalLibName;
function BMessage_AddString(Message : TCPlusObject; const Name : PChar; aString : PChar) : TStatus_t; cdecl; external BePascalLibName;
function BMessage_FindString(Message : TCPlusObject; const Name : PChar;var aString : PChar) : TStatus_t; cdecl; external BePascalLibName;
function BMessage_AddMessage(Message : TCPlusObject; const Name : PChar; aMessage : TCPlusObject) : TStatus_t; cdecl; external BePascalLibName;
function BMessage_CountNames(Message : TCPlusObject; aType : TType_Code) : Integer; cdecl; external BePascalLibName;
function BMessage_HasSpecifiers(Message : TCPlusObject) : boolean; cdecl; external BePascalLibName;
function BMessage_IsSystem(Message : TCPlusObject) : boolean; cdecl; external BePascalLibName;
function BMessage_MakeEmpty(Message : TCPlusObject) : TStatus_t; cdecl; external BePascalLibName;
function BMessage_IsEmpty(Message : TCPlusObject) : boolean; cdecl; external BePascalLibName;
function BMessage_RemoveName(Message : TCPlusObject; const Name : PChar) : TStatus_t; cdecl; external BePascalLibName;
procedure BMessage_PrintToStream(Message : TCPlusObject); cdecl; external BePascalLibName;
function BMessage_RemoveData(Message : TCPlusObject; const name : PChar; index : Integer) : TStatus_t; cdecl; external BePascalLibName;
function BMessage_WasDelivered(Message : TCPlusObject) : boolean; cdecl; external BePascalLibName;
function BMessage_IsSourceRemote(Message : TCPlusObject) : boolean; cdecl; external BePascalLibName;
function BMessage_IsSourceWaiting(Message : TCPlusObject) : boolean; cdecl; external BePascalLibName;
function BMessage_IsReply(Message : TCPlusObject) : boolean; cdecl; external BePascalLibName;
function BMessage_Previous(Message : TCPlusObject) : TCPlusObject; cdecl; external BePascalLibName;
function BMessage_WasDropped(Message : TCPlusObject) : boolean; cdecl; external BePascalLibName;
implementation
// start TMessage
constructor TMessage.Create;
begin
inherited Create;
CPlusObject := BMessage_Create(Self);
end;
constructor TMessage.Create(Command : Cardinal);
begin
inherited Create;
CPlusObject := BMessage_Create(Self, Command);
end;
constructor TMessage.Create(var Message : TMessage);
begin
inherited Create;
CPlusObject := BMessage_Create(Self, Message.FCPlusObject);
end;
destructor TMessage.Destroy;
begin
if CPlusObject <> nil then
BMessage_Free(CPlusObject);
inherited;
end;
function TMessage.GetWhat : Cardinal;
begin
Result := BMessage_GetWhat(CPlusObject);
end;
procedure TMessage.SetWhat(aWhat : Cardinal);
begin
BMessage_SetWhat(CPlusObject, aWhat);
end;
function TMessage.AddData(const Name : PChar; aType : TType_Code; const Data : Pointer; FixedSize : Cardinal; NumItems : Integer) : TStatus_t;
begin
result := BMessage_AddData(CPlusObject, Name, aType, Data, FixedSize, NumItems);
end;
function TMessage.AddBool(const Name : PChar; aBool : boolean) : TStatus_t;
begin
result := BMessage_AddBool(CPlusObject, Name, aBool);
end;
function TMessage.AddInt8(const Name : PChar; anInt8 : Shortint) : TStatus_t;
begin
result := BMessage_AddInt8(CPlusObject, Name, anInt8);
end;
function TMessage.FindInt8(const Name : PChar; var anInt8 : Shortint) : TStatus_t;
begin
result := BMessage_FindInt8(CPlusObject, Name, anInt8);
end;
function TMessage.AddInt16(const Name : PChar; anInt16 : Smallint) : TStatus_t;
begin
result := BMessage_AddInt16(CPlusObject, Name, anInt16);
end;
function TMessage.AddInt32(const Name : PChar; anInt32 : Integer) : TStatus_t;
begin
result := BMessage_AddInt32(CPlusObject, Name, anInt32);
end;
function TMessage.AddInt64(const Name : PChar; anInt64 : int64) : TStatus_t;
begin
result := BMessage_AddInt64(CPlusObject, Name, anInt64);
end;
function TMessage.AddFloat(const Name : PChar; aFloat : Single) : TStatus_t;
begin
result := BMessage_AddFloat(CPlusObject, Name, aFloat);
end;
function TMessage.AddDouble(const Name : PChar; aDouble : Double) : TStatus_t;
begin
result := BMessage_AddDouble(CPlusObject, Name, aDouble);
end;
function TMessage.AddString(const Name : PChar; aString : PChar) : TStatus_t;
begin
result := BMessage_AddString(CPlusObject, Name, aString);
end;
function TMessage.FindString(const Name : PChar;var aString : PChar) : TStatus_t;
begin
result := BMessage_FindString(CPlusObject, Name, aString);
end;
function TMessage.AddMessage(const Name : PChar; aMessage : TCPlusObject) : TStatus_t;
begin
result := BMessage_AddMessage(CPlusObject, Name, aMessage);
end;
function TMessage.CountNames(aType : TType_Code) : Integer;
begin
result := BMessage_CountNames(CPlusObject, aType);
end;
function TMessage.HasSpecifiers : boolean;
begin
result := BMessage_HasSpecifiers(CPlusObject);
end;
function TMessage.IsSystem : boolean;
begin
result := BMessage_IsSystem(CPlusObject);
end;
function TMessage.MakeEmpty : TStatus_t;
begin
result := BMessage_MakeEmpty(CPlusObject);
end;
function TMessage.IsEmpty : boolean;
begin
result := BMessage_IsEmpty(CPlusObject);
end;
function TMessage.RemoveName(const Name : PChar) : TStatus_t;
begin
result := BMessage_RemoveName(CPlusObject, Name);
end;
procedure TMessage.PrintToStream;
begin
BMessage_PrintToStream(CPlusObject);
end;
function TMessage.RemoveData(const name : PChar; index : Integer) : TStatus_t;
begin
result := BMessage_RemoveData(CPlusObject, name, index);
end;
function TMessage.WasDelivered : boolean;
begin
result := BMessage_WasDelivered(CPlusObject);
end;
function TMessage.IsSourceRemote : boolean;
begin
result := BMessage_IsSourceRemote(CPlusObject);
end;
function TMessage.IsSourceWaiting : boolean;
begin
result := BMessage_IsSourceWaiting(CPlusObject);
end;
function TMessage.IsReply : boolean;
begin
result := BMessage_IsReply(CPlusObject);
end;
function TMessage.Previous : TMessage;
begin
result := TMessage.Wrap(BMessage_Previous(CPlusObject));
end;
function TMessage.WasDropped : boolean;
begin
result := BMessage_WasDropped(CPlusObject);
end;
end.

View File

@@ -1,249 +0,0 @@
{ BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
Eric Jourde
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
}
unit messenger;
interface
uses
beobj, os, Handler, Looper, Message, SupportDefs;
type
TMessenger = class(TBeObject)
private
public
constructor Create; override;
constructor Create(mime_sig : PChar; aTeam : TTeam_id; var err : TStatus_t);
constructor Create(handler : THandler; looper : TLooper; var err : TStatus_t);
constructor Create(from : TMessenger);
destructor Destroy; override;
function IsTargetLocal : boolean;
function Target(looper : TLooper) : THandler;
function LockTarget : boolean;
// function LockTargetWithTimeout(timeout : TBigtime_t) : TStatus_t;
function SendMessage(command : Cardinal; reply_to : THandler) : TStatus_t;
function SendMessage(a_message : TMessage; reply_to : THandler; timeout : TBigtime_t) : TStatus_t;
function SendMessage(a_message : TMessage; reply_to : TMessenger; timeout : TBigtime_t) : TStatus_t;
function SendMessage(command : Cardinal; reply : TMessage) : TStatus_t;
function SendMessage(a_message : TMessage; reply : TMessage; send_timeout : TBigtime_t; reply_timeout : TBigtime_t) : TStatus_t;
// function operator=(from : TMessenger) : TMessenger;
// function operator==(other : TMessenger) : boolean;
function IsValid : boolean;
function Team : TTeam_id;
// constructor Create(aTeam : TTeam_id; port : TPort_id; token : integer; preferred : boolean);
// procedure InitData(mime_sig : PChar; aTeam : TTeam_id; perr : PStatus_t);
// procedure port_id fPort;
// procedure int32 fHandlerToken;
// procedure team_id fTeam;
// procedure int32 extra0;
// procedure int32 extra1;
// procedure bool fPreferredTarget;
// procedure bool extra2;
// procedure bool extra3;
// procedure bool extra4;
end;
function BMessenger_Create(AObject : TBeObject) : TCplusObject; cdecl; external BePascalLibName name 'BMessenger_Create';
function BMessenger_Create(AObject : TBeObject; mime_sig : PChar; team : TTeam_id; var err : TStatus_t) : TCplusObject; cdecl; external BePascalLibName name 'BMessenger_Create_1';
function BMessenger_Create(AObject : TBeObject; handler : THandler; looper : TLooper; var err : TStatus_t) : TCplusObject; cdecl; external BePascalLibName name 'BMessenger_Create_2';
function BMessenger_Create(AObject : TBeObject; from : TMessenger) : TCplusObject; cdecl; external BePascalLibName name 'BMessenger_Create_3';
procedure BMessenger_Free(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMessenger_Free';
function BMessenger_IsTargetLocal(AObject : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BMessenger_IsTargetLocal';
function BMessenger_Target(AObject : TCPlusObject; looper : TCplusObject) : THandler; cdecl; external BePascalLibName name 'BMessenger_Target';
function BMessenger_LockTarget(AObject : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BMessenger_LockTarget';
//function BMessenger_LockTargetWithTimeout(AObject : TCPlusObject; timeout : TBigtime_t) : TStatus_t; cdecl; external BePascalLibName name 'BMessenger_LockTargetWithTimeout';
function BMessenger_SendMessage(AObject : TCPlusObject; command : Cardinal; reply_to : TCPlusObject) : TStatus_t; cdecl; external BePascalLibName name 'BMessenger_SendMessage';
function BMessenger_SendMessage_1(AObject : TCPlusObject; a_message : TCplusObject; reply_to : TCplusObject; timeout : TBigtime_t) : TStatus_t; cdecl; external BePascalLibName name 'BMessenger_SendMessage_1';
// How to handle this ? (remove the comment to see what to fix)
function BMessenger_SendMessage_2(AObject : TCPlusObject; a_message : TCplusObject; reply_to : TCplusObject; timeout : TBigtime_t) : TStatus_t; cdecl; external BePascalLibName name 'BMessenger_SendMessage_2';
function BMessenger_SendMessage_3(AObject : TCPlusObject; command : Cardinal; reply : TCplusObject) : TStatus_t; cdecl; external BePascalLibName name 'BMessenger_SendMessage_3';
function BMessenger_SendMessage_4(AObject : TCPlusObject; a_message : TCplusObject; reply : TCplusObject; send_timeout : TBigtime_t; reply_timeout : TBigtime_t) : TStatus_t; cdecl; external BePascalLibName name 'BMessenger_SendMessage_4';
//function BMessenger_operator=(AObject : TCPlusObject; from : TMessenger) : TMessenger; cdecl; external BePascalLibName name 'BMessenger_operator=';
//function BMessenger_operator==(AObject : TCPlusObject; other : TMessenger) : boolean; cdecl; external BePascalLibName name 'BMessenger_operator==';
function BMessenger_IsValid(AObject : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BMessenger_IsValid';
function BMessenger_Team(AObject : TCPlusObject) : TTeam_id; cdecl; external BePascalLibName name 'BMessenger_Team';
//function BMessenger_Create(AObject : TBeObject; team : TTeam_id; port : TPort_id; token : integer; preferred : boolean) : TCplusObject; cdecl; external BePascalLibName name 'BMessenger_Create';
//procedure BMessenger_InitData(AObject : TCPlusObject; mime_sig : PChar; team : TTeam_id; perr : PStatus_t); cdecl; external BePascalLibName name 'BMessenger_InitData';
//procedure BMessenger_port_id fPort(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMessenger_port_id fPort';
//procedure BMessenger_int32 fHandlerToken(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMessenger_int32 fHandlerToken';
//procedure BMessenger_team_id fTeam(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMessenger_team_id fTeam';
//procedure BMessenger_int32 extra0(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMessenger_int32 extra0';
//procedure BMessenger_int32 extra1(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMessenger_int32 extra1';
//procedure BMessenger_bool fPreferredTarget(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMessenger_bool fPreferredTarget';
//procedure BMessenger_bool extra2(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMessenger_bool extra2';
//procedure BMessenger_bool extra3(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMessenger_bool extra3';
//procedure BMessenger_bool extra4(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMessenger_bool extra4';
var
be_app_TMessenger : TMessenger;
be_app_messengerCPlus : TCPlusObject; cvar; external;
implementation
constructor TMessenger.Create;
begin
BMessenger_Create(Self);
end;
constructor TMessenger.Create(mime_sig : PChar; aTeam : TTeam_id; var err : TStatus_t);
begin
CPlusObject := BMessenger_Create(Self, mime_sig, aTeam, err);
end;
constructor TMessenger.Create(handler : THandler; looper : TLooper; var err : TStatus_t);
begin
CPlusObject := BMessenger_Create(Self, handler, looper, err);
end;
constructor TMessenger.Create(from : TMessenger);
begin
CPlusObject := BMessenger_Create(Self, from);
end;
destructor TMessenger.Destroy;
begin
BMessenger_Free(CPlusObject);
end;
function TMessenger.IsTargetLocal : boolean;
begin
Result := BMessenger_IsTargetLocal(CPlusObject);
end;
function TMessenger.Target(looper : TLooper) : THandler;
begin
Result := BMessenger_Target(CPlusObject, looper.CPlusObject);
end;
function TMessenger.LockTarget : boolean;
begin
Result := BMessenger_LockTarget(CPlusObject);
end;
//function TMessenger.LockTargetWithTimeout(timeout : TBigtime_t) : TStatus_t;
//begin
// BMessenger_LockTargetWithTimeout(CPlusObject, timeout);
//end;
function TMessenger.SendMessage(command : Cardinal; reply_to : THandler) : TStatus_t;
begin
Result := BMessenger_SendMessage(CPlusObject, command, reply_to.CPlusObject);
end;
function TMessenger.SendMessage(a_message : TMessage; reply_to : THandler; timeout : TBigtime_t) : TStatus_t;
begin
Result := BMessenger_SendMessage_1(CPlusObject, a_message.CPlusObject, reply_to.CPlusObject, timeout);
end;
function TMessenger.SendMessage(a_message : TMessage; reply_to : TMessenger; timeout : TBigtime_t) : TStatus_t;
begin
Result := BMessenger_SendMessage_2(CPlusObject, a_message.CPlusObject, reply_to.CPlusObject, timeout);
end;
function TMessenger.SendMessage(command : Cardinal; reply : TMessage) : TStatus_t;
begin
Result := BMessenger_SendMessage_3(CPlusObject, command, reply.CPlusObject);
end;
function TMessenger.SendMessage(a_message : TMessage; reply : TMessage; send_timeout : TBigtime_t; reply_timeout : TBigtime_t) : TStatus_t;
begin
Result := BMessenger_SendMessage_4(CPlusObject, a_message.CPlusObject, reply.CPlusObject, send_timeout, reply_timeout);
end;
//function TMessenger.operator=(from : TMessenger) : TMessenger;
//begin
// BMessenger_operator=(CPlusObject, from);
//end;
//
//function TMessenger.operator==(other : TMessenger) : boolean;
//begin
// BMessenger_operator==(CPlusObject, other);
//end;
function TMessenger.IsValid : boolean;
begin
Result := BMessenger_IsValid(CPlusObject);
end;
function TMessenger.Team : TTeam_id;
begin
Result := BMessenger_Team(CPlusObject);
end;
//constructor TMessenger.Create(aTeam : TTeam_id; port : TPort_id; token : integer; preferred : boolean);
//begin
// CPlusObject := BMessenger_Create(Self, aTeam, port, token, preferred);
//end;
//procedure TMessenger.InitData(mime_sig : PChar; aTeam : TTeam_id; perr : PStatus_t);
//begin
// BMessenger_InitData(CPlusObject, mime_sig, aTeam, perr);
//end;
//procedure TMessenger.port_id fPort;
//begin
// BMessenger_port_id fPort(CPlusObject);
//end;
//
//procedure TMessenger.int32 fHandlerToken;
//begin
// BMessenger_int32 fHandlerToken(CPlusObject);
//end;
//
//procedure TMessenger.team_id fTeam;
//begin
// BMessenger_team_id fTeam(CPlusObject);
//end;
//
//procedure TMessenger.int32 extra0;
//begin
// BMessenger_int32 extra0(CPlusObject);
//end;
//
//procedure TMessenger.int32 extra1;
//begin
// BMessenger_int32 extra1(CPlusObject);
//end;
//
//procedure TMessenger.bool fPreferredTarget;
//begin
// BMessenger_bool fPreferredTarget(CPlusObject);
//end;
//
//procedure TMessenger.bool extra2;
//begin
// BMessenger_bool extra2(CPlusObject);
//end;
//
//procedure TMessenger.bool extra3;
//begin
// BMessenger_bool extra3(CPlusObject);
//end;
//
//procedure TMessenger.bool extra4;
//begin
// BMessenger_bool extra4(CPlusObject);
//end;
initialization
be_app_TMessenger := nil;
finalization
be_app_TMessenger := nil;
end.

View File

@@ -1,24 +0,0 @@
/* BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _ROSTER_H_
#define _ROSTER_H_
#include <Roster.h>
#endif /* _ROSTER_H_ */

View File

@@ -1,340 +0,0 @@
{ BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
}
unit Roster;
interface
uses
beobj, appdefs, supportdefs, OS, Entry, StorageDefs, List, Messenger,
message;
type
PTEntryRef = ^TEntryRef;
TAppInfoProc = procedure;
TAppInfo = record
thread : TThread_id;
team : TTeam_id;
port : TPort_id;
flags : Cardinal;
ref : TEntryRef;
signature : Array[0..B_MIME_TYPE_LENGTH] of Char;
end;
TRoster = class(TBeObject)
private
public
constructor Create; override;
destructor Destroy; override;
//*****************
function IsRunning(mime_sig : PChar) : boolean;
function IsRunning(var ref : TEntryRef) : boolean;
function TeamFor(mime_sig : PChar) : TTeam_id;
function TeamFor(var ref : TEntryRef) : TTeam_id;
procedure GetAppList(team_id_list : TList);
procedure GetAppList(sig : PChar; team_id_list : TList);
function GetAppInfo(sig : PChar; var info : TAppInfo) : TStatus_t;
function GetAppInfo(var ref : TEntryRef; var info : TAppInfo) : TStatus_t;
function GetRunningAppInfo(team : TTeam_id; var info : TAppInfo) : TStatus_t;
function GetActiveAppInfo(var info : TAppInfo) : TStatus_t;
function FindApp(mime_type : PChar; var app : TEntryRef) : TStatus_t;
function FindApp(var ref : TEntryRef; var app : TEntryRef) : TStatus_t;
function Broadcast(msg : TMessage) : TStatus_t;
function Broadcast(msg : TMessage; reply_to : TMessenger) : TStatus_t;
function StopWatching(target : TMessenger) : TStatus_t;
function ActivateApp(team : TTeam_id) : TStatus_t;
function Launch(mime_type : PChar; initial_msgs : TMessage; var app_team : TTeam_id) : TStatus_t;
function Launch(mime_type : PChar; message_list : TList; var app_team : TTeam_id) : TStatus_t;
function Launch(mime_type : PChar; argc : integer; args : PChar; var app_team : TTeam_id) : TStatus_t;
function Launch(var ref : TEntryRef; initial_message : TMessage; var app_team : TTeam_id) : TStatus_t;
function Launch(var ref : TEntryRef; message_list : TList; var app_team : TTeam_id) : TStatus_t;
function Launch(var ref : TEntryRef; argc : integer; args : PChar; var app_team : TTeam_id) : TStatus_t;
procedure GetRecentDocuments(refList : TMessage; maxCount : integer; ofType : PChar; openedByAppSig : PChar);
procedure GetRecentDocuments(refList : TMessage; maxCount : integer; ofTypeList : PChar; ofTypeListCount : integer; openedByAppSig : PChar);
procedure GetRecentFolders(refList : TMessage; maxCount : integer; openedByAppSig : PChar);
procedure GetRecentApps(refList : TMessage; maxCount : integer);
procedure AddToRecentDocuments(var doc : TEntryRef; appSig : PChar);
procedure AddToRecentFolders(var folder : TEntryRef; appSig : PChar);
// private
// procedure enum mtarget { MAIN_MESSENGER, MIME_MESSENGER, USE_GIVEN };
{ function _StartWatching(t : ; roster_mess : TMessenger; what : Cardinal; notify : TMessenger; event_mask : Cardinal) : TStatus_t;
function _StopWatching(t : ; roster_mess : TMessenger; what : Cardinal; notify : TMessenger) : TStatus_t;
function AddApplication(mime_sig : PChar; ref : ^TEntryRef; flags : Cardinal; team : TTeam_id; thread : TThread_id; port : TPort_id; full_reg : boolean) : Cardinal;
procedure SetSignature(team : TTeam_id; mime_sig : PChar);
procedure SetThread(team : TTeam_id; tid : TThread_id);
procedure SetThreadAndTeam(entry_token : Cardinal; tid : TThread_id; team : TTeam_id);
procedure CompleteRegistration(team : TTeam_id; : TThread_id; port : TPort_id);
function IsAppPreRegistered(ref : ^TEntryRef; team : TTeam_id; info : ^TAppInfo) : boolean;
procedure RemovePreRegApp(entry_token : Cardinal);
procedure RemoveApp(team : TTeam_id);
function xLaunchAppPrivate(mime_sig : PChar; ref : ^TEntryRef; msg_list : TList; cargs : integer; args : PChar; app_team : ^TTeam_id) : TStatus_t;
function UpdateActiveApp(team : TTeam_id) : boolean;
procedure SetAppFlags(team : TTeam_id; flags : Cardinal);
procedure DumpRoster;
function resolve_app(in_type : PChar; ref : ^TEntryRef; app_ref : ^TEntryRef; app_sig : PChar; app_flags : Cardinal; was_document : boolean) : TStatus_t;
function translate_ref(ref : ^TEntryRef; app_meta : TBMimeType; app_ref : ^TEntryRef; app_file : TBFile; app_sig : PChar; was_document : boolean) : TStatus_t;
function translate_type(mime_type : PChar; meta : TBMimeType; app_ref : ^TEntryRef; app_file : TBFile; app_sig : PChar) : TStatus_t;
function sniff_file(file : ^TEntryRef; finfo : TBNodeInfo; mime_type : PChar) : TStatus_t;
function is_wildcard(sig : PChar) : boolean;
function get_unique_supporting_app(apps : TMessage; out_sig : PChar) : TStatus_t;
function get_random_supporting_app(apps : TMessage; out_sig : PChar) : TStatus_t;
function build_arg_vector(args : PChar; pargs : integer; app_ref : ^TEntryRef; doc_ref : ^TEntryRef) : PChar;
function send_to_running(tema : TTeam_id; app_ref : ^TEntryRef; cargs : integer; args : PChar; msg_list : TList; ref : ^TEntryRef) : TStatus_t;
procedure InitMessengers;
procedure BMessenger fMess;
procedure BMessenger fMimeMess;
procedure uint32 _fReserved[3];
}
end;
function Get_be_roster : TCPlusObject; cdecl; external BePascalLibName;
function BRoster_Create(AObject : TObject) : TCPlusObject; cdecl; external BePascalLibName;
procedure BRoster_Destroy(CPlusObject : TCPlusObject); cdecl; external BePascalLibName;
//function app_info_Create(AObject : TBeObject); cdecl; external BePascalLibName name 'app_info_Create';
//procedure app_info_Free(AObject : TCPlusObject); cdecl; external BePascalLibName name 'app_info_Free';
//procedure app_info_thread_id thread(AObject : TCPlusObject); cdecl; external BePascalLibName name 'app_info_thread_id thread';
//procedure app_info_team_id team(AObject : TCPlusObject); cdecl; external BePascalLibName name 'app_info_team_id team';
//procedure app_info_port_id port(AObject : TCPlusObject); cdecl; external BePascalLibName name 'app_info_port_id port';
//procedure app_info_uint32 flags(AObject : TCPlusObject); cdecl; external BePascalLibName name 'app_info_uint32 flags';
//procedure app_info_entry_ref ref(AObject : TCPlusObject); cdecl; external BePascalLibName name 'app_info_entry_ref ref';
//procedure app_info_char signature[B_MIME_TYPE_LENGTH](AObject : TCPlusObject); cdecl; external BePascalLibName name 'app_info_char signature[B_MIME_TYPE_LENGTH]';
//function BRoster_Create(AObject : TBeObject); cdecl; external BePascalLibName name 'BRoster_Create';
//procedure BRoster_Free(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BRoster_Free';
function BRoster_IsRunning(AObject : TCPlusObject; mime_sig : PChar) : boolean; cdecl; external BePascalLibName name 'BRoster_IsRunning';
function BRoster_IsRunning(AObject : TCPlusObject; var ref : TEntryRef) : boolean; cdecl; external BePascalLibName name 'BRoster_IsRunning';
function BRoster_TeamFor(AObject : TCPlusObject; mime_sig : PChar) : TTeam_id; cdecl; external BePascalLibName name 'BRoster_TeamFor';
function BRoster_TeamFor(AObject : TCPlusObject; var ref : TEntryRef) : TTeam_id; cdecl; external BePascalLibName name 'BRoster_TeamFor';
procedure BRoster_GetAppList(AObject : TCPlusObject; team_id_list : TCPlusObject); cdecl; external BePascalLibName name 'BRoster_GetAppList';
procedure BRoster_GetAppList(AObject : TCPlusObject; sig : PChar; team_id_list : TCPlusObject); cdecl; external BePascalLibName name 'BRoster_GetAppList';
function BRoster_GetAppInfo(AObject : TCPlusObject; sig : PChar; var info : TAppInfo) : TStatus_t; cdecl; external BePascalLibName name 'BRoster_GetAppInfo';
function BRoster_GetAppInfo(AObject : TCPlusObject; var ref : TEntryRef; var info : TAppInfo) : TStatus_t; cdecl; external BePascalLibName name 'BRoster_GetAppInfo';
function BRoster_GetRunningAppInfo(AObject : TCPlusObject; team : TTeam_id; var info : TAppInfo) : TStatus_t; cdecl; external BePascalLibName name 'BRoster_GetRunningAppInfo';
function BRoster_GetActiveAppInfo(AObject : TCPlusObject; var info : TAppInfo) : TStatus_t; cdecl; external BePascalLibName name 'BRoster_GetActiveAppInfo';
function BRoster_FindApp(AObject : TCPlusObject; mime_type : PChar; var app : TEntryRef) : TStatus_t; cdecl; external BePascalLibName name 'BRoster_FindApp';
function BRoster_FindApp_1(AObject : TCPlusObject; var ref : TEntryRef; var app : TEntryRef) : TStatus_t; cdecl; external BePascalLibName name 'BRoster_FindApp';
function BRoster_Broadcast(aRoster : TCPlusObject; msg : TCPlusObject) : TStatus_t; cdecl; external BePascalLibName name 'BRoster_Broadcast';
function BRoster_Broadcast_1(AObject : TCPlusObject; msg : TCPlusObject; reply_to : TCPlusObject) : TStatus_t; cdecl; external BePascalLibName name 'BRoster_Broadcast';
function BRoster_StopWatching(AObject : TCPlusObject; target : TCPlusObject) : TStatus_t; cdecl; external BePascalLibName name 'BRoster_StopWatching';
function BRoster_ActivateApp(AObject : TCPlusObject; team : TTeam_id) : TStatus_t; cdecl; external BePascalLibName name 'BRoster_ActivateApp';
function BRoster_Launch(AObject : TCPlusObject; mime_type : PChar; initial_msgs : TCPlusObject; var app_team : TTeam_id) : TStatus_t; cdecl; external BePascalLibName name 'BRoster_Launch';
function BRoster_Launch_1(AObject : TCPlusObject; mime_type : PChar; message_list : TCPlusObject; var app_team : TTeam_id) : TStatus_t; cdecl; external BePascalLibName name 'BRoster_Launch';
function BRoster_Launch_2(AObject : TCPlusObject; mime_type : PChar; argc : integer; args : PChar; var app_team : TTeam_id) : TStatus_t; cdecl; external BePascalLibName name 'BRoster_Launch';
function BRoster_Launch_3(AObject : TCPlusObject; var ref : TEntryRef; initial_message : TMessage; var app_team : TTeam_id) : TStatus_t; cdecl; external BePascalLibName name 'BRoster_Launch';
function BRoster_Launch_4(AObject : TCPlusObject; var ref : TEntryRef; message_list : TList; var app_team : TTeam_id) : TStatus_t; cdecl; external BePascalLibName name 'BRoster_Launch';
function BRoster_Launch_5(AObject : TCPlusObject; var ref : TEntryRef; argc : integer; args : PChar; var app_team : TTeam_id) : TStatus_t; cdecl; external BePascalLibName name 'BRoster_Launch';
procedure BRoster_GetRecentDocuments(AObject : TCPlusObject; refList : TCPlusObject; maxCount : integer; ofType : PChar; openedByAppSig : PChar); cdecl; external BePascalLibName name 'BRoster_GetRecentDocuments';
procedure BRoster_GetRecentDocuments(AObject : TCPlusObject; refList : TCPlusObject; maxCount : integer; ofTypeList : PChar; ofTypeListCount : integer; openedByAppSig : PChar); cdecl; external BePascalLibName name 'BRoster_GetRecentDocuments';
procedure BRoster_GetRecentFolders(AObject : TCPlusObject; refList : TCPlusObject; maxCount : integer; openedByAppSig : PChar); cdecl; external BePascalLibName name 'BRoster_GetRecentFolders';
procedure BRoster_GetRecentApps(AObject : TCPlusObject; refList : TCPlusObject; maxCount : integer); cdecl; external BePascalLibName name 'BRoster_GetRecentApps';
procedure BRoster_AddToRecentDocuments(AObject : TCPlusObject; var doc : TEntryRef; appSig : PChar); cdecl; external BePascalLibName name 'BRoster_AddToRecentDocuments';
procedure BRoster_AddToRecentFolders(AObject : TCPlusObject; var folder : TEntryRef; appSig : PChar); cdecl; external BePascalLibName name 'BRoster_AddToRecentFolders';
// procedure BRoster_enum mtarget { MAIN_MESSENGER, MIME_MESSENGER, USE_GIVEN }(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BRoster_enum mtarget { MAIN_MESSENGER, MIME_MESSENGER, USE_GIVEN }';
{function BRoster__StartWatching(AObject : TCPlusObject; t : ; roster_mess : TCPlusObject; what : Cardinal; notify : TCPlusObject; event_mask : Cardinal) : TStatus_t; cdecl; external BePascalLibName name 'BRoster__StartWatching';
function BRoster__StopWatching(AObject : TCPlusObject; t : ; roster_mess : TCPlusObject; what : Cardinal; notify : TCPlusObject) : TStatus_t; cdecl; external BePascalLibName name 'BRoster__StopWatching';
function BRoster_AddApplication(AObject : TCPlusObject; mime_sig : PChar; ref : ^TEntryRef; flags : Cardinal; team : TTeam_id; thread : TThread_id; port : TPort_id; full_reg : boolean) : Cardinal; cdecl; external BePascalLibName name 'BRoster_AddApplication';
procedure BRoster_SetSignature(AObject : TCPlusObject; team : TTeam_id; mime_sig : PChar); cdecl; external BePascalLibName name 'BRoster_SetSignature';
procedure BRoster_SetThread(AObject : TCPlusObject; team : TTeam_id; tid : TThread_id); cdecl; external BePascalLibName name 'BRoster_SetThread';
procedure BRoster_SetThreadAndTeam(AObject : TCPlusObject; entry_token : Cardinal; tid : TThread_id; team : TTeam_id); cdecl; external BePascalLibName name 'BRoster_SetThreadAndTeam';
procedure BRoster_CompleteRegistration(AObject : TCPlusObject; team : TTeam_id; : TThread_id; port : TPort_id); cdecl; external BePascalLibName name 'BRoster_CompleteRegistration';
function BRoster_IsAppPreRegistered(AObject : TCPlusObject; ref : ^TEntryRef; team : TTeam_id; info : ^TAppInfo) : boolean; cdecl; external BePascalLibName name 'BRoster_IsAppPreRegistered';
procedure BRoster_RemovePreRegApp(AObject : TCPlusObject; entry_token : Cardinal); cdecl; external BePascalLibName name 'BRoster_RemovePreRegApp';
procedure BRoster_RemoveApp(AObject : TCPlusObject; team : TTeam_id); cdecl; external BePascalLibName name 'BRoster_RemoveApp';
function BRoster_xLaunchAppPrivate(AObject : TCPlusObject; mime_sig : PChar; ref : ^TEntryRef; msg_list : TCPlusObject; cargs : integer; args : PChar; app_team : ^TTeam_id) : TStatus_t; cdecl; external BePascalLibName name 'BRoster_xLaunchAppPrivate';
function BRoster_UpdateActiveApp(AObject : TCPlusObject; team : TTeam_id) : boolean; cdecl; external BePascalLibName name 'BRoster_UpdateActiveApp';
procedure BRoster_SetAppFlags(AObject : TCPlusObject; team : TTeam_id; flags : Cardinal); cdecl; external BePascalLibName name 'BRoster_SetAppFlags';
procedure BRoster_DumpRoster(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BRoster_DumpRoster';
function BRoster_resolve_app(AObject : TCPlusObject; in_type : PChar; ref : ^TEntryRef; app_ref : ^TEntryRef; app_sig : PChar; app_flags : Cardinal; was_document : boolean) : TStatus_t; cdecl; external BePascalLibName name 'BRoster_resolve_app';
function BRoster_translate_ref(AObject : TCPlusObject; ref : ^TEntryRef; app_meta : TCPlusObject; app_ref : ^TEntryRef; app_file : TCPlusObject; app_sig : PChar; was_document : boolean) : TStatus_t; cdecl; external BePascalLibName name 'BRoster_translate_ref';
function BRoster_translate_type(AObject : TCPlusObject; mime_type : PChar; meta : TCPlusObject; app_ref : ^TEntryRef; app_file : TCPlusObject; app_sig : PChar) : TStatus_t; cdecl; external BePascalLibName name 'BRoster_translate_type';
function BRoster_sniff_file(AObject : TCPlusObject; file : ^TEntryRef; finfo : TCPlusObject; mime_type : PChar) : TStatus_t; cdecl; external BePascalLibName name 'BRoster_sniff_file';
function BRoster_is_wildcard(AObject : TCPlusObject; sig : PChar) : boolean; cdecl; external BePascalLibName name 'BRoster_is_wildcard';
function BRoster_get_unique_supporting_app(AObject : TCPlusObject; apps : TMessage; out_sig : PChar) : TStatus_t; cdecl; external BePascalLibName name 'BRoster_get_unique_supporting_app';
function BRoster_get_random_supporting_app(AObject : TCPlusObject; apps : TMessage; out_sig : PChar) : TStatus_t; cdecl; external BePascalLibName name 'BRoster_get_random_supporting_app';
function BRoster_build_arg_vector(AObject : TCPlusObject; args : PChar; pargs : integer; app_ref : ^TEntryRef; doc_ref : ^TEntryRef) : PChar; cdecl; external BePascalLibName name 'BRoster_build_arg_vector';
function BRoster_send_to_running(AObject : TCPlusObject; tema : TTeam_id; app_ref : ^TEntryRef; cargs : integer; args : PChar; msg_list : TList; ref : ^TEntryRef) : TStatus_t; cdecl; external BePascalLibName name 'BRoster_send_to_running';
procedure BRoster_InitMessengers(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BRoster_InitMessengers';
procedure BRoster_BMessenger fMess(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BRoster_BMessenger fMess';
procedure BRoster_BMessenger fMimeMess(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BRoster_BMessenger fMimeMess';
procedure BRoster_uint32 _fReserved[3](AObject : TCPlusObject); cdecl; external BePascalLibName name 'BRoster_uint32 _fReserved[3]';
}
var
be_roster : TRoster;
implementation
constructor TRoster.Create;
begin
inherited;
CPlusObject := BRoster_Create(Self);
be_roster := Self;
end;
destructor TRoster.Destroy;
begin
BRoster_Destroy(CPlusObject);
inherited;
end;
function TRoster.IsRunning(mime_sig : PChar) : boolean;
begin
Result := BRoster_IsRunning(CPlusObject, mime_sig);
end;
function TRoster.IsRunning(var ref : TEntryRef) : boolean;
begin
Result := BRoster_IsRunning(CPlusObject, ref);
end;
function TRoster.TeamFor(mime_sig : PChar) : TTeam_id;
begin
Result := BRoster_TeamFor(CPlusObject, mime_sig);
end;
function TRoster.TeamFor(var ref : TEntryRef) : TTeam_id;
begin
Result := BRoster_TeamFor(CPlusObject, ref);
end;
procedure TRoster.GetAppList(team_id_list : TList);
begin
BRoster_GetAppList(CPlusObject, team_id_list.CPlusObject);
end;
procedure TRoster.GetAppList(sig : PChar; team_id_list : TList);
begin
BRoster_GetAppList(CPlusObject, sig, team_id_list.CPlusObject);
end;
function TRoster.GetAppInfo(sig : PChar; var info : TAppInfo) : TStatus_t;
begin
Result := BRoster_GetAppInfo(CPlusObject, sig, info);
end;
function TRoster.GetAppInfo(var ref : TEntryRef; var info : TAppInfo) : TStatus_t;
begin
Result := BRoster_GetAppInfo(CPlusObject, ref, info);
end;
function TRoster.GetRunningAppInfo(team : TTeam_id; var info : TAppInfo) : TStatus_t;
begin
Result := BRoster_GetRunningAppInfo(CPlusObject, team, info);
end;
function TRoster.GetActiveAppInfo(var info : TAppInfo) : TStatus_t;
begin
Result := BRoster_GetActiveAppInfo(CPlusObject, info);
end;
function TRoster.FindApp(mime_type : PChar; var app : TEntryRef) : TStatus_t;
begin
Result := BRoster_FindApp(CPlusObject, mime_type, app);
end;
function TRoster.FindApp(var ref : TEntryRef; var app : TEntryRef) : TStatus_t;
begin
Result := BRoster_FindApp_1(CPlusObject, ref, app);
end;
function TRoster.Broadcast(msg : TMessage) : TStatus_t;
begin
Result := BRoster_Broadcast(CPlusObject, msg.CPlusObject);
end;
function TRoster.Broadcast(msg : TMessage; reply_to : TMessenger) : TStatus_t;
begin
Result := BRoster_Broadcast_1(CPlusObject, msg.CPlusObject, reply_to.CPlusObject);
end;
function TRoster.StopWatching(target : TMessenger) : TStatus_t;
begin
Result := BRoster_StopWatching(CPlusObject, target.CPlusObject);
end;
function TRoster.ActivateApp(team : TTeam_id) : TStatus_t;
begin
Result := BRoster_ActivateApp(CPlusObject, team);
end;
function TRoster.Launch(mime_type : PChar; initial_msgs : TMessage; var app_team : TTeam_id) : TStatus_t;
begin
Result := BRoster_Launch(CPlusObject, mime_type, initial_msgs.CPlusObject, app_team);
end;
function TRoster.Launch(mime_type : PChar; message_list : TList; var app_team : TTeam_id) : TStatus_t;
begin
Result := BRoster_Launch_1(CPlusObject, mime_type, message_list.CPlusObject, app_team);
end;
function TRoster.Launch(mime_type : PChar; argc : integer; args : PChar; var app_team : TTeam_id) : TStatus_t;
begin
Result := BRoster_Launch_2(CPlusObject, mime_type, argc, args, app_team);
end;
function TRoster.Launch(var ref : TEntryRef; initial_message : TMessage; var app_team : TTeam_id) : TStatus_t;
begin
Result := BRoster_Launch_3(CPlusObject, ref, initial_message, app_team);
end;
function TRoster.Launch(var ref : TEntryRef; message_list : TList; var app_team : TTeam_id) : TStatus_t;
begin
Result := BRoster_Launch_4(CPlusObject, ref, message_list, app_team);
end;
function TRoster.Launch(var ref : TEntryRef; argc : integer; args : PChar; var app_team : TTeam_id) : TStatus_t;
begin
Result := BRoster_Launch_5(CPlusObject, ref, argc, args, app_team);
end;
procedure TRoster.GetRecentDocuments(refList : TMessage; maxCount : integer; ofType : PChar; openedByAppSig : PChar);
begin
BRoster_GetRecentDocuments(CPlusObject, refList.CPlusObject, maxCount, ofType, openedByAppSig);
end;
procedure TRoster.GetRecentDocuments(refList : TMessage; maxCount : integer; ofTypeList : PChar; ofTypeListCount : integer; openedByAppSig : PChar);
begin
BRoster_GetRecentDocuments(CPlusObject, refList.CPlusObject, maxCount, ofTypeList, ofTypeListCount, openedByAppSig);
end;
procedure TRoster.GetRecentFolders(refList : TMessage; maxCount : integer; openedByAppSig : PChar);
begin
BRoster_GetRecentFolders(CPlusObject, refList.CPlusObject, maxCount, openedByAppSig);
end;
procedure TRoster.GetRecentApps(refList : TMessage; maxCount : integer);
begin
BRoster_GetRecentApps(CPlusObject, refList.CPlusObject, maxCount);
end;
procedure TRoster.AddToRecentDocuments(var doc : TEntryRef; appSig : PChar);
begin
BRoster_AddToRecentDocuments(CPlusObject, doc, appSig);
end;
procedure TRoster.AddToRecentFolders(var folder : TEntryRef; appSig : PChar);
begin
BRoster_AddToRecentFolders(CPlusObject, folder, appSig);
end;
initialization
be_roster := TRoster.Wrap(Get_be_roster);
finalization
be_roster.UnWrap;
be_roster := nil;
end.

View File

@@ -1,51 +0,0 @@
/* BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _BEOBJ_CPP_
#define _BEOBJ_CPP_
#include <beobj.h>
#if defined(__cplusplus)
extern "C" {
#endif
BPasObject_GetPasClassName_hook PasObject_GetPasClassName_hook;
#if defined(__cplusplus)
}
#endif
BPasObject::BPasObject(TPasObject PasObject)
{
FPasObject = PasObject;
}
TPasObject BPasObject::GetPasObject(void) const
{
return FPasObject;
}
BPasObject::~BPasObject(){}
char *BPasObject::GetPasClassName(void)
{
return PasObject_GetPasClassName_hook(FPasObject);
}
#endif /* _BEOBJ_CPP_ */

View File

@@ -1,38 +0,0 @@
/* BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _BEOBJ_H_
#define _BEOBJ_H_
typedef void* TPasObject;
typedef void* TCPlusObject;
typedef char *(*BPasObject_GetPasClassName_hook)(TPasObject PasObject);
class BPasObject
{
public:
BPasObject(TPasObject PasObject);
TPasObject GetPasObject(void) const;
virtual ~BPasObject(void);
char *GetPasClassName(void);
private:
TPasObject FPasObject;
};
#endif /* _BEOBJ_H_ */

View File

@@ -1,126 +0,0 @@
{ BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
}
unit beobj;
interface
{$M+}
uses
fdblib;
// FreePascal use ld on BeOS (like on LINUX) to link to libraries.
// ld use the environment variable BELIBRARIES to find libraries.
const
BePascalLibName = 'bepascal';
type
// BePascal types
TCPlusObject = Pointer;
THandle = Pointer;
TBeObject = class(TObject)
private
procedure Debug;
protected
FCPlusObject : TCPlusObject;
public
constructor Create; virtual;
constructor CreatePas; virtual;
constructor Wrap(ACPlusObject : TCPlusObject); virtual;
destructor UnWrap; virtual;
property CPlusObject : TCPlusObject read FCPlusObject write FCPlusObject;
end;
implementation
uses
SysUtils;
var
PasObject_GetPasClassName_hook : Pointer; cvar; external;
function PasObject_GetPasClassName_hook_func(PasObject : TBeObject) : PChar;
begin
if PasObject <> nil then
Result := StrPCopy(Result, PasObject.ClassName)
else
Result := '';
end;
// Not really a useful function. Un jour peut être...
function BPasObject_GetPasObject(ACPlusObject : TCPlusObject) : TObject; cdecl; external BePascalLibName name 'BPasObject_GetPasObject';
// start TBeObject
constructor TBeObject.Create;
begin
inherited;
Debug;
end;
// Constructeur utilisé pour créer une instance Pascal à partir d'un objet C++.
// Nécessaire notamment pour encapsuler les objets C++ passé en paramètre des
// fonctions de hook.
constructor TBeObject.Wrap(ACPlusObject : TCPlusObject);
begin
Self.CPlusObject := ACPlusObject;
Debug;
end;
constructor TBeObject.CreatePas;
begin
Create;
end;
procedure TBeObject.Debug;
var
size : cardinal;
begin
{$IFDEF DEBUG}
size := 0;
size := SizeOf(Self.ClassType);
SendText('Instance de ' + Self.ClassName + '(' + HexStr(longint(pointer(Self)), 8) + ')' +
'(' + IntToStr(size) + ')' +
' ');
{$ENDIF}
end;
// Destructeur utilisé pour libérer l'objet pascal sans
// détruire l'objet C++ correspondant. Utile pour
// libérer la mémoire coté pascal dans le cas d'objets
// C++ qui ne sont pas propriété de l'application
// (cas des messages passés aux fonctions de rappel)
destructor TBeObject.UnWrap;
begin
{$IFDEF DEBUG}
SendText('UnWrap');
{$ENDIF}
// On passe CPlusObject à nil pour éviter de libérer
// l'objet C++ lors de l'appel de free
Self.CPlusObject := nil;
end;
// end TBeObject
initialization
PasObject_GetPasClassName_hook := @PasObject_GetPasClassName_hook_func;
finalization
PasObject_GetPasClassName_hook := nil;
end.

View File

@@ -1,419 +0,0 @@
/* BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Eric Jourde
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _JOYSTICK_CPP_
#define _JOYSTICK_CPP_
#include "Joystick.h"
#include <beobj.h>
#if defined(__cplusplus)
extern "C" {
#endif
/*
* Method: BJoystick::BJoystick()
* Descr:
*/
TCPlusObject BJoystick_Create()
{
return new BJoystick();
}
/*
* Method: BJoystick::~BJoystick()
* Descr:
*/
void BJoystick_Free(BJoystick *Joystick)
{
delete Joystick;
}
/*
* Method: BJoystick::Open()
* Descr:
*/
status_t
BJoystick_Open(BJoystick *Joystick, const char *portName)
{
return Joystick->Open(portName);
}
/*
* Method: BJoystick::Open()
* Descr:
*/
status_t
BJoystick_Open_1
(BJoystick *Joystick, const char *portName,
bool enter_enhanced)
{
return Joystick->Open(portName,
enter_enhanced);
}
/*
* Method: BJoystick::Close()
* Descr:
*/
void
BJoystick_Close(BJoystick *Joystick)
{
Joystick->Close();
}
/*
* Method: BJoystick::Update()
* Descr:
*/
status_t
BJoystick_Update(BJoystick *Joystick)
{
return Joystick->Update();
}
/*
* Method: BJoystick::SetMaxLatency()
* Descr:
*/
status_t
BJoystick_SetMaxLatency(BJoystick *Joystick, bigtime_t max_latency)
{
return Joystick->SetMaxLatency(max_latency);
}
/*
* Method: BJoystick::CountDevices()
* Descr:
*/
int32
BJoystick_CountDevices(BJoystick *Joystick)
{
return Joystick->CountDevices();
}
/*
* Method: BJoystick::GetDeviceName()
* Descr:
*/
status_t
BJoystick_GetDeviceName(BJoystick *Joystick, int32 n,
char *name,
size_t bufSize)
{
return Joystick->GetDeviceName(n,
name,
bufSize);
}
/*
* Method: BJoystick::EnterEnhancedMode()
* Descr:
*/
bool
BJoystick_EnterEnhancedMode(BJoystick *Joystick, const entry_ref *ref)
{
return Joystick->EnterEnhancedMode(ref);
}
/*
* Method: BJoystick::CountSticks()
* Descr:
*/
int32
BJoystick_CountSticks(BJoystick *Joystick)
{
return Joystick->CountSticks();
}
/*
* Method: BJoystick::CountAxes()
* Descr:
*/
int32
BJoystick_CountAxes(BJoystick *Joystick)
{
return Joystick->CountAxes();
}
/*
* Method: BJoystick::CountHats()
* Descr:
*/
int32
BJoystick_CountHats(BJoystick *Joystick)
{
return Joystick->CountHats();
}
/*
* Method: BJoystick::CountButtons()
* Descr:
*/
int32
BJoystick_CountButtons(BJoystick *Joystick)
{
return Joystick->CountButtons();
}
/*
* Method: BJoystick::GetAxisValues()
* Descr:
*/
status_t
BJoystick_GetAxisValues(BJoystick *Joystick, int16 *out_values,
int32 for_stick)
{
return Joystick->GetAxisValues(out_values,
for_stick);
}
/*
* Method: BJoystick::GetHatValues()
* Descr:
*/
status_t
BJoystick_GetHatValues(BJoystick *Joystick, uint8 *out_hats,
int32 for_stick)
{
return Joystick->GetHatValues(out_hats,
for_stick);
}
/*
* Method: BJoystick::ButtonValues()
* Descr:
*/
uint32
BJoystick_ButtonValues(BJoystick *Joystick, int32 for_stick)
{
return Joystick->ButtonValues(for_stick);
}
/*
* Method: BJoystick::GetAxisNameAt()
* Descr:
*/
status_t
BJoystick_GetAxisNameAt(BJoystick *Joystick, int32 index,
BString *out_name)
{
return Joystick->GetAxisNameAt(index,
out_name);
}
/*
* Method: BJoystick::GetHatNameAt()
* Descr:
*/
status_t
BJoystick_GetHatNameAt(BJoystick *Joystick, int32 index,
BString *out_name)
{
return Joystick->GetHatNameAt(index,
out_name);
}
/*
* Method: BJoystick::GetButtonNameAt()
* Descr:
*/
status_t
BJoystick_GetButtonNameAt(BJoystick *Joystick, int32 index,
BString *out_name)
{
return Joystick->GetButtonNameAt(index,
out_name);
}
/*
* Method: BJoystick::GetControllerModule()
* Descr:
*/
status_t
BJoystick_GetControllerModule(BJoystick *Joystick, BString *out_name)
{
return Joystick->GetControllerModule(out_name);
}
/*
* Method: BJoystick::GetControllerName()
* Descr:
*/
status_t
BJoystick_GetControllerName(BJoystick *Joystick, BString *out_name)
{
return Joystick->GetControllerName(out_name);
}
/*
* Method: BJoystick::IsCalibrationEnabled()
* Descr:
*/
bool
BJoystick_IsCalibrationEnabled(BJoystick *Joystick)
{
return Joystick->IsCalibrationEnabled();
}
/*
* Method: BJoystick::EnableCalibration()
* Descr:
*/
status_t
BJoystick_EnableCalibration(BJoystick *Joystick, bool calibrates)
{
return Joystick->EnableCalibration(calibrates);
}
/*
* Method: BJoystick::Calibrate()
* Descr:
*/
/*
void
BJoystick_Calibrate(BJoystick *Joystick, struct _extended_joystick *reading)
{
Joystick->Calibrate(reading);
}
*/
/*
* Method: BJoystick::gather_enhanced_info()
* Descr:
*/
/*status_t
BJoystick_gather_enhanced_info(BJoystick *Joystick, const entry_ref *ref)
{
return Joystick->gather_enhanced_info(ref);
}
*/
/*
* Method: BJoystick::save_config()
* Descr:
*/
/*status_t
BJoystick_save_config(BJoystick *Joystick, const entry_ref *ref)
{
return Joystick->save_config(ref);
}
*/
/*
* Method: BJoystick::_ReservedJoystick1()
* Descr:
*/
/*void
BJoystick__ReservedJoystick1(BJoystick *Joystick)
{
Joystick->_ReservedJoystick1();
}
*/
/*
* Method: BJoystick::_ReservedJoystick2()
* Descr:
*/
/*void
BJoystick__ReservedJoystick2(BJoystick *Joystick)
{
Joystick->_ReservedJoystick2();
}
*/
/*
* Method: BJoystick::_ReservedJoystick3()
* Descr:
*/
/*void
BJoystick__ReservedJoystick3(BJoystick *Joystick)
{
Joystick->_ReservedJoystick3();
}
*/
/*
* Method: BJoystick::_Reserved_Joystick_4()
* Descr:
*/
/*status_t
BJoystick__Reserved_Joystick_4(BJoystick *Joystick, void *,
...)
{
return Joystick->_Reserved_Joystick_4(,
);
}
*/
/*
* Method: BJoystick::_Reserved_Joystick_5()
* Descr:
*/
/*status_t
BJoystick__Reserved_Joystick_5(BJoystick *Joystick, void *,
...)
{
return Joystick->_Reserved_Joystick_5(,
);
}
*/
/*
* Method: BJoystick::_Reserved_Joystick_6()
* Descr:
*/
/*status_t
BJoystick__Reserved_Joystick_6(BJoystick *Joystick, void *,
...)
{
return Joystick->_Reserved_Joystick_6(,
);
}
*/
#if defined(__cplusplus)
}
#endif
#endif /* _JOYSTICK_CPP_ */

View File

@@ -1,220 +0,0 @@
{ BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Eric Jourde
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
}
unit joystick;
interface
uses
beobj, SupportDefs, os;
type
TJoystick = class(TBeObject)
private
public
constructor Create; override;
destructor Destroy; override;
function Open(portName : PChar) : TStatus_t;
procedure Close;
function Open_1(portName : PChar; enter_enhanced : boolean):TStatus_t;
function Update: TStatus_t;
function SetMaxLatency( max_latency:TBigtime_t): TStatus_t;
function CountDevices : Cardinal;
function GetDeviceName( n : Integer; name : PChar; bufSize: Tsize_t): TStatus_t;
function CountSticks: Cardinal;
function CountAxes:Cardinal;
function CountHats:Cardinal;
function CountButtons:Cardinal;
function GetAxisValues( out_values : Integer; for_stick : cardinal): TStatus_t;
function ButtonValues(for_stick: cardinal):Cardinal;
function IsCalibrationEnabled:boolean;
function EnableCalibration (calibrates : boolean): TStatus_t;
//function BJoystick_EnterEnhancedMode(BAObject : TCPlusObject; const entry_ref *ref): Boolean;
// function GetAxisNameAt(index: cardinal; BString *out_name): TStatus_t;
// function GetHatNameAt( index: cardinal,BString *out_name): TStatus_t;
// function GetButtonNameAt( index: cardinal,BString *out_name): TStatus_t; c
// function GetControllerModule( BString *out_name): TStatus_t;
// function GetControllerName( BString *out_name): TStatus_t;
// function GetHatValues( uint8 *out_hats;for_stick: cardinal): TStatus_t;
end;
function BJoystick_Create(AObject : TBeObject) : TCPlusObject; cdecl; external BePascalLibName name 'BJoystick_Create';
procedure BJoystick_Free(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BJoystick_Free';
function BJoystick_Open(AObject : TCPlusObject; portName : PChar):TStatus_t ; cdecl; external BePascalLibName name 'BJoystick_Open';
function BJoystick_Open_1(AObject : TCPlusObject; portName : PChar; enter_enhanced : boolean):TStatus_t; cdecl; external BePascalLibName name 'BJoystick_Open_1';
procedure BJoystick_Close(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BJoystick_Close';
function BJoystick_Update(AObject : TCPlusObject): TStatus_t; cdecl; external BePascalLibName name 'BJoystick_Update';
function BJoystick_SetMaxLatency(AObject : TCPlusObject; max_latency:TBigtime_t): TStatus_t; cdecl; external BePascalLibName name 'BJoystick_SetMaxLatency';
function BJoystick_CountDevices(AObject : TCPlusObject):Cardinal; cdecl; external BePascalLibName name 'BJoystick_CountDevices';
function BJoystick_GetDeviceName(AObject : TCPlusObject; n : Integer; name : PChar; bufSize: Tsize_t): TStatus_t; cdecl; external BePascalLibName name 'BJoystick_GetDeviceName';
function BJoystick_CountSticks(BAObject : TCPlusObject): Cardinal; cdecl; external BePascalLibName name 'BJoystick_CountSticks';
function BJoystick_CountAxes(BAObject : TCPlusObject):Cardinal; cdecl; external BePascalLibName name 'BJoystick_CountAxes';
function BJoystick_CountHats(BAObject : TCPlusObject):Cardinal; cdecl; external BePascalLibName name 'BJoystick_CountHats';
function BJoystick_CountButtons(BAObject : TCPlusObject):Cardinal; cdecl; external BePascalLibName name 'BJoystick_CountButtons';
function BJoystick_GetAxisValues(BAObject : TCPlusObject; out_values : Integer; for_stick : cardinal): TStatus_t; cdecl; external BePascalLibName name 'BJoystick_GetAxisValues';
function BJoystick_ButtonValues(BAObject : TCPlusObject;for_stick: cardinal):Cardinal; cdecl; external BePascalLibName name 'BJoystick_ButtonValues';
function BJoystick_IsCalibrationEnabled(BAObject : TCPlusObject):boolean; cdecl; external BePascalLibName name 'BJoystick_IsCalibrationEnabled';
function BJoystick_EnableCalibration(BAObject : TCPlusObject;calibrates : boolean): TStatus_t; cdecl; external BePascalLibName name 'BJoystick_EnableCalibration';
//function BJoystick_EnterEnhancedMode(BAObject : TCPlusObject; const entry_ref *ref): Boolean; cdecl; external BePascalLibName name 'BJoystick_EnterEnhancedMode';
//function BJoystick_GetHatValues(BAObject : TCPlusObject, uint8 *out_hats;for_stick: cardinal): TStatus_t; cdecl; external BePascalLibName name 'BJoystick_GetHatValues';
//function BJoystick_GetAxisNameAt(BAObject : TCPlusObject;index: cardinal; BString *out_name): TStatus_t; cdecl; external BePascalLibName name 'BJoystick_GetAxisNameAt';
//function BJoystick_GetHatNameAt(BAObject : TCPlusObject; index: cardinal, BString *out_name): TStatus_t; cdecl; external BePascalLibName name 'BJoystick_GetHatNameAt';
//function BJoystick_GetButtonNameAt(BAObject : TCPlusObject; index: cardinal,BString *out_name): TStatus_t; cdecl; external BePascalLibName name 'BJoystick_GetButtonNameAt';
//function BJoystick_GetControllerModule(BAObject : TCPlusObject, BString *out_name): TStatus_t; cdecl; external BePascalLibName name 'BJoystick_GetControllerModule';
//function BJoystick_GetControllerName(BAObject : TCPlusObject, BString *out_name): TStatus_t; cdecl; external BePascalLibName name 'BJoystick_GetControllerName';
implementation
constructor TJoystick.Create;
begin
inherited;
CPlusObject := BJoystick_Create(Self);
end;
destructor TJoystick.Destroy;
begin
if CPlusObject <> nil then
BJoystick_Free(CPlusObject);
inherited;
end;
function TJoystick.Open(portName : PChar) : TStatus_t;
begin
result := BJoystick_Open(CPlusObject, portName);
end;
function TJoystick.Open_1( portName : PChar; enter_enhanced : boolean):TStatus_t;
begin
result := BJoystick_Open_1(CPlusObject, portName , enter_enhanced);
end;
procedure TJoystick.Close;
begin
BJoystick_Close(CPlusObject);
end;
function TJoystick.Update: TStatus_t;
begin
result:=BJoystick_Update(CPlusObject);
end;
function TJoystick.SetMaxLatency(max_latency:TBigtime_t): TStatus_t;
begin
result:=BJoystick_SetMaxLatency(CPlusObject, max_latency);
end;
function TJoystick.CountDevices :Cardinal;
begin
result:=BJoystick_CountDevices(CPlusObject);
end;
function TJoystick.GetDeviceName( n : Integer; name : PChar; bufSize: Tsize_t): TStatus_t;
begin
result:=BJoystick_GetDeviceName(CPlusObject, n, name, bufSize );
end;
//function BJoystick_EnterEnhancedMode(BAObject : TCPlusObject; const entry_ref *ref): Boolean;
function TJoystick.CountSticks: Cardinal;
begin
result:=BJoystick_CountSticks(CPlusObject);
end;
function TJoystick.CountAxes:Cardinal;
begin
result:=BJoystick_CountAxes(CPlusObject);
end;
function TJoystick.CountHats:Cardinal;
begin
result:=BJoystick_CountHats(CPlusObject);
end;
function TJoystick.CountButtons:Cardinal;
begin
result:=BJoystick_CountButtons(CPlusObject);
end;
function TJoystick.GetAxisValues( out_values : Integer; for_stick : cardinal): TStatus_t;
begin
result:=BJoystick_GetAxisValues(CPlusObject, out_values, for_stick);
end;
//function TJoystick.GetHatValues( uint8 *out_hats ; for_stick: cardinal): TStatus_t;
//begin
// result:=BJoystick_GetHatValues( out_hats,for_stick);
//end;
function TJoystick.ButtonValues(for_stick: cardinal):Cardinal;
begin
result:=BJoystick_ButtonValues(CPlusObject,for_stick);
end;
//function TJoystick.GetAxisNameAt(index: cardinal; BString *out_name): TStatus_t;
//begin
// result:=BJoystick_GetAxisNameAt(CPlusObject,index,out_name);
//end;
//function TJoystick.GetHatNameAt( index: cardinal,BString *out_name): TStatus_t;
//begin
// result:=BJoystick_GetHatNameAt(CPlusObject, index,out_name);
//end;
//function TJoystick.GetButtonNameAt( index: cardinal,BString *out_name): TStatus_t;
//begin
// result:=BJoystick_GetButtonNameAt(CPlusObject, index,out_name);
//end;
//function TJoystick.GetControllerModule( BString *out_name): TStatus_t;
//begin
// result:=BJoystick_GetControllerModule(CPlusObject, out_name);
//end;
//function TJoystick.GetControllerName( BString: *out_name): TStatus_t;
//begin
// result:=BJoystick_GetControllerName(CPlusObject, out_name);
//end;
function TJoystick.IsCalibrationEnabled:boolean;
begin
result:=BJoystick_IsCalibrationEnabled(CPlusObject);
end;
function TJoystick.EnableCalibration( calibrates : boolean): TStatus_t;
begin
result:=BJoystick_EnableCalibration(CPlusObject, calibrates);
end;
end.

View File

@@ -1,441 +0,0 @@
/* BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _SERIALPORT_CPP_
#define _SERIALPORT_CPP_
#include "SerialPort.h"
#include <beobj.h>
#if defined(__cplusplus)
extern "C" {
#endif
/*
* Method: BSerialPort::BSerialPort()
* Descr:
*/
TCPlusObject BSerialPort_Create()
{
return new BSerialPort();
}
/*
* Method: BSerialPort::~BSerialPort()
* Descr:
*/
void BSerialPort_Free(BSerialPort *SerialPort)
{
delete SerialPort;
}
/*
* Method: BSerialPort::Open()
* Descr:
*/
status_t
BSerialPort_Open(BSerialPort *SerialPort, const char *portName)
{
return SerialPort->Open(portName);
}
/*
* Method: BSerialPort::Close()
* Descr:
*/
void
BSerialPort_Close(BSerialPort *SerialPort)
{
SerialPort->Close();
}
/*
* Method: BSerialPort::Read()
* Descr:
*/
ssize_t
BSerialPort_Read(BSerialPort *SerialPort, void *buf,
size_t count)
{
return SerialPort->Read(buf,
count);
}
/*
* Method: BSerialPort::Write()
* Descr:
*/
ssize_t
BSerialPort_Write(BSerialPort *SerialPort, const void *buf,
size_t count)
{
return SerialPort->Write(buf,
count);
}
/*
* Method: BSerialPort::SetBlocking()
* Descr:
*/
void
BSerialPort_SetBlocking(BSerialPort *SerialPort, bool Blocking)
{
SerialPort->SetBlocking(Blocking);
}
/*
* Method: BSerialPort::SetTimeout()
* Descr:
*/
status_t
BSerialPort_SetTimeout(BSerialPort *SerialPort, bigtime_t microSeconds)
{
return SerialPort->SetTimeout(microSeconds);
}
/*
* Method: BSerialPort::SetDataRate()
* Descr:
*/
status_t
BSerialPort_SetDataRate(BSerialPort *SerialPort, data_rate bitsPerSecond)
{
return SerialPort->SetDataRate(bitsPerSecond);
}
/*
* Method: BSerialPort::DataRate()
* Descr:
*/
data_rate
BSerialPort_DataRate(BSerialPort *SerialPort)
{
return SerialPort->DataRate();
}
/*
* Method: BSerialPort::SetDataBits()
* Descr:
*/
void
BSerialPort_SetDataBits(BSerialPort *SerialPort, data_bits numBits)
{
SerialPort->SetDataBits(numBits);
}
/*
* Method: BSerialPort::DataBits()
* Descr:
*/
data_bits
BSerialPort_DataBits(BSerialPort *SerialPort, void)
{
return SerialPort->DataBits();
}
/*
* Method: BSerialPort::SetStopBits()
* Descr:
*/
void
BSerialPort_SetStopBits(BSerialPort *SerialPort, stop_bits numBits)
{
SerialPort->SetStopBits(numBits);
}
/*
* Method: BSerialPort::StopBits()
* Descr:
*/
stop_bits
BSerialPort_StopBits(BSerialPort *SerialPort, void)
{
return SerialPort->StopBits();
}
/*
* Method: BSerialPort::SetParityMode()
* Descr:
*/
void
BSerialPort_SetParityMode(BSerialPort *SerialPort, parity_mode which)
{
SerialPort->SetParityMode(which);
}
/*
* Method: BSerialPort::ParityMode()
* Descr:
*/
parity_mode
BSerialPort_ParityMode(BSerialPort *SerialPort, void)
{
return SerialPort->ParityMode();
}
/*
* Method: BSerialPort::ClearInput()
* Descr:
*/
void
BSerialPort_ClearInput(BSerialPort *SerialPort, void)
{
SerialPort->ClearInput();
}
/*
* Method: BSerialPort::ClearOutput()
* Descr:
*/
void
BSerialPort_ClearOutput(BSerialPort *SerialPort, void)
{
SerialPort->ClearOutput();
}
/*
* Method: BSerialPort::SetFlowControl()
* Descr:
*/
void
BSerialPort_SetFlowControl(BSerialPort *SerialPort, uint32 method)
{
SerialPort->SetFlowControl(method);
}
/*
* Method: BSerialPort::FlowControl()
* Descr:
*/
uint32
BSerialPort_FlowControl(BSerialPort *SerialPort)
{
return SerialPort->FlowControl();
}
/*
* Method: BSerialPort::SetDTR()
* Descr:
*/
status_t
BSerialPort_SetDTR(BSerialPort *SerialPort, bool asserted)
{
return SerialPort->SetDTR(asserted);
}
/*
* Method: BSerialPort::SetRTS()
* Descr:
*/
status_t
BSerialPort_SetRTS(BSerialPort *SerialPort, bool asserted)
{
return SerialPort->SetRTS(asserted);
}
/*
* Method: BSerialPort::NumCharsAvailable()
* Descr:
*/
status_t
BSerialPort_NumCharsAvailable(BSerialPort *SerialPort, int32 *wait_until_this_many)
{
return SerialPort->NumCharsAvailable(wait_until_this_many);
}
/*
* Method: BSerialPort::IsCTS()
* Descr:
*/
bool
BSerialPort_IsCTS(BSerialPort *SerialPort)
{
return SerialPort->IsCTS();
}
/*
* Method: BSerialPort::IsDSR()
* Descr:
*/
bool
BSerialPort_IsDSR(BSerialPort *SerialPort)
{
return SerialPort->IsDSR();
}
/*
* Method: BSerialPort::IsRI()
* Descr:
*/
bool
BSerialPort_IsRI(BSerialPort *SerialPort)
{
return SerialPort->IsRI();
}
/*
* Method: BSerialPort::IsDCD()
* Descr:
*/
bool
BSerialPort_IsDCD(BSerialPort *SerialPort)
{
return SerialPort->IsDCD();
}
/*
* Method: BSerialPort::WaitForInput()
* Descr:
*/
ssize_t
BSerialPort_WaitForInput(BSerialPort *SerialPort)
{
return SerialPort->WaitForInput();
}
/*
* Method: BSerialPort::CountDevices()
* Descr:
*/
int32
BSerialPort_CountDevices(BSerialPort *SerialPort)
{
return SerialPort->CountDevices();
}
/*
* Method: BSerialPort::GetDeviceName()
* Descr:
*/
status_t
BSerialPort_GetDeviceName(BSerialPort *SerialPort, int32 n,
char *name,
size_t bufSize)
{
return SerialPort->GetDeviceName(n,
name,
bufSize);
}
#if defined(__cplusplus)
}
#endif
/*
* Method: BSerialPort::ScanDevices()
* Descr:
*/
/* private function !
void
BSerialPort_ScanDevices(BSerialPort *SerialPort)
{
SerialPort->ScanDevices();
}*/
/*
* Method: BSerialPort::_ReservedSerialPort1()
* Descr:
*/
/* private function !
void
BSerialPort__ReservedSerialPort1(BSerialPort *SerialPort)
{
SerialPort->_ReservedSerialPort1();
}*/
/*
* Method: BSerialPort::_ReservedSerialPort2()
* Descr:
*/
/* private function !
void
BSerialPort__ReservedSerialPort2(BSerialPort *SerialPort)
{
SerialPort->_ReservedSerialPort2();
}*/
/*
* Method: BSerialPort::_ReservedSerialPort3()
* Descr:
*/
/* private function !
void
BSerialPort__ReservedSerialPort3(BSerialPort *SerialPort)
{
SerialPort->_ReservedSerialPort3();
}*/
/*
* Method: BSerialPort::_ReservedSerialPort4()
* Descr:
*/
/* private function !
void
BSerialPort__ReservedSerialPort4(BSerialPort *SerialPort)
{
SerialPort->_ReservedSerialPort4();
}*/
/*
* Method: BSerialPort::DriverControl()
* Descr:
*/
/* private function !
int
BSerialPort_DriverControl(BSerialPort *SerialPort)
{
return SerialPort->DriverControl();
}*/
#endif /* _SERIALPORT_CPP_ */

View File

@@ -1,277 +0,0 @@
{ BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
}
unit serialport;
interface
uses
beobj, SupportDefs, os;
type
// Pascal enum start at 0 (like in C++). We are lucky because we can't
// initialize enum values yet (?) in FreePascal ;-)
TDataRate = (B_0_BPS, B_50_BPS, B_75_BPS, B_110_BPS, B_134_BPS,
B_150_BPS, B_200_BPS, B_300_BPS, B_600_BPS, B_1200_BPS,
B_1800_BPS, B_2400_BPS, B_4800_BPS, B_9600_BPS, B_19200_BPS,
B_38400_BPS, B_57600_BPS, B_115200_BPS,
B_230400_BPS, B_31250_BPS);
TDataBits = (B_DATA_BITS_7, B_DATA_BITS_8);
TStopBits = (B_STOP_BITS_1, B_STOP_BITS_2);
TParityMode = (B_NO_PARITY, B_ODD_PARITY, B_EVEN_PARITY);
const
B_NOFLOW_CONTROL = 0;
B_HARDWARE_CONTROL = 1;
B_SOFTWARE_CONTROL = 2;
type
TSerialPort = class(TBeObject)
private
public
constructor Create; override;
destructor Destroy; override;
function Open(portName : PChar) : TStatus_t;
procedure Close;
function Read(buf : PChar; count : TSize_t) : TSSize_t;
function Write(const buf : PChar; count : TSize_t) : TSSize_t;
procedure SetBlocking(Blocking : boolean);
function SetTimeout(microSeconds : TBigtime_t) : TStatus_t;
function SetDataRate(bitsPerSecond : TDataRate) : TStatus_t;
function GetDataRate : TDataRate;
procedure SetDataBits(numBits : TDataBits);
function GetDataBits : TDataBits;
procedure SetStopBits(numBits : TStopBits);
function GetStopBits : TStopBits;
procedure SetParityMode(numBits : TParityMode);
function GetParityMode : TParityMode;
procedure ClearInput;
procedure ClearOutput;
procedure SetFlowControl(method : Cardinal);
function GetFlowControl : Cardinal;
function SetDTR(asserted : boolean) : TStatus_t;
function SetRTS(asserted : boolean) : TStatus_t;
function NumCharsAvailable(var wait_until_this_many : integer) : TStatus_t;
function IsCTS : boolean;
function IsDSR : boolean;
function IsRI : boolean;
function IsDCD : boolean;
function WaitForInput : TSSize_t;
function CountDevices : integer;
function GetDeviceName(n : integer; name : PChar; bufSize : TSize_t) : TStatus_t;
property DataRate : TDataRate read GetDataRate write SetDataRate;
property DataBits : TDataBits read GetDataBits write SetDataBits;
property StopBits : TStopBits read GetStopBits write SetStopBits;
property ParityMode : TParityMode read GetParityMode write SetParityMode;
end;
function BSerialPort_Create(AObject : TBeObject) : TCPlusObject; cdecl; external BePascalLibName name 'BSerialPort_Create';
procedure BSerialPort_Free(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BSerialPort_Free';
function BSerialPort_Open(AObject : TCPlusObject; portName : PChar) : TStatus_t; cdecl; external BePascalLibName name 'BSerialPort_Open';
procedure BSerialPort_Close(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BSerialPort_Close';
function BSerialPort_Read(AObject : TCPlusObject; buf : PChar; count : TSize_t) : TSSize_t; cdecl; external BePascalLibName name 'BSerialPort_Read';
function BSerialPort_Write(AObject : TCPlusObject; const buf : PChar; count : TSize_t) : TSSize_t; cdecl; external BePascalLibName name 'BSerialPort_Write';
procedure BSerialPort_SetBlocking(AObject : TCPlusObject; Blocking : boolean); cdecl; external BePascalLibName name 'BSerialPort_SetBlocking';
function BSerialPort_SetTimeout(AObject : TCPlusObject; microSeconds : TBigtime_t) : TStatus_t; cdecl; external BePascalLibName name 'BSerialPort_SetTimeout';
function BSerialPort_SetDataRate(AObject : TCPlusObject; bitsPerSecond : TDataRate) : TStatus_t; cdecl; external BePascalLibName name 'BSerialPort_SetDataRate';
function BSerialPort_DataRate(AObject : TCPlusObject) : TDataRate; cdecl; external BePascalLibName name 'BSerialPort_DataRate';
procedure BSerialPort_SetDataBits(AObject : TCPlusObject; numBits : TDataBits); cdecl; external BePascalLibName name 'BSerialPort_SetDataBits';
function BSerialPort_DataBits(AObject : TCPlusObject) : TDataBits; cdecl; external BePascalLibName name 'BSerialPort_DataBits';
procedure BSerialPort_SetStopBits(AObject : TCPlusObject; numBits : TStopBits); cdecl; external BePascalLibName name 'BSerialPort_SetStopBits';
function BSerialPort_StopBits(AObject : TCPlusObject) : TStopBits; cdecl; external BePascalLibName name 'BSerialPort_StopBits';
procedure BSerialPort_SetParityMode(AObject : TCPlusObject; numBits : TParityMode); cdecl; external BePascalLibName name 'BSerialPort_SetParityMode';
function BSerialPort_ParityMode(AObject : TCPlusObject) : TParityMode; cdecl; external BePascalLibName name 'BSerialPort_ParityMode';
procedure BSerialPort_ClearInput(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BSerialPort_ClearInput';
procedure BSerialPort_ClearOutput(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BSerialPort_ClearOutput';
procedure BSerialPort_SetFlowControl(AObject : TCPlusObject; method : Cardinal); cdecl; external BePascalLibName name 'BSerialPort_SetFlowControl';
function BSerialPort_FlowControl(AObject : TCPlusObject) : Cardinal; cdecl; external BePascalLibName name 'BSerialPort_FlowControl';
function BSerialPort_SetDTR(AObject : TCPlusObject; asserted : boolean) : TStatus_t; cdecl; external BePascalLibName name 'BSerialPort_SetDTR';
function BSerialPort_SetRTS(AObject : TCPlusObject; asserted : boolean) : TStatus_t; cdecl; external BePascalLibName name 'BSerialPort_SetRTS';
function BSerialPort_NumCharsAvailable(AObject : TCPlusObject; var wait_until_this_many : integer) : TStatus_t; cdecl; external BePascalLibName name 'BSerialPort_NumCharsAvailable';
function BSerialPort_IsCTS(AObject : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BSerialPort_IsCTS';
function BSerialPort_IsDSR(AObject : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BSerialPort_IsDSR';
function BSerialPort_IsRI(AObject : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BSerialPort_IsRI';
function BSerialPort_IsDCD(AObject : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BSerialPort_IsDCD';
function BSerialPort_WaitForInput(AObject : TCPlusObject) : TSSize_t; cdecl; external BePascalLibName name 'BSerialPort_WaitForInput';
function BSerialPort_CountDevices(AObject : TCPlusObject) : integer; cdecl; external BePascalLibName name 'BSerialPort_CountDevices';
function BSerialPort_GetDeviceName(AObject : TCPlusObject; n : integer; name : PChar; bufSize : TSize_t): TStatus_t; cdecl; external BePascalLibName name 'BSerialPort_GetDeviceName';
implementation
constructor TSerialPort.Create;
begin
inherited;
CPlusObject := BSerialPort_Create(Self);
end;
destructor TSerialPort.Destroy;
begin
if CPlusObject <> nil then
BSerialPort_Free(CPlusObject);
inherited;
end;
function TSerialPort.Open(portName : PChar) : TStatus_t;
begin
result := BSerialPort_Open(CPlusObject, portName);
end;
procedure TSerialPort.Close;
begin
BSerialPort_Close(CPlusObject);
end;
function TSerialPort.Read(buf : PChar; count : TSize_t) : TSSize_t;
begin
Result := BSerialPort_Read(CPlusObject, buf, count);
end;
function TSerialPort.Write(const buf : PChar; count : TSize_t) : TSSize_t;
begin
Result := BSerialPort_Write(CPlusObject, buf, count);
end;
procedure TSerialPort.SetBlocking(Blocking : boolean);
begin
BSerialPort_SetBlocking(CPlusObject, Blocking);
end;
function TSerialPort.SetTimeout(microSeconds : TBigtime_t) : TStatus_t;
begin
Result := BSerialPort_SetTimeout(CPlusObject, microSeconds);
end;
function TSerialPort.SetDataRate(bitsPerSecond : TDataRate) : TStatus_t;
begin
Result := BSerialPort_SetDataRate(CPlusObject, bitsPerSecond);
end;
function TSerialPort.GetDataRate : TDataRate;
begin
Result := BSerialPort_DataRate(CPlusObject);
end;
procedure TSerialPort.SetDataBits(numBits : TDataBits);
begin
BSerialPort_SetDataBits(CPlusObject, numBits);
end;
function TSerialPort.GetDataBits : TDataBits;
begin
Result := BSerialPort_DataBits(CPlusObject);
end;
procedure TSerialPort.SetStopBits(numBits : TStopBits);
begin
BSerialPort_SetStopBits(CPlusObject, numBits);
end;
function TSerialPort.GetStopBits : TStopBits;
begin
Result := BSerialPort_StopBits(CPlusObject);
end;
procedure TSerialPort.SetParityMode(numBits : TParityMode);
begin
BSerialPort_SetParityMode(CPlusObject, numBits);
end;
function TSerialPort.GetParityMode : TParityMode;
begin
Result := BSerialPort_ParityMode(CPlusObject);
end;
procedure TSerialPort.ClearInput;
begin
BSerialPort_ClearInput(CPlusObject);
end;
procedure TSerialPort.ClearOutput;
begin
BSerialPort_ClearOutput(CPlusObject);
end;
procedure TSerialPort.SetFlowControl(method : Cardinal);
begin
BSerialPort_SetFlowControl(CPlusobject, method);
end;
function TSerialPort.GetFlowControl : Cardinal;
begin
Result := BSerialPort_FlowControl(CPlusObject);
end;
function TSerialPort.SetDTR(asserted : boolean) : TStatus_t;
begin
Result := BSerialPort_SetDTR(CPlusObject, asserted);
end;
function TSerialPort.SetRTS(asserted : boolean) : TStatus_t;
begin
Result := BSerialPort_SetRTS(CPlusObject, asserted);
end;
function TSerialPort.NumCharsAvailable(var wait_until_this_many : integer) : TStatus_t;
begin
Result := BSerialPort_NumCharsAvailable(CPlusObject, wait_until_this_many);
end;
function TSerialPort.IsCTS : boolean;
begin
Result := BSerialPort_IsCTS(CPlusObject);
end;
function TSerialPort.IsDSR : boolean;
begin
Result := BSerialPort_IsDSR(CPlusObject);
end;
function TSerialPort.IsRI : boolean;
begin
Result := BSerialPort_IsRI(CPlusObject);
end;
function TSerialPort.IsDCD : boolean;
begin
Result := BSerialPort_IsDCD(CPlusObject);
end;
function TSerialPort.WaitForInput : TSSize_t;
begin
Result := BSerialPort_WaitForInput(CPlusObject);
end;
function TSerialPort.CountDevices : integer;
begin
Result := BSerialPort_CountDevices(CPlusObject);
end;
function TSerialPort.GetDeviceName(n : integer; name : PChar; bufSize : TSize_t) : TStatus_t;
begin
Result := BSerialPort_GetDeviceName(CPlusObject, n, name, bufSize);
end;
end.

File diff suppressed because it is too large Load Diff

View File

@@ -1,21 +0,0 @@
#ifndef HEY_H
#define HEY_H
#include <SupportDefs.h>
__declspec(dllexport) int32 HeyInterpreterThreadHook(void* arg);
__declspec(dllexport) status_t Hey(BMessenger* target, const char* arg, BMessage* reply);
__declspec(dllexport) bool isSpace(char c);
__declspec(dllexport) status_t Hey(BMessenger* target, char* argv[], int32* argx, int32 argc, BMessage* reply);
__declspec(dllexport) status_t add_specifier(BMessage *to_message, char *argv[], int32 *argx, int32 argc);
__declspec(dllexport) status_t add_data(BMessage *to_message, char *argv[], int32 *argx);
__declspec(dllexport) status_t add_with(BMessage *to_message, char *argv[], int32 *argx, int32 argc);
__declspec(dllexport) void add_message_contents(BList *textlist, BMessage *msg, int32 level);
__declspec(dllexport) char *get_datatype_string(int32 type);
__declspec(dllexport) char *format_data(int32 type, char *ptr, long size);
__declspec(dllexport) void print_message(BMessage *message);
__declspec(dllexport) char *id_to_string(long ID, char *here);
__declspec(dllexport) bool is_valid_char(uint8 c);
#endif

View File

@@ -1,70 +0,0 @@
unit hey;
interface
uses
beobj, SysUtils, Messenger, Message, SupportDefs, Roster, OS, List, fdblib;
type
BHey = class
public
class function Hey(atarget : TMessenger; aarg : string; areply : TMessage) : TStatus_t;
class function Hey(AppName : string; aarg : string; areply : TMessage) : TStatus_t;
class function GetMessenger(AppName : string) : TMessenger;
end;
implementation
function InternalHey(target : TCPlusObject; arg : PChar; reply : TCPlusObject) : TStatus_t; cdecl; external BePascalLibName name 'Hey__FP10BMessengerPCcP8BMessage';//'Hey__FP10BMessengerPPcPllP8BMessage';
class function BHey.Hey(AppName : string; aArg : string; aReply : TMessage) : TStatus_t;
var
Messenger : TMessenger;
begin
Messenger := BHey.GetMessenger(AppName);
if Messenger <> nil then
Result := BHey.Hey(Messenger, aArg, aReply);
end;
class function BHey.Hey(atarget : TMessenger; aarg : string; areply : TMessage) : TStatus_t;
var
local : string;
begin
local := aarg + #0;
Result := InternalHey(atarget.CPlusObject, @local[1], areply.CPlusObject);
end;
class function BHey.GetMessenger(AppName : string) : TMessenger;
var
List : TList;
i : integer;
Team_id : TTeam_id;
AppInfo : TAppInfo;
Status_t : TStatus_t;
begin
Result := nil;
List := TList.Create;
try
be_roster.GetAppList(List);
for i := 0 to List.CountItems - 1 do
begin
Team_id := TTeam_id(List.ItemAt(i));
be_roster.GetRunningAppInfo(Team_id, AppInfo);
if AppName = PChar(AppInfo.Signature) then
begin
Result := TMessenger.Create(PChar(AppInfo.Signature), -1, Status_t);
Break;
end
else if PChar(AppInfo.ref.name) = AppName then
begin
Result := TMessenger.Create(0, Team_id, Status_t);
Break;
end;
end;
finally
List.Free;
end;
end;
end.

View File

@@ -1,534 +0,0 @@
/* BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2003 Olivier Coursiere
Eric Jourde
Oscar Lesta
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _ALERT_CPP_
#define _ALERT_CPP_
#include <Alert.h>
#include "window.h"
#include "looper.h"
#include <beobj.h>
/*----------------------------------------------------------------*/
/*----- BAlert class ---------------------------------------------*/
class BPAlert : public BAlert, public virtual BPWindow // Is this OK? or should be public virtual?
{
public:
BPAlert(TPasObject PasObject,
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);
BPAlert(TPasObject PasObject,
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);
BPAlert(TPasObject PasObject, BMessage *data);
//virtual ~BAlert();
/* Archiving */
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);
virtual void MessageReceived(BMessage *an_event);
virtual void FrameResized(float new_width, float new_height);
BButton *ButtonAt(int32 index) const;
BTextView *TextView() const;
/*
virtual BHandler *ResolveSpecifier(BMessage *msg,
int32 index,
BMessage *specifier,
int32 form,
const char *property);
virtual status_t GetSupportedSuites(BMessage *data);
*/
virtual void DispatchMessage(BMessage *msg, BHandler *handler);
virtual void Quit();
virtual bool QuitRequested();
static BPoint AlertPosition(float width, float height);
/*----- Private or reserved -----------------------------------------*/
//virtual status_t Perform(perform_code d, void *arg);
private:
/*
friend class _BAlertFilter_;
virtual void _ReservedAlert1();
virtual void _ReservedAlert2();
virtual void _ReservedAlert3();
void InitObject(const char *text,
const char *button1,
const char *button2 = NULL,
const char *button3 = NULL,
button_width width = B_WIDTH_AS_USUAL,
button_spacing spacing = B_EVEN_SPACING,
alert_type type = B_INFO_ALERT);
BBitmap *InitIcon();
sem_id fAlertSem;
int32 fAlertVal;
BButton *fButtons[3];
BTextView *fTextView;
char fKeys[3];
alert_type fMsgType;
button_width fButtonWidth;
BInvoker *fInvoker;
uint32 _reserved[4];
*/
};
/*-------------------------------------------------------------*/
/*-------------------------------------------------------------*/
BPAlert::BPAlert(TPasObject PasObject,
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(title, text, button1, button2, button3, width, type),
BPWindow(PasObject, BRect(), title, B_UNTYPED_WINDOW, 0, 0),
// oco or Baldur :
// why this doesn't work? compiler says:
// BPWindow doesn't have a BPLooper member. The same with BPArchivable.
// BPLooper(PasObject),
BPHandler(PasObject, title),
// BPArchivable(PasObject),
BPasObject(PasObject)
{
}
BPAlert::BPAlert(TPasObject PasObject,
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)
: BAlert(title, text, button1, button2, button3, width, spacing, type),
BPWindow(PasObject, BRect(), title, B_UNTYPED_WINDOW, 0, 0),
// BPLooper(PasObject),
BPHandler(PasObject, title),
// BPArchivable(PasObject),
BPasObject(PasObject)
{
}
BPAlert::BPAlert(TPasObject PasObject, BMessage *data)
: BAlert(data),
// UGLY HACK!!! FIX ME!!! (should be "BPWindow(PasObject, data)" )
BPWindow(PasObject, BRect(), "Ugly_Hack!", B_UNTYPED_WINDOW, 0, 0),
// BPLooper(PasObject),
BPHandler(PasObject),
// BPArchivable(PasObject),
BPasObject(PasObject)
{
}
void
BPAlert::SetShortcut(int32 button_index, char key)
{
BAlert::SetShortcut(button_index, key);
}
char
BPAlert::Shortcut(int32 button_index) const
{
return BAlert::Shortcut(button_index);
}
int32
BPAlert::Go(void)
{
return BAlert::Go();
}
status_t
BPAlert::Go(BInvoker *invoker)
{
return BAlert::Go(invoker);
}
void
BPAlert::MessageReceived(BMessage *an_event)
{
BAlert::MessageReceived(an_event);
}
void
BPAlert::FrameResized(float new_width, float new_height)
{
BAlert::FrameResized(new_width, new_height);
}
void
BPAlert::DispatchMessage(BMessage *msg, BHandler *handler)
{
BAlert::DispatchMessage(msg, handler);
}
void
BPAlert::Quit(void)
{
BAlert::Quit();
}
bool
BPAlert::QuitRequested(void)
{
BAlert::QuitRequested();
}
/*-------------------------------------------------------------*/
#if defined(__cplusplus)
extern "C" {
#endif
/*----------------------------------------------------------------*/
/*
* Method: BAlert::BAlert()
* Descr:
*/
TCPlusObject BAlert_Create(TPasObject PasObject, const char *title, const char *text, const char *button1, const char *button2, const char *button3, button_width width, alert_type type)
{
return new BPAlert(PasObject, title, text, button1, button2, button3, width, type);
}
/*
* Method: BAlert::BAlert()
* Descr:
*/
TCPlusObject BAlert_Create_1
(TPasObject PasObject, const char *title, const char *text, const char *button1, const char *button2, const char *button3, button_width width, button_spacing spacing, alert_type type)
{
return new BPAlert(PasObject, title, text, button1, button2, button3, width, spacing, type);
}
/*
* Method: BAlert::BAlert()
* Descr:
*/
TCPlusObject BAlert_Create_2(TPasObject PasObject, BMessage *data)
{
return new BPAlert(PasObject, data);
}
/*
* Method: BAlert::~BAlert()
* Descr:
*/
TCPlusObject BAlert_Free(BAlert *Alert)
{
delete Alert;
}
/*
* Method: BAlert::Instantiate()
* Descr:
*/
BArchivable *
BAlert_Instantiate(BAlert *Alert, BMessage *data)
{
return Alert->Instantiate(data);
}
/*
* Method: BAlert::Archive()
* Descr:
*/
status_t
BAlert_Archive(BAlert *Alert, BMessage *data, bool deep)
{
return Alert->Archive(data, deep);
}
/*
* Method: BAlert::SetShortcut()
* Descr:
*/
void
BAlert_SetShortcut(BAlert *Alert, int32 button_index, char key)
{
Alert->SetShortcut(button_index, key);
}
/*
* Method: BAlert::Shortcut()
* Descr:
*/
char
BAlert_Shortcut(BAlert *Alert, int32 button_index)
{
return Alert->Shortcut(button_index);
}
/*
* Method: BAlert::Go()
* Descr:
*/
int32
BAlert_Go(BAlert *Alert)
{
return Alert->Go();
}
/*
* Method: BAlert::Go()
* Descr:
*/
status_t
BAlert_Go_1
(BAlert *Alert, BInvoker *invoker)
{
return Alert->Go(invoker);
}
/*
* Method: BAlert::MessageReceived()
* Descr:
*/
void
BAlert_MessageReceived(BAlert *Alert, BMessage *an_event)
{
Alert->MessageReceived(an_event);
}
/*
* Method: BAlert::FrameResized()
* Descr:
*/
void
BAlert_FrameResized(BAlert *Alert, float new_width, float new_height)
{
Alert->FrameResized(new_width, new_height);
}
/*
* Method: BAlert::ButtonAt()
* Descr:
*/
BButton *
BAlert_ButtonAt(BAlert *Alert, int32 index)
{
return Alert->ButtonAt(index);
}
/*
* Method: BAlert::TextView()
* Descr:
*/
BTextView *
BAlert_TextView(BAlert *Alert)
{
return Alert->TextView();
}
/*
* Method: BAlert::ResolveSpecifier()
* Descr:
*/
BHandler *
BAlert_ResolveSpecifier(BAlert *Alert, BMessage *msg, int32 index, BMessage *specifier, int32 form, const char *property)
{
return Alert->ResolveSpecifier(msg, index, specifier, form, property);
}
/*
* Method: BAlert::GetSupportedSuites()
* Descr:
*/
status_t
BAlert_GetSupportedSuites(BAlert *Alert, BMessage *data)
{
return Alert->GetSupportedSuites(data);
}
/*
* Method: BAlert::DispatchMessage()
* Descr:
*/
void
BAlert_DispatchMessage(BAlert *Alert, BMessage *msg, BHandler *handler)
{
Alert->DispatchMessage(msg, handler);
}
/*
* Method: BAlert::Quit()
* Descr:
*/
void
BAlert_Quit(BAlert *Alert)
{
Alert->Quit();
}
/*
* Method: BAlert::QuitRequested()
* Descr:
*/
bool
BAlert_QuitRequested(BAlert *Alert)
{
return Alert->QuitRequested();
}
/*
* Method: BAlert::AlertPosition()
* Descr:
*/
BPoint
BAlert_AlertPosition(BAlert *Alert, float width, float height)
{
return Alert->AlertPosition(width, height);
}
/*
* Method: BAlert::Perform()
* Descr:
*/
/*
status_t
BAlert_Perform(BAlert *Alert, perform_code d, void *arg)
{
return Alert->Perform(d, arg);
}
*/
/*
* Method: BAlert::_ReservedAlert1()
* Descr:
*/
/*
void
BAlert__ReservedAlert1(BAlert *Alert)
{
Alert->_ReservedAlert1();
}
*/
/*
* Method: BAlert::_ReservedAlert2()
* Descr:
*/
/*
void
BAlert__ReservedAlert2(BAlert *Alert)
{
Alert->_ReservedAlert2();
}
*/
/*
* Method: BAlert::_ReservedAlert3()
* Descr:
*/
/*
void
BAlert__ReservedAlert3(BAlert *Alert)
{
Alert->_ReservedAlert3();
}
*/
/*
* Method: BAlert::InitObject()
* Descr:
*/
/*
void
BAlert_InitObject(BAlert *Alert, const char *text, const char *button1, const char *button2, const char *button3, button_width width, button_spacing spacing, alert_type type)
{
Alert->InitObject(text, button1, button2, button3, width, spacing, type);
}
*/
/*
* Method: BAlert::InitIcon()
* Descr:
*/
/*
BBitmap *
BAlert_InitIcon(BAlert *Alert)
{
return Alert->InitIcon();
}
*/
/*----------------------------------------------------------------*/
#if defined(__cplusplus)
}
#endif
/*----------------------------------------------------------------*/
#endif /* _ALERT_CPP_ */

View File

@@ -1,809 +0,0 @@
/* BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2003 Olivier Coursiere
Eric Jourde
Oscar Lesta
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _BITMAP_CPP
#define _BITMAP_CPP
#include "Bitmap.h"
#include "view.h"
#include <archivable.h>
#include <beobj.h>
/*----------------------------------------------------------------*/
/*----- BBitmap class --------------------------------------------*/
class BPBitmap : public BBitmap, public BPArchivable
{
public:
BPBitmap(TPasObject PasObject,
BRect bounds,
uint32 flags,
color_space depth,
int32 bytesPerRow=B_ANY_BYTES_PER_ROW,
screen_id screenID=B_MAIN_SCREEN_ID);
BPBitmap(TPasObject PasObject,
BRect bounds,
color_space depth,
bool accepts_views = false,
bool need_contiguous = false);
BPBitmap(TPasObject PasObject,
const BBitmap* source,
bool accepts_views = false,
bool need_contiguous = false);
BPBitmap(TPasObject PasObject, BMessage *data);
//virtual ~BBitmap();
/* Archiving */
static BArchivable *Instantiate(BMessage *data);
//virtual status_t Archive(BMessage *data, bool deep = true) const;
status_t InitCheck() const;
bool IsValid() const;
status_t LockBits(uint32 *state=NULL);
void UnlockBits();
area_id Area() const;
void * Bits() const;
int32 BitsLength() const;
int32 BytesPerRow() const;
color_space ColorSpace() const;
BRect Bounds() const;
void SetBits(const void *data,
int32 length,
int32 offset,
color_space cs);
status_t GetOverlayRestrictions(overlay_restrictions *restrict) const;
/* to mimic a BWindow */
virtual void AddChild(BView *view);
virtual bool RemoveChild(BView *view);
int32 CountChildren() const;
BView *ChildAt(int32 index) const;
BView *FindView(const char *view_name) const;
BView *FindView(BPoint point) const;
bool Lock();
void Unlock();
bool IsLocked() const;
virtual status_t Perform(perform_code d, void *arg);
/*----- Private or reserved -----------------------------------------*/
private:
/*
friend class BView;
friend class BApplication;
friend void _IMPEXP_BE _get_screen_bitmap_(BBitmap *,BRect,bool);
virtual void _ReservedBitmap1();
virtual void _ReservedBitmap2();
virtual void _ReservedBitmap3();
BBitmap(const BBitmap &);
BBitmap &operator=(const BBitmap &);
char *get_shared_pointer() const;
void set_bits(long offset, char *data, long length);
void set_bits_24(long offset, char *data, long length);
void set_bits_24_local_gray(long offset, char *data, long len);
void set_bits_24_local_256(long offset, uchar *data, long len);
void set_bits_24_24(long offset, char *data, long length,
bool big_endian_dst);
void set_bits_8_24(long offset, char *data, long length,
bool big_endian_dst);
void set_bits_gray_24(long offset, char *data, long length,
bool big_endian_dst);
int32 get_server_token() const;
void InitObject( BRect frame, color_space depth,
uint32 flags, int32 bytesPerRow, screen_id screenID);
void AssertPtr();
void *fBasePtr;
int32 fSize;
color_space fType;
BRect fBound;
int32 fRowBytes;
BWindow *fWindow;
int32 fServerToken;
int32 fToken;
uint8 unused;
area_id fArea;
area_id fOrigArea;
uint32 fFlags;
status_t fInitError;
*/
};
/*-------------------------------------------------------------*/
/*-------------------------------------------------------------*/
BPBitmap::BPBitmap(TPasObject PasObject,
BRect bounds,
uint32 flags,
color_space depth,
int32 bytesPerRow = B_ANY_BYTES_PER_ROW,
screen_id screenID = B_MAIN_SCREEN_ID)
: BBitmap(bounds, flags, depth, bytesPerRow, screenID),
BPArchivable(PasObject)//,
// BPasObject(PasObject)
{
}
BPBitmap::BPBitmap(TPasObject PasObject,
BRect bounds,
color_space depth,
bool accepts_views = false,
bool need_contiguous = false)
: BBitmap(bounds, depth, accepts_views, need_contiguous),
BPArchivable(PasObject)//,
// BPasObject(PasObject)
{
}
BPBitmap::BPBitmap(TPasObject PasObject,
const BBitmap* source,
bool accepts_views = false,
bool need_contiguous = false)
: BBitmap(source, accepts_views, need_contiguous),
BPArchivable(PasObject)//,
// BPasObject(PasObject)
{
}
BPBitmap::BPBitmap(TPasObject PasObject, BMessage *data)
: BBitmap(data),
BPArchivable(PasObject)//,
// BPasObject(PasObject)
{
}
status_t
BPBitmap::InitCheck(void) const
{
return BBitmap::InitCheck();
}
bool
BPBitmap::IsValid(void) const
{
return BBitmap::IsValid();
}
status_t
BPBitmap::LockBits(uint32 *state=NULL)
{
return BBitmap::LockBits(state);
}
void
BPBitmap::UnlockBits(void)
{
BBitmap::UnlockBits();
}
area_id
BPBitmap::Area(void) const
{
return BBitmap::Area();
}
void *
BPBitmap::Bits(void) const
{
return BBitmap::Bits();
}
int32
BPBitmap::BitsLength(void) const
{
return BBitmap::BitsLength();
}
int32
BPBitmap::BytesPerRow(void) const
{
return BBitmap::BytesPerRow();
}
color_space
BPBitmap::ColorSpace(void) const
{
return BBitmap::ColorSpace();
}
BRect
BPBitmap::Bounds(void) const
{
return BBitmap::Bounds();
}
void
BPBitmap::SetBits(const void *data, int32 length, int32 offset, color_space cs)
{
BBitmap::SetBits(data, length, offset, cs);
}
status_t
BPBitmap::GetOverlayRestrictions(overlay_restrictions *restrict) const
{
return BBitmap::GetOverlayRestrictions(restrict);
}
void
BPBitmap::AddChild(BView *view)
{
BBitmap::AddChild(view);
}
bool
BPBitmap::RemoveChild(BView *view)
{
BBitmap::RemoveChild(view);
}
int32
BPBitmap::CountChildren(void) const
{
return BBitmap::CountChildren();
}
bool
BPBitmap::Lock(void)
{
return BBitmap::Lock();
}
void
BPBitmap::Unlock(void)
{
BBitmap::Unlock();
}
bool
BPBitmap::IsLocked(void) const
{
return BBitmap::IsLocked();
}
status_t
BPBitmap::Perform(perform_code d, void *arg)
{
return BBitmap::Perform(d, arg);
}
/*-------------------------------------------------------------*/
#if defined(__cplusplus)
extern "C" {
#endif
/*
* Method: BBitmap::BBitmap
* Descr:
*/
TCPlusObject BBitmap_Create(TPasObject PasObject, BRect bounds, uint32 flags, color_space depth, int32 bytesPerRow, screen_id screenID)
{
return new BPBitmap(PasObject, bounds, flags, depth, bytesPerRow, screenID);
}
/*
* Method: BBitmap::BBitmap
* Descr:
*/
TCPlusObject BBitmap_Create_1
(TPasObject PasObject, BRect bounds, color_space depth, bool accepts_views, bool need_contiguous)
{
return new BPBitmap(PasObject, bounds, depth, accepts_views, need_contiguous);
}
/*
* Method: BBitmap::BBitmap
* Descr:
*/
TCPlusObject BBitmap_Create_2
(TPasObject PasObject, const BBitmap *source, bool accepts_views, bool need_contiguous)
{
return new BPBitmap(PasObject, source, accepts_views, need_contiguous);
}
/* BBitmap(BMessage *data);
* Method: BBitmap::BBitmap
* Descr:
*/
TCPlusObject BBitmap_Create_3(TPasObject PasObject, BMessage *data)
{
return new BPBitmap(PasObject, data);
}
/*
* Method: BBitmap::~BBitmap
* Descr:
*/
void BBitmap_Free(BBitmap *Bitmap)
{
delete Bitmap;
}
/*
* Method: BBitmap::Instantiate
* Descr:
*/
BArchivable *
BBitmap_Instantiate(BBitmap *Bitmap, BMessage *data)
{
return Bitmap->Instantiate(data);
}
/*
* Method: BBitmap::Archive
* Descr:
*/
status_t
BBitmap_Archive(BBitmap *Bitmap, BMessage *data, bool deep)
{
return Bitmap->Archive(data, deep);
}
/*
* Method: BBitmap::InitCheck
* Descr:
*/
status_t
BBitmap_InitCheck(BBitmap *Bitmap)
{
return Bitmap->InitCheck();
}
/*
* Method: BBitmap::IsValid
* Descr:
*/
bool
BBitmap_IsValid(BBitmap *Bitmap)
{
return Bitmap->IsValid();
}
/*
* Method: BBitmap::LockBits
* Descr:
*/
status_t
BBitmap_LockBits(BBitmap *Bitmap, uint32 *state)
{
return Bitmap->LockBits(state);
}
/*
* Method: BBitmap::UnlockBits
* Descr:
*/
void
BBitmap_UnlockBits(BBitmap *Bitmap)
{
Bitmap->UnlockBits();
}
/*
* Method: BBitmap::Area
* Descr:
*/
area_id
BBitmap_Area(BBitmap *Bitmap)
{
return Bitmap->Area();
}
/*
* Method: BBitmap::Bits
* Descr:
*/
void *
BBitmap_Bits(BBitmap *Bitmap)
{
Bitmap->Bits();
}
/*
* Method: BBitmap::BitsLength
* Descr:
*/
int32
BBitmap_BitsLength_1
(BBitmap *Bitmap)
{
return Bitmap->BitsLength();
}
/*
* Method: BBitmap::BytesPerRow
* Descr:
*/
int32
BBitmap_BytesPerRow(BBitmap *Bitmap)
{
return Bitmap->BytesPerRow();
}
/*
* Method: BBitmap::ColorSpace
* Descr:
*/
color_space
BBitmap_ColorSpace(BBitmap *Bitmap)
{
return Bitmap->ColorSpace();
}
/*
* Method: BBitmap::Bounds
* Descr:
*/
BRect
BBitmap_Bounds(BBitmap *Bitmap)
{
return Bitmap->Bounds();
}
/*
* Method: BBitmap::SetBits
* Descr:
*/
void
BBitmap_SetBits(BBitmap *Bitmap, const void *data, int32 length, int32 offset, color_space cs)
{
Bitmap->SetBits(data, length, offset, cs);
}
/*
* Method: BBitmap::GetOverlayRestrictions
* Descr:
*/
status_t
BBitmap_GetOverlayRestrictions(BBitmap *Bitmap, overlay_restrictions *restrict)
{
return Bitmap->GetOverlayRestrictions(restrict);
}
/*
* Method: BBitmap::AddChild
* Descr:
*/
void
BBitmap_AddChild(BBitmap *Bitmap, BView *view)
{
Bitmap->AddChild(view);
}
/*
* Method: BBitmap::RemoveChild
* Descr:
*/
bool
BBitmap_RemoveChild(BBitmap *Bitmap, BView *view)
{
return Bitmap->RemoveChild(view);
}
/*
* Method: BBitmap::CountChildren
* Descr:
*/
int32
BBitmap_CountChildren(BBitmap *Bitmap)
{
return Bitmap->CountChildren();
}
/*
* Method: BBitmap::ChildAt
* Descr:
*/
BView *
BBitmap_ChildAt(BBitmap *Bitmap, int32 index)
{
return Bitmap->ChildAt(index);
}
/*
* Method: BBitmap::FindView
* Descr:
*/
BView *
BBitmap_FindView(BBitmap *Bitmap, const char *view_name)
{
return Bitmap->FindView(view_name);
}
/*
* Method: BBitmap::FindView
* Descr:
*/
BView *
BBitmap_FindView_1
(BBitmap *Bitmap, BPoint point)
{
return Bitmap->FindView(point);
}
/*
* Method: BBitmap::Lock
* Descr:
*/
bool
BBitmap_Lock(BBitmap *Bitmap)
{
return Bitmap->Lock();
}
/*
* Method: BBitmap::Unlock
* Descr:
*/
void
BBitmap_Unlock(BBitmap *Bitmap)
{
Bitmap->Unlock();
}
/*
* Method: BBitmap::IsLocked
* Descr:
*/
bool
BBitmap_IsLocked(BBitmap *Bitmap)
{
return Bitmap->IsLocked();
}
/*
* Method: BBitmap::Perform
* Descr:
*/
status_t
BBitmap_Perform(BBitmap *Bitmap, perform_code d, void *arg)
{
return Bitmap->Perform(d, arg);
}
/*
* Method: BBitmap::_ReservedBitmap1
* Descr:
*/
/*
void
BBitmap__ReservedBitmap1(BBitmap *Bitmap)
{
Bitmap->_ReservedBitmap1();
}
*/
/*
* Method: BBitmap::_ReservedBitmap2
* Descr:
*/
/*
void
BBitmap__ReservedBitmap2(BBitmap *Bitmap)
{
Bitmap->_ReservedBitmap2();
}
*/
/*
* Method: BBitmap::_ReservedBitmap3
* Descr:
*/
/*
void
BBitmap__ReservedBitmap3(BBitmap *Bitmap)
{
Bitmap->_ReservedBitmap3();
}
*/
/*
* Method: BBitmap::operator=
* Descr:
*/
/*
BBitmap &
BBitmap_operator=(BBitmap *Bitmap, const BBitmap &)
{
return Bitmap->operator=();
}
*/
/*
* Method: BBitmap::get_shared_pointer
* Descr:
*/
/*
char *
BBitmap_get_shared_pointer(BBitmap *Bitmap) const
{
return Bitmap->get_shared_pointer();
}
*/
/*
* Method: BBitmap::set_bits
* Descr:
*/
/*
void
BBitmap_set_bits(BBitmap *Bitmap, long offset, char *data, long length)
{
Bitmap->set_bits(offset, data, length);
}
*/
/*
* Method: BBitmap::set_bits_24
* Descr:
*/
/*
void
BBitmap_set_bits_24_1
(BBitmap *Bitmap, long offset, char *data, long length)
{
Bitmap->set_bits_24(offset, data, length);
}
*/
/*
* Method: BBitmap::set_bits_24_local_gray
* Descr:
*/
/*
void
BBitmap_set_bits_24_local_gray_2
(BBitmap *Bitmap, long offset, char *data, long len)
{
Bitmap->set_bits_24_local_gray(offset, data, len);
}
*/
/*
* Method: BBitmap::set_bits_24_local_256
* Descr:
*/
/*
void
BBitmap_set_bits_24_local_256(BBitmap *Bitmap, long offset, uchar *data, long len)
{
Bitmap->set_bits_24_local_256(offset, data, len);
}
*/
/*
* Method: BBitmap::set_bits_24_24
* Descr:
*/
/*
void
BBitmap_set_bits_24_24(BBitmap *Bitmap, long offset, char *data, long length, bool big_endian_dst)
{
Bitmap->set_bits_24_24(offset, data, length, big_endian_dst);
}
*/
/*
* Method: BBitmap::set_bits_8_24
* Descr:
*/
/*
void
BBitmap_set_bits_8_24(BBitmap *Bitmap, long offset, char *data, long length, bool big_endian_dst)
{
Bitmap->set_bits_8_24(offset, data, length, big_endian_dst);
}
*/
/*
* Method: BBitmap::set_bits_gray_24
* Descr:
*/
/*
void
BBitmap_set_bits_gray_24(BBitmap *Bitmap, long offset, char *data, long length, bool big_endian_dst)
{
Bitmap->set_bits_gray_24(offset, data, length, big_endian_dst);
}
*/
/*
* Method: BBitmap::get_server_token
* Descr:
*/
/*
int32
BBitmap_get_server_token(BBitmap *Bitmap) const
{
return Bitmap->get_server_token();
}
*/
/*
* Method: BBitmap::InitObject
* Descr:
*/
/*
void
BBitmap_InitObject(BBitmap *Bitmap, BRect frame, color_space depth, uint32 flags, int32 bytesPerRow, screen_id screenID)
{
Bitmap->InitObject(frame, depth, flags, bytesPerRow, screenID);
}
*/
/*
* Method: BBitmap::AssertPtr
* Descr:
*/
/*
void
BBitmap_AssertPtr(BBitmap *Bitmap)
{
Bitmap->AssertPtr();
}
*/
#if defined(__cplusplus)
}
#endif
#endif /* _BITMAP_H */

View File

@@ -1,676 +0,0 @@
/* BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2003 Olivier Coursiere
Eric Jourde
Oscar Lesta
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _BOX_CPP_
#define _BOX_CPP_
#include "Box.h"
#include "view.h"
#include <beobj.h>
class BPBox : public BBox, virtual public BPView
{
public:
BPBox(TPasObject PasObject,
BRect bounds,
const char *name = NULL,
uint32 resizeFlags = B_FOLLOW_LEFT | B_FOLLOW_TOP,
uint32 flags = B_WILL_DRAW | B_FRAME_EVENTS | B_NAVIGABLE_JUMP,
border_style border = B_FANCY_BORDER);
// virtual ~BBox(void);
/* Archiving */
BPBox(TPasObject PasObject, BMessage *data);
static BArchivable *Instantiate(BMessage *data);
// virtual status_t Archive(BMessage *data, bool deep = true) const;
/* BBox guts */
virtual void SetBorder(border_style style);
border_style Border() const;
void SetLabel(const char *label);
status_t SetLabel(BView *view_label);
const char *Label() const;
BView *LabelView() const;
virtual void Draw(BRect bounds);
virtual void AttachedToWindow();
virtual void DetachedFromWindow();
virtual void AllAttached();
virtual void AllDetached();
virtual void FrameResized(float new_width, float new_height);
virtual void MessageReceived(BMessage *msg);
virtual void MouseDown(BPoint pt);
virtual void MouseUp(BPoint pt);
virtual void WindowActivated(bool state);
virtual void MouseMoved(BPoint pt, uint32 code, const BMessage *msg);
virtual void FrameMoved(BPoint new_position);
/*
virtual BHandler *ResolveSpecifier(BMessage *msg,
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 status_t GetSupportedSuites(BMessage *data);
/*----- Private or reserved -----------------------------------------*/
// virtual status_t Perform(perform_code d, void *arg);
private:
/*
virtual void _ReservedBox1();
virtual void _ReservedBox2();
BBox &operator=(const BBox &);
void InitObject(BMessage *data = NULL);
void DrawPlain();
void DrawFancy();
void ClearAnyLabel();
char *fLabel;
BRect fBounds;
border_style fStyle;
BView *fLabelView;
uint32 _reserved[1];
*/
};
BPBox::BPBox(TPasObject PasObject,
BRect bounds,
const char *name = NULL,
uint32 resizeFlags = B_FOLLOW_LEFT | B_FOLLOW_TOP,
uint32 flags = B_WILL_DRAW | B_FRAME_EVENTS | B_NAVIGABLE_JUMP,
border_style border = B_FANCY_BORDER)
:
BBox(bounds, name, resizeFlags, flags, border),
BPView(PasObject, bounds, name, resizeFlags, flags),
BPHandler(PasObject, name),
BPasObject(PasObject)
{
}
BPBox::BPBox(TPasObject PasObject, BMessage *archive)
:
BBox(archive),
BPView(PasObject, archive),
BPHandler(PasObject, archive),
BPasObject(PasObject)
{
}
void
BPBox::SetBorder(border_style style)
{
BBox::SetBorder(style);
}
border_style
BPBox::Border(void) const
{
return BBox::Border();
}
void
BPBox::SetLabel(const char *label)
{
BBox::SetLabel(label);
}
status_t
BPBox::SetLabel(BView *view_label)
{
return BBox::SetLabel(view_label);
}
void
BPBox::Draw(BRect bounds)
{
BBox::Draw(bounds);
}
void
BPBox::AttachedToWindow(void)
{
BBox::AttachedToWindow();
}
void
BPBox::DetachedFromWindow(void)
{
BBox::DetachedFromWindow();
}
void
BPBox::AllAttached(void)
{
BBox::AllAttached();
}
void
BPBox::AllDetached(void)
{
BBox::AllDetached();
}
void
BPBox::FrameResized(float new_width, float new_height)
{
BBox::FrameResized(new_width, new_height);
}
void
BPBox::MessageReceived(BMessage *msg)
{
BBox::MessageReceived(msg);
}
void
BPBox::MouseDown(BPoint pt)
{
BBox::MouseDown(pt);
}
void
BPBox::MouseUp(BPoint pt)
{
BBox::MouseUp(pt);
}
void
BPBox::WindowActivated(bool state)
{
BBox::WindowActivated(state);
}
void
BPBox::MouseMoved(BPoint pt, uint32 code, const BMessage *msg)
{
BBox::MouseMoved(pt, code, msg);
}
void
BPBox::FrameMoved(BPoint new_position)
{
BBox::FrameMoved(new_position);
}
void
BPBox::ResizeToPreferred(void)
{
BBox::ResizeToPreferred();
}
void
BPBox::GetPreferredSize(float *width, float *height)
{
BBox::GetPreferredSize(width, height);
}
#if defined(__cplusplus)
extern "C" {
#endif
/***********************************************************************
* AUTHOR: nobody <baron>
* FILE: Box.cpp
* DATE: Tue Jan 21 00:15:28 2003
* DESCR:
***********************************************************************/
/*
* Method: BBox::~BBox()
* Descr:
*/
void BBox_Free(BBox *Box)
{
delete Box;
}
/*
* Method: BBox::BBox()
* Descr:
*/
TCPlusObject BBox_Create(TPasObject PasObject, BRect frame,
const char *name,
uint32 resizeMask,
uint32 flags,
border_style border)
{
return new BPBox(PasObject,
frame,
name,
resizeMask,
flags,
border);
}
/*
* Method: BBox::BBox()
* Descr:
*/
TCPlusObject BBox_Create_1(TPasObject PasObject, BMessage *data)
{
return new BPBox(PasObject, data);
}
/*
* Method: BBox::Instantiate()
* Descr:
*/
BArchivable *
BBox_Instantiate(BBox *Box, BMessage *data)
{
return Box->Instantiate(data);
}
/*
* Method: BBox::Archive()
* Descr:
*/
status_t
BBox_Archive(BBox *Box, BMessage *data, bool deep)
{
return Box->Archive(data, deep);
}
/*
* Method: BBox::SetBorder()
* Descr:
*/
void
BBox_SetBorder(BBox *Box, border_style style)
{
Box->SetBorder(style);
}
/*
* Method: BBox::Border()
* Descr:
*/
border_style
BBox_Border(BBox *Box)
{
return Box->Border();
}
/*
* Method: BBox::SetLabel()
* Descr:
*/
void
BBox_SetLabel(BBox *Box, const char *label)
{
Box->SetLabel(label);
}
/*
* Method: BBox::SetLabel()
* Descr:
*/
status_t
BBox_SetLabel_1
(BBox *Box, BView *view_label)
{
return Box->SetLabel(view_label);
}
/*
* Method: BBox::Label()
* Descr:
*/
const char *
BBox_Label(BBox *Box)
{
return Box->Label();
}
/*
* Method: BBox::LabelView()
* Descr:
*/
BView *
BBox_LabelView_1(BBox *Box)
{
return Box->LabelView();
}
/*
* Method: BBox::Draw()
* Descr:
*/
void
BBox_Draw(BBox *Box, BRect bounds)
{
Box->Draw(bounds);
}
/*
* Method: BBox::AttachedToWindow()
* Descr:
*/
void
BBox_AttachedToWindow(BBox *Box)
{
Box->AttachedToWindow();
}
/*
* Method: BBox::DetachedFromWindow()
* Descr:
*/
void
BBox_DetachedFromWindow(BBox *Box)
{
Box->DetachedFromWindow();
}
/*
* Method: BBox::AllAttached()
* Descr:
*/
void
BBox_AllAttached(BBox *Box)
{
Box->AllAttached();
}
/*
* Method: BBox::AllDetached()
* Descr:
*/
void
BBox_AllDetached(BBox *Box)
{
Box->AllDetached();
}
/*
* Method: BBox::FrameResized()
* Descr:
*/
void
BBox_FrameResized(BBox *Box, float new_width,
float new_height)
{
Box->FrameResized(new_width, new_height);
}
/*
* Method: BBox::MessageReceived()
* Descr:
*/
void
BBox_MessageReceived(BBox *Box, BMessage *msg)
{
Box->MessageReceived(msg);
}
/*
* Method: BBox::MouseDown()
* Descr:
*/
void
BBox_MouseDown(BBox *Box, BPoint pt)
{
Box->MouseDown(pt);
}
/*
* Method: BBox::MouseUp()
* Descr:
*/
void
BBox_MouseUp(BBox *Box, BPoint pt)
{
Box->MouseUp(pt);
}
/*
* Method: BBox::WindowActivated()
* Descr:
*/
void
BBox_WindowActivated(BBox *Box, bool state)
{
Box->WindowActivated(state);
}
/*
* Method: BBox::MouseMoved()
* Descr:
*/
void
BBox_MouseMoved(BBox *Box, BPoint pt,
uint32 code,
const BMessage *msg)
{
Box->MouseMoved(pt, code, msg);
}
/*
* Method: BBox::FrameMoved()
* Descr:
*/
void
BBox_FrameMoved(BBox *Box, BPoint new_position)
{
Box->FrameMoved(new_position);
}
/*
* Method: BBox::ResolveSpecifier()
* Descr:
*/
BHandler *
BBox_ResolveSpecifier(BBox *Box, BMessage *msg,
int32 index,
BMessage *specifier,
int32 form,
const char *property)
{
return Box->ResolveSpecifier(msg, index, specifier, form, property);
}
/*
* Method: BBox::ResizeToPreferred()
* Descr:
*/
void
BBox_ResizeToPreferred(BBox *Box)
{
Box->ResizeToPreferred();
}
/*
* Method: BBox::GetPreferredSize()
* Descr:
*/
void
BBox_GetPreferredSize(BBox *Box, float *width,
float *height)
{
Box->GetPreferredSize(width, height);
}
/*
* Method: BBox::MakeFocus()
* Descr:
*/
void
BBox_MakeFocus(BBox *Box, bool state)
{
Box->MakeFocus(state);
}
/*
* Method: BBox::GetSupportedSuites()
* Descr:
*/
status_t
BBox_GetSupportedSuites(BBox *Box, BMessage *data)
{
return Box->GetSupportedSuites(data);
}
/*
* Method: BBox::Perform()
* Descr:
*/
status_t
BBox_Perform(BBox *Box, perform_code d,
void *arg)
{
return Box->Perform(d, arg);
}
/*
* Method: BBox::_ReservedBox1()
* Descr:
*/
/*
void
BBox__ReservedBox1(BBox *Box)
{
Box->_ReservedBox1();
}
*/
/*
* Method: BBox::_ReservedBox2()
* Descr:
*/
/*
void
BBox__ReservedBox2(BBox *Box)
{
Box->_ReservedBox2();
}
*/
/*
* Method: BBox::operator=()
* Descr:
*/
/*
BBox &
BBox_operator=(BBox *Box, const BBox &)
{
return Box->operator=();
}
*/
/*
* Method: BBox::InitObject()
* Descr:
*/
/*
void
BBox_InitObject(BBox *Box, BMessage *data)
{
Box->InitObject(data);
}
*/
/*
* Method: BBox::DrawPlain()
* Descr:
*/
/*
void
BBox_DrawPlain(BBox *Box)
{
Box->DrawPlain();
}
*/
/*
* Method: BBox::DrawFancy()
* Descr:
*/
/*
void
BBox_DrawFancy(BBox *Box)
{
Box->DrawFancy();
}
*/
/*
* Method: BBox::ClearAnyLabel()
* Descr:
*/
/*
void
BBox_ClearAnyLabel(BBox *Box)
{
Box->ClearAnyLabel();
}
*/
#if defined(__cplusplus)
}
#endif
#endif /* _BOX_CPP_ */

View File

@@ -1,686 +0,0 @@
/* BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _BUTTON_CPP_
#define _BUTTON_CPP_
/***********************************************************************
* AUTHOR: nobody <baron>
* FILE: Button.cpp
* DATE: Tue Dec 3 00:28:35 2002
* DESCR:
***********************************************************************/
#include "Button.h"
#include "control.h"
#include <beobj.h>
typedef void (*BButton_MakeDefault_hook) (TPasObject PasObject, bool flag);
#if defined(__cplusplus)
extern "C" {
#endif
BButton_MakeDefault_hook Button_MakeDefault_hook;
#if defined(__cplusplus)
}
#endif
class BPButton : public BButton, virtual public BPControl
{
public:
// <BView_Constructor>
BPButton(TPasObject PasObject,
BRect frame,
const char *name,
const char *label,
BMessage *message,
uint32 resizeMask,
uint32 flags);
BPButton(TPasObject PasObject, BMessage *archive);
virtual void MessageReceived(BMessage *message);
virtual void Draw(BRect updateRect);
virtual void AttachedToWindow(void);
virtual void MakeDefault(bool flag);
virtual void WindowActivated(bool active);
virtual void AllAttached(void);
virtual void AllDetached(void);
virtual void DetachedFromWindow(void);
virtual void DrawAfterChildren(BRect updateRect);
virtual void FrameMoved(BPoint parentPoint);
virtual void FrameResized(float width, float height);
virtual void GetPreferredSize(float *width, float *height);
virtual void ResizeToPreferred(void);
virtual void KeyDown(const char *bytes, int32 numBytes);
virtual void KeyUp(const char *bytes, int32 numBytes);
virtual void MouseDown(BPoint point);
virtual void MouseMoved(BPoint point, uint32 transit, const BMessage *message);
virtual void MouseUp(BPoint point);
virtual void Pulse(void);
// virtual void TargetedByScrollView(BScrollView *scroller);
virtual void SetEnabled(bool enabled);
virtual void SetValue(int32 value);
private:
};
BPButton::BPButton(TPasObject PasObject, BRect frame,
const char *name,
const char *label,
BMessage *message,
uint32 resizeMask,
uint32 flags)
:
BButton(frame, name, label, message,
resizeMask, flags),
BPControl(PasObject, frame, name, label, message,
resizeMask, flags),
BPView(PasObject, frame, name, resizeMask, flags),
BPHandler(PasObject, name),
BPasObject(PasObject)
{
}
BPButton::BPButton(TPasObject PasObject, BMessage *archive)
:BButton(archive),
BPControl(PasObject, archive),
BPView(PasObject, archive),
BPHandler(PasObject, archive),
BPasObject(PasObject)
{
}
void BPButton::MessageReceived(BMessage *message)
{
MessageReceived_hookCall(message);
BButton::MessageReceived(message);
}
void BPButton::Draw(BRect updateRect)
{
BButton::Draw(updateRect);
Draw_hookCall(updateRect);
}
void BPButton::AttachedToWindow(void)
{
BButton::AttachedToWindow();
AttachedToWindow_hookCall();
}
void BPButton::MakeDefault(bool flag)
{
// Button_MakeDefault_hook(GetPasObject(), flag);
}
void BPButton::WindowActivated(bool active)
{
BButton::WindowActivated(active);
}
void BPButton::AllAttached(void)
{
BButton::AllAttached();
}
void BPButton::AllDetached(void)
{
BButton::AllDetached();
}
void BPButton::DetachedFromWindow(void)
{
BButton::DetachedFromWindow();
}
void BPButton::DrawAfterChildren(BRect updateRect)
{
BButton::DrawAfterChildren(updateRect);
}
void BPButton::FrameMoved(BPoint parentPoint)
{
BButton::FrameMoved(parentPoint);
}
void BPButton::FrameResized(float width, float height)
{
BButton::FrameResized(width, height);
}
void BPButton::GetPreferredSize(float *width, float *height)
{
BButton::GetPreferredSize(width, height);
}
void BPButton::ResizeToPreferred(void)
{
BButton::ResizeToPreferred();
}
void BPButton::KeyDown(const char *bytes, int32 numBytes)
{
BButton::KeyDown(bytes, numBytes);
}
void BPButton::KeyUp(const char *bytes, int32 numBytes)
{
BButton::KeyUp(bytes, numBytes);
}
void BPButton::MouseDown(BPoint point)
{
BButton::MouseDown(point);
}
void BPButton::MouseMoved(BPoint point, uint32 transit, const BMessage *message)
{
BButton::MouseMoved(point, transit, message);
}
void BPButton::MouseUp(BPoint point)
{
BButton::MouseUp(point);
}
void BPButton::Pulse(void)
{
BButton::Pulse();
}
//void BPButton::TargetedByScrollView(BScrollView *scroller)
//{
// BButton::TargetedByScrollView(scroller);
//}
void BPButton::SetEnabled(bool enabled)
{
BButton::SetEnabled(enabled);
}
void BPButton::SetValue(int32 value)
{
BButton::SetValue(value);
}
#if defined(__cplusplus)
extern "C" {
#endif
/***********************************************************************
* Method: BButton::~BButton
* Params:
* Effects:
***********************************************************************/
void BButton_Free(BButton *Button)
{
delete Button;
}
/***********************************************************************
* Method: BButton::BButton
* Params:
* Effects:
***********************************************************************/
TCPlusObject BButton_Create(TPasObject PasObject, BRect frame,
const char *name,
const char *label,
BMessage *message,
uint32 resizeMask,
uint32 flags)
{
return new BPButton(PasObject, frame, name, label, message, resizeMask, flags);
}
/***********************************************************************
* Method: BButton::BButton
* Params: BMessage *data
* Effects:
***********************************************************************/
TCPlusObject BButton_Create_1(TPasObject PasObject, BMessage *data)
{
return new BPButton(PasObject, data);
}
/***********************************************************************
* Method: BButton::Instantiate
* Params: BMessage *data
* Returns: BArchivable *
* Effects:
***********************************************************************/
BArchivable *
BButton_Instantiate(BButton *Button, BMessage *data)
{
return Button->Instantiate(data);
}
/***********************************************************************
* Method: BButton::Archive
* Params: BMessage *data, bool deep
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BButton_Archive(BButton *Button, BMessage *data, bool deep)
{
return Button->Archive(data, deep);
}
/***********************************************************************
* Method: BButton::Draw
* Params: BRect updateRect
* Returns: void
* Effects:
***********************************************************************/
void
BButton_Draw(BButton *Button, BRect updateRect)
{
Button->Draw(updateRect);
}
/***********************************************************************
* Method: BButton::MouseDown
* Params: BPoint where
* Returns: void
* Effects:
***********************************************************************/
void
BButton_MouseDown(BButton *Button, BPoint where)
{
Button->MouseDown(where);
}
/***********************************************************************
* Method: BButton::AttachedToWindow
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BButton_AttachedToWindow(BButton *Button)
{
Button->AttachedToWindow();
}
/***********************************************************************
* Method: BButton::KeyDown
* Params: const char *bytes, int32 numBytes
* Returns: void
* Effects:
***********************************************************************/
void
BButton_KeyDown(BButton *Button, const char *bytes, int32 numBytes)
{
Button->KeyDown(bytes, numBytes);
}
/***********************************************************************
* Method: BButton::MakeDefault
* Params: bool state
* Returns: void
* Effects:
***********************************************************************/
void
BButton_MakeDefault(BButton *Button, bool state)
{
Button->MakeDefault(state);
}
/***********************************************************************
* Method: BButton::SetLabel
* Params: const char *text
* Returns: void
* Effects:
***********************************************************************/
void
BButton_SetLabel(BButton *Button, const char *text)
{
Button->SetLabel(text);
}
/***********************************************************************
* Method: BButton::IsDefault
* Params:
* Returns: bool
* Effects:
***********************************************************************/
bool
BButton_IsDefault(BButton *Button)
{
return Button->IsDefault();
}
/***********************************************************************
* Method: BButton::MessageReceived
* Params: BMessage *msg
* Returns: void
* Effects:
***********************************************************************/
void
BButton_MessageReceived(BButton *Button, BMessage *msg)
{
Button->MessageReceived(msg);
}
/***********************************************************************
* Method: BButton::WindowActivated
* Params: bool state
* Returns: void
* Effects:
***********************************************************************/
void
BButton_WindowActivated(BButton *Button, bool state)
{
Button->WindowActivated(state);
}
/***********************************************************************
* Method: BButton::MouseUp
* Params: BPoint pt
* Returns: void
* Effects:
***********************************************************************/
void
BButton_MouseUp(BButton *Button, BPoint pt)
{
Button->MouseUp(pt);
}
/***********************************************************************
* Method: BButton::MouseMoved
* Params: BPoint pt, uint32 code, const BMessage *msg
* Returns: void
* Effects:
***********************************************************************/
void
BButton_MouseMoved(BButton *Button, BPoint pt, uint32 code, const BMessage *msg)
{
Button->MouseMoved(pt, code, msg);
}
/***********************************************************************
* Method: BButton::DetachedFromWindow
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BButton_DetachedFromWindow(BButton *Button)
{
Button->DetachedFromWindow();
}
/***********************************************************************
* Method: BButton::SetValue
* Params: int32 value
* Returns: void
* Effects:
***********************************************************************/
void
BButton_SetValue(BButton *Button, int32 value)
{
Button->SetValue(value);
}
/***********************************************************************
* Method: BButton::GetPreferredSize
* Params: float *width, float *height
* Returns: void
* Effects:
***********************************************************************/
void
BButton_GetPreferredSize(BButton *Button, float *width, float *height)
{
Button->GetPreferredSize(width, height);
}
/***********************************************************************
* Method: BButton::ResizeToPreferred
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BButton_ResizeToPreferred(BButton *Button)
{
Button->ResizeToPreferred();
}
/***********************************************************************
* Method: BButton::Invoke
* Params: BMessage *msg
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BButton_Invoke(BButton *Button, BMessage *msg)
{
return Button->Invoke(msg);
}
/***********************************************************************
* Method: BButton::FrameMoved
* Params: BPoint new_position
* Returns: void
* Effects:
***********************************************************************/
void
BButton_FrameMoved(BButton *Button, BPoint new_position)
{
Button->FrameMoved(new_position);
}
/***********************************************************************
* Method: BButton::FrameResized
* Params: float new_width, float new_height
* Returns: void
* Effects:
***********************************************************************/
void
BButton_FrameResized(BButton *Button, float new_width, float new_height)
{
Button->FrameResized(new_width, new_height);
}
/***********************************************************************
* Method: BButton::MakeFocus
* Params: bool state
* Returns: void
* Effects:
***********************************************************************/
void
BButton_MakeFocus(BButton *Button, bool state)
{
Button->MakeFocus(state);
}
/***********************************************************************
* Method: BButton::AllAttached
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BButton_AllAttached(BButton *Button)
{
Button->AllAttached();
}
/***********************************************************************
* Method: BButton::AllDetached
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BButton_AllDetached(BButton *Button)
{
Button->AllDetached();
}
/***********************************************************************
* Method: BButton::ResolveSpecifier
* Params: BMessage *msg, int32 index, BMessage *specifier, int32 form, const char *property
* Returns: BHandler *
* Effects:
***********************************************************************/
BHandler *
BButton_ResolveSpecifier(BButton *Button, BMessage *msg, int32 index, BMessage *specifier, int32 form, const char *property)
{
return Button->ResolveSpecifier(msg, index, specifier, form, property);
}
/***********************************************************************
* Method: BButton::GetSupportedSuites
* Params: BMessage *data
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BButton_GetSupportedSuites(BButton *Button, BMessage *data)
{
return Button->GetSupportedSuites(data);
}
/***********************************************************************
* Method: BButton::Perform
* Params: perform_code d, void *arg
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BButton_Perform(BButton *Button, perform_code d, void *arg)
{
return Button->Perform(d, arg);
}
/***********************************************************************
* Method: BButton::_ReservedButton1
* Params:
* Returns: void
* Effects:
***********************************************************************/
/*void
BButton__ReservedButton1(BButton *Button)
{
Button->_ReservedButton1();
}
*/
/***********************************************************************
* Method: BButton::_ReservedButton2
* Params:
* Returns: void
* Effects:
***********************************************************************/
/*void
BButton__ReservedButton2(BButton *Button)
{
Button->_ReservedButton2();
}
*/
/***********************************************************************
* Method: BButton::_ReservedButton3
* Params:
* Returns: void
* Effects:
***********************************************************************/
/*void
BButton__ReservedButton3(BButton *Button)
{
Button->_ReservedButton3();
}
*/
/***********************************************************************
* Method: BButton::operator=
* Params: const BButton &
* Returns: BButton &
* Effects:
***********************************************************************/
/*BButton &
BButton_operator=(BButton *Button, const BButton &)
{
return Button->operator=();
}
*/
/***********************************************************************
* Method: BButton::DrawDefault
* Params: BRect bounds, bool enabled
* Returns: BRect
* Effects:
***********************************************************************/
/*BRect
BButton_DrawDefault(BButton *Button, BRect bounds, bool enabled)
{
return Button->DrawDefault(bounds, enabled);
}
*/
/***********************************************************************
* Method: BButton::Execute
* Params:
* Returns: status_t
* Effects:
***********************************************************************/
/*status_t
BButton_Execute(BButton *Button)
{
return Button->Execute();
}
*/
#if defined(__cplusplus)
}
#endif
#endif /* _BUTTON_CPP_ */

View File

@@ -1,627 +0,0 @@
/* BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
Eric Jourde
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _CHECKBOX_CPP_
#define _CHECKBOX_CPP_
/***********************************************************************
* AUTHOR: nobody <baron>
* FILE: Button.cpp
* DATE: Tue Dec 3 00:28:35 2002
* DESCR:
***********************************************************************/
#include "CheckBox.h"
#include "control.h"
#include <beobj.h>
#if defined(__cplusplus)
extern "C" {
#endif
#if defined(__cplusplus)
}
#endif
class BPCheckBox : public BCheckBox, virtual public BPControl {
public:
BPCheckBox(TPasObject PasObject, BRect frame,
const char *name,
const char *label,
BMessage *message,
uint32 resizeMask = B_FOLLOW_LEFT | B_FOLLOW_TOP,
uint32 flags = B_WILL_DRAW | B_NAVIGABLE);
//virtual ~BCheckBox();
/* Archiving */
BPCheckBox(TPasObject PasObject, BMessage *data);
//static BArchivable *Instantiate(BMessage *data);
//virtual status_t Archive(BMessage *data, bool deep = true) const;
virtual void Draw(BRect updateRect);
virtual void AttachedToWindow();
virtual void MouseDown(BPoint where);
virtual void MessageReceived(BMessage *msg);
virtual void WindowActivated(bool state);
virtual void KeyDown(const char *bytes, int32 numBytes);
virtual void MouseUp(BPoint pt);
virtual void MouseMoved(BPoint pt, uint32 code, const BMessage *msg);
virtual void DetachedFromWindow();
virtual void SetValue(int32 value);
virtual void GetPreferredSize(float *width, float *height);
virtual void ResizeToPreferred();
//virtual status_t Invoke(BMessage *msg = NULL);
virtual void FrameMoved(BPoint new_position);
virtual void FrameResized(float new_width, float new_height);
/*virtual BHandler *ResolveSpecifier(BMessage *msg,
int32 index,
BMessage *specifier,
int32 form,
const char *property);
*/
//virtual status_t GetSupportedSuites(BMessage *data);
//virtual void MakeFocus(bool state = true);
virtual void AllAttached();
virtual void AllDetached();
/*----- Private or reserved -----------------------------------------*/
//virtual status_t Perform(perform_code d, void *arg);
private:
};
BPCheckBox::BPCheckBox(TPasObject PasObject,
BRect frame,
const char *name,
const char *label,
BMessage *message,
uint32 rmask = B_FOLLOW_LEFT | B_FOLLOW_TOP,
uint32 flags = B_WILL_DRAW | B_NAVIGABLE)
:
BCheckBox(frame,name,label,
message,rmask,flags),
BPControl(PasObject, frame, name, label, message,
rmask, flags),
BPView(PasObject, frame, name, rmask, flags),
BPHandler(PasObject, name),
BPasObject(PasObject)
{
}
BPCheckBox::BPCheckBox(TPasObject PasObject, BMessage *archive)
:BCheckBox(archive),
BPControl(PasObject, archive),
BPView(PasObject, archive),
BPHandler(PasObject, archive),
BPasObject(PasObject)
{
}
void BPCheckBox::MessageReceived(BMessage *message)
{
MessageReceived_hookCall(message);
BCheckBox::MessageReceived(message);
}
void BPCheckBox::Draw(BRect updateRect)
{
BCheckBox::Draw(updateRect);
Draw_hookCall(updateRect);
}
void BPCheckBox::AttachedToWindow(void)
{
BCheckBox::AttachedToWindow();
AttachedToWindow_hookCall();
}
void BPCheckBox::WindowActivated(bool active)
{
BCheckBox::WindowActivated(active);
}
void BPCheckBox::KeyDown(const char *bytes, int32 numBytes)
{
BCheckBox::KeyDown(bytes, numBytes);
}
void BPCheckBox::AllAttached(void)
{
BCheckBox::AllAttached();
}
void BPCheckBox::AllDetached(void)
{
BCheckBox::AllDetached();
}
void BPCheckBox::DetachedFromWindow(void)
{
BCheckBox::DetachedFromWindow();
}
void BPCheckBox::FrameMoved(BPoint parentPoint)
{
BCheckBox::FrameMoved(parentPoint);
}
void BPCheckBox::FrameResized(float width, float height)
{
BCheckBox::FrameResized(width, height);
}
void BPCheckBox::GetPreferredSize(float *width, float *height)
{
BCheckBox::GetPreferredSize(width, height);
}
void BPCheckBox::ResizeToPreferred(void)
{
BCheckBox::ResizeToPreferred();
}
void BPCheckBox::MouseDown(BPoint point)
{
BCheckBox::MouseDown(point);
}
void BPCheckBox::MouseMoved(BPoint point, uint32 transit, const BMessage *message)
{
BCheckBox::MouseMoved(point, transit, message);
}
void BPCheckBox::MouseUp(BPoint point)
{
BCheckBox::MouseUp(point);
}
//void BPButton::TargetedByScrollView(BScrollView *scroller)
//{
// BButton::TargetedByScrollView(scroller);
//}
void BPCheckBox::SetValue(int32 value)
{
BCheckBox::SetValue(value);
}
#if defined(__cplusplus)
extern "C" {
#endif
/***********************************************************************
* AUTHOR: nobody <baron>
* FILE: CheckBox.cpp
* DATE: Thu Jan 16 20:29:31 2003
* DESCR:
***********************************************************************/
/***********************************************************************
* Method: BCheckBox::~BCheckBox
* Params:
* Effects:
***********************************************************************/
void BCheckBox_FREE(BCheckBox *CheckBox)
{
delete CheckBox;
}
TCPlusObject BCheckBox_Create(TPasObject PasObject, BRect frame,
const char *name,
const char *label,
BMessage *message,
uint32 resizeMask ,
uint32 flags )
{
return new BPCheckBox( PasObject, frame,
name,
label,
message,
resizeMask ,
flags );
}
/***********************************************************************
* Method: BCheckBox::BCheckBox
* Params: BMessage *data
* Effects:
***********************************************************************/
TCPlusObject BCheckBox_Create_1(TPasObject PasObject, BMessage *data)
{
return new BPCheckBox(PasObject, data);
}
/***********************************************************************
* Method: BCheckBox::Instantiate
* Params: BMessage *data
* Returns: BArchivable *
* Effects:
***********************************************************************/
BArchivable *
BCheckBox_Instantiate(BCheckBox *CheckBox, BMessage *data)
{
return CheckBox->Instantiate(data);
}
/***********************************************************************
* Method: BCheckBox::Archive
* Params: BMessage *data, bool deep
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BCheckBox_Archive(BCheckBox *CheckBox, BMessage *data, bool deep)
{
return CheckBox->Archive(data, deep);
}
/***********************************************************************
* Method: BCheckBox::Draw
* Params: BRect updateRect
* Returns: void
* Effects:
***********************************************************************/
void
BCheckBox_Draw(BCheckBox *CheckBox, BRect updateRect)
{
CheckBox->Draw(updateRect);
}
/***********************************************************************
* Method: BCheckBox::AttachedToWindow
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BCheckBox_AttachedToWindow(BCheckBox *CheckBox)
{
CheckBox->AttachedToWindow();
}
/***********************************************************************
* Method: BCheckBox::MouseDown
* Params: BPoint where
* Returns: void
* Effects:
***********************************************************************/
void
BCheckBox_MouseDown(BCheckBox *CheckBox, BPoint where)
{
CheckBox->MouseDown(where);
}
/***********************************************************************
* Method: BCheckBox::MessageReceived
* Params: BMessage *msg
* Returns: void
* Effects:
***********************************************************************/
void
BCheckBox_MessageReceived(BCheckBox *CheckBox, BMessage *msg)
{
CheckBox->MessageReceived(msg);
}
/***********************************************************************
* Method: BCheckBox::WindowActivated
* Params: bool state
* Returns: void
* Effects:
***********************************************************************/
void
BCheckBox_WindowActivated(BCheckBox *CheckBox, bool state)
{
CheckBox->WindowActivated(state);
}
/***********************************************************************
* Method: BCheckBox::KeyDown
* Params: const char *bytes, int32 numBytes
* Returns: void
* Effects:
***********************************************************************/
void
BCheckBox_KeyDown(BCheckBox *CheckBox, const char *bytes, int32 numBytes)
{
CheckBox->KeyDown(bytes, numBytes);
}
/***********************************************************************
* Method: BCheckBox::MouseUp
* Params: BPoint pt
* Returns: void
* Effects:
***********************************************************************/
void
BCheckBox_MouseUp(BCheckBox *CheckBox, BPoint pt)
{
CheckBox->MouseUp(pt);
}
/***********************************************************************
* Method: BCheckBox::MouseMoved
* Params: BPoint pt, uint32 code, const BMessage *msg
* Returns: void
* Effects:
***********************************************************************/
void
BCheckBox_MouseMoved(BCheckBox *CheckBox, BPoint pt, uint32 code, const BMessage *msg)
{
CheckBox->MouseMoved(pt, code, msg);
}
/***********************************************************************
* Method: BCheckBox::DetachedFromWindow
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BCheckBox_DetachedFromWindow(BCheckBox *CheckBox)
{
CheckBox->DetachedFromWindow();
}
/***********************************************************************
* Method: BCheckBox::SetValue
* Params: int32 value
* Returns: void
* Effects:
***********************************************************************/
void
BCheckBox_SetValue(BCheckBox *CheckBox, int32 value)
{
CheckBox->SetValue(value);
}
/***********************************************************************
* Method: BCheckBox::GetPreferredSize
* Params: float *width, float *height
* Returns: void
* Effects:
***********************************************************************/
void
BCheckBox_GetPreferredSize(BCheckBox *CheckBox, float *width, float *height)
{
CheckBox->GetPreferredSize(width, height);
}
/***********************************************************************
* Method: BCheckBox::ResizeToPreferred
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BCheckBox_ResizeToPreferred(BCheckBox *CheckBox)
{
CheckBox->ResizeToPreferred();
}
/***********************************************************************
* Method: BCheckBox::Invoke
* Params: BMessage *msg
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BCheckBox_Invoke(BCheckBox *CheckBox, BMessage *msg)
{
return CheckBox->Invoke(msg);
}
/***********************************************************************
* Method: BCheckBox::FrameMoved
* Params: BPoint new_position
* Returns: void
* Effects:
***********************************************************************/
void
BCheckBox_FrameMoved(BCheckBox *CheckBox, BPoint new_position)
{
CheckBox->FrameMoved(new_position);
}
/***********************************************************************
* Method: BCheckBox::FrameResized
* Params: float new_width, float new_height
* Returns: void
* Effects:
***********************************************************************/
void
BCheckBox_FrameResized(BCheckBox *CheckBox, float new_width, float new_height)
{
CheckBox->FrameResized(new_width, new_height);
}
/***********************************************************************
* Method: BCheckBox::ResolveSpecifier
* Params: BMessage *msg, int32 index, BMessage *specifier, int32 form, const char *property
* Returns: BHandler *
* Effects:
***********************************************************************/
BHandler *
BCheckBox_ResolveSpecifier(BCheckBox *CheckBox, BMessage *msg, int32 index, BMessage *specifier, int32 form, const char *property)
{
return CheckBox->ResolveSpecifier(msg, index, specifier, form, property);
}
/***********************************************************************
* Method: BCheckBox::GetSupportedSuites
* Params: BMessage *data
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BCheckBox_GetSupportedSuites(BCheckBox *CheckBox, BMessage *data)
{
return CheckBox->GetSupportedSuites(data);
}
/***********************************************************************
* Method: BCheckBox::MakeFocus
* Params: bool state
* Returns: void
* Effects:
***********************************************************************/
void
BCheckBox_MakeFocus(BCheckBox *CheckBox, bool state)
{
CheckBox->MakeFocus(state);
}
/***********************************************************************
* Method: BCheckBox::AllAttached
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BCheckBox_AllAttached(BCheckBox *CheckBox)
{
CheckBox->AllAttached();
}
/***********************************************************************
* Method: BCheckBox::AllDetached
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BCheckBox_AllDetached(BCheckBox *CheckBox)
{
CheckBox->AllDetached();
}
/***********************************************************************
* Method: BCheckBox::Perform
* Params: perform_code d, void *arg
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BCheckBox_Perform(BCheckBox *CheckBox, perform_code d, void *arg)
{
return CheckBox->Perform(d, arg);
}
/***********************************************************************
* Method: BCheckBox::_ReservedCheckBox1
* Params:
* Returns: void
* Effects:
***********************************************************************/
/*void
BCheckBox__ReservedCheckBox1(BCheckBox *CheckBox)
{
CheckBox->_ReservedCheckBox1();
}
*/
/***********************************************************************
* Method: BCheckBox::_ReservedCheckBox2
* Params:
* Returns: void
* Effects:
***********************************************************************/
/*void
BCheckBox__ReservedCheckBox2(BCheckBox *CheckBox)
{
CheckBox->_ReservedCheckBox2();
}
*/
/***********************************************************************
* Method: BCheckBox::_ReservedCheckBox3
* Params:
* Returns: void
* Effects:
***********************************************************************/
/*void
BCheckBox__ReservedCheckBox3(BCheckBox *CheckBox)
{
CheckBox->_ReservedCheckBox3();
}
*/
/***********************************************************************
* Method: BCheckBox::operator=
* Params: const BCheckBox &
* Returns: BCheckBox &
* Effects:
***********************************************************************/
/*BCheckBox &
BCheckBox_operator=(BCheckBox *CheckBox, const BCheckBox &)
{
return CheckBox->operator=();
}
*/
#if defined(__cplusplus)
}
#endif
#endif /* _CHECKBOX_CPP_ */

View File

@@ -1,560 +0,0 @@
/* BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _CONTROL_CPP_
#define _CONTROL_CPP_
#include "Control.h"
#include "Rect.h"
#include "View.h"
#include "Message.h"
#include <beobj.h>
#include "view.h"
#include "control.h"
#if defined(__cplusplus)
extern "C" {
#endif
BControl_SetEnabled_hook Control_SetEnabled_hook;
BControl_SetValue_hook Control_SetValue_hook;
#if defined(__cplusplus)
}
#endif
BPControl::BPControl(TPasObject PasObject, BRect frame,
const char *name,
const char *label,
BMessage *message,
uint32 resizeMask,
uint32 flags)
:
BControl(frame, name, label, message,
resizeMask, flags),
BPView(PasObject, frame, name, resizeMask, flags),
BPHandler(PasObject, name),
BPasObject(PasObject)
{
}
BPControl::BPControl(TPasObject PasObject, BMessage *message):
BControl(message),
BPView(PasObject, message),
BPHandler(PasObject, message),
BPasObject(PasObject)
{
}
void BPControl::MessageReceived(BMessage *message)
{
MessageReceived_hookCall(message);
BControl::MessageReceived(message);
}
void BPControl::Draw(BRect updateRect)
{
BControl::Draw(updateRect);
Draw_hookCall(updateRect);
}
void BPControl::AttachedToWindow(void)
{
BControl::AttachedToWindow();
AttachedToWindow_hookCall();
}
void BPControl::SetEnabled(bool enabled)
{
SetEnabled_hookCall(enabled);
}
void BPControl::SetEnabled_hookCall(bool enabled)
{
Control_SetEnabled_hook(GetPasObject(), enabled);
}
void BPControl::SetValue(int32 value)
{
SetValue_hookCall(value);
}
void BPControl::SetValue_hookCall(int32 value)
{
Control_SetValue_hook(GetPasObject(), value);
}
#if defined(__cplusplus)
extern "C" {
#endif
/*
* Method: BControl::BControl()
* Descr:
*/
TCPlusObject BControl_Create(TPasObject PasObject, BRect frame,
const char *name,
const char *label,
BMessage *message,
uint32 resizeMask,
uint32 flags)
{
return new BPControl(PasObject, frame,
name,
label,
message,
resizeMask,
flags);
}
/*
* Method: BControl::~BControl()
* Descr:
*/
void BControl_Free(BControl *Control)
{
delete Control;
}
/*
* Method: BControl::BControl()
* Descr:
*/
/*TCPlusObject BControl_Create(TPasObject PasObject, BMessage *data)
{
return new BPControl(PasObject, data);
}
*/
/*
* Method: BControl::Instantiate()
* Descr:
*/
BArchivable *
BControl_Instantiate(BControl *Control, BMessage *data)
{
return Control->Instantiate(data);
}
/*
* Method: BControl::Archive()
* Descr:
*/
status_t
BControl_Archive(BControl *Control, BMessage *data,
bool deep)
{
return Control->Archive(data,
deep);
}
/*
* Method: BControl::WindowActivated()
* Descr:
*/
void
BControl_WindowActivated(BControl *Control, bool state)
{
Control->WindowActivated(state);
}
/*
* Method: BControl::AttachedToWindow()
* Descr:
*/
void
BControl_AttachedToWindow(BControl *Control)
{
Control->AttachedToWindow();
}
/*
* Method: BControl::MessageReceived()
* Descr:
*/
void
BControl_MessageReceived(BControl *Control, BMessage *msg)
{
Control->MessageReceived(msg);
}
/*
* Method: BControl::MakeFocus()
* Descr:
*/
void
BControl_MakeFocus(BControl *Control, bool state)
{
Control->MakeFocus(state);
}
/*
* Method: BControl::KeyDown()
* Descr:
*/
void
BControl_KeyDown(BControl *Control, const char *bytes,
int32 numBytes)
{
Control->KeyDown(bytes,
numBytes);
}
/*
* Method: BControl::MouseDown()
* Descr:
*/
void
BControl_MouseDown(BControl *Control, BPoint pt)
{
Control->MouseDown(pt);
}
/*
* Method: BControl::MouseUp()
* Descr:
*/
void
BControl_MouseUp(BControl *Control, BPoint pt)
{
Control->MouseUp(pt);
}
/*
* Method: BControl::MouseMoved()
* Descr:
*/
void
BControl_MouseMoved(BControl *Control, BPoint pt,
uint32 code,
const BMessage *msg)
{
Control->MouseMoved(pt,
code,
msg);
}
/*
* Method: BControl::DetachedFromWindow()
* Descr:
*/
void
BControl_DetachedFromWindow(BControl *Control)
{
Control->DetachedFromWindow();
}
/*
* Method: BControl::SetLabel()
* Descr:
*/
void
BControl_SetLabel(BControl *Control, const char *text)
{
Control->SetLabel(text);
}
/*
* Method: BControl::Label()
* Descr:
*/
const char *
BControl_Label(BControl *Control)
{
return Control->Label();
}
/*
* Method: BControl::SetValue()
* Descr:
*/
void
BControl_SetValue(BControl *Control, int32 value)
{
Control->SetValue(value);
}
/*
* Method: BControl::Value()
* Descr:
*/
int32
BControl_Value(BControl *Control)
{
return Control->Value();
}
/*
* Method: BControl::SetEnabled()
* Descr:
*/
void
BControl_SetEnabled(BControl *Control, bool on)
{
Control->SetEnabled(on);
}
/*
* Method: BControl::IsEnabled()
* Descr:
*/
bool
BControl_IsEnabled(BControl *Control)
{
return Control->IsEnabled();
}
/*
* Method: BControl::GetPreferredSize()
* Descr:
*/
void
BControl_GetPreferredSize(BControl *Control, float *width,
float *height)
{
Control->GetPreferredSize(width,
height);
}
/*
* Method: BControl::ResizeToPreferred()
* Descr:
*/
void
BControl_ResizeToPreferred(BControl *Control)
{
Control->ResizeToPreferred();
}
/*
* Method: BControl::Invoke()
* Descr:
*/
status_t
BControl_Invoke(BControl *Control, BMessage *msg)
{
return Control->Invoke(msg);
}
/*
* Method: BControl::ResolveSpecifier()
* Descr:
*/
BHandler *
BControl_ResolveSpecifier(BControl *Control, BMessage *msg,
int32 index,
BMessage *specifier,
int32 form,
const char *property)
{
return Control->ResolveSpecifier(msg,
index,
specifier,
form,
property);
}
/*
* Method: BControl::GetSupportedSuites()
* Descr:
*/
status_t
BControl_GetSupportedSuites(BControl *Control, BMessage *data)
{
return Control->GetSupportedSuites(data);
}
/*
* Method: BControl::AllAttached()
* Descr:
*/
void
BControl_AllAttached(BControl *Control)
{
Control->AllAttached();
}
/*
* Method: BControl::AllDetached()
* Descr:
*/
void
BControl_AllDetached(BControl *Control)
{
Control->AllDetached();
}
/*
* Method: BControl::Perform()
* Descr:
*/
status_t
BControl_Perform(BControl *Control, perform_code d,
void *arg)
{
return Control->Perform(d,
arg);
}
/*
* Method: BControl::IsFocusChanging()
* Descr:
*/
/*bool
BControl_IsFocusChanging(BControl *Control)
{
return Control->IsFocusChanging();
}*/
/*
* Method: BControl::IsTracking()
* Descr:
*/
/*bool
BControl_IsTracking(BControl *Control)
{
return Control->IsTracking();
}*/
/*
* Method: BControl::SetTracking()
* Descr:
*/
/*void
BControl_SetTracking(BControl *Control, bool state)
{
Control->SetTracking(state);
}*/
/*
* Method: BControl::SetValueNoUpdate()
* Descr:
*/
/*void
BControl_SetValueNoUpdate(BControl *Control, int32 value)
{
Control->SetValueNoUpdate(value);
}*/
/*
* Method: BControl::_ReservedControl1()
* Descr:
*/
/*void
BControl__ReservedControl1(BControl *Control)
{
Control->_ReservedControl1();
}*/
/*
* Method: BControl::_ReservedControl2()
* Descr:
*/
/*void
BControl__ReservedControl2(BControl *Control)
{
Control->_ReservedControl2();
}*/
/*
* Method: BControl::_ReservedControl3()
* Descr:
*/
/*void
BControl__ReservedControl3(BControl *Control)
{
Control->_ReservedControl3();
}*/
/*
* Method: BControl::_ReservedControl4()
* Descr:
*/
/*void
BControl__ReservedControl4(BControl *Control)
{
Control->_ReservedControl4();
}*/
/*
* Method: BControl::operator=()
* Descr:
*/
/*BControl &
BControl_operator=(BControl *Control, const BControl &)
{
return Control->operator=();
}*/
/*
* Method: BControl::InitData()
* Descr:
*/
/*void
BControl_InitData(BControl *Control, BMessage *data)
{
Control->InitData(data);
}*/
#if defined(__cplusplus)
}
#endif
#endif /* _CONTROL_CPP_ */

View File

@@ -1,692 +0,0 @@
/* BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
Eric Jourde
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _FONT_CPP_
#define _FONT_CPP_
#include "Font.h"
#include "font.h"
#include "Rect.h"
#include <beobj.h>
BPFont::BPFont(TPasObject PasObject, const BFont &font) : BFont( font), BPasObject(PasObject)
{
}
BPFont::BPFont(TPasObject PasObject) : BFont(), BPasObject(PasObject)
{
}
#if defined(__cplusplus)
extern "C" {
#endif
/***********************************************************************
* AUTHOR: nobody <baron>
* FILE: Font.cpp
* DATE: Wed Jan 29 20:08:34 2003
* DESCR:
***********************************************************************/
#include "Font.h"
/***********************************************************************
* Method: BFont::BFont
* Params:
* Effects:
***********************************************************************/
TCPlusObject BFont_Create(TPasObject PasObject)
{
return new BPFont(PasObject);
}
/***********************************************************************
* Method: BFont::BFont
* Params: const BFont &font
* Effects:
***********************************************************************/
TCPlusObject BFont_Create_1
(TPasObject PasObject, const BFont &font)
{
return new BPFont(PasObject, font);
}
/***********************************************************************
* Method: BFont::BFont
* Params: const BFont *font
* Effects:
***********************************************************************/
TCPlusObject BFont_Create_2
(TPasObject PasObject, const BFont *font)
{
return new BPFont(PasObject, font);
}
void BFont_Free
(BFont *font)
{
//delete font;
}
/***********************************************************************
* Method: BFont::SetFamilyAndStyle
* Params: const font_family family, const font_style style
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BFont_SetFamilyAndStyle(BFont *Font, const font_family family, const font_style style)
{
//return Font->SetFamilyAndStyle(family, style);
}
/***********************************************************************
* Method: BFont::SetFamilyAndStyle
* Params: uint32 code
* Returns: void
* Effects:
***********************************************************************/
void
BFont_SetFamilyAndStyle_1
(BFont *Font, uint32 code)
{
//Font->SetFamilyAndStyle(code);
}
/***********************************************************************
* Method: BFont::SetFamilyAndFace
* Params: const font_family family, uint16 face
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BFont_SetFamilyAndFace(BFont *Font, const font_family family, uint16 face)
{
return Font->SetFamilyAndFace(family, face);
}
/***********************************************************************
* Method: BFont::SetSize
* Params: float size
* Returns: void
* Effects:
***********************************************************************/
void
BFont_SetSize(BFont *Font, float size)
{
Font->SetSize(size);
}
/***********************************************************************
* Method: BFont::SetShear
* Params: float shear
* Returns: void
* Effects:
***********************************************************************/
void
BFont_SetShear(BFont *Font, float shear)
{
Font->SetShear(shear);
}
/***********************************************************************
* Method: BFont::SetRotation
* Params: float rotation
* Returns: void
* Effects:
***********************************************************************/
void
BFont_SetRotation(BFont *Font, float rotation)
{
Font->SetRotation(rotation);
}
/***********************************************************************
* Method: BFont::SetSpacing
* Params: uint8 spacing
* Returns: void
* Effects:
***********************************************************************/
void
BFont_SetSpacing(BFont *Font, uint8 spacing)
{
Font->SetSpacing(spacing);
}
/***********************************************************************
* Method: BFont::SetEncoding
* Params: uint8 encoding
* Returns: void
* Effects:
***********************************************************************/
void
BFont_SetEncoding(BFont *Font, uint8 encoding)
{
Font->SetEncoding(encoding);
}
/***********************************************************************
* Method: BFont::SetFace
* Params: uint16 face
* Returns: void
* Effects:
***********************************************************************/
void
BFont_SetFace(BFont *Font, uint16 face)
{
Font->SetFace(face);
}
/***********************************************************************
* Method: BFont::SetFlags
* Params: uint32 flags
* Returns: void
* Effects:
***********************************************************************/
void
BFont_SetFlags(BFont *Font, uint32 flags)
{
Font->SetFlags(flags);
}
/***********************************************************************
* Method: BFont::GetFamilyAndStyle
* Params: font_family *family, font_style *style
* Returns: void
* Effects:
***********************************************************************/
void
BFont_GetFamilyAndStyle(BFont *Font, font_family *family, font_style *style)
{
//Font->GetFamilyAndStyle(family, style);
}
/***********************************************************************
* Method: BFont::FamilyAndStyle
* Params:
* Returns: uint32
* Effects:
***********************************************************************/
uint32
BFont_FamilyAndStyle(BFont *Font)
{
// return Font->FamilyAndStyle();
}
/***********************************************************************
* Method: BFont::Size
* Params:
* Returns: float
* Effects:
***********************************************************************/
float
BFont_Size(BFont *Font)
{
return Font->Size();
}
/***********************************************************************
* Method: BFont::Shear
* Params:
* Returns: float
* Effects:
***********************************************************************/
float
BFont_Shear(BFont *Font)
{
return Font->Shear();
}
/***********************************************************************
* Method: BFont::Rotation
* Params:
* Returns: float
* Effects:
***********************************************************************/
float
BFont_Rotation(BFont *Font)
{
return Font->Rotation();
}
/***********************************************************************
* Method: BFont::Spacing
* Params:
* Returns: uint8
* Effects:
***********************************************************************/
uint8
BFont_Spacing(BFont *Font)
{
return Font->Spacing();
}
/***********************************************************************
* Method: BFont::Encoding
* Params:
* Returns: uint8
* Effects:
***********************************************************************/
uint8
BFont_Encoding(BFont *Font)
{
return Font->Encoding();
}
/***********************************************************************
* Method: BFont::Face
* Params:
* Returns: uint16
* Effects:
***********************************************************************/
uint16
BFont_Face(BFont *Font)
{
return Font->Face();
}
/***********************************************************************
* Method: BFont::Flags
* Params:
* Returns: uint32
* Effects:
***********************************************************************/
uint32
BFont_Flags(BFont *Font)
{
return Font->Flags();
}
/***********************************************************************
* Method: BFont::Direction
* Params:
* Returns: font_direction
* Effects:
***********************************************************************/
font_direction
BFont_Direction(BFont *Font)
{
return Font->Direction();
}
/***********************************************************************
* Method: BFont::IsFixed
* Params:
* Returns: bool
* Effects:
***********************************************************************/
bool
BFont_IsFixed(BFont *Font)
{
return Font->IsFixed();
}
/***********************************************************************
* Method: BFont::IsFullAndHalfFixed
* Params:
* Returns: bool
* Effects:
***********************************************************************/
bool
BFont_IsFullAndHalfFixed(BFont *Font)
{
return Font->IsFullAndHalfFixed();
}
/***********************************************************************
* Method: BFont::BoundingBox
* Params:
* Returns: BRect
* Effects:
***********************************************************************/
BRect
BFont_BoundingBox(BFont *Font)
{
return Font->BoundingBox();
}
/***********************************************************************
* Method: BFont::Blocks
* Params:
* Returns: unicode_block
* Effects:
***********************************************************************/
unicode_block
BFont_Blocks(BFont *Font)
{
return Font->Blocks();
}
/***********************************************************************
* Method: BFont::FileFormat
* Params:
* Returns: font_file_format
* Effects:
***********************************************************************/
font_file_format
BFont_FileFormat(BFont *Font)
{
return Font->FileFormat();
}
/***********************************************************************
* Method: BFont::CountTuned
* Params:
* Returns: int32
* Effects:
***********************************************************************/
int32
BFont_CountTuned(BFont *Font)
{
return Font->CountTuned();
}
/***********************************************************************
* Method: BFont::GetTunedInfo
* Params: int32 index, tuned_font_info *info
* Returns: void
* Effects:
***********************************************************************/
void
BFont_GetTunedInfo(BFont *Font, int32 index, tuned_font_info *info)
{
Font->GetTunedInfo(index, info);
}
/***********************************************************************
* Method: BFont::TruncateString
* Params: BString *in_out, uint32 mode, float width
* Returns: void
* Effects:
***********************************************************************/
void
BFont_TruncateString(BFont *Font, BString *in_out, uint32 mode, float width)
{
Font->TruncateString(in_out, mode, width);
}
/***********************************************************************
* Method: BFont::GetTruncatedStrings
* Params: const char *stringArray[], int32 numStrings, uint32 mode, float width, BString resultArray[]
* Returns: void
* Effects:
***********************************************************************/
void
BFont_GetTruncatedStrings(BFont *Font, const char *stringArray[], int32 numStrings, uint32 mode, float width, BString resultArray[])
{
Font->GetTruncatedStrings(stringArray, numStrings, mode, width, resultArray);
}
/***********************************************************************
* Method: BFont::GetTruncatedStrings
* Params: const char *stringArray[], int32 numStrings, uint32 mode, float width, char *resultArray[]
* Returns: void
* Effects:
***********************************************************************/
void
BFont_GetTruncatedStrings_1
(BFont *Font, const char *stringArray[], int32 numStrings, uint32 mode, float width, char *resultArray[])
{
Font->GetTruncatedStrings(stringArray, numStrings, mode, width, resultArray);
}
/***********************************************************************
* Method: BFont::StringWidth
* Params: const char *string
* Returns: float
* Effects:
***********************************************************************/
float
BFont_StringWidth(BFont *Font, const char *string)
{
return Font->StringWidth(string);
}
/***********************************************************************
* Method: BFont::StringWidth
* Params: const char *string, int32 length
* Returns: float
* Effects:
***********************************************************************/
float
BFont_StringWidth_1
(BFont *Font, const char *string, int32 length)
{
return Font->StringWidth(string, length);
}
/***********************************************************************
* Method: BFont::GetStringWidths
* Params: const char *stringArray[], const int32 lengthArray[], int32 numStrings, float widthArray[]
* Returns: void
* Effects:
***********************************************************************/
void
BFont_GetStringWidths(BFont *Font, const char *stringArray[], const int32 lengthArray[], int32 numStrings, float widthArray[])
{
Font->GetStringWidths(stringArray, lengthArray, numStrings, widthArray);
}
/***********************************************************************
* Method: BFont::GetEscapements
* Params: const char charArray[], int32 numChars, float escapementArray[]
* Returns: void
* Effects:
***********************************************************************/
void
BFont_GetEscapements(BFont *Font, const char charArray[], int32 numChars, float escapementArray[])
{
Font->GetEscapements(charArray, numChars, escapementArray);
}
/***********************************************************************
* Method: BFont::GetEscapements
* Params: const char charArray[], int32 numChars, escapement_delta *delta, float escapementArray[]
* Returns: void
* Effects:
***********************************************************************/
void
BFont_GetEscapements_1
(BFont *Font, const char charArray[], int32 numChars, escapement_delta *delta, float escapementArray[])
{
Font->GetEscapements(charArray, numChars, delta, escapementArray);
}
/***********************************************************************
* Method: BFont::GetEscapements
* Params: const char charArray[], int32 numChars, escapement_delta *delta, BPoint escapementArray[]
* Returns: void
* Effects:
***********************************************************************/
void
BFont_GetEscapements_2
(BFont *Font, const char charArray[], int32 numChars, escapement_delta *delta, BPoint escapementArray[])
{
Font->GetEscapements(charArray, numChars, delta, escapementArray);
}
/***********************************************************************
* Method: BFont::GetEscapements
* Params: const char charArray[], int32 numChars, escapement_delta *delta, BPoint escapementArray[], BPoint offsetArray[]
* Returns: void
* Effects:
***********************************************************************/
void
BFont_GetEscapements_3
(BFont *Font, const char charArray[], int32 numChars, escapement_delta *delta, BPoint escapementArray[], BPoint offsetArray[])
{
Font->GetEscapements(charArray, numChars, delta, escapementArray, offsetArray);
}
/***********************************************************************
* Method: BFont::GetEdges
* Params: const char charArray[], int32 numBytes, edge_info edgeArray[]
* Returns: void
* Effects:
***********************************************************************/
void
BFont_GetEdges(BFont *Font, const char charArray[], int32 numBytes, edge_info edgeArray[])
{
Font->GetEdges(charArray, numBytes, edgeArray);
}
/***********************************************************************
* Method: BFont::GetHeight
* Params: font_height *height
* Returns: void
* Effects:
***********************************************************************/
void
BFont_GetHeight(BFont *Font, font_height *height)
{
Font->GetHeight(height);
}
/***********************************************************************
* Method: BFont::GetBoundingBoxesAsGlyphs
* Params: const char charArray[], int32 numChars, font_metric_mode mode, BRect boundingBoxArray[]
* Returns: void
* Effects:
***********************************************************************/
void
BFont_GetBoundingBoxesAsGlyphs(BFont *Font, const char charArray[], int32 numChars, font_metric_mode mode, BRect boundingBoxArray[])
{
Font->GetBoundingBoxesAsGlyphs(charArray, numChars, mode, boundingBoxArray);
}
/***********************************************************************
* Method: BFont::GetBoundingBoxesAsString
* Params: const char charArray[], int32 numChars, font_metric_mode mode, escapement_delta *delta, BRect boundingBoxArray[]
* Returns: void
* Effects:
***********************************************************************/
void
BFont_GetBoundingBoxesAsString(BFont *Font, const char charArray[], int32 numChars, font_metric_mode mode, escapement_delta *delta, BRect boundingBoxArray[])
{
Font->GetBoundingBoxesAsString(charArray, numChars, mode, delta, boundingBoxArray);
}
/***********************************************************************
* Method: BFont::GetBoundingBoxesForStrings
* Params: const char *stringArray[], int32 numStrings, font_metric_mode mode, escapement_delta deltas[], BRect boundingBoxArray[]
* Returns: void
* Effects:
***********************************************************************/
void
BFont_GetBoundingBoxesForStrings(BFont *Font, const char *stringArray[], int32 numStrings, font_metric_mode mode, escapement_delta deltas[], BRect boundingBoxArray[])
{
Font->GetBoundingBoxesForStrings(stringArray, numStrings, mode, deltas, boundingBoxArray);
}
/***********************************************************************
* Method: BFont::GetGlyphShapes
* Params: const char charArray[], int32 numChars, BShape *glyphShapeArray[]
* Returns: void
* Effects:
***********************************************************************/
void
BFont_GetGlyphShapes(BFont *Font, const char charArray[], int32 numChars, BShape *glyphShapeArray[])
{
Font->GetGlyphShapes(charArray, numChars, glyphShapeArray);
}
/***********************************************************************
* Method: BFont::GetHasGlyphs
* Params: const char charArray[], int32 numChars, bool hasArray[]
* Returns: void
* Effects:
***********************************************************************/
void
BFont_GetHasGlyphs(BFont *Font, const char charArray[], int32 numChars, bool hasArray[])
{
Font->GetHasGlyphs(charArray, numChars, hasArray);
}
/***********************************************************************
* Method: BFont::PrintToStream
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BFont_PrintToStream(BFont *Font)
{
Font->PrintToStream();
}
#if defined(__cplusplus)
}
#endif
#endif /* _FONT_CPP_ */

View File

@@ -1,503 +0,0 @@
/* BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
Eric Jourde
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _LISTITEM_CPP_
#define _LISTITEM_CPP_
/***********************************************************************
* AUTHOR: nobody <baron>
* FILE: StringView.cpp
* DATE: Mon Jan 13 21:52:29 2003
* DESCR:
***********************************************************************/
#include "ListItem.h"
#include <beobj.h>
typedef void (*BListItem_DrawItem_hook) (TPasObject PasObject, TCPlusObject owner, TCPlusObject frame, bool complete );
typedef void (*BListString_DrawItem_hook) (TPasObject PasObject, TCPlusObject owner, TCPlusObject frame, bool complete );
typedef void (*BListItem_Update_hook) (TPasObject PasObject, TCPlusObject owner, TCPlusObject font);
typedef void (*BListString_Update_hook) (TPasObject PasObject, TCPlusObject owner, TCPlusObject font);
#if defined(__cplusplus)
extern "C" {
#endif
BListItem_DrawItem_hook ListItem_DrawItem_hook;
BListString_DrawItem_hook ListString_DrawItem_hook;
BListItem_Update_hook ListItem_Update_hook;
BListString_Update_hook ListString_Update_hook;
#if defined(__cplusplus)
}
#endif
////////////////////////////////////////
// BPListItem
////////////////////////////////////////
class BPListItem : public BListItem, virtual public BPasObject
{
public:
BPListItem(TPasObject PasObject,BMessage *data);
BPListItem(TPasObject PasObject,uint32 outlineLevel = 0, bool expanded = true);
virtual void DrawItem(BView *owner, BRect frame, bool complete = false);
virtual void Update(BView *owner, const BFont *font);
private:
};
BPListItem::BPListItem(TPasObject PasObject,BMessage *data)
:BListItem(data),
BPasObject(PasObject)
{
}
BPListItem::BPListItem(TPasObject PasObject, uint32 outlineLevel = 0, bool expanded = true)
:BListItem(outlineLevel,expanded),
BPasObject(PasObject)
{
}
void BPListItem::Update(BView *owner, const BFont *font)
{
ListItem_Update_hook(GetPasObject(), &owner, &font);
}
void BPListItem::DrawItem(BView *owner, BRect frame, bool complete = false)
{
//BListItem::DrawItem(owner, frame, complete);
ListItem_DrawItem_hook(GetPasObject(), &owner, &frame, complete);
}
////////////////////////////////////////
// BPStringItem
////////////////////////////////////////
class BPStringItem : public BStringItem , virtual public BPasObject
{
public:
BPStringItem(TPasObject PasObject,const char *text,uint32 outlineLevel = 0, bool expanded = true);
BPStringItem(TPasObject PasObject,BMessage *data);
virtual void DrawItem(BView *owner, BRect frame, bool complete = false);
virtual void Update(BView *owner, const BFont *font);
private:
};
BPStringItem::BPStringItem(TPasObject PasObject,const char *text,uint32 outlineLevel = 0, bool expanded = true)
:BStringItem(text,outlineLevel,expanded),
//BPListItem(PasObject,outlineLevel,expanded),
BPasObject(PasObject)
{
}
BPStringItem::BPStringItem(TPasObject PasObject,BMessage *data)
:BStringItem(data),
//BPListItem(PasObject),
BPasObject(PasObject)
{
}
void BPStringItem::DrawItem(BView *owner, BRect frame, bool complete = false)
{
BStringItem::DrawItem(owner, frame, complete);
ListString_DrawItem_hook(GetPasObject(), &owner, &frame, complete);
}
void BPStringItem::Update(BView *owner, const BFont *font)
{
BStringItem::Update(owner, font);
ListString_Update_hook(GetPasObject(), &owner, &font);
}
#if defined(__cplusplus)
extern "C" {
#endif
/***********************************************************************
* AUTHOR: nobody <baron>
* FILE: ListItem.cpp
* DATE: Mon Feb 3 20:25:49 2003
* DESCR:
***********************************************************************/
TCPlusObject BListItem_Create(TPasObject PasObject, uint32 outlineLevel, bool expanded)
{
return new BPListItem(PasObject, outlineLevel, expanded);
}
/***********************************************************************
* Method: BListItem::BListItem
* Params: BMessage *data
* Effects:
***********************************************************************/
TCPlusObject BListItem_Create_1(TPasObject PasObject, BMessage *data)
{
return new BPListItem(PasObject, data);
}
/***********************************************************************
* Method: BListItem::~BListItem
* Params:
* Effects:
***********************************************************************/
void BListItem_Free(BListItem *ListItem)
{
delete ListItem;
}
/***********************************************************************
* Method: BListItem::Archive
* Params: BMessage *data, bool deep
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BListItem_Archive(BListItem *ListItem, BMessage *data, bool deep)
{
return ListItem->Archive(data, deep);
}
/***********************************************************************
* Method: BListItem::Height
* Params:
* Returns: float
* Effects:
***********************************************************************/
float
BListItem_Height(BListItem *ListItem)
{
return ListItem->Height();
}
/***********************************************************************
* Method: BListItem::Width
* Params:
* Returns: float
* Effects:
***********************************************************************/
float
BListItem_Width(BListItem *ListItem)
{
return ListItem->Width();
}
/***********************************************************************
* Method: BListItem::IsSelected
* Params:
* Returns: bool
* Effects:
***********************************************************************/
bool
BListItem_IsSelected(BListItem *ListItem)
{
return ListItem->IsSelected();
}
/***********************************************************************
* Method: BListItem::Select
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BListItem_Select(BListItem *ListItem)
{
ListItem->Select();
}
/***********************************************************************
* Method: BListItem::Deselect
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BListItem_Deselect(BListItem *ListItem)
{
ListItem->Deselect();
}
/***********************************************************************
* Method: BListItem::SetEnabled
* Params: bool on
* Returns: void
* Effects:
***********************************************************************/
void
BListItem_SetEnabled(BListItem *ListItem, bool on)
{
ListItem->SetEnabled(on);
}
/***********************************************************************
* Method: BListItem::IsEnabled
* Params:
* Returns: bool
* Effects:
***********************************************************************/
bool
BListItem_IsEnabled(BListItem *ListItem)
{
return ListItem->IsEnabled();
}
/***********************************************************************
* Method: BListItem::SetHeight
* Params: float height
* Returns: void
* Effects:
***********************************************************************/
void
BListItem_SetHeight(BListItem *ListItem, float height)
{
ListItem->SetHeight(height);
}
/***********************************************************************
* Method: BListItem::SetWidth
* Params: float width
* Returns: void
* Effects:
***********************************************************************/
void
BListItem_SetWidth(BListItem *ListItem, float width)
{
ListItem->SetWidth(width);
}
/***********************************************************************
* Method: BListItem::Update
* Params: BView *owner, const BFont *font
* Returns: void
* Effects:
***********************************************************************/
void
BListItem_Update(BListItem *ListItem, BView *owner, const BFont *font)
{
ListItem->Update(owner, font);
}
/***********************************************************************
* Method: BListItem::Perform
* Params: perform_code d, void *arg
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BListItem_Perform(BListItem *ListItem, perform_code d, void *arg)
{
return ListItem->Perform(d, arg);
}
/***********************************************************************
* Method: BListItem::IsExpanded
* Params:
* Returns: bool
* Effects:
***********************************************************************/
bool
BListItem_IsExpanded(BListItem *ListItem)
{
return ListItem->IsExpanded();
}
/***********************************************************************
* Method: BListItem::SetExpanded
* Params: bool expanded
* Returns: void
* Effects:
***********************************************************************/
void
BListItem_SetExpanded(BListItem *ListItem, bool expanded)
{
ListItem->SetExpanded(expanded);
}
/***********************************************************************
* Method: BListItem::OutlineLevel
* Params:
* Returns: uint32
* Effects:
***********************************************************************/
uint32
BListItem_OutlineLevel(BListItem *ListItem)
{
return ListItem->OutlineLevel();
}
void BListItem_DrawItem(BListItem *ListItem, BView *owner, BRect frame, bool complete)
{
ListItem->DrawItem(owner, frame, complete);
}
TCPlusObject BStringItem_Create(TPasObject PasObject, const char *text, uint32 outlineLevel, bool expanded)
{
return new BPStringItem(PasObject, text, outlineLevel, expanded);
}
/***********************************************************************
* Method: BStringItem::~BStringItem
* Params:
* Effects:
***********************************************************************/
void BStringItem_Free(BStringItem *StringItem)
{
return StringItem->~BStringItem();
}
/***********************************************************************
* Method: BStringItem::BStringItem
* Params: BMessage *data
* Effects:
***********************************************************************/
TCPlusObject BStringItem_Create_1(TPasObject PasObject, BMessage *data)
{
return new BPStringItem(PasObject, data);
}
/***********************************************************************
* Method: BStringItem::Instantiate
* Params: BMessage *data
* Returns: BArchivable *
* Effects:
***********************************************************************/
BArchivable *
BStringItem_Instantiate(BStringItem *StringItem, BMessage *data)
{
return StringItem->Instantiate(data);
}
/***********************************************************************
* Method: BStringItem::Archive
* Params: BMessage *data, bool deep
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BStringItem_Archive(BStringItem *StringItem, BMessage *data, bool deep)
{
return StringItem->Archive(data, deep);
}
/***********************************************************************
* Method: BStringItem::DrawItem
* Params: BView *owner, BRect frame, bool complete
* Returns: void
* Effects:
***********************************************************************/
void
BStringItem_DrawItem(BStringItem *StringItem, BView *owner, BRect frame, bool complete)
{
StringItem->DrawItem(owner, frame, complete);
}
/***********************************************************************
* Method: BStringItem::SetText
* Params: const char *text
* Returns: void
* Effects:
***********************************************************************/
void
BStringItem_SetText(BStringItem *StringItem, const char *text)
{
StringItem->SetText(text);
}
/***********************************************************************
* Method: BStringItem::Text
* Params:
* Returns: const char *
* Effects:
***********************************************************************/
const char *
BStringItem_Text(BStringItem *StringItem)
{
return StringItem->Text();
}
/***********************************************************************
* Method: BStringItem::Update
* Params: BView *owner, const BFont *font
* Returns: void
* Effects:
***********************************************************************/
void
BStringItem_Update(BStringItem *StringItem, BView *owner, const BFont *font)
{
StringItem->Update(owner, font);
}
/***********************************************************************
* Method: BStringItem::Perform
* Params: perform_code d, void *arg
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BStringItem_Perform(BStringItem *StringItem, perform_code d, void *arg)
{
return StringItem->Perform(d, arg);
}
#if defined(__cplusplus)
}
#endif
#endif /* _LISTITEM_CPP_ */

File diff suppressed because it is too large Load Diff

View File

@@ -1,925 +0,0 @@
#ifndef _MENU_CPP_
#define _MENU_CPP_
/***********************************************************************
* AUTHOR: nobody <baron>
* FILE: Menu.cpp
* DATE: Sat Jan 11 16:55:14 2003
* DESCR:
***********************************************************************/
#include "Menu.h"
#include "menu.h"
#include "Messenger.h"
#include "view.h"
#include <beobj.h>
#include "MenuItem.h"
BPMenu::BPMenu(TPasObject PasObject, const char *name, menu_layout layout = B_ITEMS_IN_COLUMN)
:BMenu(name, layout),
BPView(PasObject, BRect(0, 0, 0, 0), "", 0, 0),
BPHandler(PasObject),
BPasObject(PasObject)
{
}
BPMenu::BPMenu(TPasObject PasObject, const char *name, float width, float height)
:BMenu(name, width, height),
BPView(PasObject, BRect(0, 0, 0, 0), "", 0, 0),
BPHandler(PasObject),
BPasObject(PasObject)
{
}
BPMenu::BPMenu(TPasObject PasObject, BMessage *archive)
:BMenu(archive),
BPView(PasObject, BRect(0, 0, 0, 0), "", 0, 0),
BPHandler(PasObject),
BPasObject(PasObject)
{
}
BPMenu::BPMenu(TPasObject PasObject, BRect frame, const char *name, uint32 resizingMode, uint32 flags, menu_layout layout, bool resizeToFit)
:BMenu(frame, name, resizingMode, flags, layout, resizeToFit),
BPView(PasObject, BRect(0, 0, 0, 0), "", 0, 0),
BPHandler(PasObject),
BPasObject(PasObject)
{
}
void BPMenu::MessageReceived(BMessage *message)
{
MessageReceived_hookCall(message);
BMenu::MessageReceived(message);
}
void BPMenu::AllAttached(void)
{
// AllAttached_hookCall(message);
}
void BPMenu::AttachedToWindow(void)
{
BMenu::AttachedToWindow();
// AttachedToWindow_hookCall();
}
void BPMenu::AllDetached(void)
{
// View_AllDetached_hook(GetPasObject());
}
void BPMenu::DetachedFromWindow(void)
{
// View_DetachedFromWindow_hook(GetPasObject());
}
void BPMenu::Draw(BRect updateRect)
{
BMenu::Draw(updateRect);
Draw_hookCall(updateRect);
}
void BPMenu::DrawAfterChildren(BRect updateRect)
{
// View_DrawAfterChildren_hook(GetPasObject(), &updateRect);
}
void BPMenu::FrameMoved(BPoint parentPoint)
{
// View_FrameMoved_hook(GetPasObject(), &parentPoint);
}
void BPMenu::FrameResized(float width, float height)
{
// View_FrameResized_hook(GetPasObject(), width, height);
}
void BPMenu::GetPreferredSize(float *width, float *height)
{
// View_GetPreferredSize_hook(GetPasObject(), width, height);
}
void BPMenu::ResizeToPreferred(void)
{
// View_ResizeToPreferred_hook(GetPasObject());
}
void BPMenu::KeyDown(const char *bytes, int32 numBytes)
{
// View_KeyDown_hook(GetPasObject(), bytes, numBytes);
}
void BPMenu::KeyUp(const char *bytes, int32 numBytes)
{
// View_KeyUp_hook(GetPasObject(), bytes, numBytes);
}
void BPMenu::MouseDown(BPoint point)
{
// View_MouseDown_hook(GetPasObject(), &point);
}
void BPMenu::MouseMoved(BPoint point, uint32 transit, const BMessage *message)
{
// View_MouseMoved_hook(GetPasObject(), &point, transit, &message);
}
void BPMenu::MouseUp(BPoint point)
{
// View_MouseUp_hook(GetPasObject(), &point);
}
void BPMenu::Pulse(void)
{
// View_Pulse_hook(GetPasObject());
}
//void BPMenu::TargetedByScrollView(BScrollView *scroller)
//{
// View_TargetedByScrollView(GetPasObject(), scroller);
//}
void BPMenu::WindowActivated(bool active)
{
// View_WindowActivated_hook(GetPasObject(), active);
}
void BPMenu::SetEnabled(bool enabled)
{
}
void BPMenu::SetValue(int32 value)
{
}
void BPMenu::MakeDefault(bool)
{
}
#if defined(__cplusplus)
extern "C" {
#endif
/***********************************************************************
* Method: BMenu::BMenu
* Params: const char *title, menu_layout layout
* Effects:
***********************************************************************/
TCPlusObject BMenu_Create(TPasObject PasObject, const char *title, menu_layout layout)
{
return new BPMenu(PasObject, title, layout);
}
/***********************************************************************
* Method: BMenu::BMenu
* Params: const char *title, float width, float height
* Effects:
***********************************************************************/
TCPlusObject BMenu_Create_1
(TPasObject PasObject, const char *title, float width, float height)
{
return new BPMenu(PasObject, title, width, height);
}
/***********************************************************************
* Method: BMenu::~BMenu
* Params:
* Effects:
***********************************************************************/
void BMenu_Free(BMenu *Menu)
{
delete Menu;
}
/***********************************************************************
* Method: BMenu::BMenu
* Params: BMessage *data
* Effects:
***********************************************************************/
TCPlusObject BMenu_Create_2(TPasObject PasObject, BMessage *data)
{
return new BPMenu(PasObject, data);
}
/***********************************************************************
* Method: BMenu::Instantiate
* Params: BMessage *data
* Returns: BArchivable *
* Effects:
***********************************************************************/
BArchivable *
BMenu_Instantiate(BMenu *Menu, BMessage *data)
{
return Menu->Instantiate(data);
}
/***********************************************************************
* Method: BMenu::Archive
* Params: BMessage *data, bool deep
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BMenu_Archive(BMenu *Menu, BMessage *data, bool deep)
{
return Menu->Archive(data, deep);
}
/***********************************************************************
* Method: BMenu::AttachedToWindow
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BMenu_AttachedToWindow(BMenu *Menu)
{
Menu->AttachedToWindow();
}
/***********************************************************************
* Method: BMenu::DetachedFromWindow
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BMenu_DetachedFromWindow(BMenu *Menu)
{
Menu->DetachedFromWindow();
}
/***********************************************************************
* Method: BMenu::AddItem
* Params: BMenuItem *item
* Returns: bool
* Effects:
***********************************************************************/
bool
BMenu_AddItem(BMenu *Menu, BMenuItem *item)
{
return Menu->AddItem(item);
}
/***********************************************************************
* Method: BMenu::AddItem
* Params: BMenuItem *item, int32 index
* Returns: bool
* Effects:
***********************************************************************/
bool
BMenu_AddItem_1
(BMenu *Menu, BMenuItem *item, int32 index)
{
return Menu->AddItem(item, index);
}
/***********************************************************************
* Method: BMenu::AddItem
* Params: BMenuItem *item, BRect frame
* Returns: bool
* Effects:
***********************************************************************/
bool
BMenu_AddItem_2
(BMenu *Menu, BMenuItem *item, BRect frame)
{
return Menu->AddItem(item, frame);
}
/***********************************************************************
* Method: BMenu::AddItem
* Params: BMenu *menu
* Returns: bool
* Effects:
***********************************************************************/
bool
BMenu_AddItem_3
(BMenu *Menu, BMenu *menu)
{
return Menu->AddItem(menu);
}
/***********************************************************************
* Method: BMenu::AddItem
* Params: BMenu *menu, int32 index
* Returns: bool
* Effects:
***********************************************************************/
bool
BMenu_AddItem_4
(BMenu *Menu, BMenu *menu, int32 index)
{
return Menu->AddItem(menu, index);
}
/***********************************************************************
* Method: BMenu::AddItem
* Params: BMenu *menu, BRect frame
* Returns: bool
* Effects:
***********************************************************************/
bool
BMenu_AddItem_5
(BMenu *Menu, BMenu *menu, BRect frame)
{
return Menu->AddItem(menu, frame);
}
/***********************************************************************
* Method: BMenu::AddList
* Params: BList *list, int32 index
* Returns: bool
* Effects:
***********************************************************************/
bool
BMenu_AddList(BMenu *Menu, BList *list, int32 index)
{
return Menu->AddList(list, index);
}
/***********************************************************************
* Method: BMenu::AddSeparatorItem
* Params:
* Returns: bool
* Effects:
***********************************************************************/
bool
BMenu_AddSeparatorItem(BMenu *Menu)
{
return Menu->AddSeparatorItem();
}
/***********************************************************************
* Method: BMenu::RemoveItem
* Params: BMenuItem *item
* Returns: bool
* Effects:
***********************************************************************/
bool
BMenu_RemoveItem(BMenu *Menu, BMenuItem *item)
{
return Menu->RemoveItem(item);
}
/***********************************************************************
* Method: BMenu::RemoveItem
* Params: int32 index
* Returns: BMenuItem *
* Effects:
***********************************************************************/
BMenuItem *
BMenu_RemoveItem_1
(BMenu *Menu, int32 index)
{
return Menu->RemoveItem(index);
}
/***********************************************************************
* Method: BMenu::RemoveItems
* Params: int32 index, int32 count, bool del
* Returns: bool
* Effects:
***********************************************************************/
bool
BMenu_RemoveItems_2
(BMenu *Menu, int32 index, int32 count, bool del)
{
return Menu->RemoveItems(index, count, del);
}
/***********************************************************************
* Method: BMenu::RemoveItem
* Params: BMenu *menu
* Returns: bool
* Effects:
***********************************************************************/
bool
BMenu_RemoveItem_2(BMenu *Menu, BMenu *menu)
{
return Menu->RemoveItem(menu);
}
/***********************************************************************
* Method: BMenu::ItemAt
* Params: int32 index
* Returns: BMenuItem *
* Effects:
***********************************************************************/
BMenuItem *
BMenu_ItemAt(BMenu *Menu, int32 index)
{
return Menu->ItemAt(index);
}
/***********************************************************************
* Method: BMenu::SubmenuAt
* Params: int32 index
* Returns: BMenu *
* Effects:
***********************************************************************/
BMenu *
BMenu_SubmenuAt(BMenu *Menu, int32 index)
{
return Menu->SubmenuAt(index);
}
/***********************************************************************
* Method: BMenu::CountItems
* Params:
* Returns: int32
* Effects:
***********************************************************************/
int32
BMenu_CountItems(BMenu *Menu)
{
return Menu->CountItems();
}
/***********************************************************************
* Method: BMenu::IndexOf
* Params: BMenuItem *item
* Returns: int32
* Effects:
***********************************************************************/
int32
BMenu_IndexOf(BMenu *Menu, BMenuItem *item)
{
return Menu->IndexOf(item);
}
/***********************************************************************
* Method: BMenu::IndexOf
* Params: BMenu *menu
* Returns: int32
* Effects:
***********************************************************************/
int32
BMenu_IndexOf_1
(BMenu *Menu, BMenu *menu)
{
return Menu->IndexOf(menu);
}
/***********************************************************************
* Method: BMenu::FindItem
* Params: uint32 command
* Returns: BMenuItem *
* Effects:
***********************************************************************/
BMenuItem *
BMenu_FindItem(BMenu *Menu, uint32 command)
{
return Menu->FindItem(command);
}
/***********************************************************************
* Method: BMenu::FindItem
* Params: const char *name
* Returns: BMenuItem *
* Effects:
***********************************************************************/
BMenuItem *
BMenu_FindItem_1
(BMenu *Menu, const char *name)
{
return Menu->FindItem(name);
}
/***********************************************************************
* Method: BMenu::SetTargetForItems
* Params: BHandler *target
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BMenu_SetTargetForItems(BMenu *Menu, BHandler *target)
{
return Menu->SetTargetForItems(target);
}
/***********************************************************************
* Method: BMenu::SetTargetForItems
* Params: BMessenger messenger
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BMenu_SetTargetForItems_1
(BMenu *Menu, BMessenger messenger)
{
return Menu->SetTargetForItems(messenger);
}
/***********************************************************************
* Method: BMenu::SetEnabled
* Params: bool state
* Returns: void
* Effects:
***********************************************************************/
void
BMenu_SetEnabled(BMenu *Menu, bool state)
{
Menu->SetEnabled(state);
}
/***********************************************************************
* Method: BMenu::SetRadioMode
* Params: bool state
* Returns: void
* Effects:
***********************************************************************/
void
BMenu_SetRadioMode(BMenu *Menu, bool state)
{
Menu->SetRadioMode(state);
}
/***********************************************************************
* Method: BMenu::SetTriggersEnabled
* Params: bool state
* Returns: void
* Effects:
***********************************************************************/
void
BMenu_SetTriggersEnabled(BMenu *Menu, bool state)
{
Menu->SetTriggersEnabled(state);
}
/***********************************************************************
* Method: BMenu::SetMaxContentWidth
* Params: float max
* Returns: void
* Effects:
***********************************************************************/
void
BMenu_SetMaxContentWidth(BMenu *Menu, float max)
{
Menu->SetMaxContentWidth(max);
}
/***********************************************************************
* Method: BMenu::SetLabelFromMarked
* Params: bool on
* Returns: void
* Effects:
***********************************************************************/
void
BMenu_SetLabelFromMarked(BMenu *Menu, bool on)
{
Menu->SetLabelFromMarked(on);
}
/***********************************************************************
* Method: BMenu::IsLabelFromMarked
* Params:
* Returns: bool
* Effects:
***********************************************************************/
bool
BMenu_IsLabelFromMarked(BMenu *Menu)
{
return Menu->IsLabelFromMarked();
}
/***********************************************************************
* Method: BMenu::IsEnabled
* Params:
* Returns: bool
* Effects:
***********************************************************************/
bool
BMenu_IsEnabled(BMenu *Menu)
{
return Menu->IsEnabled();
}
/***********************************************************************
* Method: BMenu::IsRadioMode
* Params:
* Returns: bool
* Effects:
***********************************************************************/
bool
BMenu_IsRadioMode(BMenu *Menu)
{
return Menu->IsRadioMode();
}
/***********************************************************************
* Method: BMenu::AreTriggersEnabled
* Params:
* Returns: bool
* Effects:
***********************************************************************/
bool
BMenu_AreTriggersEnabled(BMenu *Menu)
{
return Menu->AreTriggersEnabled();
}
/***********************************************************************
* Method: BMenu::IsRedrawAfterSticky
* Params:
* Returns: bool
* Effects:
***********************************************************************/
bool
BMenu_IsRedrawAfterSticky(BMenu *Menu)
{
return Menu->IsRedrawAfterSticky();
}
/***********************************************************************
* Method: BMenu::MaxContentWidth
* Params:
* Returns: float
* Effects:
***********************************************************************/
float
BMenu_MaxContentWidth(BMenu *Menu)
{
return Menu->MaxContentWidth();
}
/***********************************************************************
* Method: BMenu::FindMarked
* Params:
* Returns: BMenuItem *
* Effects:
***********************************************************************/
BMenuItem *
BMenu_FindMarked(BMenu *Menu)
{
return Menu->FindMarked();
}
/***********************************************************************
* Method: BMenu::Supermenu
* Params:
* Returns: BMenu *
* Effects:
***********************************************************************/
BMenu *
BMenu_Supermenu(BMenu *Menu)
{
return Menu->Supermenu();
}
/***********************************************************************
* Method: BMenu::Superitem
* Params:
* Returns: BMenuItem *
* Effects:
***********************************************************************/
BMenuItem *
BMenu_Superitem(BMenu *Menu)
{
return Menu->Superitem();
}
/***********************************************************************
* Method: BMenu::MessageReceived
* Params: BMessage *msg
* Returns: void
* Effects:
***********************************************************************/
void
BMenu_MessageReceived(BMenu *Menu, BMessage *msg)
{
Menu->MessageReceived(msg);
}
/***********************************************************************
* Method: BMenu::KeyDown
* Params: const char *bytes, int32 numBytes
* Returns: void
* Effects:
***********************************************************************/
void
BMenu_KeyDown(BMenu *Menu, const char *bytes, int32 numBytes)
{
Menu->KeyDown(bytes, numBytes);
}
/***********************************************************************
* Method: BMenu::Draw
* Params: BRect updateRect
* Returns: void
* Effects:
***********************************************************************/
void
BMenu_Draw(BMenu *Menu, BRect updateRect)
{
Menu->Draw(updateRect);
}
/***********************************************************************
* Method: BMenu::GetPreferredSize
* Params: float *width, float *height
* Returns: void
* Effects:
***********************************************************************/
void
BMenu_GetPreferredSize(BMenu *Menu, float *width, float *height)
{
Menu->GetPreferredSize(width, height);
}
/***********************************************************************
* Method: BMenu::ResizeToPreferred
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BMenu_ResizeToPreferred(BMenu *Menu)
{
Menu->ResizeToPreferred();
}
/***********************************************************************
* Method: BMenu::FrameMoved
* Params: BPoint new_position
* Returns: void
* Effects:
***********************************************************************/
void
BMenu_FrameMoved(BMenu *Menu, BPoint new_position)
{
Menu->FrameMoved(new_position);
}
/***********************************************************************
* Method: BMenu::FrameResized
* Params: float new_width, float new_height
* Returns: void
* Effects:
***********************************************************************/
void
BMenu_FrameResized(BMenu *Menu, float new_width, float new_height)
{
Menu->FrameResized(new_width, new_height);
}
/***********************************************************************
* Method: BMenu::InvalidateLayout
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BMenu_InvalidateLayout(BMenu *Menu)
{
Menu->InvalidateLayout();
}
/***********************************************************************
* Method: BMenu::ResolveSpecifier
* Params: BMessage *msg, int32 index, BMessage *specifier, int32 form, const char *property
* Returns: BHandler *
* Effects:
***********************************************************************/
BHandler *
BMenu_ResolveSpecifier(BMenu *Menu, BMessage *msg, int32 index, BMessage *specifier, int32 form, const char *property)
{
return Menu->ResolveSpecifier(msg, index, specifier, form, property);
}
/***********************************************************************
* Method: BMenu::GetSupportedSuites
* Params: BMessage *data
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BMenu_GetSupportedSuites(BMenu *Menu, BMessage *data)
{
return Menu->GetSupportedSuites(data);
}
/***********************************************************************
* Method: BMenu::Perform
* Params: perform_code d, void *arg
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BMenu_Perform(BMenu *Menu, perform_code d, void *arg)
{
return Menu->Perform(d, arg);
}
/***********************************************************************
* Method: BMenu::MakeFocus
* Params: bool state
* Returns: void
* Effects:
***********************************************************************/
void
BMenu_MakeFocus(BMenu *Menu, bool state)
{
Menu->MakeFocus(state);
}
/***********************************************************************
* Method: BMenu::AllAttached
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BMenu_AllAttached(BMenu *Menu)
{
Menu->AllAttached();
}
/***********************************************************************
* Method: BMenu::AllDetached
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BMenu_AllDetached(BMenu *Menu)
{
Menu->AllDetached();
}
/***********************************************************************
* Method: BMenu::BMenu
* Params: BRect frame, const char *viewName, uint32 resizeMask, uint32 flags, menu_layout layout, bool resizeToFit
* Effects:
***********************************************************************/
TCPlusObject BMenu_Create_3(TPasObject PasObject, BRect frame, const char *viewName, uint32 resizeMask, uint32 flags, menu_layout layout, bool resizeToFit)
{
return new BPMenu(PasObject, frame, viewName, resizeMask, flags, layout, resizeToFit);
}
#if defined(__cplusplus)
}
#endif
#endif /* _MENU_CPP_ */

View File

@@ -1,642 +0,0 @@
#ifndef _MENUBAR_CPP_
#define _MENUBAR_CPP_
#include "MenuBar.h"
#include "menubar.h"
#include <beobj.h>
BPMenuBar::BPMenuBar(TPasObject PasObject, BRect frame, const char *name,
uint32 resizingMode = B_FOLLOW_LEFT_RIGHT | B_FOLLOW_TOP,
menu_layout layout = B_ITEMS_IN_COLUMN, bool resizeToFit = true)
:BMenuBar(frame, name, resizingMode, layout, resizeToFit),
BPMenu(PasObject, name, layout),
BPView(PasObject, BRect(0, 0, 0, 0), "", 0, 0),
BPHandler(PasObject),
BPasObject(PasObject)
{
}
BPMenuBar::BPMenuBar(TPasObject PasObject, BMessage *archive)
:BMenuBar(archive),
BPMenu(PasObject, archive),
BPView(PasObject, BRect(0, 0, 0, 0), "", 0, 0),
BPHandler(PasObject),
BPasObject(PasObject)
{
}
void BPMenuBar::MessageReceived(BMessage *message)
{
MessageReceived_hookCall(message);
BMenuBar::MessageReceived(message);
}
void BPMenuBar::AllAttached(void)
{
BMenuBar::AllAttached();
// AllAttached_hookCall(message);
}
void BPMenuBar::AttachedToWindow(void)
{
BMenuBar::AttachedToWindow();
AttachedToWindow_hookCall();
}
void BPMenuBar::AllDetached(void)
{
BMenuBar::AllDetached();
// View_AllDetached_hook(GetPasObject());
}
void BPMenuBar::DetachedFromWindow(void)
{
BMenuBar::DetachedFromWindow();
// View_DetachedFromWindow_hook(GetPasObject());
}
void BPMenuBar::Draw(BRect updateRect)
{
BMenuBar::Draw(updateRect);
Draw_hookCall(updateRect);
}
void BPMenuBar::DrawAfterChildren(BRect updateRect)
{
BMenuBar::DrawAfterChildren(updateRect);
// View_DrawAfterChildren_hook(GetPasObject(), &updateRect);
}
void BPMenuBar::FrameMoved(BPoint parentPoint)
{
BMenuBar::FrameMoved(parentPoint);
// View_FrameMoved_hook(GetPasObject(), &parentPoint);
}
void BPMenuBar::FrameResized(float width, float height)
{
BMenuBar::FrameResized(width, height);
// View_FrameResized_hook(GetPasObject(), width, height);
}
void BPMenuBar::GetPreferredSize(float *width, float *height)
{
BMenuBar::GetPreferredSize(width, height);
// View_GetPreferredSize_hook(GetPasObject(), width, height);
}
void BPMenuBar::ResizeToPreferred(void)
{
BMenuBar::ResizeToPreferred();
// View_ResizeToPreferred_hook(GetPasObject());
}
void BPMenuBar::KeyDown(const char *bytes, int32 numBytes)
{
BMenuBar::KeyDown(bytes, numBytes);
// View_KeyDown_hook(GetPasObject(), bytes, numBytes);
}
void BPMenuBar::KeyUp(const char *bytes, int32 numBytes)
{
BMenuBar::KeyUp(bytes, numBytes);
// View_KeyUp_hook(GetPasObject(), bytes, numBytes);
}
void BPMenuBar::MouseDown(BPoint point)
{
BMenuBar::MouseDown(point);
// View_MouseDown_hook(GetPasObject(), &point);
}
void BPMenuBar::MouseMoved(BPoint point, uint32 transit, const BMessage *message)
{
BMenuBar::MouseMoved(point, transit, message);
// View_MouseMoved_hook(GetPasObject(), &point, transit, &message);
}
void BPMenuBar::MouseUp(BPoint point)
{
BMenuBar::MouseUp(point);
// View_MouseUp_hook(GetPasObject(), &point);
}
void BPMenuBar::Pulse(void)
{
BMenuBar::Pulse();
// View_Pulse_hook(GetPasObject());
}
//void BPMenu::TargetedByScrollView(BScrollView *scroller)
//{
// View_TargetedByScrollView(GetPasObject(), scroller);
//}
void BPMenuBar::WindowActivated(bool active)
{
BMenuBar::WindowActivated(active);
// View_WindowActivated_hook(GetPasObject(), active);
}
void BPMenuBar::SetEnabled(bool enabled)
{
BMenuBar::SetEnabled(enabled);
}
void BPMenuBar::SetValue(int32 value)
{
}
void BPMenuBar::MakeDefault(bool flag)
{
}
#if defined(__cplusplus)
extern "C" {
#endif
/***********************************************************************
* AUTHOR: nobody <baron>
* FILE: MenuBar.cpp
* DATE: Sun Jan 12 01:25:37 2003
* DESCR:
***********************************************************************/
TCPlusObject BMenuBar_Create(TPasObject PasObject, BRect frame, const char *name,
uint32 resizingMode = B_FOLLOW_LEFT_RIGHT | B_FOLLOW_TOP,
menu_layout layout = B_ITEMS_IN_COLUMN, bool resizeToFit = true)
{
return new BPMenuBar(PasObject, frame, name, resizingMode, layout, resizeToFit);
}
/***********************************************************************
* Method: BMenuBar::BMenuBar
* Params: BMessage *data
* Effects:
***********************************************************************/
TCPlusObject BMenuBar_Create_2(TPasObject PasObject, BMessage *data)
{
return new BPMenuBar(PasObject, data);
}
/***********************************************************************
* Method: BMenuBar::~BMenuBar
* Params:
* Effects:
***********************************************************************/
void BMenuBar_Free(BMenuBar *MenuBar)
{
delete MenuBar;
}
/***********************************************************************
* Method: BMenuBar::Instantiate
* Params: BMessage *data
* Returns: BArchivable *
* Effects:
***********************************************************************/
BArchivable *
BMenuBar_Instantiate(BMenuBar *MenuBar, BMessage *data)
{
return MenuBar->Instantiate(data);
}
/***********************************************************************
* Method: BMenuBar::Archive
* Params: BMessage *data, bool deep
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BMenuBar_Archive(BMenuBar *MenuBar, BMessage *data, bool deep)
{
return MenuBar->Archive(data, deep);
}
/***********************************************************************
* Method: BMenuBar::SetBorder
* Params: menu_bar_border border
* Returns: void
* Effects:
***********************************************************************/
void
BMenuBar_SetBorder(BMenuBar *MenuBar, menu_bar_border border)
{
MenuBar->SetBorder(border);
}
/***********************************************************************
* Method: BMenuBar::Border
* Params:
* Returns: menu_bar_border
* Effects:
***********************************************************************/
menu_bar_border
BMenuBar_Border(BMenuBar *MenuBar)
{
return MenuBar->Border();
}
/***********************************************************************
* Method: BMenuBar::Draw
* Params: BRect updateRect
* Returns: void
* Effects:
***********************************************************************/
void
BMenuBar_Draw(BMenuBar *MenuBar, BRect updateRect)
{
MenuBar->Draw(updateRect);
}
/***********************************************************************
* Method: BMenuBar::AttachedToWindow
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BMenuBar_AttachedToWindow(BMenuBar *MenuBar)
{
MenuBar->AttachedToWindow();
}
/***********************************************************************
* Method: BMenuBar::DetachedFromWindow
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BMenuBar_DetachedFromWindow(BMenuBar *MenuBar)
{
MenuBar->DetachedFromWindow();
}
/***********************************************************************
* Method: BMenuBar::MessageReceived
* Params: BMessage *msg
* Returns: void
* Effects:
***********************************************************************/
void
BMenuBar_MessageReceived(BMenuBar *MenuBar, BMessage *msg)
{
MenuBar->MessageReceived(msg);
}
/***********************************************************************
* Method: BMenuBar::MouseDown
* Params: BPoint where
* Returns: void
* Effects:
***********************************************************************/
void
BMenuBar_MouseDown(BMenuBar *MenuBar, BPoint where)
{
MenuBar->MouseDown(where);
}
/***********************************************************************
* Method: BMenuBar::WindowActivated
* Params: bool state
* Returns: void
* Effects:
***********************************************************************/
void
BMenuBar_WindowActivated(BMenuBar *MenuBar, bool state)
{
MenuBar->WindowActivated(state);
}
/***********************************************************************
* Method: BMenuBar::MouseUp
* Params: BPoint where
* Returns: void
* Effects:
***********************************************************************/
void
BMenuBar_MouseUp(BMenuBar *MenuBar, BPoint where)
{
MenuBar->MouseUp(where);
}
/***********************************************************************
* Method: BMenuBar::FrameMoved
* Params: BPoint new_position
* Returns: void
* Effects:
***********************************************************************/
void
BMenuBar_FrameMoved(BMenuBar *MenuBar, BPoint new_position)
{
MenuBar->FrameMoved(new_position);
}
/***********************************************************************
* Method: BMenuBar::FrameResized
* Params: float new_width, float new_height
* Returns: void
* Effects:
***********************************************************************/
void
BMenuBar_FrameResized(BMenuBar *MenuBar, float new_width, float new_height)
{
MenuBar->FrameResized(new_width, new_height);
}
/***********************************************************************
* Method: BMenuBar::Show
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BMenuBar_Show(BMenuBar *MenuBar)
{
MenuBar->Show();
}
/***********************************************************************
* Method: BMenuBar::Hide
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BMenuBar_Hide(BMenuBar *MenuBar)
{
MenuBar->Hide();
}
/***********************************************************************
* Method: BMenuBar::ResolveSpecifier
* Params: BMessage *msg, int32 index, BMessage *specifier, int32 form, const char *property
* Returns: BHandler *
* Effects:
***********************************************************************/
BHandler *
BMenuBar_ResolveSpecifier(BMenuBar *MenuBar, BMessage *msg, int32 index, BMessage *specifier, int32 form, const char *property)
{
return MenuBar->ResolveSpecifier(msg, index, specifier, form, property);
}
/***********************************************************************
* Method: BMenuBar::GetSupportedSuites
* Params: BMessage *data
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BMenuBar_GetSupportedSuites(BMenuBar *MenuBar, BMessage *data)
{
return MenuBar->GetSupportedSuites(data);
}
/***********************************************************************
* Method: BMenuBar::ResizeToPreferred
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BMenuBar_ResizeToPreferred(BMenuBar *MenuBar)
{
MenuBar->ResizeToPreferred();
}
/***********************************************************************
* Method: BMenuBar::GetPreferredSize
* Params: float *width, float *height
* Returns: void
* Effects:
***********************************************************************/
void
BMenuBar_GetPreferredSize(BMenuBar *MenuBar, float *width, float *height)
{
MenuBar->GetPreferredSize(width, height);
}
/***********************************************************************
* Method: BMenuBar::MakeFocus
* Params: bool state
* Returns: void
* Effects:
***********************************************************************/
void
BMenuBar_MakeFocus(BMenuBar *MenuBar, bool state)
{
MenuBar->MakeFocus(state);
}
/***********************************************************************
* Method: BMenuBar::AllAttached
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BMenuBar_AllAttached(BMenuBar *MenuBar)
{
MenuBar->AllAttached();
}
/***********************************************************************
* Method: BMenuBar::AllDetached
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BMenuBar_AllDetached(BMenuBar *MenuBar)
{
MenuBar->AllDetached();
}
/***********************************************************************
* Method: BMenuBar::Perform
* Params: perform_code d, void *arg
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BMenuBar_Perform(BMenuBar *MenuBar, perform_code d, void *arg)
{
return MenuBar->Perform(d, arg);
}
/***********************************************************************
* Method: BMenuBar::_ReservedMenuBar1
* Params:
* Returns: void
* Effects:
***********************************************************************/
/*void
BMenuBar__ReservedMenuBar1(BMenuBar *MenuBar)
{
MenuBar->_ReservedMenuBar1();
}
*/
/***********************************************************************
* Method: BMenuBar::_ReservedMenuBar2
* Params:
* Returns: void
* Effects:
***********************************************************************/
/*void
BMenuBar__ReservedMenuBar2(BMenuBar *MenuBar)
{
MenuBar->_ReservedMenuBar2();
}
*/
/***********************************************************************
* Method: BMenuBar::_ReservedMenuBar3
* Params:
* Returns: void
* Effects:
***********************************************************************/
/*void
BMenuBar__ReservedMenuBar3(BMenuBar *MenuBar)
{
MenuBar->_ReservedMenuBar3();
}
*/
/***********************************************************************
* Method: BMenuBar::_ReservedMenuBar4
* Params:
* Returns: void
* Effects:
***********************************************************************/
/*void
BMenuBar__ReservedMenuBar4(BMenuBar *MenuBar)
{
MenuBar->_ReservedMenuBar4();
}
*/
/***********************************************************************
* Method: BMenuBar::operator=
* Params: const BMenuBar &
* Returns: BMenuBar &
* Effects:
***********************************************************************/
/*BMenuBar &
BMenuBar_operator=(BMenuBar *MenuBar, const BMenuBar &)
{
return MenuBar->operator=();
}
*/
/***********************************************************************
* Method: BMenuBar::StartMenuBar
* Params: int32 menuIndex, bool sticky, bool show_menu, BRect *special_rect
* Returns: void
* Effects:
***********************************************************************/
/*void
BMenuBar_StartMenuBar(BMenuBar *MenuBar, int32 menuIndex, bool sticky, bool show_menu, BRect *special_rect)
{
MenuBar->StartMenuBar(menuIndex, sticky, show_menu, special_rect);
}
*/
/***********************************************************************
* Method: BMenuBar::TrackTask
* Params: void *arg
* Returns: long
* Effects:
***********************************************************************/
/*long
BMenuBar_TrackTask(BMenuBar *MenuBar, void *arg)
{
return MenuBar->TrackTask(arg);
}
*/
/***********************************************************************
* Method: BMenuBar::Track
* Params: int32 *action, int32 startIndex, bool showMenu
* Returns: BMenuItem *
* Effects:
***********************************************************************/
/*BMenuItem *
BMenuBar_Track(BMenuBar *MenuBar, int32 *action, int32 startIndex, bool showMenu)
{
return MenuBar->Track(action, startIndex, showMenu);
}
*/
/***********************************************************************
* Method: BMenuBar::StealFocus
* Params:
* Returns: void
* Effects:
***********************************************************************/
/*void
BMenuBar_StealFocus(BMenuBar *MenuBar)
{
MenuBar->StealFocus();
}
*/
/***********************************************************************
* Method: BMenuBar::RestoreFocus
* Params:
* Returns: void
* Effects:
***********************************************************************/
/*void
BMenuBar_RestoreFocus(BMenuBar *MenuBar)
{
MenuBar->RestoreFocus();
}
*/
/***********************************************************************
* Method: BMenuBar::InitData
* Params: menu_layout layout
* Returns: void
* Effects:
***********************************************************************/
/*void
BMenuBar_InitData(BMenuBar *MenuBar, menu_layout layout)
{
MenuBar->InitData(layout);
}
*/
#if defined(__cplusplus)
}
#endif
#endif /* _MENUBAR_CPP_ */

View File

@@ -1,433 +0,0 @@
/* BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _MENUITEM_CPP_
#define _MENUITEM_CPP_
/***********************************************************************
* AUTHOR: nobody <baron>
* FILE: MenuItem.cpp
* DATE: Sat Jan 11 18:24:08 2003
* DESCR:
***********************************************************************/
#include "MenuItem.h"
#include "menuitem.h"
#include <beobj.h>
BPMenuItem::BPMenuItem(TPasObject PasObject, const char *label, BMessage *message, char shortcut = 0, uint32 modifiers = 0)
:BMenuItem(label, message, shortcut, modifiers),
BPasObject(PasObject)
{
}
BPMenuItem::BPMenuItem(TPasObject PasObject, BMenu *submenu, BMessage *message = NULL)
:BMenuItem(submenu, message),
BPasObject(PasObject)
{
}
BPMenuItem::BPMenuItem(TPasObject PasObject, BMessage *data)
:BMenuItem(data),
BPasObject(PasObject)
{
}
void BPMenuItem::Draw(void)
{
BMenuItem::Draw();
}
void BPMenuItem::DrawContent(void)
{
BMenuItem::DrawContent();
}
void BPMenuItem::GetContentSize(float *width, float *height)
{
BMenuItem::GetContentSize(width, height);
}
void BPMenuItem::TruncateLabel(float max, char *new_label)
{
BMenuItem::TruncateLabel(max, new_label);
}
void BPMenuItem::Highlight(bool on)
{
BMenuItem::Highlight(on);
}
bool BPMenuItem::IsSelected() const
{
return BMenuItem::IsSelected();
}
BPoint BPMenuItem::ContentLocation() const
{
return BMenuItem::ContentLocation();
}
BPSeparatorItem::BPSeparatorItem(TPasObject PasObject)
:BSeparatorItem(),
BPMenuItem(PasObject, "", NULL),
BPasObject(PasObject)
{
}
BPSeparatorItem::BPSeparatorItem(TPasObject PasObject, BMessage *data)
:BSeparatorItem(data),
BPMenuItem(PasObject, data),
BPasObject(PasObject)
{
}
void BPSeparatorItem::Draw(void)
{
BSeparatorItem::Draw();
}
void BPSeparatorItem::DrawContent(void)
{
BSeparatorItem::DrawContent();
}
#if defined(__cplusplus)
extern "C" {
#endif
/***********************************************************************
* Method: BMenuItem::BMenuItem
* Params: const char *label, BMessage *message, char shortcut, uint32 modifiers
* Effects:
***********************************************************************/
TCPlusObject BMenuItem_Create(TPasObject PasObject, const char *label, BMessage *message, char shortcut, uint32 modifiers)
{
return new BPMenuItem(PasObject, label, message, shortcut, modifiers);
}
/***********************************************************************
* Method: BMenuItem::BMenuItem
* Params: BMenu *menu, BMessage *message
* Effects:
***********************************************************************/
TCPlusObject BMenuItem_Create_1
(TPasObject PasObject, BMenu *menu, BMessage *message)
{
return new BPMenuItem(PasObject, menu, message);
}
/***********************************************************************
* Method: BMenuItem::BMenuItem
* Params: BMessage *data
* Effects:
***********************************************************************/
TCPlusObject BMenuItem_Create_2
(TPasObject PasObject, BMessage *data)
{
return new BPMenuItem(PasObject, data);
}
/***********************************************************************
* Method: BMenuItem::~BMenuItem
* Params:
* Effects:
***********************************************************************/
void BMenuItem_Free(BMenuItem *MenuItem)
{
delete MenuItem;
}
/***********************************************************************
* Method: BMenuItem::Instantiate
* Params: BMessage *data
* Returns: BArchivable *
* Effects:
***********************************************************************/
BArchivable *
BMenuItem_Instantiate(BMenuItem *MenuItem, BMessage *data)
{
return MenuItem->Instantiate(data);
}
/***********************************************************************
* Method: BMenuItem::Archive
* Params: BMessage *data, bool deep
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BMenuItem_Archive(BMenuItem *MenuItem, BMessage *data, bool deep)
{
return MenuItem->Archive(data, deep);
}
/***********************************************************************
* Method: BMenuItem::SetLabel
* Params: const char *name
* Returns: void
* Effects:
***********************************************************************/
void
BMenuItem_SetLabel(BMenuItem *MenuItem, const char *name)
{
MenuItem->SetLabel(name);
}
/***********************************************************************
* Method: BMenuItem::SetEnabled
* Params: bool state
* Returns: void
* Effects:
***********************************************************************/
void
BMenuItem_SetEnabled(BMenuItem *MenuItem, bool state)
{
MenuItem->SetEnabled(state);
}
/***********************************************************************
* Method: BMenuItem::SetMarked
* Params: bool state
* Returns: void
* Effects:
***********************************************************************/
void
BMenuItem_SetMarked(BMenuItem *MenuItem, bool state)
{
MenuItem->SetMarked(state);
}
/***********************************************************************
* Method: BMenuItem::SetTrigger
* Params: char ch
* Returns: void
* Effects:
***********************************************************************/
void
BMenuItem_SetTrigger(BMenuItem *MenuItem, char ch)
{
MenuItem->SetTrigger(ch);
}
/***********************************************************************
* Method: BMenuItem::SetShortcut
* Params: char ch, uint32 modifiers
* Returns: void
* Effects:
***********************************************************************/
void
BMenuItem_SetShortcut(BMenuItem *MenuItem, char ch, uint32 modifiers)
{
MenuItem->SetShortcut(ch, modifiers);
}
/***********************************************************************
* Method: BMenuItem::Label
* Params:
* Returns: const char *
* Effects:
***********************************************************************/
const char *
BMenuItem_Label(BMenuItem *MenuItem)
{
return MenuItem->Label();
}
/***********************************************************************
* Method: BMenuItem::IsEnabled
* Params:
* Returns: bool
* Effects:
***********************************************************************/
bool
BMenuItem_IsEnabled(BMenuItem *MenuItem)
{
return MenuItem->IsEnabled();
}
/***********************************************************************
* Method: BMenuItem::IsMarked
* Params:
* Returns: bool
* Effects:
***********************************************************************/
bool
BMenuItem_IsMarked(BMenuItem *MenuItem)
{
return MenuItem->IsMarked();
}
/***********************************************************************
* Method: BMenuItem::Trigger
* Params:
* Returns: char
* Effects:
***********************************************************************/
char
BMenuItem_Trigger(BMenuItem *MenuItem)
{
return MenuItem->Trigger();
}
/***********************************************************************
* Method: BMenuItem::Shortcut
* Params: uint32 *modifiers
* Returns: char
* Effects:
***********************************************************************/
char
BMenuItem_Shortcut(BMenuItem *MenuItem, uint32 *modifiers)
{
return MenuItem->Shortcut(modifiers);
}
/***********************************************************************
* Method: BMenuItem::Submenu
* Params:
* Returns: BMenu *
* Effects:
***********************************************************************/
BMenu *
BMenuItem_Submenu(BMenuItem *MenuItem)
{
return MenuItem->Submenu();
}
/***********************************************************************
* Method: BMenuItem::Menu
* Params:
* Returns: BMenu *
* Effects:
***********************************************************************/
BMenu *
BMenuItem_Menu(BMenuItem *MenuItem)
{
return MenuItem->Menu();
}
/***********************************************************************
* Method: BMenuItem::Frame
* Params:
* Returns: BRect
* Effects:
***********************************************************************/
BRect
BMenuItem_Frame(BMenuItem *MenuItem)
{
return MenuItem->Frame();
}
/***********************************************************************
* Method: BSeparatorItem::BSeparatorItem
* Params:
* Effects:
***********************************************************************/
TCPlusObject BSeparatorItem_Create(TPasObject PasObject)
{
return new BPSeparatorItem(PasObject);
}
/***********************************************************************
* Method: BSeparatorItem::BSeparatorItem
* Params: BMessage *data
* Effects:
***********************************************************************/
TCPlusObject BSeparatorItem_Create_1
(TPasObject PasObject, BMessage *data)
{
return new BPSeparatorItem(PasObject, data);
}
/***********************************************************************
* Method: BSeparatorItem::~BSeparatorItem
* Params:
* Effects:
***********************************************************************/
void BSeparatorItem_Free(BSeparatorItem *SeparatorItem)
{
delete SeparatorItem;
}
/***********************************************************************
* Method: BSeparatorItem::Archive
* Params: BMessage *data, bool deep
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BSeparatorItem_Archive(BSeparatorItem *SeparatorItem, BMessage *data, bool deep)
{
return SeparatorItem->Archive(data, deep);
}
/***********************************************************************
* Method: BSeparatorItem::Instantiate
* Params: BMessage *data
* Returns: BArchivable *
* Effects:
***********************************************************************/
BArchivable *
BSeparatorItem_Instantiate(BSeparatorItem *SeparatorItem, BMessage *data)
{
return SeparatorItem->Instantiate(data);
}
/***********************************************************************
* Method: BSeparatorItem::SetEnabled
* Params: bool state
* Returns: void
* Effects:
***********************************************************************/
void
BSeparatorItem_SetEnabled(BSeparatorItem *SeparatorItem, bool state)
{
SeparatorItem->SetEnabled(state);
}
#if defined(__cplusplus)
}
#endif
#endif /* _MENUITEM_CPP_ */

View File

@@ -1,755 +0,0 @@
/* BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
Eric Jourde
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _OUTLINELISTVIEW_CPP_
#define _OUTLINELISTVIEW_CPP_
#include "OutlineListView.h"
#include "view.h"
#include <beobj.h>
#include "listview.h"
#if defined(__cplusplus)
extern "C" {
#endif
#if defined(__cplusplus)
}
#endif
class BPOutlineListView : public BOutlineListView, virtual public BPListView
{
public:
BPOutlineListView(TPasObject PasObject,BRect frame,
const char * name,
list_view_type type = B_SINGLE_SELECTION_LIST,
uint32 resizeMask = B_FOLLOW_LEFT | B_FOLLOW_TOP,
uint32 flags = B_WILL_DRAW | B_FRAME_EVENTS
| B_NAVIGABLE);
BPOutlineListView(TPasObject PasObject,BMessage *data);
static BArchivable *Instantiate(BMessage *data);
//virtual status_t Archive(BMessage *data, bool deep = true) const;
virtual void MouseDown(BPoint where);
virtual void KeyDown(const char *bytes, int32 numBytes);
//virtual void FrameMoved(BPoint new_position);
virtual void FrameResized(float new_width, float new_height);
virtual void MouseUp(BPoint where);
//virtual void ResizeToPreferred();
//virtual void GetPreferredSize(float *width, float *height);
//virtual void MakeFocus(bool state = true);
virtual void AllAttached();
virtual void AllDetached();
virtual void DetachedFromWindow();
//virtual bool DoMiscellaneous(MiscCode code, MiscData * data);
virtual void MessageReceived(BMessage *);
};
BPOutlineListView::BPOutlineListView(TPasObject PasObject,BMessage *data)
:BOutlineListView(data),
BPListView(PasObject, data),
BPView(PasObject, data),
BPHandler(PasObject, data),
BPasObject(PasObject)
{
}
BPOutlineListView::BPOutlineListView(TPasObject PasObject,BRect frame,
const char * name,
list_view_type type = B_SINGLE_SELECTION_LIST,
uint32 resizeMask = B_FOLLOW_LEFT | B_FOLLOW_TOP,
uint32 flags = B_WILL_DRAW | B_FRAME_EVENTS
| B_NAVIGABLE)
:BOutlineListView(frame,name,type,resizeMask,flags),
BPListView(PasObject, frame,name,type,resizeMask,flags),
BPView(PasObject, frame,name,resizeMask,flags),
BPHandler(PasObject, name),
BPasObject(PasObject)
{
}
void BPOutlineListView::MessageReceived(BMessage *message)
{
MessageReceived_hookCall(message);
BOutlineListView::MessageReceived(message);
}
void BPOutlineListView::AllAttached(void)
{
//AllAttached_hookCall();
BOutlineListView::AllAttached();
}
void BPOutlineListView::AllDetached(void)
{
//AllDetached_hookCall();
BOutlineListView::AllDetached();
}
void BPOutlineListView::KeyDown(const char *bytes, int32 numBytes)
{
BOutlineListView::KeyDown(bytes, numBytes);
}
void BPOutlineListView::FrameResized(float width, float height)
{
FrameResized_hookCall(width, height);
BOutlineListView::FrameResized(width, height);
}
void BPOutlineListView::DetachedFromWindow(void)
{
BOutlineListView::DetachedFromWindow();
}
void BPOutlineListView::MouseDown(BPoint point)
{
BOutlineListView::MouseDown(point);
}
void BPOutlineListView::MouseUp(BPoint point)
{
BOutlineListView::MouseUp(point);
}
#if defined(__cplusplus)
extern "C" {
#endif
/***********************************************************************
* AUTHOR: nobody <baron>
* FILE: OutlineListView.cpp
* DATE: Tue Mar 4 20:12:11 2003
* DESCR:
***********************************************************************/
/***********************************************************************
* Method: BOutlineListView::BOutlineListView
* Params: BMessage *data
* Effects:
***********************************************************************/
TCPlusObject BOutlineListView_Create(TPasObject PasObject,BRect frame,
const char * name,
list_view_type type = B_SINGLE_SELECTION_LIST,
uint32 resizeMask = B_FOLLOW_LEFT | B_FOLLOW_TOP,
uint32 flags = B_WILL_DRAW | B_FRAME_EVENTS
| B_NAVIGABLE)
{
return new BPOutlineListView(PasObject, frame,name,type,resizeMask,flags);
}
TCPlusObject BOutlineListView_Create_1(TPasObject PasObject, BMessage *data)
{
return new BPOutlineListView(PasObject, data);
}
/***********************************************************************
* Method: BOutlineListView::~BOutlineListView
* Params:
* Effects:
***********************************************************************/
void BOutlineListView_Free(BOutlineListView *OutlineListView)
{
delete OutlineListView;
}
/***********************************************************************
* Method: BOutlineListView::Instantiate
* Params: BMessage *data
* Returns: BArchivable *
* Effects:
***********************************************************************/
BArchivable *
BOutlineListView_Instantiate(BOutlineListView *OutlineListView, BMessage *data)
{
return OutlineListView->Instantiate(data);
}
/***********************************************************************
* Method: BOutlineListView::Archive
* Params: BMessage *data, bool deep
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BOutlineListView_Archive(BOutlineListView *OutlineListView, BMessage *data, bool deep)
{
return OutlineListView->Archive(data, deep);
}
/***********************************************************************
* Method: BOutlineListView::MouseDown
* Params: BPoint where
* Returns: void
* Effects:
***********************************************************************/
void
BOutlineListView_MouseDown(BOutlineListView *OutlineListView, BPoint where)
{
OutlineListView->MouseDown(where);
}
/***********************************************************************
* Method: BOutlineListView::KeyDown
* Params: const char *bytes, int32 numBytes
* Returns: void
* Effects:
***********************************************************************/
void
BOutlineListView_KeyDown(BOutlineListView *OutlineListView, const char *bytes, int32 numBytes)
{
OutlineListView->KeyDown(bytes, numBytes);
}
/***********************************************************************
* Method: BOutlineListView::FrameMoved
* Params: BPoint new_position
* Returns: void
* Effects:
***********************************************************************/
void
BOutlineListView_FrameMoved(BOutlineListView *OutlineListView, BPoint new_position)
{
OutlineListView->FrameMoved(new_position);
}
/***********************************************************************
* Method: BOutlineListView::FrameResized
* Params: float new_width, float new_height
* Returns: void
* Effects:
***********************************************************************/
void
BOutlineListView_FrameResized(BOutlineListView *OutlineListView, float new_width, float new_height)
{
OutlineListView->FrameResized(new_width, new_height);
}
/***********************************************************************
* Method: BOutlineListView::MouseUp
* Params: BPoint where
* Returns: void
* Effects:
***********************************************************************/
void
BOutlineListView_MouseUp(BOutlineListView *OutlineListView, BPoint where)
{
OutlineListView->MouseUp(where);
}
/***********************************************************************
* Method: BOutlineListView::AddUnder
* Params: BListItem *item, BListItem *underItem
* Returns: bool
* Effects:
***********************************************************************/
bool
BOutlineListView_AddUnder(BOutlineListView *OutlineListView, BListItem *item, BListItem *underItem)
{
return OutlineListView->AddUnder(item, underItem);
}
/***********************************************************************
* Method: BOutlineListView::AddItem
* Params: BListItem *item
* Returns: bool
* Effects:
***********************************************************************/
bool
BOutlineListView_AddItem(BOutlineListView *OutlineListView, BListItem *item)
{
return OutlineListView->AddItem(item);
}
/***********************************************************************
* Method: BOutlineListView::AddItem
* Params: BListItem *item, int32 fullListIndex
* Returns: bool
* Effects:
***********************************************************************/
bool
BOutlineListView_AddItem_1
(BOutlineListView *OutlineListView, BListItem *item, int32 fullListIndex)
{
return OutlineListView->AddItem(item, fullListIndex);
}
/***********************************************************************
* Method: BOutlineListView::AddList
* Params: BList *newItems
* Returns: bool
* Effects:
***********************************************************************/
bool
BOutlineListView_AddList(BOutlineListView *OutlineListView, BList *newItems)
{
return OutlineListView->AddList(newItems);
}
/***********************************************************************
* Method: BOutlineListView::AddList
* Params: BList *newItems, int32 fullListIndex
* Returns: bool
* Effects:
***********************************************************************/
bool
BOutlineListView_AddList_1
(BOutlineListView *OutlineListView, BList *newItems, int32 fullListIndex)
{
return OutlineListView->AddList(newItems, fullListIndex);
}
/***********************************************************************
* Method: BOutlineListView::RemoveItem
* Params: BListItem *item
* Returns: bool
* Effects:
***********************************************************************/
bool
BOutlineListView_RemoveItem(BOutlineListView *OutlineListView, BListItem *item)
{
return OutlineListView->RemoveItem(item);
}
/***********************************************************************
* Method: BOutlineListView::RemoveItem
* Params: int32 fullListIndex
* Returns: BListItem *
* Effects:
***********************************************************************/
BListItem *
BOutlineListView_RemoveItem_1
(BOutlineListView *OutlineListView, int32 fullListIndex)
{
return OutlineListView->RemoveItem(fullListIndex);
}
/***********************************************************************
* Method: BOutlineListView::RemoveItems
* Params: int32 fullListIndex, int32 count
* Returns: bool
* Effects:
***********************************************************************/
bool
BOutlineListView_RemoveItems
(BOutlineListView *OutlineListView, int32 fullListIndex, int32 count)
{
return OutlineListView->RemoveItems(fullListIndex, count);
}
/***********************************************************************
* Method: BOutlineListView::FullListItemAt
* Params: int32 fullListIndex
* Returns: BListItem *
* Effects:
***********************************************************************/
BListItem *
BOutlineListView_FullListItemAt(BOutlineListView *OutlineListView, int32 fullListIndex)
{
return OutlineListView->FullListItemAt(fullListIndex);
}
/***********************************************************************
* Method: BOutlineListView::FullListIndexOf
* Params: BPoint point
* Returns: int32
* Effects:
***********************************************************************/
int32
BOutlineListView_FullListIndexOf(BOutlineListView *OutlineListView, BPoint point)
{
return OutlineListView->FullListIndexOf(point);
}
/***********************************************************************
* Method: BOutlineListView::FullListIndexOf
* Params: BListItem *item
* Returns: int32
* Effects:
***********************************************************************/
int32
BOutlineListView_FullListIndexOf_1
(BOutlineListView *OutlineListView, BListItem *item)
{
return OutlineListView->FullListIndexOf(item);
}
/***********************************************************************
* Method: BOutlineListView::FullListFirstItem
* Params:
* Returns: BListItem *
* Effects:
***********************************************************************/
BListItem *
BOutlineListView_FullListFirstItem(BOutlineListView *OutlineListView)
{
return OutlineListView->FullListFirstItem();
}
/***********************************************************************
* Method: BOutlineListView::FullListLastItem
* Params:
* Returns: BListItem *
* Effects:
***********************************************************************/
BListItem *
BOutlineListView_FullListLastItem(BOutlineListView *OutlineListView)
{
return OutlineListView->FullListLastItem();
}
/***********************************************************************
* Method: BOutlineListView::FullListHasItem
* Params: BListItem *item
* Returns: bool
* Effects:
***********************************************************************/
bool
BOutlineListView_FullListHasItem(BOutlineListView *OutlineListView, BListItem *item)
{
return OutlineListView->FullListHasItem(item);
}
/***********************************************************************
* Method: BOutlineListView::FullListCountItems
* Params:
* Returns: int32
* Effects:
***********************************************************************/
int32
BOutlineListView_FullListCountItems(BOutlineListView *OutlineListView)
{
return OutlineListView->FullListCountItems();
}
/***********************************************************************
* Method: BOutlineListView::FullListCurrentSelection
* Params: int32 index
* Returns: int32
* Effects:
***********************************************************************/
int32
BOutlineListView_FullListCurrentSelection(BOutlineListView *OutlineListView, int32 index)
{
return OutlineListView->FullListCurrentSelection(index);
}
/***********************************************************************
* Method: BOutlineListView::MakeEmpty
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BOutlineListView_MakeEmpty(BOutlineListView *OutlineListView)
{
OutlineListView->MakeEmpty();
}
/***********************************************************************
* Method: BOutlineListView::FullListIsEmpty
* Params:
* Returns: bool
* Effects:
***********************************************************************/
bool
BOutlineListView_FullListIsEmpty(BOutlineListView *OutlineListView)
{
return OutlineListView->FullListIsEmpty();
}
/***********************************************************************
* Method: BOutlineListView::Superitem
* Params: const BListItem *item
* Returns: BListItem *
* Effects:
***********************************************************************/
BListItem *
BOutlineListView_Superitem(BOutlineListView *OutlineListView, const BListItem *item)
{
return OutlineListView->Superitem(item);
}
/***********************************************************************
* Method: BOutlineListView::Expand
* Params: BListItem *item
* Returns: void
* Effects:
***********************************************************************/
void
BOutlineListView_Expand(BOutlineListView *OutlineListView, BListItem *item)
{
OutlineListView->Expand(item);
}
/***********************************************************************
* Method: BOutlineListView::Collapse
* Params: BListItem *item
* Returns: void
* Effects:
***********************************************************************/
void
BOutlineListView_Collapse(BOutlineListView *OutlineListView, BListItem *item)
{
OutlineListView->Collapse(item);
}
/***********************************************************************
* Method: BOutlineListView::IsExpanded
* Params: int32 fullListIndex
* Returns: bool
* Effects:
***********************************************************************/
bool
BOutlineListView_IsExpanded(BOutlineListView *OutlineListView, int32 fullListIndex)
{
return OutlineListView->IsExpanded(fullListIndex);
}
/***********************************************************************
* Method: BOutlineListView::ResolveSpecifier
* Params: BMessage *msg, int32 index, BMessage *specifier, int32 form, const char *property
* Returns: BHandler *
* Effects:
***********************************************************************/
BHandler *
BOutlineListView_ResolveSpecifier(BOutlineListView *OutlineListView, BMessage *msg, int32 index, BMessage *specifier, int32 form, const char *property)
{
return OutlineListView->ResolveSpecifier(msg, index, specifier, form, property);
}
/***********************************************************************
* Method: BOutlineListView::GetSupportedSuites
* Params: BMessage *data
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BOutlineListView_GetSupportedSuites(BOutlineListView *OutlineListView, BMessage *data)
{
return OutlineListView->GetSupportedSuites(data);
}
/***********************************************************************
* Method: BOutlineListView::Perform
* Params: perform_code d, void *arg
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BOutlineListView_Perform(BOutlineListView *OutlineListView, perform_code d, void *arg)
{
return OutlineListView->Perform(d, arg);
}
/***********************************************************************
* Method: BOutlineListView::ResizeToPreferred
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BOutlineListView_ResizeToPreferred(BOutlineListView *OutlineListView)
{
OutlineListView->ResizeToPreferred();
}
/***********************************************************************
* Method: BOutlineListView::GetPreferredSize
* Params: float *width, float *height
* Returns: void
* Effects:
***********************************************************************/
void
BOutlineListView_GetPreferredSize(BOutlineListView *OutlineListView, float *width, float *height)
{
OutlineListView->GetPreferredSize(width, height);
}
/***********************************************************************
* Method: BOutlineListView::MakeFocus
* Params: bool state
* Returns: void
* Effects:
***********************************************************************/
void
BOutlineListView_MakeFocus(BOutlineListView *OutlineListView, bool state)
{
OutlineListView->MakeFocus(state);
}
/***********************************************************************
* Method: BOutlineListView::AllAttached
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BOutlineListView_AllAttached(BOutlineListView *OutlineListView)
{
OutlineListView->AllAttached();
}
/***********************************************************************
* Method: BOutlineListView::AllDetached
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BOutlineListView_AllDetached(BOutlineListView *OutlineListView)
{
OutlineListView->AllDetached();
}
/***********************************************************************
* Method: BOutlineListView::DetachedFromWindow
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BOutlineListView_DetachedFromWindow(BOutlineListView *OutlineListView)
{
OutlineListView->DetachedFromWindow();
}
/***********************************************************************
* Method: BOutlineListView::CountItemsUnder
* Params: BListItem *under, bool oneLevelOnly
* Returns: int32
* Effects:
***********************************************************************/
int32
BOutlineListView_CountItemsUnder(BOutlineListView *OutlineListView, BListItem *under, bool oneLevelOnly)
{
return OutlineListView->CountItemsUnder(under, oneLevelOnly);
}
/***********************************************************************
* Method: BOutlineListView::ItemUnderAt
* Params: BListItem *underItem, bool oneLevelOnly, int32 index
* Returns: BListItem *
* Effects:
***********************************************************************/
BListItem *
BOutlineListView_ItemUnderAt(BOutlineListView *OutlineListView, BListItem *underItem, bool oneLevelOnly, int32 index)
{
return OutlineListView->ItemUnderAt(underItem, oneLevelOnly, index);
}
/***********************************************************************
* Method: BOutlineListView::DoMiscellaneous
* Params: MiscCode code, MiscData *data
* Returns: bool
* Effects:
***********************************************************************/
/*bool
BOutlineListView_DoMiscellaneous(BOutlineListView *OutlineListView, MiscCode code, MiscData *data)
{
return OutlineListView->DoMiscellaneous(code, data);
}
*/
/***********************************************************************
* Method: BOutlineListView::MessageReceived
* Params: BMessage *
* Returns: void
* Effects:
***********************************************************************/
/*void
BOutlineListView_MessageReceived(BOutlineListView *OutlineListView, BMessage *)
{
OutlineListView->MessageReceived();
}*/
#if defined(__cplusplus)
}
#endif
#endif /* _OUTLINELISTVIEW_CPP_ */

View File

@@ -1,84 +0,0 @@
/* BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _POINT_CPP_
#define _POINT_CPP_
#include <Point.h>
#include <Rect.h>
#include <point.h>
#include <beobj.h>
BPPoint::BPPoint(TPasObject PasObject, float x, float y) : BPoint(x, y), BPasObject(PasObject)
{
}
BPPoint::BPPoint(TPasObject PasObject, const BPoint& point) : BPoint(point), BPasObject(PasObject)
{
}
BPPoint::BPPoint(TPasObject PasObject) : BPoint(), BPasObject(PasObject)
{
}
#if defined(__cplusplus)
extern "C" {
#endif
TCPlusObject BPoint_Create_1(TPasObject PasObject, float x, float y)
{
return new BPPoint(PasObject, x, y);
}
TCPlusObject BPoint_Create_2(TPasObject PasObject, const BPoint& point)
{
return new BPPoint(PasObject, point);
}
TCPlusObject BPoint_Create_3(TPasObject PasObject)
{
return new BPPoint(PasObject);
}
void BPoint_Free(TCPlusObject Point)
{
delete Point;
}
void BPoint_ConstrainTo(TCPlusObject Point, BRect rect)
{
reinterpret_cast<BPoint*>(Point)->ConstrainTo(rect);
}
void BPoint_PrintToStream(TCPlusObject Point)
{
reinterpret_cast<BPoint*>(Point)->PrintToStream();
}
void BPoint_Set(TCPlusObject Point, float x, float y)
{
reinterpret_cast<BPoint*>(Point)->Set(x, y);
}
#if defined(__cplusplus)
}
#endif
#endif _POINT_CPP_ /* _POINT_CPP_ */

View File

@@ -1,628 +0,0 @@
/* BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2003 Olivier Coursiere
Eric Jourde
Oscar Lesta
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _RADIOBUTTON_CPP_
#define _RADIOBUTTON_CPP_
/***********************************************************************
* AUTHOR: nobody <baron>
* FILE: RadioButton.cpp
* DATE: Mon Jan 20 02:30:54 2003
* DESCR:
***********************************************************************/
#include "RadioButton.h"
#include "control.h"
#include <beobj.h>
#if defined(__cplusplus)
extern "C" {
#endif
#if defined(__cplusplus)
}
#endif
class BPRadioButton : public BRadioButton, virtual public BPControl {
public:
BPRadioButton(TPasObject PasObject,
BRect frame,
const char *name,
const char *label,
BMessage *message,
uint32 resizMask = B_FOLLOW_LEFT | B_FOLLOW_TOP,
uint32 flags = B_WILL_DRAW | B_NAVIGABLE);
//virtual ~BRadioButton();
/* Archiving */
BPRadioButton(TPasObject PasObject, BMessage *data);
//static BArchivable *Instantiate(BMessage *data);
//virtual status_t Archive(BMessage *data, bool deep = true) const;
virtual void Draw(BRect updateRect);
virtual void MouseDown(BPoint where);
virtual void AttachedToWindow();
virtual void KeyDown(const char *bytes, int32 numBytes);
virtual void SetValue(int32 value);
virtual void GetPreferredSize(float *width, float *height);
virtual void ResizeToPreferred();
//virtual status_t Invoke(BMessage *msg = NULL);
virtual void MessageReceived(BMessage *msg);
virtual void WindowActivated(bool state);
virtual void MouseUp(BPoint pt);
virtual void MouseMoved(BPoint pt, uint32 code, const BMessage *msg);
virtual void DetachedFromWindow();
virtual void FrameMoved(BPoint new_position);
virtual void FrameResized(float new_width, float new_height);
/*
virtual BHandler *ResolveSpecifier(BMessage *msg,
int32 index,
BMessage *specifier,
int32 form,
const char *property);
*/
//virtual void MakeFocus(bool state = true);
virtual void AllAttached();
// virtual void AllDetached();
// virtual status_t GetSupportedSuites(BMessage *data);
/*----- Private or reserved -----------------------------------------*/
//virtual status_t Perform(perform_code d, void *arg);
private:
/*friend status_t _init_interface_kit_();
virtual void _ReservedRadioButton1();
virtual void _ReservedRadioButton2();
BRadioButton &operator=(const BRadioButton &);
static BBitmap *sBitmaps[2][3];
bool fOutlined;
uint32 _reserved[2];*/
};
BPRadioButton::BPRadioButton(TPasObject PasObject,
BRect frame,
const char *name,
const char *label,
BMessage *message,
uint32 rmask = B_FOLLOW_LEFT | B_FOLLOW_TOP,
uint32 flags = B_WILL_DRAW | B_NAVIGABLE)
:
BRadioButton(frame,name,label,
message,rmask,flags),
BPControl(PasObject, frame, name, label, message,
rmask, flags),
BPView(PasObject, frame, name, rmask, flags),
BPHandler(PasObject, name),
BPasObject(PasObject)
{
}
BPRadioButton::BPRadioButton(TPasObject PasObject, BMessage *archive)
:BRadioButton(archive),
BPControl(PasObject, archive),
BPView(PasObject, archive),
BPHandler(PasObject, archive),
BPasObject(PasObject)
{
}
void BPRadioButton::MessageReceived(BMessage *message)
{
MessageReceived_hookCall(message);
BRadioButton::MessageReceived(message);
}
void BPRadioButton::Draw(BRect updateRect)
{
BRadioButton::Draw(updateRect);
Draw_hookCall(updateRect);
}
void BPRadioButton::AttachedToWindow(void)
{
BRadioButton::AttachedToWindow();
AttachedToWindow_hookCall();
}
void BPRadioButton::WindowActivated(bool active)
{
BRadioButton::WindowActivated(active);
}
void BPRadioButton::KeyDown(const char *bytes, int32 numBytes)
{
BRadioButton::KeyDown(bytes, numBytes);
}
void BPRadioButton::AllAttached(void)
{
BRadioButton::AllAttached();
}
/*
void BPRadioButton::AllDetached(void)
{
BRadioButton::AllDetached();
}
*/
void BPRadioButton::DetachedFromWindow(void)
{
BRadioButton::DetachedFromWindow();
}
void BPRadioButton::FrameMoved(BPoint parentPoint)
{
BRadioButton::FrameMoved(parentPoint);
}
void BPRadioButton::FrameResized(float width, float height)
{
BRadioButton::FrameResized(width, height);
}
void BPRadioButton::GetPreferredSize(float *width, float *height)
{
BRadioButton::GetPreferredSize(width, height);
}
void BPRadioButton::ResizeToPreferred(void)
{
BRadioButton::ResizeToPreferred();
}
void BPRadioButton::MouseDown(BPoint point)
{
BRadioButton::MouseDown(point);
}
void BPRadioButton::MouseMoved(BPoint point, uint32 transit, const BMessage *message)
{
BRadioButton::MouseMoved(point, transit, message);
}
void BPRadioButton::MouseUp(BPoint point)
{
BRadioButton::MouseUp(point);
}
//void BPButton::TargetedByScrollView(BScrollView *scroller)
//{
// BButton::TargetedByScrollView(scroller);
//}
void BPRadioButton::SetValue(int32 value)
{
BRadioButton::SetValue(value);
}
#if defined(__cplusplus)
extern "C" {
#endif
/***********************************************************************
* Method: BRadioButton::~BRadioButton
* Params:
* Effects:
***********************************************************************/
void BRadioButton_FREE(BRadioButton *RadioButton)
{
delete RadioButton;
}
TCPlusObject BRadioButton_Create(TPasObject PasObject, BRect frame,
const char *name,
const char *label,
BMessage *message,
uint32 resizeMask ,
uint32 flags )
{
return new BPRadioButton( PasObject, frame,
name,
label,
message,
resizeMask ,
flags );
}
/***********************************************************************
* Method: BRadioButton::BRadioButton
* Params: BMessage *data
* Effects:
***********************************************************************/
TCPlusObject BRadioButton_Create_1(TPasObject PasObject, BMessage *data)
{
return new BPRadioButton(PasObject, data);
}
/***********************************************************************
* Method: BRadioButton::~BRadioButton
* Params:
* Effects:
***********************************************************************/
/*BRadioButton_~BRadioButton(BRadioButton *RadioButton)
{
return RadioButton->~BRadioButton();
}
*/
/***********************************************************************
* Method: BRadioButton::Instantiate
* Params: BMessage *data
* Returns: BArchivable *
* Effects:
***********************************************************************/
BArchivable *
BRadioButton_Instantiate(BRadioButton *RadioButton, BMessage *data)
{
return RadioButton->Instantiate(data);
}
/***********************************************************************
* Method: BRadioButton::Archive
* Params: BMessage *data, bool deep
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BRadioButton_Archive(BRadioButton *RadioButton, BMessage *data, bool deep)
{
return RadioButton->Archive(data, deep);
}
/***********************************************************************
* Method: BRadioButton::Draw
* Params: BRect updateRect
* Returns: void
* Effects:
***********************************************************************/
void
BRadioButton_Draw(BRadioButton *RadioButton, BRect updateRect)
{
RadioButton->Draw(updateRect);
}
/***********************************************************************
* Method: BRadioButton::MouseDown
* Params: BPoint where
* Returns: void
* Effects:
***********************************************************************/
void
BRadioButton_MouseDown(BRadioButton *RadioButton, BPoint where)
{
RadioButton->MouseDown(where);
}
/***********************************************************************
* Method: BRadioButton::AttachedToWindow
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BRadioButton_AttachedToWindow(BRadioButton *RadioButton)
{
RadioButton->AttachedToWindow();
}
/***********************************************************************
* Method: BRadioButton::KeyDown
* Params: const char *bytes, int32 numBytes
* Returns: void
* Effects:
***********************************************************************/
void
BRadioButton_KeyDown(BRadioButton *RadioButton, const char *bytes, int32 numBytes)
{
RadioButton->KeyDown(bytes, numBytes);
}
/***********************************************************************
* Method: BRadioButton::SetValue
* Params: int32 value
* Returns: void
* Effects:
***********************************************************************/
void
BRadioButton_SetValue(BRadioButton *RadioButton, int32 value)
{
RadioButton->SetValue(value);
}
/***********************************************************************
* Method: BRadioButton::GetPreferredSize
* Params: float *width, float *height
* Returns: void
* Effects:
***********************************************************************/
void
BRadioButton_GetPreferredSize(BRadioButton *RadioButton, float *width, float *height)
{
RadioButton->GetPreferredSize(width, height);
}
/***********************************************************************
* Method: BRadioButton::ResizeToPreferred
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BRadioButton_ResizeToPreferred(BRadioButton *RadioButton)
{
RadioButton->ResizeToPreferred();
}
/***********************************************************************
* Method: BRadioButton::Invoke
* Params: BMessage *msg
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BRadioButton_Invoke(BRadioButton *RadioButton, BMessage *msg)
{
return RadioButton->Invoke(msg);
}
/***********************************************************************
* Method: BRadioButton::MessageReceived
* Params: BMessage *msg
* Returns: void
* Effects:
***********************************************************************/
void
BRadioButton_MessageReceived(BRadioButton *RadioButton, BMessage *msg)
{
RadioButton->MessageReceived(msg);
}
/***********************************************************************
* Method: BRadioButton::WindowActivated
* Params: bool state
* Returns: void
* Effects:
***********************************************************************/
void
BRadioButton_WindowActivated(BRadioButton *RadioButton, bool state)
{
RadioButton->WindowActivated(state);
}
/***********************************************************************
* Method: BRadioButton::MouseUp
* Params: BPoint pt
* Returns: void
* Effects:
***********************************************************************/
void
BRadioButton_MouseUp(BRadioButton *RadioButton, BPoint pt)
{
RadioButton->MouseUp(pt);
}
/***********************************************************************
* Method: BRadioButton::MouseMoved
* Params: BPoint pt, uint32 code, const BMessage *msg
* Returns: void
* Effects:
***********************************************************************/
void
BRadioButton_MouseMoved(BRadioButton *RadioButton, BPoint pt, uint32 code, const BMessage *msg)
{
RadioButton->MouseMoved(pt, code, msg);
}
/***********************************************************************
* Method: BRadioButton::DetachedFromWindow
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BRadioButton_DetachedFromWindow(BRadioButton *RadioButton)
{
RadioButton->DetachedFromWindow();
}
/***********************************************************************
* Method: BRadioButton::FrameMoved
* Params: BPoint new_position
* Returns: void
* Effects:
***********************************************************************/
void
BRadioButton_FrameMoved(BRadioButton *RadioButton, BPoint new_position)
{
RadioButton->FrameMoved(new_position);
}
/***********************************************************************
* Method: BRadioButton::FrameResized
* Params: float new_width, float new_height
* Returns: void
* Effects:
***********************************************************************/
void
BRadioButton_FrameResized(BRadioButton *RadioButton, float new_width, float new_height)
{
RadioButton->FrameResized(new_width, new_height);
}
/***********************************************************************
* Method: BRadioButton::ResolveSpecifier
* Params: BMessage *msg, int32 index, BMessage *specifier, int32 form, const char *property
* Returns: BHandler *
* Effects:
***********************************************************************/
BHandler *
BRadioButton_ResolveSpecifier(BRadioButton *RadioButton, BMessage *msg, int32 index, BMessage *specifier, int32 form, const char *property)
{
return RadioButton->ResolveSpecifier(msg, index, specifier, form, property);
}
/***********************************************************************
* Method: BRadioButton::MakeFocus
* Params: bool state
* Returns: void
* Effects:
***********************************************************************/
void
BRadioButton_MakeFocus(BRadioButton *RadioButton, bool state)
{
RadioButton->MakeFocus(state);
}
/***********************************************************************
* Method: BRadioButton::AllAttached
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BRadioButton_AllAttached(BRadioButton *RadioButton)
{
RadioButton->AllAttached();
}
/***********************************************************************
* Method: BRadioButton::AllDetached
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BRadioButton_AllDetached(BRadioButton *RadioButton)
{
RadioButton->AllDetached();
}
/***********************************************************************
* Method: BRadioButton::GetSupportedSuites
* Params: BMessage *data
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BRadioButton_GetSupportedSuites(BRadioButton *RadioButton, BMessage *data)
{
return RadioButton->GetSupportedSuites(data);
}
/***********************************************************************
* Method: BRadioButton::Perform
* Params: perform_code d, void *arg
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BRadioButton_Perform(BRadioButton *RadioButton, perform_code d, void *arg)
{
return RadioButton->Perform(d, arg);
}
/***********************************************************************
* Method: BRadioButton::_ReservedRadioButton1
* Params:
* Returns: void
* Effects:
***********************************************************************/
/*void
BRadioButton__ReservedRadioButton1(BRadioButton *RadioButton)
{
RadioButton->_ReservedRadioButton1();
}
*/
/***********************************************************************
* Method: BRadioButton::_ReservedRadioButton2
* Params:
* Returns: void
* Effects:
***********************************************************************/
/*void
BRadioButton__ReservedRadioButton2(BRadioButton *RadioButton)
{
RadioButton->_ReservedRadioButton2();
}
*/
/***********************************************************************
* Method: BRadioButton::operator=
* Params: const BRadioButton &
* Returns: BRadioButton &
* Effects:
***********************************************************************/
/*BRadioButton &
BRadioButton_operator=(BRadioButton *RadioButton, const BRadioButton &)
{
return RadioButton->operator=();
}
*/
#if defined(__cplusplus)
}
#endif
#endif /* _RADIOBUTTON_CPP_ */

View File

@@ -1,84 +0,0 @@
/* BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _RECT_CPP_
#define _RECT_CPP_
#include <Point.h>
#include <Rect.h>
#include <rect.h>
#include <beobj.h>
BPRect::BPRect(TPasObject PasObject) : BRect(), BPasObject(PasObject)
{
}
BPRect::BPRect(TPasObject PasObject, const BRect & rect) : BRect(rect), BPasObject(PasObject)
{
}
BPRect::BPRect(TPasObject PasObject, float l, float t, float r, float b) : BRect(l, t, r, b), BPasObject(PasObject)
{
}
BPRect::BPRect(TPasObject PasObject, BPoint leftTop, BPoint rightBottom) : BRect(leftTop, rightBottom), BPasObject(PasObject)
{
}
#if defined(__cplusplus)
extern "C" {
#endif
TCPlusObject BRect_Create_1(TPasObject PasObject)
{
return new BPRect(PasObject);
}
TCPlusObject BRect_Create_2(TPasObject PasObject, const BRect& rect)
{
return new BPRect(PasObject, rect);
}
TCPlusObject BRect_Create_3(TPasObject PasObject, float l, float t, float r, float b)
{
return new BPRect(PasObject, l, t, r, b);
}
TCPlusObject BRect_Create_4(TPasObject PasObject, BPoint leftTop, BPoint rightBottom)
{
return new BPRect(PasObject, leftTop, rightBottom);
}
void BRect_Free(TCPlusObject rect)
{
delete rect;
}
void BRect_PrintToStream(TCPlusObject rect)
{
reinterpret_cast<BRect*>(rect)->PrintToStream();
}
#if defined(__cplusplus)
}
#endif
#endif _RECT_CPP_ /* _RECT_CPP_ */

View File

@@ -1,635 +0,0 @@
/* BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
Eric Jourde
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _SCROLLBAR_CPP_
#define _SCROLLBAR_CPP_
/***********************************************************************
* AUTHOR: nobody <baron>
* FILE: StringView.cpp
* DATE: Mon Jan 13 21:52:29 2003
* DESCR:
***********************************************************************/
#include "ScrollBar.h"
#include "view.h"
#include <beobj.h>
#if defined(__cplusplus)
extern "C" {
#endif
#if defined(__cplusplus)
}
#endif
class BPScrollBar : public BScrollBar,virtual public BPView {
public:
BPScrollBar(TPasObject PasObject,
BRect frame,
const char *name,
BView *target,
float min,
float max,
orientation direction);
BPScrollBar(TPasObject PasObject,BMessage *data);
//static BArchivable *Instantiate(BMessage *data);
//virtual status_t Archive(BMessage *data, bool deep = true) const;
virtual void AttachedToWindow();
virtual void MessageReceived(BMessage *msg);
virtual void MouseDown(BPoint pt);
virtual void MouseUp(BPoint pt);
virtual void MouseMoved(BPoint pt, uint32 code, const BMessage *msg);
virtual void Draw(BRect updateRect);
virtual void FrameMoved(BPoint new_position);
virtual void FrameResized(float new_width, float new_height);
virtual void AllAttached();
virtual void AllDetached();
private:
};
BPScrollBar::BPScrollBar(TPasObject PasObject,
BRect frame,
const char *name,
BView *target,
float min,
float max,
orientation direction)
:
BScrollBar( frame,
name,
target,
min,
max,
direction),
BPView(PasObject, BRect(0,0,0,0), name, 0, 0),
BPHandler(PasObject, name),
BPasObject(PasObject)
{
}
BPScrollBar::BPScrollBar(TPasObject PasObject, BMessage *data)
:BScrollBar(data),
BPView(PasObject, data),
BPHandler(PasObject, data),
BPasObject(PasObject)
{
}
void BPScrollBar::MessageReceived(BMessage *message)
{
MessageReceived_hookCall(message);
BScrollBar::MessageReceived(message);
}
void BPScrollBar::Draw(BRect updateRect)
{
BScrollBar::Draw(updateRect);
Draw_hookCall(updateRect);
}
void BPScrollBar::AttachedToWindow(void)
{
BScrollBar::AttachedToWindow();
AttachedToWindow_hookCall();
}
void BPScrollBar::AllAttached(void)
{
BScrollBar::AllAttached();
}
void BPScrollBar::AllDetached(void)
{
BScrollBar::AllDetached();
}
void BPScrollBar::FrameMoved(BPoint parentPoint)
{
BScrollBar::FrameMoved(parentPoint);
}
void BPScrollBar::FrameResized(float width, float height)
{
BScrollBar::FrameResized(width, height);
}
void BPScrollBar::MouseDown(BPoint point)
{
BScrollBar::MouseDown(point);
}
void BPScrollBar::MouseMoved(BPoint point, uint32 transit, const BMessage *message)
{
BScrollBar::MouseMoved(point, transit, message);
}
void BPScrollBar::MouseUp(BPoint point)
{
BScrollBar::MouseUp(point);
}
#if defined(__cplusplus)
extern "C" {
#endif
/***********************************************************************
* AUTHOR: nobody <baron>
* FILE: ScrollBar.cpp
* DATE: Sun Feb 2 15:49:13 2003
* DESCR:
***********************************************************************/
/***********************************************************************
* Method: BScrollBar::BScrollBar
* Params: BRect frame, const char *name, BView *target, float min, float max, orientation direction
* Effects:
***********************************************************************/
TCPlusObject BScrollBar_Create(TPasObject PasObject, BRect frame, const char *name, BView *target, float min, float max, orientation direction)
{
return new BPScrollBar(PasObject, frame, name, target, min, max, direction);
}
/***********************************************************************
* Method: BScrollBar::BScrollBar
* Params: BMessage *data
* Effects:
***********************************************************************/
TCPlusObject BScrollBar_Create_1
(TPasObject PasObject, BMessage *data)
{
return new BPScrollBar(PasObject, data);
}
/***********************************************************************
* Method: BScrollBar::~BScrollBar
* Params:
* Effects:
***********************************************************************/
void BScrollBar_Free(BScrollBar *ScrollBar)
{
delete ScrollBar;
}
/***********************************************************************
* Method: BScrollBar::Instantiate
* Params: BMessage *data
* Returns: BArchivable *
* Effects:
***********************************************************************/
BArchivable *
BScrollBar_Instantiate(BScrollBar *ScrollBar, BMessage *data)
{
return ScrollBar->Instantiate(data);
}
/***********************************************************************
* Method: BScrollBar::Archive
* Params: BMessage *data, bool deep
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BScrollBar_Archive(BScrollBar *ScrollBar, BMessage *data, bool deep)
{
return ScrollBar->Archive(data, deep);
}
/***********************************************************************
* Method: BScrollBar::AttachedToWindow
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BScrollBar_AttachedToWindow(BScrollBar *ScrollBar)
{
ScrollBar->AttachedToWindow();
}
/***********************************************************************
* Method: BScrollBar::SetValue
* Params: float value
* Returns: void
* Effects:
***********************************************************************/
void
BScrollBar_SetValue(BScrollBar *ScrollBar, float value)
{
ScrollBar->SetValue(value);
}
/***********************************************************************
* Method: BScrollBar::Value
* Params:
* Returns: float
* Effects:
***********************************************************************/
float
BScrollBar_Value(BScrollBar *ScrollBar)
{
return ScrollBar->Value();
}
/***********************************************************************
* Method: BScrollBar::SetProportion
* Params: float
* Returns: void
* Effects:
***********************************************************************/
void
BScrollBar_SetProportion(BScrollBar *ScrollBar, float value)
{
ScrollBar->SetProportion(value);
}
/***********************************************************************
* Method: BScrollBar::Proportion
* Params:
* Returns: float
* Effects:
***********************************************************************/
float
BScrollBar_Proportion(BScrollBar *ScrollBar)
{
return ScrollBar->Proportion();
}
/***********************************************************************
* Method: BScrollBar::ValueChanged
* Params: float newValue
* Returns: void
* Effects:
***********************************************************************/
void
BScrollBar_ValueChanged(BScrollBar *ScrollBar, float newValue)
{
ScrollBar->ValueChanged(newValue);
}
/***********************************************************************
* Method: BScrollBar::SetRange
* Params: float min, float max
* Returns: void
* Effects:
***********************************************************************/
void
BScrollBar_SetRange(BScrollBar *ScrollBar, float min, float max)
{
ScrollBar->SetRange(min, max);
}
/***********************************************************************
* Method: BScrollBar::GetRange
* Params: float *min, float *max
* Returns: void
* Effects:
***********************************************************************/
void
BScrollBar_GetRange(BScrollBar *ScrollBar, float *min, float *max)
{
ScrollBar->GetRange(min, max);
}
/***********************************************************************
* Method: BScrollBar::SetSteps
* Params: float smallStep, float largeStep
* Returns: void
* Effects:
***********************************************************************/
void
BScrollBar_SetSteps(BScrollBar *ScrollBar, float smallStep, float largeStep)
{
ScrollBar->SetSteps(smallStep, largeStep);
}
/***********************************************************************
* Method: BScrollBar::GetSteps
* Params: float *smallStep, float *largeStep
* Returns: void
* Effects:
***********************************************************************/
void
BScrollBar_GetSteps(BScrollBar *ScrollBar, float *smallStep, float *largeStep)
{
ScrollBar->GetSteps(smallStep, largeStep);
}
/***********************************************************************
* Method: BScrollBar::SetTarget
* Params: BView *target
* Returns: void
* Effects:
***********************************************************************/
void
BScrollBar_SetTarget(BScrollBar *ScrollBar, BView *target)
{
ScrollBar->SetTarget(target);
}
/***********************************************************************
* Method: BScrollBar::SetTarget
* Params: const char *targetName
* Returns: void
* Effects:
***********************************************************************/
void
BScrollBar_SetTarget_1
(BScrollBar *ScrollBar, const char *targetName)
{
ScrollBar->SetTarget(targetName);
}
/***********************************************************************
* Method: BScrollBar::Target
* Params:
* Returns: BView *
* Effects:
***********************************************************************/
BView *
BScrollBar_Target(BScrollBar *ScrollBar)
{
return ScrollBar->Target();
}
/***********************************************************************
* Method: BScrollBar::Orientation
* Params:
* Returns: orientation
* Effects:
***********************************************************************/
orientation
BScrollBar_Orientation(BScrollBar *ScrollBar)
{
return ScrollBar->Orientation();
}
/***********************************************************************
* Method: BScrollBar::MessageReceived
* Params: BMessage *msg
* Returns: void
* Effects:
***********************************************************************/
void
BScrollBar_MessageReceived(BScrollBar *ScrollBar, BMessage *msg)
{
ScrollBar->MessageReceived(msg);
}
/***********************************************************************
* Method: BScrollBar::MouseDown
* Params: BPoint pt
* Returns: void
* Effects:
***********************************************************************/
void
BScrollBar_MouseDown(BScrollBar *ScrollBar, BPoint pt)
{
ScrollBar->MouseDown(pt);
}
/***********************************************************************
* Method: BScrollBar::MouseUp
* Params: BPoint pt
* Returns: void
* Effects:
***********************************************************************/
void
BScrollBar_MouseUp(BScrollBar *ScrollBar, BPoint pt)
{
ScrollBar->MouseUp(pt);
}
/***********************************************************************
* Method: BScrollBar::MouseMoved
* Params: BPoint pt, uint32 code, const BMessage *msg
* Returns: void
* Effects:
***********************************************************************/
void
BScrollBar_MouseMoved(BScrollBar *ScrollBar, BPoint pt, uint32 code, const BMessage *msg)
{
ScrollBar->MouseMoved(pt, code, msg);
}
/***********************************************************************
* Method: BScrollBar::DetachedFromWindow
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BScrollBar_DetachedFromWindow(BScrollBar *ScrollBar)
{
ScrollBar->DetachedFromWindow();
}
/***********************************************************************
* Method: BScrollBar::Draw
* Params: BRect updateRect
* Returns: void
* Effects:
***********************************************************************/
void
BScrollBar_Draw(BScrollBar *ScrollBar, BRect updateRect)
{
ScrollBar->Draw(updateRect);
}
/***********************************************************************
* Method: BScrollBar::FrameMoved
* Params: BPoint new_position
* Returns: void
* Effects:
***********************************************************************/
void
BScrollBar_FrameMoved(BScrollBar *ScrollBar, BPoint new_position)
{
ScrollBar->FrameMoved(new_position);
}
/***********************************************************************
* Method: BScrollBar::FrameResized
* Params: float new_width, float new_height
* Returns: void
* Effects:
***********************************************************************/
void
BScrollBar_FrameResized(BScrollBar *ScrollBar, float new_width, float new_height)
{
ScrollBar->FrameResized(new_width, new_height);
}
/***********************************************************************
* Method: BScrollBar::ResolveSpecifier
* Params: BMessage *msg, int32 index, BMessage *specifier, int32 form, const char *property
* Returns: BHandler *
* Effects:
***********************************************************************/
BHandler *
BScrollBar_ResolveSpecifier(BScrollBar *ScrollBar, BMessage *msg, int32 index, BMessage *specifier, int32 form, const char *property)
{
return ScrollBar->ResolveSpecifier(msg, index, specifier, form, property);
}
/***********************************************************************
* Method: BScrollBar::ResizeToPreferred
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BScrollBar_ResizeToPreferred(BScrollBar *ScrollBar)
{
ScrollBar->ResizeToPreferred();
}
/***********************************************************************
* Method: BScrollBar::GetPreferredSize
* Params: float *width, float *height
* Returns: void
* Effects:
***********************************************************************/
void
BScrollBar_GetPreferredSize(BScrollBar *ScrollBar, float *width, float *height)
{
ScrollBar->GetPreferredSize(width, height);
}
/***********************************************************************
* Method: BScrollBar::MakeFocus
* Params: bool state
* Returns: void
* Effects:
***********************************************************************/
void
BScrollBar_MakeFocus(BScrollBar *ScrollBar, bool state)
{
ScrollBar->MakeFocus(state);
}
/***********************************************************************
* Method: BScrollBar::AllAttached
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BScrollBar_AllAttached(BScrollBar *ScrollBar)
{
ScrollBar->AllAttached();
}
/***********************************************************************
* Method: BScrollBar::AllDetached
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BScrollBar_AllDetached(BScrollBar *ScrollBar)
{
ScrollBar->AllDetached();
}
/***********************************************************************
* Method: BScrollBar::GetSupportedSuites
* Params: BMessage *data
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BScrollBar_GetSupportedSuites(BScrollBar *ScrollBar, BMessage *data)
{
return ScrollBar->GetSupportedSuites(data);
}
/***********************************************************************
* Method: BScrollBar::Perform
* Params: perform_code d, void *arg
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BScrollBar_Perform(BScrollBar *ScrollBar, perform_code d, void *arg)
{
return ScrollBar->Perform(d, arg);
}
#if defined(__cplusplus)
}
#endif
#endif /* SCROLLBAR_CPP */

View File

@@ -1,592 +0,0 @@
/* BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
Eric Jourde
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _SCROLLVIEW_CPP_
#define _SCROLLVIEW_CPP_
/***********************************************************************
* AUTHOR: nobody <baron>
* FILE: StringView.cpp
* DATE: Mon Jan 13 21:52:29 2003
* DESCR:
***********************************************************************/
#include "ScrollView.h"
#include "view.h"
#include <beobj.h>
#if defined(__cplusplus)
extern "C" {
#endif
#if defined(__cplusplus)
}
#endif
class BPScrollView : public BScrollView, virtual public BPView {
public:
BPScrollView(
TPasObject PasObject,
const char *name,
BView *target,
uint32 resizeMask = B_FOLLOW_LEFT |
B_FOLLOW_TOP,
uint32 flags = 0,
bool horizontal = false,
bool vertical = false,
border_style border = B_FANCY_BORDER);
BPScrollView(TPasObject PasObject,BMessage *data);
//virtual ~BScrollView();
static BArchivable *Instantiate(BMessage *data);
//virtual status_t Archive(BMessage *data, bool deep = true) const;
virtual void Draw(BRect updateRect);
virtual void AttachedToWindow();
virtual void MessageReceived(BMessage *msg);
virtual void MouseDown(BPoint pt);
virtual void WindowActivated(bool state);
virtual void MouseUp(BPoint pt);
virtual void MouseMoved(BPoint pt, uint32 code, const BMessage *msg);
virtual void DetachedFromWindow();
virtual void AllAttached();
virtual void AllDetached();
//virtual void FrameMoved(BPoint new_position);
virtual void FrameResized(float new_width, float new_height);
//virtual void ResizeToPreferred();
//virtual void GetPreferredSize(float *width, float *height);
//virtual void MakeFocus(bool state = true);
/*----- Private or reserved -----------------------------------------*/
private:
};
BPScrollView::BPScrollView(TPasObject PasObject,
const char *name,
BView *target,
uint32 resizeMask = B_FOLLOW_LEFT |
B_FOLLOW_TOP,
uint32 flags = 0,
bool horizontal = false,
bool vertical = false,
border_style border = B_FANCY_BORDER)
:
BScrollView(name,
target,
resizeMask,
flags,
horizontal,
vertical,
border),
BPView(PasObject, BRect(0,0,0,0), name, 0, flags),
BPHandler(PasObject, name),
BPasObject(PasObject)
{
}
BPScrollView::BPScrollView(TPasObject PasObject, BMessage *data)
:BScrollView(data),
BPView(PasObject, data),
BPHandler(PasObject, data),
BPasObject(PasObject)
{
}
void BPScrollView::MessageReceived(BMessage *message)
{
MessageReceived_hookCall(message);
BScrollView::MessageReceived(message);
}
void BPScrollView::Draw(BRect updateRect)
{
BScrollView::Draw(updateRect);
Draw_hookCall(updateRect);
}
void BPScrollView::AttachedToWindow(void)
{
//BTextView::AttachedToWindow();
AttachedToWindow_hookCall();
}
void BPScrollView::AllAttached(void)
{
BScrollView::AllAttached();
}
void BPScrollView::AllDetached(void)
{
BScrollView::AllDetached();
}
void BPScrollView::WindowActivated(bool active)
{
BScrollView::WindowActivated(active);
}
void BPScrollView::FrameResized(float width, float height)
{
BScrollView::FrameResized(width, height);
}
void BPScrollView::DetachedFromWindow(void)
{
BScrollView::DetachedFromWindow();
}
void BPScrollView::MouseDown(BPoint point)
{
BScrollView::MouseDown(point);
}
void BPScrollView::MouseMoved(BPoint point, uint32 transit, const BMessage *message)
{
BScrollView::MouseMoved(point, transit, message);
}
void BPScrollView::MouseUp(BPoint point)
{
BScrollView::MouseUp(point);
}
#if defined(__cplusplus)
extern "C" {
#endif
/***********************************************************************
* AUTHOR: nobody <baron>
* FILE: ScrollView.cpp
* DATE: Sun Feb 2 20:53:19 2003
* DESCR:
***********************************************************************/
/***********************************************************************
* Method: BScrollView::BScrollView
* Params: BMessage *data
* Effects:
***********************************************************************/
TCPlusObject BScrollView_Create(TPasObject PasObject,
const char *name,
BView *target,
uint32 resizeMask = B_FOLLOW_LEFT |
B_FOLLOW_TOP,
uint32 flags = 0,
bool horizontal = false,
bool vertical = false,
border_style border = B_FANCY_BORDER)
{
return new BPScrollView(PasObject, name,target,resizeMask,flags,horizontal,vertical,border);
}
TCPlusObject BScrollView_Create_1(TPasObject PasObject, BMessage *data)
{
return new BPScrollView(PasObject, data);
}
/***********************************************************************
* Method: BScrollView::~BScrollView
* Params:
* Effects:
***********************************************************************/
void BScrollView_Free(BScrollView *ScrollView)
{
delete ScrollView;
}
/***********************************************************************
* Method: BScrollView::Instantiate
* Params: BMessage *data
* Returns: BArchivable *
* Effects:
***********************************************************************/
BArchivable *
BScrollView_Instantiate(BScrollView *ScrollView, BMessage *data)
{
return ScrollView->Instantiate(data);
}
/***********************************************************************
* Method: BScrollView::Archive
* Params: BMessage *data, bool deep
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BScrollView_Archive(BScrollView *ScrollView, BMessage *data, bool deep)
{
return ScrollView->Archive(data, deep);
}
/***********************************************************************
* Method: BScrollView::Draw
* Params: BRect updateRect
* Returns: void
* Effects:
***********************************************************************/
void
BScrollView_Draw(BScrollView *ScrollView, BRect updateRect)
{
ScrollView->Draw(updateRect);
}
/***********************************************************************
* Method: BScrollView::AttachedToWindow
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BScrollView_AttachedToWindow(BScrollView *ScrollView)
{
ScrollView->AttachedToWindow();
}
/***********************************************************************
* Method: BScrollView::ScrollBar
* Params: orientation flag
* Returns: BScrollBar *
* Effects:
***********************************************************************/
BScrollBar *
BScrollView_ScrollBar(BScrollView *ScrollView, orientation flag)
{
return ScrollView->ScrollBar(flag);
}
/***********************************************************************
* Method: BScrollView::SetBorder
* Params: border_style border
* Returns: void
* Effects:
***********************************************************************/
void
BScrollView_SetBorder(BScrollView *ScrollView, border_style border)
{
ScrollView->SetBorder(border);
}
/***********************************************************************
* Method: BScrollView::Border
* Params:
* Returns: border_style
* Effects:
***********************************************************************/
border_style
BScrollView_Border(BScrollView *ScrollView)
{
return ScrollView->Border();
}
/***********************************************************************
* Method: BScrollView::SetBorderHighlighted
* Params: bool state
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BScrollView_SetBorderHighlighted(BScrollView *ScrollView, bool state)
{
return ScrollView->SetBorderHighlighted(state);
}
/***********************************************************************
* Method: BScrollView::IsBorderHighlighted
* Params:
* Returns: bool
* Effects:
***********************************************************************/
bool
BScrollView_IsBorderHighlighted(BScrollView *ScrollView)
{
return ScrollView->IsBorderHighlighted();
}
/***********************************************************************
* Method: BScrollView::SetTarget
* Params: BView *new_target
* Returns: void
* Effects:
***********************************************************************/
void
BScrollView_SetTarget(BScrollView *ScrollView, BView *new_target)
{
ScrollView->SetTarget(new_target);
}
/***********************************************************************
* Method: BScrollView::Target
* Params:
* Returns: BView *
* Effects:
***********************************************************************/
BView *
BScrollView_Target(BScrollView *ScrollView)
{
return ScrollView->Target();
}
/***********************************************************************
* Method: BScrollView::MessageReceived
* Params: BMessage *msg
* Returns: void
* Effects:
***********************************************************************/
void
BScrollView_MessageReceived(BScrollView *ScrollView, BMessage *msg)
{
ScrollView->MessageReceived(msg);
}
/***********************************************************************
* Method: BScrollView::MouseDown
* Params: BPoint pt
* Returns: void
* Effects:
***********************************************************************/
void
BScrollView_MouseDown(BScrollView *ScrollView, BPoint pt)
{
ScrollView->MouseDown(pt);
}
/***********************************************************************
* Method: BScrollView::WindowActivated
* Params: bool state
* Returns: void
* Effects:
***********************************************************************/
void
BScrollView_WindowActivated(BScrollView *ScrollView, bool state)
{
ScrollView->WindowActivated(state);
}
/***********************************************************************
* Method: BScrollView::MouseUp
* Params: BPoint pt
* Returns: void
* Effects:
***********************************************************************/
void
BScrollView_MouseUp(BScrollView *ScrollView, BPoint pt)
{
ScrollView->MouseUp(pt);
}
/***********************************************************************
* Method: BScrollView::MouseMoved
* Params: BPoint pt, uint32 code, const BMessage *msg
* Returns: void
* Effects:
***********************************************************************/
void
BScrollView_MouseMoved(BScrollView *ScrollView, BPoint pt, uint32 code, const BMessage *msg)
{
ScrollView->MouseMoved(pt, code, msg);
}
/***********************************************************************
* Method: BScrollView::DetachedFromWindow
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BScrollView_DetachedFromWindow(BScrollView *ScrollView)
{
ScrollView->DetachedFromWindow();
}
/***********************************************************************
* Method: BScrollView::AllAttached
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BScrollView_AllAttached(BScrollView *ScrollView)
{
ScrollView->AllAttached();
}
/***********************************************************************
* Method: BScrollView::AllDetached
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BScrollView_AllDetached(BScrollView *ScrollView)
{
ScrollView->AllDetached();
}
/***********************************************************************
* Method: BScrollView::FrameMoved
* Params: BPoint new_position
* Returns: void
* Effects:
***********************************************************************/
void
BScrollView_FrameMoved(BScrollView *ScrollView, BPoint new_position)
{
ScrollView->FrameMoved(new_position);
}
/***********************************************************************
* Method: BScrollView::FrameResized
* Params: float new_width, float new_height
* Returns: void
* Effects:
***********************************************************************/
void
BScrollView_FrameResized(BScrollView *ScrollView, float new_width, float new_height)
{
ScrollView->FrameResized(new_width, new_height);
}
/***********************************************************************
* Method: BScrollView::ResolveSpecifier
* Params: BMessage *msg, int32 index, BMessage *specifier, int32 form, const char *property
* Returns: BHandler *
* Effects:
***********************************************************************/
BHandler *
BScrollView_ResolveSpecifier(BScrollView *ScrollView, BMessage *msg, int32 index, BMessage *specifier, int32 form, const char *property)
{
return ScrollView->ResolveSpecifier(msg, index, specifier, form, property);
}
/***********************************************************************
* Method: BScrollView::ResizeToPreferred
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BScrollView_ResizeToPreferred(BScrollView *ScrollView)
{
ScrollView->ResizeToPreferred();
}
/***********************************************************************
* Method: BScrollView::GetPreferredSize
* Params: float *width, float *height
* Returns: void
* Effects:
***********************************************************************/
void
BScrollView_GetPreferredSize(BScrollView *ScrollView, float *width, float *height)
{
ScrollView->GetPreferredSize(width, height);
}
/***********************************************************************
* Method: BScrollView::MakeFocus
* Params: bool state
* Returns: void
* Effects:
***********************************************************************/
void
BScrollView_MakeFocus(BScrollView *ScrollView, bool state)
{
ScrollView->MakeFocus(state);
}
/***********************************************************************
* Method: BScrollView::GetSupportedSuites
* Params: BMessage *data
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BScrollView_GetSupportedSuites(BScrollView *ScrollView, BMessage *data)
{
return ScrollView->GetSupportedSuites(data);
}
/***********************************************************************
* Method: BScrollView::Perform
* Params: perform_code d, void *arg
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BScrollView_Perform(BScrollView *ScrollView, perform_code d, void *arg)
{
return ScrollView->Perform(d, arg);
}
#if defined(__cplusplus)
}
#endif
#endif /* _SSCROLLVIEW_CPP_ */

View File

@@ -1,657 +0,0 @@
/* BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
Eric Jourde
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _STATUSBAR_CPP_
#define _STATUSBAR_CPP_
/***********************************************************************
* AUTHOR: nobody <baron>
* FILE: StringView.cpp
* DATE: Mon Jan 13 21:52:29 2003
* DESCR:
***********************************************************************/
#include "StatusBar.h"
#include "view.h"
#include <beobj.h>
#if defined(__cplusplus)
extern "C" {
#endif
#if defined(__cplusplus)
}
#endif
class BPStatusBar : public BStatusBar, virtual BPView
{
public:
BPStatusBar(TPasObject PasObject,
BRect frame,
const char *name,
const char *label = NULL,
const char *trailing_label = NULL);
BPStatusBar(TPasObject PasObject,BMessage *data);
//static BArchivable *Instantiate(BMessage *data);
//virtual status_t Archive(BMessage *data, bool deep = true) const;
virtual void AttachedToWindow();
virtual void MessageReceived(BMessage *msg);
virtual void Draw(BRect updateRect);
virtual void MouseDown(BPoint pt);
virtual void MouseUp(BPoint pt);
//virtual void WindowActivated(bool state);
virtual void MouseMoved(BPoint pt, uint32 code, const BMessage *msg);
//virtual void DetachedFromWindow();
virtual void FrameMoved(BPoint new_position);
virtual void FrameResized(float new_width, float new_height);
virtual void AllAttached();
virtual void AllDetached();
private:
};
BPStatusBar::BPStatusBar(TPasObject PasObject,
BRect frame,
const char *name,
const char *label = NULL,
const char *trailing_label = NULL)
:BStatusBar(
frame,
name,
label ,
trailing_label ),
BPView(PasObject, BRect(0,0,0,0), name, 0, 0),
BPHandler(PasObject, name),
BPasObject(PasObject)
{
}
BPStatusBar::BPStatusBar(TPasObject PasObject,BMessage *data)
:BStatusBar(data),
BPView(PasObject, data),
BPHandler(PasObject, data),
BPasObject(PasObject)
{
}
void BPStatusBar::MessageReceived(BMessage *message)
{
MessageReceived_hookCall(message);
BStatusBar::MessageReceived(message);
}
void BPStatusBar::Draw(BRect updateRect)
{
BStatusBar::Draw(updateRect);
Draw_hookCall(updateRect);
}
void BPStatusBar::AttachedToWindow(void)
{
BStatusBar::AttachedToWindow();
AttachedToWindow_hookCall();
}
void BPStatusBar::AllAttached(void)
{
BStatusBar::AllAttached();
}
void BPStatusBar::AllDetached(void)
{
BStatusBar::AllDetached();
}
void BPStatusBar::FrameMoved(BPoint parentPoint)
{
BStatusBar::FrameMoved(parentPoint);
}
void BPStatusBar::FrameResized(float width, float height)
{
BStatusBar::FrameResized(width, height);
}
void BPStatusBar::MouseDown(BPoint point)
{
BStatusBar::MouseDown(point);
}
void BPStatusBar::MouseMoved(BPoint point, uint32 transit, const BMessage *message)
{
BStatusBar::MouseMoved(point, transit, message);
}
void BPStatusBar::MouseUp(BPoint point)
{
BStatusBar::MouseUp(point);
}
#if defined(__cplusplus)
extern "C" {
#endif
/***********************************************************************
* Method: BStatusBar::BStatusBar
* Params: BRect frame, const char *name, const char *label, const char *trailing_label
* Effects:
***********************************************************************/
TCPlusObject BStatusBar_Create(TPasObject PasObject, BRect frame, const char *name, const char *label, const char *trailing_label)
{
return new BPStatusBar(PasObject, frame, name, label, trailing_label);
}
/***********************************************************************
* Method: BStatusBar::BStatusBar
* Params: BMessage *data
* Effects:
***********************************************************************/
TCPlusObject BStatusBar_Create_1
(TPasObject PasObject, BMessage *data)
{
return new BPStatusBar(PasObject, data);
}
/***********************************************************************
* Method: BStatusBar::~BStatusBar
* Params:
* Effects:
***********************************************************************/
void BStatusBar_Free(BStatusBar *StatusBar)
{
delete StatusBar;
}
/***********************************************************************
* Method: BStatusBar::Instantiate
* Params: BMessage *data
* Returns: BArchivable *
* Effects:
***********************************************************************/
BArchivable *
BStatusBar_Instantiate(BStatusBar *StatusBar, BMessage *data)
{
return StatusBar->Instantiate(data);
}
/***********************************************************************
* Method: BStatusBar::Archive
* Params: BMessage *data, bool deep
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BStatusBar_Archive(BStatusBar *StatusBar, BMessage *data, bool deep)
{
return StatusBar->Archive(data, deep);
}
/***********************************************************************
* Method: BStatusBar::AttachedToWindow
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BStatusBar_AttachedToWindow(BStatusBar *StatusBar)
{
StatusBar->AttachedToWindow();
}
/***********************************************************************
* Method: BStatusBar::MessageReceived
* Params: BMessage *msg
* Returns: void
* Effects:
***********************************************************************/
void
BStatusBar_MessageReceived(BStatusBar *StatusBar, BMessage *msg)
{
StatusBar->MessageReceived(msg);
}
/***********************************************************************
* Method: BStatusBar::Draw
* Params: BRect updateRect
* Returns: void
* Effects:
***********************************************************************/
void
BStatusBar_Draw(BStatusBar *StatusBar, BRect updateRect)
{
StatusBar->Draw(updateRect);
}
/***********************************************************************
* Method: BStatusBar::SetBarColor
* Params: rgb_color color
* Returns: void
* Effects:
***********************************************************************/
void
BStatusBar_SetBarColor(BStatusBar *StatusBar, rgb_color color)
{
StatusBar->SetBarColor(color);
}
/***********************************************************************
* Method: BStatusBar::SetBarHeight
* Params: float height
* Returns: void
* Effects:
***********************************************************************/
void
BStatusBar_SetBarHeight(BStatusBar *StatusBar, float height)
{
StatusBar->SetBarHeight(height);
}
/***********************************************************************
* Method: BStatusBar::SetText
* Params: const char *str
* Returns: void
* Effects:
***********************************************************************/
void
BStatusBar_SetText(BStatusBar *StatusBar, const char *str)
{
StatusBar->SetText(str);
}
/***********************************************************************
* Method: BStatusBar::SetTrailingText
* Params: const char *str
* Returns: void
* Effects:
***********************************************************************/
void
BStatusBar_SetTrailingText(BStatusBar *StatusBar, const char *str)
{
StatusBar->SetTrailingText(str);
}
/***********************************************************************
* Method: BStatusBar::SetMaxValue
* Params: float max
* Returns: void
* Effects:
***********************************************************************/
void
BStatusBar_SetMaxValue(BStatusBar *StatusBar, float max)
{
StatusBar->SetMaxValue(max);
}
/***********************************************************************
* Method: BStatusBar::Update
* Params: float delta, const char *main_text, const char *trailing_text
* Returns: void
* Effects:
***********************************************************************/
void
BStatusBar_Update(BStatusBar *StatusBar, float delta, const char *main_text, const char *trailing_text)
{
StatusBar->Update(delta, main_text, trailing_text);
}
/***********************************************************************
* Method: BStatusBar::Reset
* Params: const char *label, const char *trailing_label
* Returns: void
* Effects:
***********************************************************************/
void
BStatusBar_Reset(BStatusBar *StatusBar, const char *label, const char *trailing_label)
{
StatusBar->Reset(label, trailing_label);
}
/***********************************************************************
* Method: BStatusBar::CurrentValue
* Params:
* Returns: float
* Effects:
***********************************************************************/
float
BStatusBar_CurrentValue(BStatusBar *StatusBar)
{
return StatusBar->CurrentValue();
}
/***********************************************************************
* Method: BStatusBar::MaxValue
* Params:
* Returns: float
* Effects:
***********************************************************************/
float
BStatusBar_MaxValue(BStatusBar *StatusBar)
{
return StatusBar->MaxValue();
}
/***********************************************************************
* Method: BStatusBar::BarColor
* Params:
* Returns: rgb_color
* Effects:
***********************************************************************/
rgb_color
BStatusBar_BarColor(BStatusBar *StatusBar)
{
return StatusBar->BarColor();
}
/***********************************************************************
* Method: BStatusBar::BarHeight
* Params:
* Returns: float
* Effects:
***********************************************************************/
float
BStatusBar_BarHeight(BStatusBar *StatusBar)
{
return StatusBar->BarHeight();
}
/***********************************************************************
* Method: BStatusBar::Text
* Params:
* Returns: const char *
* Effects:
***********************************************************************/
const char *
BStatusBar_Text(BStatusBar *StatusBar)
{
return StatusBar->Text();
}
/***********************************************************************
* Method: BStatusBar::TrailingText
* Params:
* Returns: const char *
* Effects:
***********************************************************************/
const char *
BStatusBar_TrailingText(BStatusBar *StatusBar)
{
return StatusBar->TrailingText();
}
/***********************************************************************
* Method: BStatusBar::Label
* Params:
* Returns: const char *
* Effects:
***********************************************************************/
const char *
BStatusBar_Label(BStatusBar *StatusBar)
{
return StatusBar->Label();
}
/***********************************************************************
* Method: BStatusBar::TrailingLabel
* Params:
* Returns: const char *
* Effects:
***********************************************************************/
const char *
BStatusBar_TrailingLabel(BStatusBar *StatusBar)
{
return StatusBar->TrailingLabel();
}
/***********************************************************************
* Method: BStatusBar::MouseDown
* Params: BPoint pt
* Returns: void
* Effects:
***********************************************************************/
void
BStatusBar_MouseDown(BStatusBar *StatusBar, BPoint pt)
{
StatusBar->MouseDown(pt);
}
/***********************************************************************
* Method: BStatusBar::MouseUp
* Params: BPoint pt
* Returns: void
* Effects:
***********************************************************************/
void
BStatusBar_MouseUp(BStatusBar *StatusBar, BPoint pt)
{
StatusBar->MouseUp(pt);
}
/***********************************************************************
* Method: BStatusBar::WindowActivated
* Params: bool state
* Returns: void
* Effects:
***********************************************************************/
void
BStatusBar_WindowActivated(BStatusBar *StatusBar, bool state)
{
StatusBar->WindowActivated(state);
}
/***********************************************************************
* Method: BStatusBar::MouseMoved
* Params: BPoint pt, uint32 code, const BMessage *msg
* Returns: void
* Effects:
***********************************************************************/
void
BStatusBar_MouseMoved(BStatusBar *StatusBar, BPoint pt, uint32 code, const BMessage *msg)
{
StatusBar->MouseMoved(pt, code, msg);
}
/***********************************************************************
* Method: BStatusBar::DetachedFromWindow
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BStatusBar_DetachedFromWindow(BStatusBar *StatusBar)
{
StatusBar->DetachedFromWindow();
}
/***********************************************************************
* Method: BStatusBar::FrameMoved
* Params: BPoint new_position
* Returns: void
* Effects:
***********************************************************************/
void
BStatusBar_FrameMoved(BStatusBar *StatusBar, BPoint new_position)
{
StatusBar->FrameMoved(new_position);
}
/***********************************************************************
* Method: BStatusBar::FrameResized
* Params: float new_width, float new_height
* Returns: void
* Effects:
***********************************************************************/
void
BStatusBar_FrameResized(BStatusBar *StatusBar, float new_width, float new_height)
{
StatusBar->FrameResized(new_width, new_height);
}
/***********************************************************************
* Method: BStatusBar::ResolveSpecifier
* Params: BMessage *msg, int32 index, BMessage *specifier, int32 form, const char *property
* Returns: BHandler *
* Effects:
***********************************************************************/
BHandler *
BStatusBar_ResolveSpecifier(BStatusBar *StatusBar, BMessage *msg, int32 index, BMessage *specifier, int32 form, const char *property)
{
return StatusBar->ResolveSpecifier(msg, index, specifier, form, property);
}
/***********************************************************************
* Method: BStatusBar::ResizeToPreferred
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BStatusBar_ResizeToPreferred(BStatusBar *StatusBar)
{
StatusBar->ResizeToPreferred();
}
/***********************************************************************
* Method: BStatusBar::GetPreferredSize
* Params: float *width, float *height
* Returns: void
* Effects:
***********************************************************************/
void
BStatusBar_GetPreferredSize(BStatusBar *StatusBar, float *width, float *height)
{
StatusBar->GetPreferredSize(width, height);
}
/***********************************************************************
* Method: BStatusBar::MakeFocus
* Params: bool state
* Returns: void
* Effects:
***********************************************************************/
void
BStatusBar_MakeFocus(BStatusBar *StatusBar, bool state)
{
StatusBar->MakeFocus(state);
}
/***********************************************************************
* Method: BStatusBar::AllAttached
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BStatusBar_AllAttached(BStatusBar *StatusBar)
{
StatusBar->AllAttached();
}
/***********************************************************************
* Method: BStatusBar::AllDetached
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BStatusBar_AllDetached(BStatusBar *StatusBar)
{
StatusBar->AllDetached();
}
/***********************************************************************
* Method: BStatusBar::GetSupportedSuites
* Params: BMessage *data
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BStatusBar_GetSupportedSuites(BStatusBar *StatusBar, BMessage *data)
{
return StatusBar->GetSupportedSuites(data);
}
/***********************************************************************
* Method: BStatusBar::Perform
* Params: perform_code d, void *arg
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BStatusBar_Perform(BStatusBar *StatusBar, perform_code d, void *arg)
{
return StatusBar->Perform(d, arg);
}
#if defined(__cplusplus)
}
#endif
#endif /* _STATUSBAR_CPP_ */

View File

@@ -1,552 +0,0 @@
/* BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _STRINGVIEW_CPP_
#define _STRINGVIEW_CPP_
/***********************************************************************
* AUTHOR: nobody <baron>
* FILE: StringView.cpp
* DATE: Mon Jan 13 21:52:29 2003
* DESCR:
***********************************************************************/
#include "StringView.h"
#include "view.h"
#include <beobj.h>
#if defined(__cplusplus)
extern "C" {
#endif
#if defined(__cplusplus)
}
#endif
class BPStringView : public BStringView, virtual public BPView
{
public:
BPStringView(TPasObject PasObject,
BRect bounds,
const char *name,
const char *text,
uint32 resizeFlags,
uint32 flags);
BPStringView(TPasObject PasObject, BMessage *archive);
virtual void AttachedToWindow(void);
virtual void Draw(BRect updateRect);
virtual void MessageReceived(BMessage *message);
virtual void MouseDown(BPoint point);
virtual void MouseUp(BPoint point);
virtual void MouseMoved(BPoint point, uint32 transit, const BMessage *message);
virtual void FrameMoved(BPoint parentPoint);
virtual void FrameResized(float width, float height);
virtual void AllAttached(void);
virtual void AllDetached(void);
private:
};
BPStringView::BPStringView(TPasObject PasObject,
BRect bounds,
const char *name,
const char *text,
uint32 resizeFlags,
uint32 flags)
:
BStringView( bounds,
name,
text,
resizeFlags,
flags),
BPView(PasObject, BRect(0,0,0,0), name, 0, flags),
BPHandler(PasObject, name),
BPasObject(PasObject)
{
}
BPStringView::BPStringView(TPasObject PasObject, BMessage *data)
:BStringView(data),
BPView(PasObject, data),
BPHandler(PasObject, data),
BPasObject(PasObject)
{
}
void BPStringView::MessageReceived(BMessage *message)
{
MessageReceived_hookCall(message);
BStringView::MessageReceived(message);
}
void BPStringView::Draw(BRect updateRect)
{
BStringView::Draw(updateRect);
Draw_hookCall(updateRect);
}
void BPStringView::AttachedToWindow(void)
{
BStringView::AttachedToWindow();
AttachedToWindow_hookCall();
}
void BPStringView::AllAttached(void)
{
BStringView::AllAttached();
}
void BPStringView::AllDetached(void)
{
BStringView::AllDetached();
}
void BPStringView::FrameMoved(BPoint parentPoint)
{
BStringView::FrameMoved(parentPoint);
}
void BPStringView::FrameResized(float width, float height)
{
BStringView::FrameResized(width, height);
}
void BPStringView::MouseDown(BPoint point)
{
BStringView::MouseDown(point);
}
void BPStringView::MouseMoved(BPoint point, uint32 transit, const BMessage *message)
{
BStringView::MouseMoved(point, transit, message);
}
void BPStringView::MouseUp(BPoint point)
{
BStringView::MouseUp(point);
}
#if defined(__cplusplus)
extern "C" {
#endif
TCPlusObject BStringView_Create(TPasObject PasObject,
BRect bounds,
const char *name,
const char *text,
uint32 resizeFlags,
uint32 flags)
{
return new BPStringView(PasObject,bounds,
name,
text,
resizeFlags,
flags);
}
/***********************************************************************
* Method: BStringView::BStringView
* Params: BMessage *data
* Effects:
***********************************************************************/
TCPlusObject BStringView_Create_1(TPasObject PasObject, BMessage *data)
{
return new BPStringView(PasObject, data);
}
/***********************************************************************
* Method: BStringView::~BStringView
* Params:
* Effects:
***********************************************************************/
void BStringView_Free(BStringView *StringView)
{
delete StringView;
}
/***********************************************************************
* Method: BStringView::Instantiate
* Params: BMessage *data
* Returns: BArchivable *
* Effects:
***********************************************************************/
BArchivable *
BStringView_Instantiate(BStringView *StringView, BMessage *data)
{
return StringView->Instantiate(data);
}
/***********************************************************************
* Method: BStringView::Archive
* Params: BMessage *data, bool deep
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BStringView_Archive(BStringView *StringView, BMessage *data, bool deep)
{
return StringView->Archive(data, deep);
}
/***********************************************************************
* Method: BStringView::SetText
* Params: const char *text
* Returns: void
* Effects:
***********************************************************************/
void
BStringView_SetText(BStringView *StringView, const char *text)
{
StringView->SetText(text);
}
/***********************************************************************
* Method: BStringView::Text
* Params:
* Returns: const char *
* Effects:
***********************************************************************/
const char *
BStringView_Text(BStringView *StringView)
{
return StringView->Text();
}
/***********************************************************************
* Method: BStringView::SetAlignment
* Params: alignment flag
* Returns: void
* Effects:
***********************************************************************/
void
BStringView_SetAlignment(BStringView *StringView, alignment flag)
{
StringView->SetAlignment(flag);
}
/***********************************************************************
* Method: BStringView::Alignment
* Params:
* Returns: alignment
* Effects:
***********************************************************************/
alignment
BStringView_Alignment(BStringView *StringView)
{
return StringView->Alignment();
}
/***********************************************************************
* Method: BStringView::AttachedToWindow
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BStringView_AttachedToWindow(BStringView *StringView)
{
StringView->AttachedToWindow();
}
/***********************************************************************
* Method: BStringView::Draw
* Params: BRect bounds
* Returns: void
* Effects:
***********************************************************************/
void
BStringView_Draw(BStringView *StringView, BRect bounds)
{
StringView->Draw(bounds);
}
/***********************************************************************
* Method: BStringView::MessageReceived
* Params: BMessage *msg
* Returns: void
* Effects:
***********************************************************************/
void
BStringView_MessageReceived(BStringView *StringView, BMessage *msg)
{
StringView->MessageReceived(msg);
}
/***********************************************************************
* Method: BStringView::MouseDown
* Params: BPoint pt
* Returns: void
* Effects:
***********************************************************************/
void
BStringView_MouseDown(BStringView *StringView, BPoint pt)
{
StringView->MouseDown(pt);
}
/***********************************************************************
* Method: BStringView::MouseUp
* Params: BPoint pt
* Returns: void
* Effects:
***********************************************************************/
void
BStringView_MouseUp(BStringView *StringView, BPoint pt)
{
StringView->MouseUp(pt);
}
/***********************************************************************
* Method: BStringView::MouseMoved
* Params: BPoint pt, uint32 code, const BMessage *msg
* Returns: void
* Effects:
***********************************************************************/
void
BStringView_MouseMoved(BStringView *StringView, BPoint pt, uint32 code, const BMessage *msg)
{
StringView->MouseMoved(pt, code, msg);
}
/***********************************************************************
* Method: BStringView::DetachedFromWindow
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BStringView_DetachedFromWindow(BStringView *StringView)
{
StringView->DetachedFromWindow();
}
/***********************************************************************
* Method: BStringView::FrameMoved
* Params: BPoint new_position
* Returns: void
* Effects:
***********************************************************************/
void
BStringView_FrameMoved(BStringView *StringView, BPoint new_position)
{
StringView->FrameMoved(new_position);
}
/***********************************************************************
* Method: BStringView::FrameResized
* Params: float new_width, float new_height
* Returns: void
* Effects:
***********************************************************************/
void
BStringView_FrameResized(BStringView *StringView, float new_width, float new_height)
{
StringView->FrameResized(new_width, new_height);
}
/***********************************************************************
* Method: BStringView::ResolveSpecifier
* Params: BMessage *msg, int32 index, BMessage *specifier, int32 form, const char *property
* Returns: BHandler *
* Effects:
***********************************************************************/
BHandler *
BStringView_ResolveSpecifier(BStringView *StringView, BMessage *msg, int32 index, BMessage *specifier, int32 form, const char *property)
{
return StringView->ResolveSpecifier(msg, index, specifier, form, property);
}
/***********************************************************************
* Method: BStringView::ResizeToPreferred
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BStringView_ResizeToPreferred(BStringView *StringView)
{
StringView->ResizeToPreferred();
}
/***********************************************************************
* Method: BStringView::GetPreferredSize
* Params: float *width, float *height
* Returns: void
* Effects:
***********************************************************************/
void
BStringView_GetPreferredSize(BStringView *StringView, float *width, float *height)
{
StringView->GetPreferredSize(width, height);
}
/***********************************************************************
* Method: BStringView::MakeFocus
* Params: bool state
* Returns: void
* Effects:
***********************************************************************/
void
BStringView_MakeFocus(BStringView *StringView, bool state)
{
StringView->MakeFocus(state);
}
/***********************************************************************
* Method: BStringView::AllAttached
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BStringView_AllAttached(BStringView *StringView)
{
StringView->AllAttached();
}
/***********************************************************************
* Method: BStringView::AllDetached
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BStringView_AllDetached(BStringView *StringView)
{
StringView->AllDetached();
}
/***********************************************************************
* Method: BStringView::GetSupportedSuites
* Params: BMessage *data
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BStringView_GetSupportedSuites(BStringView *StringView, BMessage *data)
{
return StringView->GetSupportedSuites(data);
}
/***********************************************************************
* Method: BStringView::Perform
* Params: perform_code d, void *arg
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BStringView_Perform(BStringView *StringView, perform_code d, void *arg)
{
return StringView->Perform(d, arg);
}
/***********************************************************************
* Method: BStringView::_ReservedStringView1
* Params:
* Returns: void
* Effects:
***********************************************************************/
/*void
BStringView__ReservedStringView1(BStringView *StringView)
{
StringView->_ReservedStringView1();
}
*/
/***********************************************************************
* Method: BStringView::_ReservedStringView2
* Params:
* Returns: void
* Effects:
***********************************************************************/
/*void
BStringView__ReservedStringView2(BStringView *StringView)
{
StringView->_ReservedStringView2();
}
*/
/***********************************************************************
* Method: BStringView::_ReservedStringView3
* Params:
* Returns: void
* Effects:
***********************************************************************/
/*void
BStringView__ReservedStringView3(BStringView *StringView)
{
StringView->_ReservedStringView3();
}
*/
/***********************************************************************
* Method: BStringView::operator=
* Params: const BStringView &
* Returns: BStringView &
* Effects:
***********************************************************************/
/*BStringView &
BStringView_operator=(BStringView *StringView, const BStringView &)
{
return StringView->operator=();
}
*/
#if defined(__cplusplus)
}
#endif
#endif /* _STRINGVIEW_CPP_ */

File diff suppressed because it is too large Load Diff

View File

@@ -1,807 +0,0 @@
/* BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
Eric Jourde
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _TEXTCONTROL_CPP_
#define _TEXTCONTROL_CPP_
/***********************************************************************
* AUTHOR: nobody <baron>
* FILE: Button.cpp
* DATE: Tue Dec 3 00:28:35 2002
* DESCR:
***********************************************************************/
#include "TextControl.h"
#include "control.h"
#include <beobj.h>
#if defined(__cplusplus)
extern "C" {
#endif
#if defined(__cplusplus)
}
#endif
class BPTextControl : public BTextControl, virtual public BPControl {
public:
BPTextControl(TPasObject PasObject,
BRect frame,
const char *name,
const char *label,
const char *initial_text,
BMessage *message,
uint32 rmask = B_FOLLOW_LEFT | B_FOLLOW_TOP,
uint32 flags = B_WILL_DRAW | B_NAVIGABLE);
//virtual ~BPTextControl();
BPTextControl(TPasObject PasObject,BMessage *data);
static BArchivable *Instantiate(BMessage *data);
//virtual status_t Archive(BMessage *data, bool deep = true) const;
//virtual void SetText(const char *text);
const char *Text() const;
virtual void SetValue(int32 value);
//virtual status_t Invoke(BMessage *msg = NULL);
BTextView *TextView() const;
//virtual void SetModificationMessage(BMessage *message);
BMessage *ModificationMessage() const;
//virtual void SetAlignment(alignment label, alignment text);
void GetAlignment(alignment *label, alignment *text) const;
//virtual void SetDivider(float dividing_line);
float Divider() const;
virtual void Draw(BRect updateRect);
virtual void MouseDown(BPoint where);
virtual void AttachedToWindow();
//virtual void MakeFocus(bool focusState = true);
virtual void SetEnabled(bool state);
virtual void FrameMoved(BPoint new_position);
virtual void FrameResized(float new_width, float new_height);
virtual void WindowActivated(bool active);
virtual void GetPreferredSize(float *width, float *height);
virtual void ResizeToPreferred();
virtual void MessageReceived(BMessage *msg);
/*virtual BHandler *ResolveSpecifier(BMessage *msg,
int32 index,
BMessage *specifier,
int32 form,
const char *property);
*/
virtual void MouseUp(BPoint pt);
virtual void MouseMoved(BPoint pt, uint32 code, const BMessage *msg);
virtual void DetachedFromWindow();
virtual void AllAttached();
virtual void AllDetached();
//virtual status_t GetSupportedSuites(BMessage *data);
//virtual void SetFlags(uint32 flags);
/*----- Private or reserved -----------------------------------------*/
//virtual status_t Perform(perform_code d, void *arg);
private:
};
BPTextControl::BPTextControl(TPasObject PasObject,
BRect frame,
const char *name,
const char *label,
const char *initial_text,
BMessage *message,
uint32 rmask = B_FOLLOW_LEFT | B_FOLLOW_TOP,
uint32 flags = B_WILL_DRAW | B_NAVIGABLE)
:
BTextControl(frame,name,label,initial_text,
message,rmask,flags),
BPControl(PasObject, frame, name, label, message,
rmask, flags),
BPView(PasObject, frame, name, rmask, flags),
BPHandler(PasObject, name),
BPasObject(PasObject)
{
}
BPTextControl::BPTextControl(TPasObject PasObject, BMessage *archive)
:BTextControl(archive),
BPControl(PasObject, archive),
BPView(PasObject, archive),
BPHandler(PasObject, archive),
BPasObject(PasObject)
{
}
void BPTextControl::MessageReceived(BMessage *message)
{
MessageReceived_hookCall(message);
BTextControl::MessageReceived(message);
}
void BPTextControl::Draw(BRect updateRect)
{
BTextControl::Draw(updateRect);
Draw_hookCall(updateRect);
}
void BPTextControl::AttachedToWindow(void)
{
BTextControl::AttachedToWindow();
AttachedToWindow_hookCall();
}
void BPTextControl::WindowActivated(bool active)
{
BTextControl::WindowActivated(active);
}
void BPTextControl::AllAttached(void)
{
BTextControl::AllAttached();
}
void BPTextControl::AllDetached(void)
{
BTextControl::AllDetached();
}
void BPTextControl::DetachedFromWindow(void)
{
BTextControl::DetachedFromWindow();
}
void BPTextControl::FrameMoved(BPoint parentPoint)
{
BTextControl::FrameMoved(parentPoint);
}
void BPTextControl::FrameResized(float width, float height)
{
BTextControl::FrameResized(width, height);
}
void BPTextControl::GetPreferredSize(float *width, float *height)
{
BTextControl::GetPreferredSize(width, height);
}
void BPTextControl::ResizeToPreferred(void)
{
BTextControl::ResizeToPreferred();
}
void BPTextControl::MouseDown(BPoint point)
{
BTextControl::MouseDown(point);
}
void BPTextControl::MouseMoved(BPoint point, uint32 transit, const BMessage *message)
{
BTextControl::MouseMoved(point, transit, message);
}
void BPTextControl::MouseUp(BPoint point)
{
BTextControl::MouseUp(point);
}
//void BPButton::TargetedByScrollView(BScrollView *scroller)
//{
// BButton::TargetedByScrollView(scroller);
//}
void BPTextControl::SetEnabled(bool enabled)
{
BTextControl::SetEnabled(enabled);
}
void BPTextControl::SetValue(int32 value)
{
BTextControl::SetValue(value);
}
#if defined(__cplusplus)
extern "C" {
#endif
/***********************************************************************
* AUTHOR: nobody <baron>
* FILE: TextControl.cpp
* DATE: Tue Jan 14 21:35:44 2003
* DESCR:
***********************************************************************/
/***********************************************************************
* Method: BTextControl::~BTextControl
* Params:
* Effects:
***********************************************************************/
void BTextControl_Free(BTextControl *TextControl)
{
delete TextControl;
}
TCPlusObject BTextControl_Create(TPasObject PasObject, BRect frame,
const char *name,
const char *label,
const char *initial_text,
BMessage *message,
uint32 resizeMask,
uint32 flags)
{
return new BPTextControl(PasObject, frame, name, label,initial_text, message, resizeMask, flags);
}
/***********************************************************************
* Method: BTextControl::BTextControl
* Params: BMessage *data
* Effects:
***********************************************************************/
TCPlusObject BTextControl_Create_1(TPasObject PasObject, BMessage *data)
{
return new BPTextControl(PasObject, data);
}
/***********************************************************************
* Method: BTextControl::Instantiate
* Params: BMessage *data
* Returns: BArchivable *
* Effects:
***********************************************************************/
BArchivable *
BTextControl_Instantiate(BTextControl *TextControl, BMessage *data)
{
return TextControl->Instantiate(data);
}
/***********************************************************************
* Method: BTextControl::Archive
* Params: BMessage *data, bool deep
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BTextControl_Archive(BTextControl *TextControl, BMessage *data, bool deep)
{
return TextControl->Archive(data, deep);
}
/***********************************************************************
* Method: BTextControl::SetText
* Params: const char *text
* Returns: void
* Effects:
***********************************************************************/
void
BTextControl_SetText(BTextControl *TextControl, const char *text)
{
TextControl->SetText(text);
}
/***********************************************************************
* Method: BTextControl::Text
* Params:
* Returns: const char *
* Effects:
***********************************************************************/
const char *
BTextControl_Text(BTextControl *TextControl)
{
return TextControl->Text();
}
/***********************************************************************
* Method: BTextControl::SetValue
* Params: int32 value
* Returns: void
* Effects:
***********************************************************************/
void
BTextControl_SetValue(BTextControl *TextControl, int32 value)
{
TextControl->SetValue(value);
}
/***********************************************************************
* Method: BTextControl::Invoke
* Params: BMessage *msg
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BTextControl_Invoke(BTextControl *TextControl, BMessage *msg)
{
return TextControl->Invoke(msg);
}
/***********************************************************************
* Method: BTextControl::TextView
* Params:
* Returns: BTextView *
* Effects:
***********************************************************************/
BTextView *
BTextControl_TextView(BTextControl *TextControl)
{
return TextControl->TextView();
}
/***********************************************************************
* Method: BTextControl::SetModificationMessage
* Params: BMessage *message
* Returns: void
* Effects:
***********************************************************************/
void
BTextControl_SetModificationMessage(BTextControl *TextControl, BMessage *message)
{
TextControl->SetModificationMessage(message);
}
/***********************************************************************
* Method: BTextControl::ModificationMessage
* Params:
* Returns: BMessage *
* Effects:
***********************************************************************/
BMessage *
BTextControl_ModificationMessage(BTextControl *TextControl)
{
return TextControl->ModificationMessage();
}
/***********************************************************************
* Method: BTextControl::SetAlignment
* Params: alignment label, alignment text
* Returns: void
* Effects:
***********************************************************************/
void
BTextControl_SetAlignment(BTextControl *TextControl, alignment label, alignment text)
{
TextControl->SetAlignment(label, text);
}
/***********************************************************************
* Method: BTextControl::GetAlignment
* Params: alignment *label, alignment *text
* Returns: void
* Effects:
***********************************************************************/
void
BTextControl_GetAlignment(BTextControl *TextControl, alignment *label, alignment *text)
{
TextControl->GetAlignment(label, text);
}
/***********************************************************************
* Method: BTextControl::SetDivider
* Params: float dividing_line
* Returns: void
* Effects:
***********************************************************************/
void
BTextControl_SetDivider(BTextControl *TextControl, float dividing_line)
{
TextControl->SetDivider(dividing_line);
}
/***********************************************************************
* Method: BTextControl::Divider
* Params:
* Returns: float
* Effects:
***********************************************************************/
float
BTextControl_Divider(BTextControl *TextControl)
{
return TextControl->Divider();
}
/***********************************************************************
* Method: BTextControl::Draw
* Params: BRect updateRect
* Returns: void
* Effects:
***********************************************************************/
void
BTextControl_Draw(BTextControl *TextControl, BRect updateRect)
{
TextControl->Draw(updateRect);
}
/***********************************************************************
* Method: BTextControl::MouseDown
* Params: BPoint where
* Returns: void
* Effects:
***********************************************************************/
void
BTextControl_MouseDown(BTextControl *TextControl, BPoint where)
{
TextControl->MouseDown(where);
}
/***********************************************************************
* Method: BTextControl::AttachedToWindow
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BTextControl_AttachedToWindow(BTextControl *TextControl)
{
TextControl->AttachedToWindow();
}
/***********************************************************************
* Method: BTextControl::MakeFocus
* Params: bool focusState
* Returns: void
* Effects:
***********************************************************************/
void
BTextControl_MakeFocus(BTextControl *TextControl, bool focusState)
{
TextControl->MakeFocus(focusState);
}
/***********************************************************************
* Method: BTextControl::SetEnabled
* Params: bool state
* Returns: void
* Effects:
***********************************************************************/
void
BTextControl_SetEnabled(BTextControl *TextControl, bool state)
{
TextControl->SetEnabled(state);
}
/***********************************************************************
* Method: BTextControl::FrameMoved
* Params: BPoint new_position
* Returns: void
* Effects:
***********************************************************************/
void
BTextControl_FrameMoved(BTextControl *TextControl, BPoint new_position)
{
TextControl->FrameMoved(new_position);
}
/***********************************************************************
* Method: BTextControl::FrameResized
* Params: float new_width, float new_height
* Returns: void
* Effects:
***********************************************************************/
void
BTextControl_FrameResized(BTextControl *TextControl, float new_width, float new_height)
{
TextControl->FrameResized(new_width, new_height);
}
/***********************************************************************
* Method: BTextControl::WindowActivated
* Params: bool active
* Returns: void
* Effects:
***********************************************************************/
void
BTextControl_WindowActivated(BTextControl *TextControl, bool active)
{
TextControl->WindowActivated(active);
}
/***********************************************************************
* Method: BTextControl::GetPreferredSize
* Params: float *width, float *height
* Returns: void
* Effects:
***********************************************************************/
void
BTextControl_GetPreferredSize(BTextControl *TextControl, float *width, float *height)
{
TextControl->GetPreferredSize(width, height);
}
/***********************************************************************
* Method: BTextControl::ResizeToPreferred
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BTextControl_ResizeToPreferred(BTextControl *TextControl)
{
TextControl->ResizeToPreferred();
}
/***********************************************************************
* Method: BTextControl::MessageReceived
* Params: BMessage *msg
* Returns: void
* Effects:
***********************************************************************/
void
BTextControl_MessageReceived(BTextControl *TextControl, BMessage *msg)
{
TextControl->MessageReceived(msg);
}
/***********************************************************************
* Method: BTextControl::ResolveSpecifier
* Params: BMessage *msg, int32 index, BMessage *specifier, int32 form, const char *property
* Returns: BHandler *
* Effects:
***********************************************************************/
BHandler *
BTextControl_ResolveSpecifier(BTextControl *TextControl, BMessage *msg, int32 index, BMessage *specifier, int32 form, const char *property)
{
return TextControl->ResolveSpecifier(msg, index, specifier, form, property);
}
/***********************************************************************
* Method: BTextControl::MouseUp
* Params: BPoint pt
* Returns: void
* Effects:
***********************************************************************/
void
BTextControl_MouseUp(BTextControl *TextControl, BPoint pt)
{
TextControl->MouseUp(pt);
}
/***********************************************************************
* Method: BTextControl::MouseMoved
* Params: BPoint pt, uint32 code, const BMessage *msg
* Returns: void
* Effects:
***********************************************************************/
void
BTextControl_MouseMoved(BTextControl *TextControl, BPoint pt, uint32 code, const BMessage *msg)
{
TextControl->MouseMoved(pt, code, msg);
}
/***********************************************************************
* Method: BTextControl::DetachedFromWindow
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BTextControl_DetachedFromWindow(BTextControl *TextControl)
{
TextControl->DetachedFromWindow();
}
/***********************************************************************
* Method: BTextControl::AllAttached
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BTextControl_AllAttached(BTextControl *TextControl)
{
TextControl->AllAttached();
}
/***********************************************************************
* Method: BTextControl::AllDetached
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BTextControl_AllDetached(BTextControl *TextControl)
{
TextControl->AllDetached();
}
/***********************************************************************
* Method: BTextControl::GetSupportedSuites
* Params: BMessage *data
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BTextControl_GetSupportedSuites(BTextControl *TextControl, BMessage *data)
{
return TextControl->GetSupportedSuites(data);
}
/***********************************************************************
* Method: BTextControl::SetFlags
* Params: uint32 flags
* Returns: void
* Effects:
***********************************************************************/
void
BTextControl_SetFlags(BTextControl *TextControl, uint32 flags)
{
TextControl->SetFlags(flags);
}
/***********************************************************************
* Method: BTextControl::Perform
* Params: perform_code d, void *arg
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BTextControl_Perform(BTextControl *TextControl, perform_code d, void *arg)
{
return TextControl->Perform(d, arg);
}
/***********************************************************************
* Method: BTextControl::_ReservedTextControl1
* Params:
* Returns: void
* Effects:
***********************************************************************/
/*void
BTextControl__ReservedTextControl1(BTextControl *TextControl)
{
TextControl->_ReservedTextControl1();
}
*/
/***********************************************************************
* Method: BTextControl::_ReservedTextControl2
* Params:
* Returns: void
* Effects:
***********************************************************************/
/*void
BTextControl__ReservedTextControl2(BTextControl *TextControl)
{
TextControl->_ReservedTextControl2();
}
*/
/***********************************************************************
* Method: BTextControl::_ReservedTextControl3
* Params:
* Returns: void
* Effects:
***********************************************************************/
/*void
BTextControl__ReservedTextControl3(BTextControl *TextControl)
{
TextControl->_ReservedTextControl3();
}
*/
/***********************************************************************
* Method: BTextControl::_ReservedTextControl4
* Params:
* Returns: void
* Effects:
***********************************************************************/
/*void
BTextControl__ReservedTextControl4(BTextControl *TextControl)
{
TextControl->_ReservedTextControl4();
}
*/
/***********************************************************************
* Method: BTextControl::operator=
* Params: const BTextControl &
* Returns: BTextControl &
* Effects:
***********************************************************************/
/*BTextControl &
BTextControl_operator=(BTextControl *TextControl, const BTextControl &)
{
return TextControl->operator=();
}
*/
/***********************************************************************
* Method: BTextControl::CommitValue
* Params:
* Returns: void
* Effects:
***********************************************************************/
/*void
BTextControl_CommitValue(BTextControl *TextControl)
{
TextControl->CommitValue();
}
*/
/***********************************************************************
* Method: BTextControl::InitData
* Params: const char *label, const char *initial_text, BMessage *data
* Returns: void
* Effects:
***********************************************************************/
/*void
BTextControl_InitData(BTextControl *TextControl, const char *label, const char *initial_text, BMessage *data)
{
TextControl->InitData(label, initial_text, data);
}
*/
#if defined(__cplusplus)
}
#endif
#endif /* _TextControl_CPP_ */

File diff suppressed because it is too large Load Diff

View File

@@ -1,542 +0,0 @@
/* BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _VIEW_CPP_
#define _VIEW_CPP_
#include <View.h>
#include <OS.h>
#include <handler.h>
#include <view.h>
#include <beobj.h>
// definition of callback function in BView
typedef void (*BView_AllAttached_hook) (TPasObject PasObject);
typedef void (*BView_AllDetached_hook) (TPasObject PasObject);
typedef void (*BView_AttachedToWindow_hook) (TPasObject PasObject);
typedef void (*BView_DetachedFromWindow_hook) (TPasObject PasObject);
typedef void (*BView_Draw_hook) (TPasObject PasObject, TCPlusObject updateRect);
typedef void (*BView_DrawAfterChildren_hook) (TPasObject PasObject, TCPlusObject updateRect);
typedef void (*BView_FrameMoved_hook) (TPasObject PasObject, TCPlusObject parentPoint);
typedef void (*BView_FrameResized_hook) (TPasObject PasObject, float width, float height);
typedef void (*BView_GetPreferredSize_hook) (TPasObject PasObject, float *width, float *height);
typedef void (*BView_ResizeToPreferred_hook) (TPasObject PasObject);
typedef void (*BView_KeyDown_hook) (TPasObject PasObject, const char *bytes, int32 numBytes);
typedef void (*BView_KeyUp_hook) (TPasObject PasObject, const char *bytes, int32 numBytes);
typedef void (*BView_MouseDown_hook) (TPasObject PasObject, TCPlusObject point);
typedef void (*BView_MouseMoved_hook) (TPasObject PasObject, TCPlusObject point, uint32 transit, TCPlusObject message);
typedef void (*BView_MouseUp_hook) (TPasObject PasObject, TCPlusObject point);
typedef void (*BView_Pulse_hook) (TPasObject PasObject);
typedef void (*BView_TargetedByScrollView_hook) (TPasObject PasObject, TCPlusObject scroller);
typedef void (*BView_WindowActivated_hook) (TPasObject PasObject, bool active);
#if defined(__cplusplus)
extern "C" {
#endif
uint32 _B_FOLLOW_NONE = B_FOLLOW_NONE;
uint32 _B_FOLLOW_ALL_SIDES = B_FOLLOW_ALL_SIDES;
uint32 _B_FOLLOW_ALL = B_FOLLOW_ALL;
uint32 _B_FOLLOW_LEFT = B_FOLLOW_LEFT;
uint32 _B_FOLLOW_RIGHT = B_FOLLOW_RIGHT;
uint32 _B_FOLLOW_LEFT_RIGHT = B_FOLLOW_LEFT_RIGHT;
uint32 _B_FOLLOW_H_CENTER = B_FOLLOW_H_CENTER;
uint32 _B_FOLLOW_TOP = B_FOLLOW_TOP;
uint32 _B_FOLLOW_BOTTOM = B_FOLLOW_BOTTOM;
uint32 _B_FOLLOW_TOP_BOTTOM = B_FOLLOW_TOP_BOTTOM;
uint32 _B_FOLLOW_V_CENTER = B_FOLLOW_V_CENTER;
BView_AllAttached_hook View_AllAttached_hook;
BView_AllDetached_hook View_AllDetached_hook;
BView_AttachedToWindow_hook View_AttachedToWindow_hook;
BView_DetachedFromWindow_hook View_DetachedFromWindow_hook;
BView_Draw_hook View_Draw_hook;
BView_DrawAfterChildren_hook View_DrawAfterChildren_hook;
BView_FrameMoved_hook View_FrameMoved_hook;
BView_FrameResized_hook View_FrameResized_hook;
BView_GetPreferredSize_hook View_GetPreferredSize_hook;
BView_ResizeToPreferred_hook View_ResizeToPreferred_hook;
BView_KeyDown_hook View_KeyDown_hook;
BView_KeyUp_hook View_KeyUp_hook;
BView_MouseDown_hook View_MouseDown_hook;
BView_MouseMoved_hook View_MouseMoved_hook;
BView_MouseUp_hook View_MouseUp_hook;
BView_Pulse_hook View_Pulse_hook;
BView_TargetedByScrollView_hook View_TargetedByScrollView_hook;
BView_WindowActivated_hook View_WindowActivated_hook;
#if defined(__cplusplus)
}
#endif
BPView::BPView(TPasObject PasObject,
BRect frame,
const char *name,
uint32 resizingMode,
uint32 flags)
: BView(frame, name, resizingMode, flags),
BPHandler(PasObject),
BPasObject(PasObject)
{
}
BPView::BPView(TPasObject PasObject, BMessage *archive)
: BView(archive),
BPHandler(PasObject),
BPasObject(PasObject)
{
}
void BPView::MessageReceived(BMessage *message)
{
BPHandler::MessageReceived_hookCall(message);
BView::MessageReceived(message);
}
void BPView::AllAttached(void)
{
AllAttached_hookCall();
}
void BPView::AllAttached_hookCall(void)
{
View_AllAttached_hook(GetPasObject());
}
void BPView::AttachedToWindow(void)
{
BView::AttachedToWindow();
AttachedToWindow_hookCall();
}
void BPView::AttachedToWindow_hookCall(void)
{
View_AttachedToWindow_hook(GetPasObject());
}
void BPView::AllDetached(void)
{
AllDetached_hookCall();
}
void BPView::AllDetached_hookCall(void)
{
View_AllDetached_hook(GetPasObject());
}
void BPView::DetachedFromWindow(void)
{
DetachedFromWindow_hookCall();
}
void BPView::DetachedFromWindow_hookCall(void)
{
View_DetachedFromWindow_hook(GetPasObject());
}
void BPView::Draw(BRect updateRect)
{
BView::Draw(updateRect);
Draw_hookCall(updateRect);
}
void BPView::Draw_hookCall(BRect updateRect)
{
View_Draw_hook(GetPasObject(), &updateRect);
}
void BPView::DrawAfterChildren(BRect updateRect)
{
DrawAfterChildren_hookCall(updateRect);
}
void BPView::DrawAfterChildren_hookCall(BRect updateRect)
{
View_DrawAfterChildren_hook(GetPasObject(), &updateRect);
}
void BPView::FrameMoved(BPoint parentPoint)
{
FrameMoved_hookCall(parentPoint);
}
void BPView::FrameMoved_hookCall(BPoint parentPoint)
{
View_FrameMoved_hook(GetPasObject(), &parentPoint);
}
void BPView::FrameResized(float width, float height)
{
FrameResized_hookCall(width, height);
}
void BPView::FrameResized_hookCall(float width, float height)
{
View_FrameResized_hook(GetPasObject(), width, height);
}
void BPView::GetPreferredSize(float *width, float *height)
{
GetPreferredSize_hookCall(width, height);
}
void BPView::GetPreferredSize_hookCall(float *width, float *height)
{
View_GetPreferredSize_hook(GetPasObject(), width, height);
}
void BPView::ResizeToPreferred(void)
{
ResizeToPreferred_hookCall();
}
void BPView::ResizeToPreferred_hookCall(void)
{
View_ResizeToPreferred_hook(GetPasObject());
}
void BPView::KeyDown(const char *bytes, int32 numBytes)
{
KeyDown_hookCall(bytes, numBytes);
}
void BPView::KeyDown_hookCall(const char *bytes, int32 numBytes)
{
View_KeyDown_hook(GetPasObject(), bytes, numBytes);
}
void BPView::KeyUp(const char *bytes, int32 numBytes)
{
KeyUp_hookCall(bytes, numBytes);
}
void BPView::KeyUp_hookCall(const char *bytes, int32 numBytes)
{
View_KeyUp_hook(GetPasObject(), bytes, numBytes);
}
void BPView::MouseDown(BPoint point)
{
MouseDown_hookCall(point);
}
void BPView::MouseDown_hookCall(BPoint point)
{
View_MouseDown_hook(GetPasObject(), &point);
}
void BPView::MouseMoved(BPoint point, uint32 transit, const BMessage *message)
{
MouseMoved_hookCall(point, transit, message);
}
void BPView::MouseMoved_hookCall(BPoint point, uint32 transit, const BMessage *message)
{
View_MouseMoved_hook(GetPasObject(), &point, transit, &message);
}
void BPView::MouseUp(BPoint point)
{
MouseUp_hookCall(point);
}
void BPView::MouseUp_hookCall(BPoint point)
{
View_MouseUp_hook(GetPasObject(), &point);
}
void BPView::Pulse(void)
{
Pulse_hookCall();
}
void BPView::Pulse_hookCall(void)
{
View_Pulse_hook(GetPasObject());
}
//void BPView::TargetedByScrollView(BScrollView *scroller)
//{
// View_TargetedByScrollView(GetPasObject(), scroller);
//}
void BPView::WindowActivated(bool active)
{
WindowActivated_hookCall(active);
}
void BPView::WindowActivated_hookCall(bool active)
{
View_WindowActivated_hook(GetPasObject(), active);
}
#if defined(__cplusplus)
extern "C" {
#endif
TCPlusObject BView_Create_1(TPasObject PasObject,
BRect frame,
const char *name,
uint32 resizingMode,
uint32 flags)
{
return new BPView(PasObject, frame, name, resizingMode, flags);
}
void BView_Free(TCPlusObject View)
{
delete View;
}
/***********************************************************************
* Method: BView::Instantiate
* Params: BMessage *data
* Returns: BArchivable *
* Effects:
***********************************************************************/
BArchivable *
BView_Instantiate(BView *View, BMessage *data)
{
return View->Instantiate(data);
}
/***********************************************************************
* Method: BView::Archive
* Params: BMessage *data, bool deep
* Returns: status_t
* Effects:
***********************************************************************/
status_t
BView_Archive(BView *View, BMessage *data,
bool deep)
{
return View->Archive(data,
deep);
}
// TODO : implement hook functions
/***********************************************************************
* Method: BView::AttachedToWindow
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BView_AttachedToWindow(BView *View)
{
View->AttachedToWindow();
}
/***********************************************************************
* Method: BView::AllAttached
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BView_AllAttached(BView *View)
{
View->AllAttached();
}
/***********************************************************************
* Method: BView::DetachedFromWindow
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BView_DetachedFromWindow(BView *View)
{
View->DetachedFromWindow();
}
/***********************************************************************
* Method: BView::AllDetached
* Params:
* Returns: void
* Effects:
***********************************************************************/
void
BView_AllDetached(BView *View)
{
View->AllDetached();
}
// END TODO implement hook functions
/***********************************************************************
* Method: BView::AddChild
* Params: BView *child, BView *before
* Returns: void
* Effects:
***********************************************************************/
void
BView_AddChild(BView *View, BView *child,
BView *before)
{
View->AddChild(child,
before);
}
/***********************************************************************
* Method: BView::RemoveChild
* Params: BView *child
* Returns: bool
* Effects:
***********************************************************************/
bool
BView_RemoveChild(BView *View, BView *child)
{
return View->RemoveChild(child);
}
/***********************************************************************
* Method: BView::CountChildren
* Params:
* Returns: int32
* Effects:
***********************************************************************/
int32
BView_CountChildren(BView *View)
{
return View->CountChildren();
}
/***********************************************************************
* Method: BView::ChildAt
* Params: int32 index
* Returns: BView *
* Effects:
***********************************************************************/
BView *
BView_ChildAt(BView *View, int32 index)
{
return View->ChildAt(index);
}
/***********************************************************************
* Method: BView::NextSibling
* Params:
* Returns: BView *
* Effects:
***********************************************************************/
BView *
BView_NextSibling(BView *View)
{
return View->NextSibling();
}
/***********************************************************************
* Method: BView::PreviousSibling
* Params:
* Returns: BView *
* Effects:
***********************************************************************/
BView *
BView_PreviousSibling(BView *View)
{
return View->PreviousSibling();
}
/***********************************************************************
* Method: BView::RemoveSelf
* Params:
* Returns: bool
* Effects:
***********************************************************************/
bool
BView_RemoveSelf(BView *View)
{
return View->RemoveSelf();
}
/***********************************************************************
* Method: BView::Window
* Params:
* Returns: BWindow *
* Effects:
***********************************************************************/
BWindow *
BView_Window(BView *View)
{
return View->Window();
}
// TODO : implement hook function
/***********************************************************************
* Method: BView::Draw
* Params: BRect updateRect
* Returns: void
* Effects:
***********************************************************************/
void
BView_Draw(BView *View, BRect updateRect)
{
View->Draw(updateRect);
}
// END TODO implement hook function
/***********************************************************************
* Method: BView::SetViewColor
* Params: rgb_color c
* Returns: void
* Effects:
***********************************************************************/
void
BView_SetViewColor(BView *View, rgb_color c)
{
View->SetViewColor(c);
}
/***********************************************************************
* Method: BView::ViewColor
* Params:
* Returns: rgb_color
* Effects:
***********************************************************************/
rgb_color
BView_ViewColor(BView *View)
{
return View->ViewColor();
}
#if defined(__cplusplus)
}
#endif
#endif /* _VIEW_CPP_ */

File diff suppressed because it is too large Load Diff

View File

@@ -1,317 +0,0 @@
{ BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2003 Olivier Coursiere
Eric Jourde
Oscar Lesta
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
}
unit Alert;
interface
uses
BeObj, Archivable, Button, InterfaceDefs, Invoker, Handler,
Message, Rect, SupportDefs, TextView, Window;
type
{ enum for flavors of alert }
// enum alert_type
TAlert_Type = (B_EMPTY_ALERT, B_INFO_ALERT, B_IDEA_ALERT, B_WARNING_ALERT,
B_STOP_ALERT);
//enum button_spacing
TButton_Spacing = (B_EVEN_SPACING, B_OFFSET_SPACING);
TAlert = class(TWindow)
private
public
// Here we have this name colition: type --> kind
constructor Create(title : PChar; text : PChar; button1 : PChar;
button2 : PChar; button3 : PChar; width : TButton_Width;
kind{type} : TAlert_Type);
constructor Create(title : PChar; text : PChar; button1 : PChar;
button2 : PChar; button3 : PChar; width : TButton_Width;
spacing : TButton_Spacing; kind{type} : TAlert_Type);
constructor Create(data : TMessage);
destructor Destroy; override;
function Instantiate(data : TMessage) : TArchivable;
function Archive(data : TMessage; deep : boolean) : TStatus_t;
procedure SetShortcut(button_index : integer; key : Char);
function Shortcut(button_index : integer) : Char;
function Go : integer;
function Go(invoker : TInvoker) : TStatus_t;
procedure MessageReceived(an_event : TMessage); override;
procedure FrameResized(new_width : double; new_height : double);
function ButtonAt(index : integer) : TButton;
function TextView : TTextView;
function ResolveSpecifier(msg : TMessage; index : integer; specifier : TMessage; form : integer; properti : PChar) : THandler;
function GetSupportedSuites(data : TMessage) : TStatus_t;
procedure DispatchMessage(msg : TMessage; handler : THandler); override;
procedure Quit;
function QuitRequested : boolean; override;
function AlertPosition(width : double; height : double) : TPoint;
{
function Perform(d : TPerform_code; arg : Pointer) : TStatus_t;
procedure _ReservedAlert1;
procedure _ReservedAlert2;
procedure _ReservedAlert3;
procedure InitObject(text : PChar; button1 : PChar; button2 : PChar; button3 : PChar; width : TButton_Width; spacing : TButton_Spacing; type : TAlert_Type);
function InitIcon : TBitmap;
procedure sem_id fAlertSem;
procedure int32 fAlertVal;
procedure BButton *fButtons[3];
procedure BTextView *fTextView;
procedure char fKeys[3];
procedure alert_type fMsgType;
procedure button_width fButtonWidth;
procedure BInvoker *fInvoker;
procedure uint32 _reserved[4];
}
end;
function BAlert_Create(AObject : TBeObject; title : PChar; text : PChar;
button1 : PChar; button2 : PChar; button3 : PChar; width : TButton_Width;
kind{type} : TAlert_Type) : TCPlusObject; cdecl;
external BePascalLibName name 'BAlert_Create';
function BAlert_Create_1(AObject : TBeObject; title : PChar; text : PChar;
button1 : PChar; button2 : PChar; button3 : PChar; width : TButton_Width;
spacing : TButton_Spacing; kind{type} : TAlert_Type) : TCPlusObject; cdecl;
external BePascalLibName name 'BAlert_Create_1';
function BAlert_Create_2(AObject : TBeObject; data : TCPlusObject)
: TCPlusObject; cdecl; external BePascalLibName name 'BAlert_Create_2';
procedure BAlert_Free(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BAlert_Free';
function BAlert_Instantiate(AObject : TCPlusObject; data : TCPlusObject) : TArchivable; cdecl; external BePascalLibName name 'BAlert_Instantiate';
function BAlert_Archive(AObject : TCPlusObject; data : TCPlusObject; deep : boolean) : TStatus_t; cdecl; external BePascalLibName name 'BAlert_Archive';
procedure BAlert_SetShortcut(AObject : TCPlusObject; button_index : integer; key : Char); cdecl; external BePascalLibName name 'BAlert_SetShortcut';
function BAlert_Shortcut(AObject : TCPlusObject; button_index : integer) : Char; cdecl; external BePascalLibName name 'BAlert_Shortcut';
function BAlert_Go(AObject : TCPlusObject) : integer; cdecl; external BePascalLibName name 'BAlert_Go';
function BAlert_Go(AObject : TCPlusObject; invoker : TCPlusObject) : TStatus_t; cdecl; external BePascalLibName name 'BAlert_Go';
procedure BAlert_MessageReceived(AObject : TCPlusObject; an_event : TCPlusObject); cdecl; external BePascalLibName name 'BAlert_MessageReceived';
procedure BAlert_FrameResized(AObject : TCPlusObject; new_width : double; new_height : double); cdecl; external BePascalLibName name 'BAlert_FrameResized';
function BAlert_ButtonAt(AObject : TCPlusObject; index : integer) : TButton; cdecl; external BePascalLibName name 'BAlert_ButtonAt';
function BAlert_TextView(AObject : TCPlusObject) : TTextView; cdecl; external BePascalLibName name 'BAlert_TextView';
function BAlert_ResolveSpecifier(AObject : TCPlusObject; msg : TCPlusObject; index : integer; specifier : TCPlusObject; form : integer; properti : PChar) : THandler; cdecl; external BePascalLibName name 'BAlert_ResolveSpecifier';
function BAlert_GetSupportedSuites(AObject : TCPlusObject; data : TCPlusObject) : TStatus_t; cdecl; external BePascalLibName name 'BAlert_GetSupportedSuites';
procedure BAlert_DispatchMessage(AObject : TCPlusObject; msg : TCPlusObject; handler : TCPlusObject); cdecl; external BePascalLibName name 'BAlert_DispatchMessage';
procedure BAlert_Quit(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BAlert_Quit';
function BAlert_QuitRequested(AObject : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BAlert_QuitRequested';
function BAlert_AlertPosition(AObject : TCPlusObject; width : double; height : double) : TPoint; cdecl; external BePascalLibName name 'BAlert_AlertPosition';
{
function BAlert_Perform(AObject : TCPlusObject; d : TPerform_code; arg : Pointer) : TStatus_t; cdecl; external BePascalLibName name 'BAlert_Perform';
procedure BAlert__ReservedAlert1(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BAlert__ReservedAlert1';
procedure BAlert__ReservedAlert2(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BAlert__ReservedAlert2';
procedure BAlert__ReservedAlert3(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BAlert__ReservedAlert3';
procedure BAlert_InitObject(AObject : TCPlusObject; text : PChar; button1 : PChar; button2 : PChar; button3 : PChar; width : TButton_Width; spacing : TButton_Spacing; type : TAlert_Type); cdecl; external BePascalLibName name 'BAlert_InitObject';
function BAlert_InitIcon(AObject : TCPlusObject) : TBitmap; cdecl; external BePascalLibName name 'BAlert_InitIcon';
procedure BAlert_sem_id fAlertSem(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BAlert_sem_id fAlertSem';
procedure BAlert_int32 fAlertVal(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BAlert_int32 fAlertVal';
procedure BAlert_BButton *fButtons[3](AObject : TCPlusObject); cdecl; external BePascalLibName name 'BAlert_BButton *fButtons[3]';
procedure BAlert_BTextView *fTextView(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BAlert_BTextView *fTextView';
procedure BAlert_char fKeys[3](AObject : TCPlusObject); cdecl; external BePascalLibName name 'BAlert_char fKeys[3]';
procedure BAlert_alert_type fMsgType(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BAlert_alert_type fMsgType';
procedure BAlert_button_width fButtonWidth(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BAlert_button_width fButtonWidth';
procedure BAlert_BInvoker *fInvoker(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BAlert_BInvoker *fInvoker';
procedure BAlert_uint32 _reserved[4](AObject : TCPlusObject); cdecl; external BePascalLibName name 'BAlert_uint32 _reserved[4]';
}
implementation
constructor TAlert.Create(title : PChar; text : PChar; button1 : PChar;
button2 : PChar; button3 : PChar; width : TButton_Width;
kind{type} : TAlert_Type);
begin
CPlusObject := BAlert_Create(Self, title, text, button1, button2, button3,
width, kind);
end;
constructor TAlert.Create(title : PChar; text : PChar; button1 : PChar; button2 : PChar; button3 : PChar; width : TButton_Width; spacing : TButton_Spacing; kind{type} : TAlert_Type);
begin
CPlusObject := BAlert_Create_1(Self, title, text, button1, button2, button3,
width, spacing, kind{type});
end;
constructor TAlert.Create(data : TMessage);
begin
CPlusObject := BAlert_Create_2(Self, data.CPlusObject);
end;
destructor TAlert.Destroy;
begin
BAlert_Free(CPlusObject);
end;
function TAlert.Instantiate(data : TMessage) : TArchivable;
begin
Result := BAlert_Instantiate(CPlusObject, data.CPlusObject);
end;
function TAlert.Archive(data : TMessage; deep : boolean) : TStatus_t;
begin
Result := BAlert_Archive(CPlusObject, data.CPlusObject, deep);
end;
procedure TAlert.SetShortcut(button_index : integer; key : Char);
begin
BAlert_SetShortcut(CPlusObject, button_index, key);
end;
function TAlert.Shortcut(button_index : integer) : Char;
begin
Result := BAlert_Shortcut(CPlusObject, button_index);
end;
function TAlert.Go : integer;
begin
Result := BAlert_Go(CPlusObject);
end;
function TAlert.Go(invoker : TInvoker) : TStatus_t;
begin
Result := BAlert_Go(CPlusObject, invoker.CPlusObject);
end;
procedure TAlert.MessageReceived(an_event : TMessage);
begin
BAlert_MessageReceived(CPlusObject, an_event.CPlusObject);
end;
procedure TAlert.FrameResized(new_width : double; new_height : double);
begin
BAlert_FrameResized(CPlusObject, new_width, new_height);
end;
function TAlert.ButtonAt(index : integer) : TButton;
begin
Result := BAlert_ButtonAt(CPlusObject, index);
end;
function TAlert.TextView : TTextView;
begin
Result := BAlert_TextView(CPlusObject);
end;
function TAlert.ResolveSpecifier(msg : TMessage; index : integer; specifier : TMessage; form : integer; properti : PChar) : THandler;
begin
Result := BAlert_ResolveSpecifier(CPlusObject, msg.CPlusObject, index, specifier.CPlusObject, form, properti);
end;
function TAlert.GetSupportedSuites(data : TMessage) : TStatus_t;
begin
Result := BAlert_GetSupportedSuites(CPlusObject, data.CPlusObject);
end;
procedure TAlert.DispatchMessage(msg : TMessage; handler : THandler);
begin
BAlert_DispatchMessage(CPlusObject, msg.CPlusObject, handler.CPlusObject);
end;
procedure TAlert.Quit;
begin
BAlert_Quit(CPlusObject);
end;
function TAlert.QuitRequested : boolean;
begin
Result := BAlert_QuitRequested(CPlusObject);
end;
function TAlert.AlertPosition(width : double; height : double) : TPoint;
begin
Result := BAlert_AlertPosition(CPlusObject, width, height);
end;
{
function TAlert.Perform(d : TPerform_code; arg : Pointer) : TStatus_t;
begin
Result := BAlert_Perform(CPlusObject, d, arg);
end;
procedure TAlert._ReservedAlert1;
begin
BAlert__ReservedAlert1(CPlusObject);
end;
procedure TAlert._ReservedAlert2;
begin
BAlert__ReservedAlert2(CPlusObject);
end;
procedure TAlert._ReservedAlert3;
begin
BAlert__ReservedAlert3(CPlusObject);
end;
procedure TAlert.InitObject(text : PChar; button1 : PChar; button2 : PChar; button3 : PChar; width : TButton_Width; spacing : TButton_Spacing; type : TAlert_Type);
begin
BAlert_InitObject(CPlusObject, text, button1, button2, button3, width, spacing, type);
end;
function TAlert.InitIcon : TBitmap;
begin
Result := BAlert_InitIcon(CPlusObject);
end;
procedure TAlert.sem_id fAlertSem;
begin
BAlert_sem_id fAlertSem(CPlusObject);
end;
procedure TAlert.int32 fAlertVal;
begin
BAlert_int32 fAlertVal(CPlusObject);
end;
procedure TAlert.BButton *fButtons[3];
begin
BAlert_BButton *fButtons[3](CPlusObject);
end;
procedure TAlert.BTextView *fTextView;
begin
BAlert_BTextView *fTextView(CPlusObject);
end;
procedure TAlert.char fKeys[3];
begin
BAlert_char fKeys[3](CPlusObject);
end;
procedure TAlert.alert_type fMsgType;
begin
BAlert_alert_type fMsgType(CPlusObject);
end;
procedure TAlert.button_width fButtonWidth;
begin
BAlert_button_width fButtonWidth(CPlusObject);
end;
procedure TAlert.BInvoker *fInvoker;
begin
BAlert_BInvoker *fInvoker(CPlusObject);
end;
procedure TAlert.uint32 _reserved[4];
begin
BAlert_uint32 _reserved[4](CPlusObject);
end;
}
end.

View File

@@ -1,550 +0,0 @@
{ BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2003 Olivier Coursiere
Eric Jourde
Oscar Lesta
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
}
unit Bitmap;
interface
uses
BeObj, Archivable, GraphicDefs, Message, OS, Rect, SupportDefs, View;
type
// PCardinal = ^Cardinal;
TBitmap = class(TArchivable)
private
public
// I will change "bounds" to "frame" in these constructors...
// they clash with the Bounds function.
// Also "bytesPerWow" --> "bytes_per_row"
constructor Create(frame : TRect; flags : Cardinal; depth : TColor_Space;
bytes_per_row : Integer; screenID : TScreenID);
constructor Create(frame : TRect; depth : TColor_Space;
accepts_views : boolean; need_contiguous : boolean);
constructor Create(source : TBitmap; accepts_views : boolean;
need_contiguous : boolean);
constructor Create(data : TMessage);
destructor Destroy; override;
function Instantiate(data : TMessage) : TArchivable;
function Archive(data : TMessage; deep : boolean) : TStatus_t;
function InitCheck : TStatus_t;
function IsValid : boolean;
function LockBits(state : PCardinal) : TStatus_t;
procedure UnlockBits;
function Area : TArea_ID;
function Bits : Pointer;
function BitsLength : Integer;
function BytesPerRow : Integer;
function ColorSpace : TColor_Space;
function Bounds : TRect;
procedure SetBits(data : Pointer; length : integer; offset : integer;
cs : TColor_Space);
function GetOverlayRestrictions(restrict : TOverlayRestrictions)
: TStatus_t;
procedure AddChild(view : TView);
function RemoveChild(view : TView) : boolean;
function CountChildren : integer;
function ChildAt(index : integer) : TView;
function FindView(view_name : PChar) : TView;
function FindView(point : TPoint) : TView;
function Lock : boolean;
procedure Unlock;
function IsLocked : boolean;
function Perform(d : TPerform_code; arg : Pointer) : TStatus_t;
{
procedure _ReservedBitmap1;
procedure _ReservedBitmap2;
procedure _ReservedBitmap3;
constructor Create( : TBitmap);
function operator=( : TBitmap) : TBitmap;
function get_shared_pointer : PChar;
procedure set_bits(offset : integer; data : PChar; length : integer);
procedure set_bits_24(offset : integer; data : PChar; length : integer);
procedure set_bits_24_local_gray(offset : integer; data : PChar; len : integer);
procedure set_bits_24_local_256(offset : integer; data : PByte; len : integer);
procedure set_bits_24_24(offset : integer; data : PChar; length : integer; big_endian_dst : boolean);
procedure set_bits_8_24(offset : integer; data : PChar; length : integer; big_endian_dst : boolean);
procedure set_bits_gray_24(offset : integer; data : PChar; length : integer; big_endian_dst : boolean);
function get_server_token : integer;
procedure InitObject(frame : TRect; depth : TColor_Space; flags : Cardinal; bytesPerRow : integer; screenID : TScreenID);
procedure AssertPtr;
procedure void *fBasePtr;
procedure int32 fSize;
procedure color_space fType;
procedure BRect fBound;
procedure int32 fRowBytes;
procedure BWindow *fWindow;
procedure int32 fServerToken;
procedure int32 fToken;
procedure uint8 unused;
procedure area_id fArea;
procedure area_id fOrigArea;
procedure uint32 fFlags;
procedure status_t fInitError;
}
end;
function BBitmap_Create(AObject : TBeObject; bounds : TCPlusObject;
flags : Cardinal; depth : TColor_Space; bytesPerRow : Integer;
screenID : TScreenID) : TCPlusObject; cdecl;
external BePascalLibName name 'BBitmap_Create';
function BBitmap_Create_1(AObject : TBeObject; bounds : TCPlusObject;
depth : TColor_Space; accepts_views : boolean; need_contiguous : boolean)
: TCPlusObject; cdecl; external BePascalLibName name 'BBitmap_Create_1';
function BBitmap_Create_2(AObject : TBeObject; source : TBitmap;
accepts_views : boolean; need_contiguous : boolean) : TCPlusObject; cdecl;
external BePascalLibName name 'BBitmap_Create_2';
function BBitmap_Create_3(AObject : TBeObject; data : TCPlusObject)
: TCPlusObject; cdecl; external BePascalLibName name 'BBitmap_Create_3';
procedure BBitmap_Free(AObject : TCPlusObject); cdecl;
external BePascalLibName name 'BBitmap_Free';
function BBitmap_Instantiate(AObject : TCPlusObject; data : {TMessage}TCPlusObject)
: TArchivable; cdecl; external BePascalLibName name 'BBitmap_Instantiate';
function BBitmap_Archive(AObject : TCPlusObject; data : {TMessage}TCPlusObject;
deep : boolean) : TStatus_t; cdecl;
external BePascalLibName name 'BBitmap_Archive';
function BBitmap_InitCheck(AObject : TCPlusObject) : TStatus_t; cdecl;
external BePascalLibName name 'BBitmap_InitCheck';
function BBitmap_IsValid(AObject : TCPlusObject) : boolean; cdecl;
external BePascalLibName name 'BBitmap_IsValid';
function BBitmap_LockBits(AObject : TCPlusObject; state : PCardinal)
: TStatus_t; cdecl; external BePascalLibName name 'BBitmap_LockBits';
procedure BBitmap_UnlockBits(AObject : TCPlusObject); cdecl;
external BePascalLibName name 'BBitmap_UnlockBits';
function BBitmap_Area(AObject : TCPlusObject) : TArea_ID; cdecl;
external BePascalLibName name 'BBitmap_Area';
function BBitmap_Bits(AObject : TCPlusObject) : Pointer; cdecl;
external BePascalLibName name 'BBitmap_Bits';
function BBitmap_BitsLength(AObject : TCPlusObject) : integer; cdecl;
external BePascalLibName name 'BBitmap_BitsLength';
function BBitmap_BytesPerRow(AObject : TCPlusObject) : integer; cdecl;
external BePascalLibName name 'BBitmap_BytesPerRow';
function BBitmap_ColorSpace(AObject : TCPlusObject) : TColor_Space; cdecl;
external BePascalLibName name 'BBitmap_ColorSpace';
function BBitmap_Bounds(AObject : TCPlusObject) : TRect; cdecl;
external BePascalLibName name 'BBitmap_Bounds';
procedure BBitmap_SetBits(AObject : TCPlusObject; data : Pointer;
length : integer; offset : integer; cs : TColor_Space); cdecl;
external BePascalLibName name 'BBitmap_SetBits';
function BBitmap_GetOverlayRestrictions(AObject : TCPlusObject;
restrict : TOverlayRestrictions) : TStatus_t; cdecl;
external BePascalLibName name 'BBitmap_GetOverlayRestrictions';
procedure BBitmap_AddChild(AObject : TCPlusObject; view : {TView}TCPlusObject); cdecl;
external BePascalLibName name 'BBitmap_AddChild';
function BBitmap_RemoveChild(AObject : TCPlusObject; view : {TView}TCPlusObject)
: boolean; cdecl; external BePascalLibName name 'BBitmap_RemoveChild';
function BBitmap_CountChildren(AObject : TCPlusObject) : integer; cdecl;
external BePascalLibName name 'BBitmap_CountChildren';
function BBitmap_ChildAt(AObject : TCPlusObject; index : integer) : TView;
cdecl; external BePascalLibName name 'BBitmap_ChildAt';
function BBitmap_FindView(AObject : TCPlusObject; view_name : PChar) : TView;
cdecl; external BePascalLibName name 'BBitmap_FindView';
function BBitmap_FindView(AObject : TCPlusObject; point : TPoint{TCPlusObject})
: TView; cdecl; external BePascalLibName name 'BBitmap_FindView';
function BBitmap_Lock(AObject : TCPlusObject) : boolean; cdecl;
external BePascalLibName name 'BBitmap_Lock';
procedure BBitmap_Unlock(AObject : TCPlusObject); cdecl;
external BePascalLibName name 'BBitmap_Unlock';
function BBitmap_IsLocked(AObject : TCPlusObject) : boolean; cdecl;
external BePascalLibName name 'BBitmap_IsLocked';
function BBitmap_Perform(AObject : TCPlusObject; d : TPerform_code; arg : Pointer) : TStatus_t; cdecl; external BePascalLibName name 'BBitmap_Perform';
{
procedure BBitmap__ReservedBitmap1(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBitmap__ReservedBitmap1';
procedure BBitmap__ReservedBitmap2(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBitmap__ReservedBitmap2';
procedure BBitmap__ReservedBitmap3(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBitmap__ReservedBitmap3';
function BBitmap_Create(AObject : TBeObject; : TBitmap); cdecl; external BePascalLibName name 'BBitmap_Create';
function BBitmap_operator=(AObject : TCPlusObject; : TBitmap) : TBitmap; cdecl; external BePascalLibName name 'BBitmap_operator=';
function BBitmap_get_shared_pointer(AObject : TCPlusObject) : PChar; cdecl; external BePascalLibName name 'BBitmap_get_shared_pointer';
procedure BBitmap_set_bits(AObject : TCPlusObject; offset : integer; data : PChar; length : integer); cdecl; external BePascalLibName name 'BBitmap_set_bits';
procedure BBitmap_set_bits_24(AObject : TCPlusObject; offset : integer; data : PChar; length : integer); cdecl; external BePascalLibName name 'BBitmap_set_bits_24';
procedure BBitmap_set_bits_24_local_gray(AObject : TCPlusObject; offset : integer; data : PChar; len : integer); cdecl; external BePascalLibName name 'BBitmap_set_bits_24_local_gray';
procedure BBitmap_set_bits_24_local_256(AObject : TCPlusObject; offset : integer; data : PByte; len : integer); cdecl; external BePascalLibName name 'BBitmap_set_bits_24_local_256';
procedure BBitmap_set_bits_24_24(AObject : TCPlusObject; offset : integer; data : PChar; length : integer; big_endian_dst : boolean); cdecl; external BePascalLibName name 'BBitmap_set_bits_24_24';
procedure BBitmap_set_bits_8_24(AObject : TCPlusObject; offset : integer; data : PChar; length : integer; big_endian_dst : boolean); cdecl; external BePascalLibName name 'BBitmap_set_bits_8_24';
procedure BBitmap_set_bits_gray_24(AObject : TCPlusObject; offset : integer; data : PChar; length : integer; big_endian_dst : boolean); cdecl; external BePascalLibName name 'BBitmap_set_bits_gray_24';
function BBitmap_get_server_token(AObject : TCPlusObject) : integer; cdecl; external BePascalLibName name 'BBitmap_get_server_token';
procedure BBitmap_InitObject(AObject : TCPlusObject; frame : TCPlusObject; depth : TColor_Space; flags : Cardinal; bytesPerRow : integer; screenID : TScreenID); cdecl; external BePascalLibName name 'BBitmap_InitObject';
procedure BBitmap_AssertPtr(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBitmap_AssertPtr';
procedure BBitmap_void *fBasePtr(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBitmap_void *fBasePtr';
procedure BBitmap_int32 fSize(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBitmap_int32 fSize';
procedure BBitmap_color_space fType(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBitmap_color_space fType';
procedure BBitmap_BRect fBound(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBitmap_BRect fBound';
procedure BBitmap_int32 fRowBytes(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBitmap_int32 fRowBytes';
procedure BBitmap_BWindow *fWindow(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBitmap_BWindow *fWindow';
procedure BBitmap_int32 fServerToken(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBitmap_int32 fServerToken';
procedure BBitmap_int32 fToken(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBitmap_int32 fToken';
procedure BBitmap_uint8 unused(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBitmap_uint8 unused';
procedure BBitmap_area_id fArea(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBitmap_area_id fArea';
procedure BBitmap_area_id fOrigArea(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBitmap_area_id fOrigArea';
procedure BBitmap_uint32 fFlags(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBitmap_uint32 fFlags';
procedure BBitmap_status_t fInitError(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBitmap_status_t fInitError';
}
implementation
{ -- NOTE!
I will change "bounds" to "frame" in these constructors...
they clash with the Bounds function.
Also "bytesPerWow" --> "bytes_per_row"
}
// BBitmap(BRect bounds, uint32 flags, color_space depth,
// int32 bytesPerRow=B_ANY_BYTES_PER_ROW, screen_id screenID=B_MAIN_SCREEN_ID);
constructor TBitmap.Create(frame{bounds} : TRect; flags : Cardinal;
depth : TColor_Space; bytes_per_row : Integer; screenID : TScreenID);
begin
CPlusObject := BBitmap_Create(Self, frame, flags, depth, bytes_per_row,
screenID);
end;
// BBitmap(BRect bounds, color_space depth, bool accepts_views = false,
// bool need_contiguous = false);
constructor TBitmap.Create(frame{bounds} : TRect; depth : TColor_Space;
accepts_views : boolean; need_contiguous : Boolean);
begin
CPlusObject := BBitmap_Create_1(Self, frame.CPlusObject, depth,
accepts_views, need_contiguous);
end;
// BBitmap(const BBitmap* source, bool accepts_views = false,
// bool need_contiguous = false);
constructor TBitmap.Create(source : TBitmap; accepts_views : Boolean;
need_contiguous : Boolean);
begin
CPlusObject := BBitmap_Create_2(Self, source, accepts_views, need_contiguous);
end;
// BBitmap(BMessage *data);
constructor TBitmap.Create(data : TMessage);
begin
CPlusObject := BBitmap_Create_3(Self, data.CPlusObject);
end;
destructor TBitmap.Destroy;
begin
BBitmap_Free(CPlusObject);
inherited;
end;
function TBitmap.Instantiate(data : TMessage) : TArchivable;
begin
Result := BBitmap_Instantiate(CPlusObject, data.CPlusObject);
end;
function TBitmap.Archive(data : TMessage; deep : boolean) : TStatus_t;
begin
Result := BBitmap_Archive(CPlusObject, data.CPlusObject, deep);
end;
function TBitmap.InitCheck : TStatus_t;
begin
Result := BBitmap_InitCheck(CPlusObject);
end;
function TBitmap.IsValid : boolean;
begin
Result := BBitmap_IsValid(CPlusObject);
end;
function TBitmap.LockBits(state : PCardinal) : TStatus_t;
begin
Result := BBitmap_LockBits(CPlusObject, state);
end;
procedure TBitmap.UnlockBits;
begin
BBitmap_UnlockBits(CPlusObject);
end;
function TBitmap.Area : TArea_ID;
begin
Result := BBitmap_Area(CPlusObject);
end;
function TBitmap.Bits : Pointer;
begin
Result := BBitmap_Bits(CPlusObject);
end;
function TBitmap.BitsLength : integer;
begin
Result := BBitmap_BitsLength(CPlusObject);
end;
function TBitmap.BytesPerRow : integer;
begin
Result := BBitmap_BytesPerRow(CPlusObject);
end;
function TBitmap.ColorSpace : TColor_Space;
begin
Result := BBitmap_ColorSpace(CPlusObject);
end;
function TBitmap.Bounds : TRect;
begin
Result := BBitmap_Bounds(CPlusObject);
end;
procedure TBitmap.SetBits(data : Pointer; length : integer; offset : integer; cs : TColor_Space);
begin
BBitmap_SetBits(CPlusObject, data, length, offset, cs);
end;
function TBitmap.GetOverlayRestrictions(restrict : TOverlayRestrictions) : TStatus_t;
begin
Result := BBitmap_GetOverlayRestrictions(CPlusObject, restrict);
end;
procedure TBitmap.AddChild(view : TView);
begin
BBitmap_AddChild(CPlusObject, view.CPlusObject);
end;
function TBitmap.RemoveChild(view : TView) : boolean;
begin
Result := BBitmap_RemoveChild(CPlusObject, view.CPlusObject);
end;
function TBitmap.CountChildren : integer;
begin
Result := BBitmap_CountChildren(CPlusObject);
end;
function TBitmap.ChildAt(index : integer) : TView;
begin
Result := BBitmap_ChildAt(CPlusObject, index);
end;
function TBitmap.FindView(view_name : PChar) : TView;
begin
Result := BBitmap_FindView(CPlusObject, view_name);
end;
function TBitmap.FindView(point : TPoint) : TView;
begin
Result := BBitmap_FindView(CPlusObject, point.CPlusObject);
end;
function TBitmap.Lock : boolean;
begin
Result := BBitmap_Lock(CPlusObject);
end;
procedure TBitmap.Unlock;
begin
BBitmap_Unlock(CPlusObject);
end;
function TBitmap.IsLocked : boolean;
begin
Result := BBitmap_IsLocked(CPlusObject);
end;
function TBitmap.Perform(d : TPerform_code; arg : Pointer) : TStatus_t;
begin
Result := BBitmap_Perform(CPlusObject, d, arg);
end;
{
procedure TBitmap._ReservedBitmap1;
begin
BBitmap__ReservedBitmap1(CPlusObject);
end;
procedure TBitmap._ReservedBitmap2;
begin
BBitmap__ReservedBitmap2(CPlusObject);
end;
procedure TBitmap._ReservedBitmap3;
begin
BBitmap__ReservedBitmap3(CPlusObject);
end;
constructor TBitmap.Create( : TBitmap);
begin
CPlusObject := BBitmap_Create(Self, );
end;
function TBitmap.operator=( : TBitmap) : TBitmap;
begin
Result := BBitmap_operator=(CPlusObject, );
end;
function TBitmap.get_shared_pointer : PChar;
begin
Result := BBitmap_get_shared_pointer(CPlusObject);
end;
procedure TBitmap.set_bits(offset : integer; data : PChar; length : integer);
begin
BBitmap_set_bits(CPlusObject, offset, data, length);
end;
procedure TBitmap.set_bits_24(offset : integer; data : PChar; length : integer);
begin
BBitmap_set_bits_24(CPlusObject, offset, data, length);
end;
procedure TBitmap.set_bits_24_local_gray(offset : integer; data : PChar; len : integer);
begin
BBitmap_set_bits_24_local_gray(CPlusObject, offset, data, len);
end;
procedure TBitmap.set_bits_24_local_256(offset : integer; data : PByte; len : integer);
begin
BBitmap_set_bits_24_local_256(CPlusObject, offset, data, len);
end;
procedure TBitmap.set_bits_24_24(offset : integer; data : PChar; length : integer; big_endian_dst : boolean);
begin
BBitmap_set_bits_24_24(CPlusObject, offset, data, length, big_endian_dst);
end;
procedure TBitmap.set_bits_8_24(offset : integer; data : PChar; length : integer; big_endian_dst : boolean);
begin
BBitmap_set_bits_8_24(CPlusObject, offset, data, length, big_endian_dst);
end;
procedure TBitmap.set_bits_gray_24(offset : integer; data : PChar; length : integer; big_endian_dst : boolean);
begin
BBitmap_set_bits_gray_24(CPlusObject, offset, data, length, big_endian_dst);
end;
function TBitmap.get_server_token : integer;
begin
Result := BBitmap_get_server_token(CPlusObject);
end;
procedure TBitmap.InitObject(frame : TRect; depth : TColor_Space; flags : Cardinal; bytesPerRow : integer; screenID : TScreenID);
begin
BBitmap_InitObject(CPlusObject, frame.CPlusObject, depth, flags, bytesPerRow, screenID);
end;
procedure TBitmap.AssertPtr;
begin
BBitmap_AssertPtr(CPlusObject);
end;
procedure TBitmap.void *fBasePtr;
begin
BBitmap_void *fBasePtr(CPlusObject);
end;
procedure TBitmap.int32 fSize;
begin
BBitmap_int32 fSize(CPlusObject);
end;
procedure TBitmap.color_space fType;
begin
BBitmap_color_space fType(CPlusObject);
end;
procedure TBitmap.BRect fBound;
begin
BBitmap_BRect fBound(CPlusObject);
end;
procedure TBitmap.int32 fRowBytes;
begin
BBitmap_int32 fRowBytes(CPlusObject);
end;
procedure TBitmap.BWindow *fWindow;
begin
BBitmap_BWindow *fWindow(CPlusObject);
end;
procedure TBitmap.int32 fServerToken;
begin
BBitmap_int32 fServerToken(CPlusObject);
end;
procedure TBitmap.int32 fToken;
begin
BBitmap_int32 fToken(CPlusObject);
end;
procedure TBitmap.uint8 unused;
begin
BBitmap_uint8 unused(CPlusObject);
end;
procedure TBitmap.area_id fArea;
begin
BBitmap_area_id fArea(CPlusObject);
end;
procedure TBitmap.area_id fOrigArea;
begin
BBitmap_area_id fOrigArea(CPlusObject);
end;
procedure TBitmap.uint32 fFlags;
begin
BBitmap_uint32 fFlags(CPlusObject);
end;
procedure TBitmap.status_t fInitError;
begin
BBitmap_status_t fInitError(CPlusObject);
end;
}
end.

View File

@@ -1,360 +0,0 @@
{ BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2003 Olivier Coursiere
Eric Jourde
Oscar Lesta
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
}
unit box;
interface
uses
BeObj, Archivable, Control, Handler, Message, Rect, SupportDefs,
InterfaceDefs, View;
type
TBox = class(TView)
private
public
constructor Create(Frame : TRect; Name : PChar; ResizingMode,
Flags : Cardinal; BorderStyle : Tborder_style);
constructor Create(data : TMessage);
destructor Destroy; override;
function Instantiate(data : TMessage) : TArchivable;
function Archive(data : TMessage; deep : boolean) : TStatus_t;
procedure SetBorder(style : Tborder_style);
function Border : Tborder_style;
procedure SetLabel(aLabel : PChar);
function SetLabel(view_label : TView) : TStatus_t;
// Conflicting Name: Label is a reserved word in Pascal.
// I will use: GetLabel
function GetLabel : PChar;
function LabelView : TView;
procedure Draw(bounds : TRect); override;
procedure AttachedToWindow; override;
procedure DetachedFromWindow; override;
procedure AllAttached; override;
procedure AllDetached; override;
procedure FrameResized(new_width : double; new_height : double); override;
procedure MessageReceived(msg : TMessage); override;
procedure MouseDown(pt : TPoint); override;
procedure MouseUp(pt : TPoint); override;
procedure WindowActivated(state : boolean); override;
procedure MouseMoved(pt : TPoint; code : Cardinal; msg : TMessage); override;
procedure FrameMoved(new_position : TPoint); override;
function ResolveSpecifier(msg : TMessage; index : integer;
specifier : TMessage; form : integer;
properti : PChar) : THandler;
procedure ResizeToPreferred; override;
procedure GetPreferredSize(width : double; height : double);
procedure MakeFocus(state : boolean);
function GetSupportedSuites(data : TMessage) : TStatus_t;
function Perform(d : TPerform_code; arg : Pointer) : TStatus_t;
// procedure _ReservedBox1;
// procedure _ReservedBox2;
// function operator=( : TBox) : TBox;
// procedure InitObject(data : TMessage);
// procedure DrawPlain;
// procedure DrawFancy;
// procedure ClearAnyLabel;
// procedure char *fLabel;
// procedure BRect fBounds;
// procedure border_style fStyle;
// procedure BView *fLabelView;
// procedure uint32 _reserved[1];
end;
function BBox_Create(AObject : TBeObject;
Frame : TCPlusObject;
Name : PChar;
ResizingMode, Flags : Cardinal;
BorderStyle : Tborder_style) : TCPlusObject;
cdecl; external BePascalLibName name 'BBox_Create';
function BBox_Create_1(AObject : TBeObject; data : TCPlusObject) : TCPlusObject; cdecl; external BePascalLibName name 'BBox_Create_1';
procedure BBox_Free(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBox_Free';
function BBox_Instantiate(AObject : TCPlusObject; data : TCPlusObject) : TArchivable; cdecl; external BePascalLibName name 'BBox_Instantiate';
function BBox_Archive(AObject : TCPlusObject; data : TCPlusObject; deep : boolean) : TStatus_t; cdecl; external BePascalLibName name 'BBox_Archive';
procedure BBox_SetBorder(AObject : TCPlusObject; style : Tborder_style); cdecl; external BePascalLibName name 'BBox_SetBorder';
function BBox_Border(AObject : TCPlusObject) : Tborder_style; cdecl; external BePascalLibName name 'BBox_Border';
// Conflicting name Label --> aLabel.
procedure BBox_SetLabel(AObject : TCPlusObject; aLabel : PChar); cdecl; external BePascalLibName name 'BBox_SetLabel';
function BBox_SetLabel(AObject : TCPlusObject; view_label : TView) : TStatus_t; cdecl; external BePascalLibName name 'BBox_SetLabel';
function BBox_Label(AObject : TCPlusObject) : PChar; cdecl; external BePascalLibName name 'BBox_Label';
function BBox_LabelView(AObject : TCPlusObject) : TView; cdecl; external BePascalLibName name 'BBox_LabelView_1';
procedure BBox_Draw(AObject : TCPlusObject; bounds : TRect); cdecl; external BePascalLibName name 'BBox_Draw';
procedure BBox_AttachedToWindow(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBox_AttachedToWindow';
procedure BBox_DetachedFromWindow(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBox_DetachedFromWindow';
procedure BBox_AllAttached(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBox_AllAttached';
procedure BBox_AllDetached(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBox_AllDetached';
procedure BBox_FrameResized(AObject : TCPlusObject; new_width : double; new_height : double); cdecl; external BePascalLibName name 'BBox_FrameResized';
procedure BBox_MessageReceived(AObject : TCPlusObject; msg : TCPlusObject); cdecl; external BePascalLibName name 'BBox_MessageReceived';
procedure BBox_MouseDown(AObject : TCPlusObject; pt : TPoint); cdecl; external BePascalLibName name 'BBox_MouseDown';
procedure BBox_MouseUp(AObject : TCPlusObject; pt : TPoint); cdecl; external BePascalLibName name 'BBox_MouseUp';
procedure BBox_WindowActivated(AObject : TCPlusObject; state : boolean); cdecl; external BePascalLibName name 'BBox_WindowActivated';
procedure BBox_MouseMoved(AObject : TCPlusObject; pt : TPoint; code : Cardinal; msg : TCPlusObject); cdecl; external BePascalLibName name 'BBox_MouseMoved';
procedure BBox_FrameMoved(AObject : TCPlusObject; new_position : TPoint); cdecl; external BePascalLibName name 'BBox_FrameMoved';
function BBox_ResolveSpecifier(AObject : TCPlusObject; msg : TCPlusObject; index : integer; specifier : TMessage; form : integer; properti : PChar) : THandler; cdecl; external BePascalLibName name 'BBox_ResolveSpecifier';
procedure BBox_ResizeToPreferred(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBox_ResizeToPreferred';
procedure BBox_GetPreferredSize(AObject : TCPlusObject; width : double; height : double); cdecl; external BePascalLibName name 'BBox_GetPreferredSize';
procedure BBox_MakeFocus(AObject : TCPlusObject; state : boolean); cdecl; external BePascalLibName name 'BBox_MakeFocus';
function BBox_GetSupportedSuites(AObject : TCPlusObject; data : TCPlusObject) : TStatus_t; cdecl; external BePascalLibName name 'BBox_GetSupportedSuites';
function BBox_Perform(AObject : TCPlusObject; d : TPerform_code; arg : Pointer) : TStatus_t; cdecl; external BePascalLibName name 'BBox_Perform';
{
procedure BBox__ReservedBox1(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBox__ReservedBox1';
procedure BBox__ReservedBox2(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBox__ReservedBox2';
function BBox_operator=(AObject : TCPlusObject; : TBox) : TBox; cdecl; external BePascalLibName name 'BBox_operator=';
procedure BBox_InitObject(AObject : TCPlusObject; data : TMessage); cdecl; external BePascalLibName name 'BBox_InitObject';
procedure BBox_DrawPlain(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBox_DrawPlain';
procedure BBox_DrawFancy(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBox_DrawFancy';
procedure BBox_ClearAnyLabel(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBox_ClearAnyLabel';
procedure BBox_char *fLabel(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBox_char *fLabel';
procedure BBox_BRect fBounds(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBox_BRect fBounds';
procedure BBox_border_style fStyle(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBox_border_style fStyle';
procedure BBox_BView *fLabelView(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBox_BView *fLabelView';
procedure BBox_uint32 _reserved[1](AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBox_uint32 _reserved[1]';
}
implementation
constructor TBox.Create(Frame : TRect; Name : PChar; ResizingMode, Flags : Cardinal; BorderStyle : Tborder_style);
begin
CreatePas;
CPlusObject := BBox_Create(Self, Frame.CPlusObject, Name, ResizingMode, Flags, BorderStyle);
end;
constructor TBox.Create(data : TMessage);
begin
CreatePas;
CPlusObject := BBox_Create_1(Self, data.CPlusObject);
end;
destructor TBox.Destroy;
begin
BBox_Free(CPlusObject);
inherited;
end;
function TBox.Instantiate(data : TMessage) : TArchivable;
begin
Result := BBox_Instantiate(CPlusObject, data.CPlusObject);
end;
function TBox.Archive(data : TMessage; deep : boolean) : TStatus_t;
begin
Result := BBox_Archive(CPlusObject, data.CPlusObject, deep);
end;
procedure TBox.SetBorder(style : Tborder_style);
begin
BBox_SetBorder(CPlusObject, style);
end;
function TBox.Border : Tborder_style;
begin
Result := BBox_Border(CPlusObject);
end;
procedure TBox.SetLabel(aLabel : PChar);
begin
BBox_SetLabel(CPlusObject, aLabel);
end;
function TBox.SetLabel(view_label : TView) : TStatus_t;
begin
Result := BBox_SetLabel(CPlusObject, view_label{.CPlusObject});
end;
// Conflicting Name: Label is a reserved word in Pascal.
// I will use: GetLabel
function TBox.GetLabel : PChar;
begin
Result := BBox_Label(CPlusObject);
end;
function TBox.LabelView : TView;
begin
Result := BBox_LabelView(CPlusObject);
end;
procedure TBox.Draw(bounds : TRect);
begin
BBox_Draw(CPlusObject, bounds{.CPlusObject});
end;
procedure TBox.AttachedToWindow;
begin
BBox_AttachedToWindow(CPlusObject);
end;
procedure TBox.DetachedFromWindow;
begin
BBox_DetachedFromWindow(CPlusObject);
end;
procedure TBox.AllAttached;
begin
BBox_AllAttached(CPlusObject);
end;
procedure TBox.AllDetached;
begin
BBox_AllDetached(CPlusObject);
end;
procedure TBox.FrameResized(new_width : double; new_height : double);
begin
BBox_FrameResized(CPlusObject, new_width, new_height);
end;
procedure TBox.MessageReceived(msg : TMessage);
begin
BBox_MessageReceived(CPlusObject, msg.CPlusObject);
end;
procedure TBox.MouseDown(pt : TPoint);
begin
BBox_MouseDown(CPlusObject, pt{.CPlusObject});
end;
procedure TBox.MouseUp(pt : TPoint);
begin
BBox_MouseUp(CPlusObject, pt{.CPlusObject});
end;
procedure TBox.WindowActivated(state : boolean);
begin
BBox_WindowActivated(CPlusObject, state);
end;
procedure TBox.MouseMoved(pt : TPoint; code : Cardinal; msg : TMessage);
begin
BBox_MouseMoved(CPlusObject, pt{.CPlusObject}, code, msg);
end;
procedure TBox.FrameMoved(new_position : TPoint);
begin
BBox_FrameMoved(CPlusObject, new_position{.CPlusObject});
end;
function TBox.ResolveSpecifier(msg : TMessage; index : integer; specifier : TMessage; form : integer; properti : PChar) : THandler;
begin
Result := BBox_ResolveSpecifier(CPlusObject, msg{.CPlusObject}, index, specifier{.CPlusObject}, form, properti);
end;
procedure TBox.ResizeToPreferred;
begin
BBox_ResizeToPreferred(CPlusObject);
end;
procedure TBox.GetPreferredSize(width : double; height : double);
begin
BBox_GetPreferredSize(CPlusObject, width, height);
end;
procedure TBox.MakeFocus(state : boolean);
begin
BBox_MakeFocus(CPlusObject, state);
end;
function TBox.GetSupportedSuites(data : TMessage) : TStatus_t;
begin
Result := BBox_GetSupportedSuites(CPlusObject, data.CPlusObject);
end;
function TBox.Perform(d : TPerform_code; arg : Pointer) : TStatus_t;
begin
Result := BBox_Perform(CPlusObject, d, arg);
end;
{
procedure TBox._ReservedBox1;
begin
BBox__ReservedBox1(CPlusObject);
end;
procedure TBox._ReservedBox2;
begin
BBox__ReservedBox2(CPlusObject);
end;
function TBox.operator=( : TBox) : TBox;
begin
Result := BBox_operator=(CPlusObject, );
end;
}
{
procedure TBox.InitObject(data : TMessage);
begin
BBox_InitObject(CPlusObject, data.CPlusObject);
end;
procedure TBox.DrawPlain;
begin
BBox_DrawPlain(CPlusObject);
end;
procedure TBox.DrawFancy;
begin
BBox_DrawFancy(CPlusObject);
end;
procedure TBox.ClearAnyLabel;
begin
BBox_ClearAnyLabel(CPlusObject);
end;
}
{
procedure TBox.char *fLabel;
begin
BBox_char *fLabel(CPlusObject);
end;
procedure TBox.BRect fBounds;
begin
BBox_BRect fBounds(CPlusObject);
end;
procedure TBox.border_style fStyle;
begin
BBox_border_style fStyle(CPlusObject);
end;
procedure TBox.BView *fLabelView;
begin
BBox_BView *fLabelView(CPlusObject);
end;
procedure TBox.uint32 _reserved[1];
begin
BBox_uint32 _reserved[1](CPlusObject);
end;
}
end.

View File

@@ -1,330 +0,0 @@
{ BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
Eric Jourde
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
}
unit button;
interface
uses
beobj, Control, Message, Archivable, SupportDefs, Rect, Handler;
type
TButton = class(TControl)
private
public
destructor Destroy; override;
constructor Create(frame : TRect; name, aLabel : PChar; message : TMessage; resizingMode, flags : Cardinal); virtual;
constructor Create(data : TMessage); override;
function Instantiate(data : TMessage) : TArchivable;
function Archive(data : TMessage; deep : boolean) : TStatus_t;
procedure Draw(updateRect : TRect); override;
procedure MouseDown(where : TPoint); override;
procedure AttachedToWindow; override;
procedure KeyDown(bytes : PChar; numBytes : integer); override;
// Hook functions
procedure MakeDefault(state : boolean); virtual;
procedure SetLabel(text : PChar);
function IsDefault : boolean;
procedure MessageReceived(msg : TMessage); override;
procedure WindowActivated(state : boolean); override;
procedure MouseUp(pt : TPoint); override;
procedure MouseMoved(pt : TPoint; code : Cardinal; msg : TMessage); override;
procedure DetachedFromWindow; override;
procedure SetValue(aValue : integer);
procedure GetPreferredSize(width : double; height : double);
procedure ResizeToPreferred; override;
function Invoke(msg : TMessage) : TStatus_t;
procedure FrameMoved(new_position : TPoint); override;
procedure FrameResized(new_width : double; new_height : double); override;
procedure MakeFocus(state : boolean); override;
procedure AllAttached; override;
procedure AllDetached; override;
function ResolveSpecifier(msg : TMessage; index : integer; specifier : TMessage; form : integer; properti : PChar) : THandler;
function GetSupportedSuites(data : TMessage) : TStatus_t;
function Perform(d : TPerform_code; arg : Pointer) : TStatus_t;
// procedure _ReservedButton1;
// procedure _ReservedButton2;
// procedure _ReservedButton3;
// function operator=( : TButton) : TButton;
// function DrawDefault(bounds : TRect; enabled : boolean) : TRect;
// function Execute : TStatus_t;
// procedure float fCachedWidth;
// procedure bool fDrawAsDefault;
// procedure uint32 _reserved[3];
// procedure MakeDefault(flag : boolean); virtual;
end;
procedure BButton_Free(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BButton_Free';
function BButton_Create(AObject : TBeObject; frame : TCPlusObject; name, aLabel : PChar; message : TCPlusObject; resizingMode, flags : Cardinal) : TCPlusObject; cdecl; external BePascalLibName name 'BButton_Create';
function BButton_Create(AObject : TBeObject; data : TCPlusObject) : TCPlusObject; cdecl; external BePascalLibName name 'BButton_Create';
function BButton_Instantiate(AObject : TCPlusObject; data : TCPlusObject) : TArchivable; cdecl; external BePascalLibName name 'BButton_Instantiate';
function BButton_Archive(AObject : TCPlusObject; data : TCplusObject; deep : boolean) : TStatus_t; cdecl; external BePascalLibName name 'BButton_Archive';
procedure BButton_Draw(AObject : TCPlusObject; updateRect : TCPlusObject); cdecl; external BePascalLibName name 'BButton_Draw';
procedure BButton_MouseDown(AObject : TCPlusObject; where : TCPlusObject); cdecl; external BePascalLibName name 'BButton_MouseDown';
procedure BButton_AttachedToWindow(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BButton_AttachedToWindow';
procedure BButton_KeyDown(AObject : TCPlusObject; bytes : PChar; numBytes : integer); cdecl; external BePascalLibName name 'BButton_KeyDown';
procedure BButton_MakeDefault(AObject : TCPlusObject; state : boolean); cdecl; external BePascalLibName name 'BButton_MakeDefault';
procedure BButton_SetLabel(AObject : TCPlusObject; text : PChar); cdecl; external BePascalLibName name 'BButton_SetLabel';
function BButton_IsDefault(AObject : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BButton_IsDefault';
procedure BButton_MessageReceived(AObject : TCPlusObject; msg : TCPlusObject); cdecl; external BePascalLibName name 'BButton_MessageReceived';
procedure BButton_WindowActivated(AObject : TCPlusObject; state : boolean); cdecl; external BePascalLibName name 'BButton_WindowActivated';
procedure BButton_MouseUp(AObject : TCPlusObject; pt : TCplusObject); cdecl; external BePascalLibName name 'BButton_MouseUp';
procedure BButton_MouseMoved(AObject : TCPlusObject; pt : TCPlusObject; code : Cardinal; msg : TMessage); cdecl; external BePascalLibName name 'BButton_MouseMoved';
procedure BButton_DetachedFromWindow(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BButton_DetachedFromWindow';
procedure BButton_SetValue(AObject : TCPlusObject; aValue : integer); cdecl; external BePascalLibName name 'BButton_SetValue';
procedure BButton_GetPreferredSize(AObject : TCPlusObject; width : double; height : double); cdecl; external BePascalLibName name 'BButton_GetPreferredSize';
procedure BButton_ResizeToPreferred(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BButton_ResizeToPreferred';
function BButton_Invoke(AObject : TCPlusObject; msg : TCPlusObject) : TStatus_t; cdecl; external BePascalLibName name 'BButton_Invoke';
procedure BButton_FrameMoved(AObject : TCPlusObject; new_position : TCPlusObject); cdecl; external BePascalLibName name 'BButton_FrameMoved';
procedure BButton_FrameResized(AObject : TCPlusObject; new_width : double; new_height : double); cdecl; external BePascalLibName name 'BButton_FrameResized';
procedure BButton_MakeFocus(AObject : TCPlusObject; state : boolean); cdecl; external BePascalLibName name 'BButton_MakeFocus';
procedure BButton_AllAttached(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BButton_AllAttached';
procedure BButton_AllDetached(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BButton_AllDetached';
function BButton_ResolveSpecifier(AObject : TCPlusObject; msg : TCPlusObject; index : integer; specifier : TCPlusObject; form : integer; properti : PChar) : THandler; cdecl; external BePascalLibName name 'BButton_ResolveSpecifier';
function BButton_GetSupportedSuites(AObject : TCPlusObject; data : TCPlusObject) : TStatus_t; cdecl; external BePascalLibName name 'BButton_GetSupportedSuites';
function BButton_Perform(AObject : TCPlusObject; d : TPerform_code; arg : Pointer) : TStatus_t; cdecl; external BePascalLibName name 'BButton_Perform';
//procedure BButton__ReservedButton1(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BButton__ReservedButton1';
//procedure BButton__ReservedButton2(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BButton__ReservedButton2';
//procedure BButton__ReservedButton3(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BButton__ReservedButton3';
//function BButton_operator=(AObject : TCPlusObject; : TButton) : TButton; cdecl; external BePascalLibName name 'BButton_operator=';
//function BButton_DrawDefault(AObject : TCPlusObject; bounds : TCPlusObject; enabled : boolean) : TRect; cdecl; external BePascalLibName name 'BButton_DrawDefault';
//function BButton_Execute(AObject : TCPlusObject) : TStatus_t; cdecl; external BePascalLibName name 'BButton_Execute';
//procedure BButton_float fCachedWidth(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BButton_float fCachedWidth';
//procedure BButton_bool fDrawAsDefault(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BButton_bool fDrawAsDefault';
//procedure BButton_uint32 _reserved[3](AObject : TCPlusObject); cdecl; external BePascalLibName name 'BButton_uint32 _reserved[3]';
//var
// procedure BButton_MakeDefault_hook(Button : TButton; flag : boolean); cdecl; external BePascalLibName name 'BButton_MakeDefault';
implementation
var
Button_MakeDefault_hook : Pointer; cvar; external;
destructor TButton.Destroy;
begin
BButton_Free(CPlusObject);
inherited;
end;
constructor TButton.Create(frame : TRect; name, aLabel : PChar; message : TMessage; resizingMode, flags : Cardinal);
begin
CreatePas;
CPlusObject := BButton_Create(Self, frame.CPlusObject, name, aLabel, message.CPlusObject, resizingMode, flags);
end;
constructor TButton.Create(data : TMessage);
begin
CreatePas;
CPlusObject := BButton_Create(Self, data.CPlusObject);
end;
function TButton.Instantiate(data : TMessage) : TArchivable;
begin
Result := BButton_Instantiate(CPlusObject, data.CPlusObject);
end;
function TButton.Archive(data : TMessage; deep : boolean) : TStatus_t;
begin
Result := BButton_Archive(CPlusObject, data.CPlusObject, deep);
end;
procedure TButton.Draw(updateRect : TRect);
begin
end;
procedure TButton.MouseDown(where : TPoint);
begin
end;
procedure TButton.AttachedToWindow;
begin
end;
procedure TButton.KeyDown(bytes : PChar; numBytes : integer);
begin
end;
procedure TButton.MakeDefault(state : boolean);
begin
end;
procedure TButton.SetLabel(text : PChar);
begin
BButton_SetLabel(CPlusObject, text);
end;
function TButton.IsDefault : boolean;
begin
Result := BButton_IsDefault(CPlusObject);
end;
procedure TButton.MessageReceived(msg : TMessage);
begin
// BButton_MessageReceived(CPlusObject, msg.CPlusObject);
end;
procedure TButton.WindowActivated(state : boolean);
begin
// BButton_WindowActivated(CPlusObject, state);
end;
procedure TButton.MouseUp(pt : TPoint);
begin
// BButton_MouseUp(CPlusObject, pt.CPlusObject);
end;
procedure TButton.MouseMoved(pt : TPoint; code : Cardinal; msg : TMessage);
begin
// BButton_MouseMoved(CPlusObject, pt.CPlusObject, code, msg);
end;
procedure TButton.DetachedFromWindow;
begin
// BButton_DetachedFromWindow(CPlusObject);
end;
procedure TButton.SetValue(aValue : integer);
begin
// BButton_SetValue(CPlusObject, aValue);
end;
procedure TButton.GetPreferredSize(width : double; height : double);
begin
// BButton_GetPreferredSize(CPlusObject, width, height);
end;
procedure TButton.ResizeToPreferred;
begin
// BButton_ResizeToPreferred(CPlusObject);
end;
function TButton.Invoke(msg : TMessage) : TStatus_t;
begin
Result := BButton_Invoke(CPlusObject, msg.CPlusObject);
end;
procedure TButton.FrameMoved(new_position : TPoint);
begin
// BButton_FrameMoved(CPlusObject, new_position.CPlusObject);
end;
procedure TButton.FrameResized(new_width : double; new_height : double);
begin
// BButton_FrameResized(CPlusObject, new_width, new_height);
end;
procedure TButton.MakeFocus(state : boolean);
begin
BButton_MakeFocus(CPlusObject, state);
end;
procedure TButton.AllAttached;
begin
// BButton_AllAttached(CPlusObject);
end;
procedure TButton.AllDetached;
begin
// BButton_AllDetached(CPlusObject);
end;
function TButton.ResolveSpecifier(msg : TMessage; index : integer; specifier : TMessage; form : integer; properti : PChar) : THandler;
begin
Result := BButton_ResolveSpecifier(CPlusObject, msg.CPlusObject, index, specifier.CPlusObject, form, properti);
end;
function TButton.GetSupportedSuites(data : TMessage) : TStatus_t;
begin
Result := BButton_GetSupportedSuites(CPlusObject, data.CPlusObject);
end;
function TButton.Perform(d : TPerform_code; arg : Pointer) : TStatus_t;
begin
Result := BButton_Perform(CPlusObject, d, arg);
end;
{procedure TButton._ReservedButton1;
begin
BButton__ReservedButton1(CPlusObject);
end;
procedure TButton._ReservedButton2;
begin
BButton__ReservedButton2(CPlusObject);
end;
procedure TButton._ReservedButton3;
begin
BButton__ReservedButton3(CPlusObject);
end;}
{function TButton.operator=( : TButton) : TButton;
begin
Result := BButton_operator=(CPlusObject, );
end;
}
{function TButton.DrawDefault(bounds : TRect; enabled : boolean) : TRect;
begin
Result := BButton_DrawDefault(CPlusObject, bounds.CPlusObject, enabled);
end;
function TButton.Execute : TStatus_t;
begin
Result := BButton_Execute(CPlusObject);
end;}
{procedure TButton.float fCachedWidth;
begin
BButton_float fCachedWidth(CPlusObject);
end;
}
{procedure TButton.bool fDrawAsDefault;
begin
BButton_bool fDrawAsDefault(CPlusObject);
end;
}
{procedure TButton.uint32 _reserved[3];
begin
BButton_uint32 _reserved[3](CPlusObject);
end;
}
{procedure TButton.MakeDefault(flag : boolean);
begin
end;
}
procedure Button_MakeDefault_hook_func(Button : TButton; flag : boolean); cdecl;
begin
if Button <> nil then
Button.MakeDefault(flag);
end;
initialization
Button_MakeDefault_hook := @Button_MakeDefault_hook_func;
end.

View File

@@ -1,262 +0,0 @@
{ BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
Eric Jourde
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
}
unit checkbox;
interface
uses
beobj, Control, Message, Archivable, SupportDefs, Rect, Handler;
type TCheckBox = class(TControl)
private
public
destructor Destroy;override;
constructor Create(frame : TRect; name, aLabel : PChar; message : TMessage; resizingMode, flags : Cardinal); virtual;
constructor Create(data : TMessage) ;override;
function Instantiate(data : TMessage) : TArchivable;
function Archive(data : TMessage; deep : boolean) : TStatus_t;
procedure Draw(updateRect : TRect);override;
procedure AttachedToWindow;override;
procedure MouseDown(where : TPoint);override;
procedure MessageReceived(msg : TMessage);override;
procedure WindowActivated(state : boolean);override;
procedure KeyDown(bytes : PChar; numBytes : integer);override;
procedure MouseUp(pt : TPoint);override;
procedure MouseMoved(pt : TPoint; code : Cardinal; msg : TMessage);override;
procedure DetachedFromWindow;override;
procedure SetValue(avalue : integer);
procedure GetPreferredSize(width : double; height : double);
procedure ResizeToPreferred;override;
function Invoke(msg : TMessage) : TStatus_t;
procedure FrameMoved(new_position : TPoint);override;
procedure FrameResized(new_width : double; new_height : double);override;
function ResolveSpecifier(msg : TMessage; index : integer; specifier : TMessage; form : integer; properti : PChar) : THandler;
function GetSupportedSuites(data : TMessage) : TStatus_t;
procedure MakeFocus(state : boolean);override;
procedure AllAttached;override;
procedure AllDetached;override;
function Perform(d : TPerform_code; arg : Pointer) : TStatus_t;
// procedure _ReservedCheckBox1;
//procedure _ReservedCheckBox2;
//procedure _ReservedCheckBox3;
//function operator=( : ) : ;
// procedure bool fOutlined;
//procedure uint32 _reserved[2];
end;
procedure BCheckBox_Free(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BCheckBox_FREE';
function BCheckBox_Create(AObject : TBeObject; frame : TCPlusObject; name, aLabel : PChar; message : TCPlusObject; resizingMode, flags : Cardinal) : TCPlusObject; cdecl; external BePascalLibName name 'BCheckBox_Create';
function BCheckBox_Create_1(AObject : TBeObject; data : TCPlusObject) : TCPlusObject; cdecl; external BePascalLibName name 'BCheckBox_Create_1';
function BCheckBox_Instantiate(AObject : TCPlusObject; data : TCPlusObject) : TArchivable; cdecl; external BePascalLibName name 'BCheckBox_Instantiate';
function BCheckBox_Archive(AObject : TCPlusObject; data : TCPlusObject; deep : boolean) : TStatus_t; cdecl; external BePascalLibName name 'BCheckBox_Archive';
procedure BCheckBox_Draw(AObject : TCPlusObject; updateRect : TCPlusObject); cdecl; external BePascalLibName name 'BCheckBox_Draw';
procedure BCheckBox_AttachedToWindow(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BCheckBox_AttachedToWindow';
procedure BCheckBox_MouseDown(AObject : TCPlusObject; where : TCPlusObject); cdecl; external BePascalLibName name 'BCheckBox_MouseDown';
procedure BCheckBox_MessageReceived(AObject : TCPlusObject; msg : TCPlusObject); cdecl; external BePascalLibName name 'BCheckBox_MessageReceived';
procedure BCheckBox_WindowActivated(AObject : TCPlusObject; state : boolean); cdecl; external BePascalLibName name 'BCheckBox_WindowActivated';
procedure BCheckBox_KeyDown(AObject : TCPlusObject; bytes : PChar; numBytes : integer); cdecl; external BePascalLibName name 'BCheckBox_KeyDown';
procedure BCheckBox_MouseUp(AObject : TCPlusObject; pt : TCPlusObject); cdecl; external BePascalLibName name 'BCheckBox_MouseUp';
procedure BCheckBox_MouseMoved(AObject : TCPlusObject; pt : TCPlusObject; code : Cardinal; msg : TMessage); cdecl; external BePascalLibName name 'BCheckBox_MouseMoved';
procedure BCheckBox_DetachedFromWindow(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BCheckBox_DetachedFromWindow';
procedure BCheckBox_SetValue(AObject : TCPlusObject; value : integer); cdecl; external BePascalLibName name 'BCheckBox_SetValue';
procedure BCheckBox_GetPreferredSize(AObject : TCPlusObject; width : double; height : double); cdecl; external BePascalLibName name 'BCheckBox_GetPreferredSize';
procedure BCheckBox_ResizeToPreferred(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BCheckBox_ResizeToPreferred';
function BCheckBox_Invoke(AObject : TCPlusObject; msg : TCPlusObject) : TStatus_t; cdecl; external BePascalLibName name 'BCheckBox_Invoke';
procedure BCheckBox_FrameMoved(AObject : TCPlusObject; new_position : TCPlusObject); cdecl; external BePascalLibName name 'BCheckBox_FrameMoved';
procedure BCheckBox_FrameResized(AObject : TCPlusObject; new_width : double; new_height : double); cdecl; external BePascalLibName name 'BCheckBox_FrameResized';
function BCheckBox_ResolveSpecifier(AObject : TCPlusObject; msg : TCPlusObject; index : integer; specifier : TCPlusObject; form : integer; properti : PChar) : THandler; cdecl; external BePascalLibName name 'BCheckBox_ResolveSpecifier';
function BCheckBox_GetSupportedSuites(AObject : TCPlusObject; data : TCPlusObject) : TStatus_t; cdecl; external BePascalLibName name 'BCheckBox_GetSupportedSuites';
procedure BCheckBox_MakeFocus(AObject : TCPlusObject; state : boolean); cdecl; external BePascalLibName name 'BCheckBox_MakeFocus';
procedure BCheckBox_AllAttached(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BCheckBox_AllAttached';
procedure BCheckBox_AllDetached(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BCheckBox_AllDetached';
function BCheckBox_Perform(AObject : TCPlusObject; d : TPerform_code; arg : Pointer) : TStatus_t; cdecl; external BePascalLibName name 'BCheckBox_Perform';
//procedure BCheckBox__ReservedCheckBox1(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BCheckBox__ReservedCheckBox1';
//procedure BCheckBox__ReservedCheckBox2(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BCheckBox__ReservedCheckBox2';
//procedure BCheckBox__ReservedCheckBox3(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BCheckBox__ReservedCheckBox3';
//function BCheckBox_operator=(AObject : TCPlusObject; : ) : ; cdecl; external BePascalLibName name 'BCheckBox_operator=';
//procedure BCheckBox_bool fOutlined(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BCheckBox_bool fOutlined';
//procedure BCheckBox_uint32 _reserved[2](AObject : TCPlusObject); cdecl; external BePascalLibName name 'BCheckBox_uint32 _reserved[2]';
implementation
destructor TCheckBox.Destroy;
begin
BCheckBox_Free(CPlusObject);
inherited;
end;
constructor TCheckBox.Create(frame : TRect; name, aLabel : PChar; message : TMessage; resizingMode, flags : Cardinal);
begin
CreatePas;
CPlusObject := BCheckBox_Create(Self, frame.CPlusObject, name, aLabel, message.CPlusObject, resizingMode, flags);
end;
constructor TCheckBox.Create(data : TMessage) ;
begin
CreatePas;
CPlusObject := BCheckBox_Create_1(Self, data.CPlusObject);
end;
function TCheckBox.Instantiate(data : TMessage) : TArchivable;
begin
Result := BCheckBox_Instantiate(CPlusObject, data.CPlusObject);
end;
function TCheckBox.Archive(data : TMessage; deep : boolean) : TStatus_t;
begin
Result := BCheckBox_Archive(CPlusObject, data.CPlusObject, deep);
end;
procedure TCheckBox.Draw(updateRect : TRect);
begin
//BCheckBox_Draw(CPlusObject, updateRect.CPlusObject);
end;
procedure TCheckBox.AttachedToWindow;
begin
//BCheckBox_AttachedToWindow(CPlusObject);
end;
procedure TCheckBox.MouseDown(where : TPoint);
begin
//BCheckBox_MouseDown(CPlusObject, where.CPlusObject);
end;
procedure TCheckBox.MessageReceived(msg : TMessage);
begin
//BCheckBox_MessageReceived(CPlusObject, msg.CPlusObject);
end;
procedure TCheckBox.WindowActivated(state : boolean);
begin
// BCheckBox_WindowActivated(CPlusObject, state);
end;
procedure TCheckBox.KeyDown(bytes : PChar; numBytes : integer);
begin
//BCheckBox_KeyDown(CPlusObject, bytes, numBytes);
end;
procedure TCheckBox.MouseUp(pt : TPoint);
begin
//BCheckBox_MouseUp(CPlusObject, pt.CPlusObject);
end;
procedure TCheckBox.MouseMoved(pt : TPoint; code : Cardinal; msg : TMessage);
begin
//BCheckBox_MouseMoved(CPlusObject, pt.CPlusObject, code, msg);
end;
procedure TCheckBox.DetachedFromWindow;
begin
//BCheckBox_DetachedFromWindow(CPlusObject);
end;
procedure TCheckBox.SetValue(avalue : integer);
begin
BCheckBox_SetValue(CPlusObject, avalue);
end;
procedure TCheckBox.GetPreferredSize(width : double; height : double);
begin
BCheckBox_GetPreferredSize(CPlusObject, width, height);
end;
procedure TCheckBox.ResizeToPreferred;
begin
BCheckBox_ResizeToPreferred(CPlusObject);
end;
function TCheckBox.Invoke(msg : TMessage) : TStatus_t;
begin
Result := BCheckBox_Invoke(CPlusObject, msg.CPlusObject);
end;
procedure TCheckBox.FrameMoved(new_position : TPoint);
begin
BCheckBox_FrameMoved(CPlusObject, new_position.CPlusObject);
end;
procedure TCheckBox.FrameResized(new_width : double; new_height : double);
begin
BCheckBox_FrameResized(CPlusObject, new_width, new_height);
end;
function TCheckBox.ResolveSpecifier(msg : TMessage; index : integer; specifier : TMessage; form : integer; properti : PChar) : THandler;
begin
Result := BCheckBox_ResolveSpecifier(CPlusObject, msg.CPlusObject, index, specifier.CPlusObject, form, properti);
end;
function TCheckBox.GetSupportedSuites(data : TMessage) : TStatus_t;
begin
Result := BCheckBox_GetSupportedSuites(CPlusObject, data.CPlusObject);
end;
procedure TCheckBox.MakeFocus(state : boolean);
begin
BCheckBox_MakeFocus(CPlusObject, state);
end;
procedure TCheckBox.AllAttached;
begin
BCheckBox_AllAttached(CPlusObject);
end;
procedure TCheckBox.AllDetached;
begin
BCheckBox_AllDetached(CPlusObject);
end;
function TCheckBox.Perform(d : TPerform_code; arg : Pointer) : TStatus_t;
begin
Result := BCheckBox_Perform(CPlusObject, d, arg);
end;
{procedure ._ReservedCheckBox1;
begin
BCheckBox__ReservedCheckBox1(CPlusObject);
end;
procedure ._ReservedCheckBox2;
begin
BCheckBox__ReservedCheckBox2(CPlusObject);
end;
procedure ._ReservedCheckBox3;
begin
BCheckBox__ReservedCheckBox3(CPlusObject);
end;
function .operator=( : ) : ;
begin
Result := BCheckBox_operator=(CPlusObject, );
end;
procedure .bool fOutlined;
begin
BCheckBox_bool fOutlined(CPlusObject);
end;
procedure .uint32 _reserved[2];
begin
BCheckBox_uint32 _reserved[2](CPlusObject);
end;
}
end.

View File

@@ -1,51 +0,0 @@
/* BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _CONTROL_H_
#define _CONTROL_H_
#include <beobj.h>
#include "view.h"
typedef void (*BControl_SetEnabled_hook) (TPasObject PasObject, bool enabled);
typedef void (*BControl_SetValue_hook) (TPasObject PasObject, int32 value);
class BPControl : public BControl, virtual public BPView
{
public:
// <BView_Constructor>
BPControl(TPasObject PasObject,
BRect frame,
const char *name,
const char *label,
BMessage *message,
uint32 resizeMask,
uint32 flags);
BPControl(TPasObject PasObject, BMessage *message);
virtual void MessageReceived(BMessage *message);
virtual void Draw(BRect updateRect);
virtual void AttachedToWindow(void);
virtual void SetEnabled(bool enabled);
virtual void SetValue(int32 value);
virtual void SetEnabled_hookCall(bool enabled);
virtual void SetValue_hookCall(int32 value);
private:
};
#endif /* _CONTROL_H_ */

View File

@@ -1,366 +0,0 @@
{ BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
Eric Jourde
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
}
unit control;
interface
uses
beobj, View, Message, Archivable, Rect, Handler, SupportDefs, Invoker;
type
TControl = class(TView)
private
protected
FInvoker : TInvoker;
function GetInvoker : TInvoker;
public
constructor Create(frame : TCPlusObject; name, aLabel : PChar; message : TCPlusObject; resizingMode, flags : Cardinal); virtual;
destructor Destroy; override;
constructor Create(data : TMessage); virtual;
function Instantiate(data : TMessage) : TArchivable;
function Archive(data : TMessage; deep : boolean) : TStatus_t;
procedure WindowActivated(state : boolean); override;
procedure AttachedToWindow; override;
procedure MessageReceived(msg : TMessage); override;
procedure MakeFocus(state : boolean); virtual;
procedure KeyDown(bytes : PChar; numBytes : integer); override;
procedure MouseDown(pt : TPoint); override;
procedure MouseUp(pt : TPoint); override;
procedure MouseMoved(pt : TPoint; code : Cardinal; msg : TMessage); override;
procedure DetachedFromWindow; override;
procedure SetLabel(text : PChar);
function Labl : PChar;
procedure SetValue(aValue : integer);
function Value : integer;
procedure SetEnabled(aOn : boolean);
function IsEnabled : boolean;
procedure GetPreferredSize(width : double; height : double);
procedure ResizeToPreferred; override;
function Invoke(msg : TMessage) : TStatus_t;
function ResolveSpecifier(msg : TMessage; index : integer; specifier : TMessage; form : integer; properti{;-)} : PChar) : THandler;
function GetSupportedSuites(data : TMessage) : TStatus_t;
procedure AllAttached; override;
procedure AllDetached; override;
function Perform(d : TPerform_code; arg : Pointer) : TStatus_t;
// function IsFocusChanging : boolean;
// function IsTracking : boolean;
// procedure SetTracking(state : boolean);
// procedure SetValueNoUpdate(aValue : integer);
// procedure _ReservedControl1;
// procedure _ReservedControl2;
// procedure _ReservedControl3;
// procedure _ReservedControl4;
// function operator=( : TControl) : TControl;
// procedure InitData(data : TMessage);
// procedure char *fLabel;
// procedure int32 fValue;
// procedure bool fEnabled;
// procedure bool fFocusChanging;
// procedure bool fTracking;
// procedure bool fWantsNav;
// procedure uint32 _reserved[4];
property Invoker : TInvoker read GetInvoker;
end;
//function BControl_Create(AObject : TBeObject) : TCPlusObject; cdecl; external BePascalLibName name 'BControl_Create';
function BControl_Create(AObject : TBeObject; frame : TCPlusObject; name, aLabel : PChar; message : TCPlusObject; resizingMode, flags : Cardinal) : TCPlusObject; cdecl; external BePascalLibName name 'BControl_Create';
procedure BControl_Free(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BControl_Free';
function BControl_Create(AObject : TBeObject; data : TCplusObject) : TCplusObject; cdecl; external BePascalLibName name 'BControl_Create';
function BControl_Instantiate(AObject : TCPlusObject; data : TCplusObject) : TArchivable; cdecl; external BePascalLibName name 'BControl_Instantiate';
function BControl_Archive(AObject : TCPlusObject; data : TCplusObject; deep : boolean) : TStatus_t; cdecl; external BePascalLibName name 'BControl_Archive';
procedure BControl_WindowActivated(AObject : TCPlusObject; state : boolean); cdecl; external BePascalLibName name 'BControl_WindowActivated';
procedure BControl_AttachedToWindow(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BControl_AttachedToWindow';
procedure BControl_MessageReceived(AObject : TCPlusObject; msg : TCplusObject); cdecl; external BePascalLibName name 'BControl_MessageReceived';
procedure BControl_MakeFocus(AObject : TCPlusObject; state : boolean); cdecl; external BePascalLibName name 'BControl_MakeFocus';
procedure BControl_KeyDown(AObject : TCPlusObject; bytes : PChar; numBytes : integer); cdecl; external BePascalLibName name 'BControl_KeyDown';
procedure BControl_MouseDown(AObject : TCPlusObject; pt : TCplusObject); cdecl; external BePascalLibName name 'BControl_MouseDown';
procedure BControl_MouseUp(AObject : TCPlusObject; pt : TCplusObject); cdecl; external BePascalLibName name 'BControl_MouseUp';
procedure BControl_MouseMoved(AObject : TCPlusObject; pt : TCplusObject; code : Cardinal; msg : TCplusObject); cdecl; external BePascalLibName name 'BControl_MouseMoved';
procedure BControl_DetachedFromWindow(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BControl_DetachedFromWindow';
procedure BControl_SetLabel(AObject : TCPlusObject; text : PChar); cdecl; external BePascalLibName name 'BControl_SetLabel';
function BControl_Labl(AObject : TCPlusObject) : PChar; cdecl; external BePascalLibName name 'BControl_Label';
procedure BControl_SetValue(AObject : TCPlusObject; value : integer); cdecl; external BePascalLibName name 'BControl_SetValue';
function BControl_Value(AObject : TCPlusObject) : integer; cdecl; external BePascalLibName name 'BControl_Value';
procedure BControl_SetEnabled(AObject : TCPlusObject; aOn : boolean); cdecl; external BePascalLibName name 'BControl_SetEnabled';
function BControl_IsEnabled(AObject : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BControl_IsEnabled';
procedure BControl_GetPreferredSize(AObject : TCPlusObject; width : double; height : double); cdecl; external BePascalLibName name 'BControl_GetPreferredSize';
procedure BControl_ResizeToPreferred(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BControl_ResizeToPreferred';
function BControl_Invoke(AObject : TCPlusObject; msg : TCplusObject) : TStatus_t; cdecl; external BePascalLibName name 'BControl_Invoke';
function BControl_ResolveSpecifier(AObject : TCPlusObject; msg : TCplusObject; index : integer; specifier : TCplusObject; form : integer; properti : PChar) : THandler; cdecl; external BePascalLibName name 'BControl_ResolveSpecifier';
function BControl_GetSupportedSuites(AObject : TCPlusObject; data : TCplusObject) : TStatus_t; cdecl; external BePascalLibName name 'BControl_GetSupportedSuites';
procedure BControl_AllAttached(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BControl_AllAttached';
procedure BControl_AllDetached(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BControl_AllDetached';
function BControl_Perform(AObject : TCPlusObject; d : TPerform_code; arg : Pointer) : TStatus_t; cdecl; external BePascalLibName name 'BControl_Perform';
//function BControl_IsFocusChanging(AObject : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BControl_IsFocusChanging';
//function BControl_IsTracking(AObject : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BControl_IsTracking';
//procedure BControl_SetTracking(AObject : TCPlusObject; state : boolean); cdecl; external BePascalLibName name 'BControl_SetTracking';
//procedure BControl_SetValueNoUpdate(AObject : TCPlusObject; aValue : integer); cdecl; external BePascalLibName name 'BControl_SetValueNoUpdate';
//procedure BControl__ReservedControl1(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BControl__ReservedControl1';
//procedure BControl__ReservedControl2(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BControl__ReservedControl2';
//procedure BControl__ReservedControl3(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BControl__ReservedControl3';
//procedure BControl__ReservedControl4(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BControl__ReservedControl4';
//function BControl_operator=(AObject : TCPlusObject; : TControl) : TControl; cdecl; external BePascalLibName name 'BControl_operator=';
procedure BControl_InitData(AObject : TCPlusObject; data : TCplusObject); cdecl; external BePascalLibName name 'BControl_InitData';
//procedure BControl_char *fLabel(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BControl_char *fLabel';
//procedure BControl_int32 fValue(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BControl_int32 fValue';
//procedure BControl_bool fEnabled(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BControl_bool fEnabled';
//procedure BControl_bool fFocusChanging(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BControl_bool fFocusChanging';
//procedure BControl_bool fTracking(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BControl_bool fTracking';
//procedure BControl_bool fWantsNav(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BControl_bool fWantsNav';
//procedure BControl_uint32 _reserved[4](AObject : TCPlusObject); cdecl; external BePascalLibName name 'BControl_uint32 _reserved[4]';
implementation
constructor TControl.Create(frame : TCPlusObject; name, aLabel : PChar; message : TCPlusObject; resizingMode, flags : Cardinal);
begin
CPlusObject := BControl_Create(Self, frame, name, aLabel, message, resizingMode, flags);
end;
destructor TControl.Destroy;
begin
if FInvoker <> nil then
FInvoker.UnWrap;
BControl_Free(CPlusObject);
end;
constructor TControl.Create(data : TMessage);
begin
CPlusObject := BControl_Create(Self, data.CPlusObject);
end;
function TControl.Instantiate(data : TMessage) : TArchivable;
begin
Result := BControl_Instantiate(CPlusObject, data.CPlusObject);
end;
function TControl.Archive(data : TMessage; deep : boolean) : TStatus_t;
begin
Result := BControl_Archive(CPlusObject, data.CPlusObject, deep);
end;
procedure TControl.WindowActivated(state : boolean);
begin
// BControl_WindowActivated(CPlusObject, state);
end;
procedure TControl.AttachedToWindow;
begin
// BControl_AttachedToWindow(CPlusObject);
end;
procedure TControl.MessageReceived(msg : TMessage);
begin
// BControl_MessageReceived(CPlusObject, msg.CPlusObject);
end;
procedure TControl.MakeFocus(state : boolean);
begin
// BControl_MakeFocus(CPlusObject, state);
end;
procedure TControl.KeyDown(bytes : PChar; numBytes : integer);
begin
// BControl_KeyDown(CPlusObject, bytes, numBytes);
end;
procedure TControl.MouseDown(pt : TPoint);
begin
// BControl_MouseDown(CPlusObject, pt.CPlusObject);
end;
procedure TControl.MouseUp(pt : TPoint);
begin
// BControl_MouseUp(CPlusObject, pt.CPlusObject);
end;
procedure TControl.MouseMoved(pt : TPoint; code : Cardinal; msg : TMessage);
begin
// BControl_MouseMoved(CPlusObject, pt.CPlusObject, code, msg);
end;
procedure TControl.DetachedFromWindow;
begin
// BControl_DetachedFromWindow(CPlusObject);
end;
procedure TControl.SetLabel(text : PChar);
begin
BControl_SetLabel(CPlusObject, text);
end;
function TControl.Labl : PChar;
begin
Result := BControl_Labl(CPlusObject);
end;
procedure TControl.SetValue(aValue : integer);
begin
BControl_SetValue(CPlusObject, aValue);
end;
function TControl.Value : integer;
begin
Result := BControl_Value(CPlusObject);
end;
procedure TControl.SetEnabled(aOn : boolean);
begin
BControl_SetEnabled(CPlusObject, aOn);
end;
function TControl.IsEnabled : boolean;
begin
Result := BControl_IsEnabled(CPlusObject);
end;
procedure TControl.GetPreferredSize(width : double; height : double);
begin
// BControl_GetPreferredSize(CPlusObject, width, height);
end;
procedure TControl.ResizeToPreferred;
begin
// BControl_ResizeToPreferred(CPlusObject);
end;
function TControl.Invoke(msg : TMessage) : TStatus_t;
begin
Result := BControl_Invoke(CPlusObject, msg.CPlusObject);
end;
function TControl.ResolveSpecifier(msg : TMessage; index : integer; specifier : TMessage; form : integer; properti : PChar) : THandler;
begin
Result := BControl_ResolveSpecifier(CPlusObject, msg.CPlusObject, index, specifier.CPlusObject, form, properti);
end;
function TControl.GetSupportedSuites(data : TMessage) : TStatus_t;
begin
Result := BControl_GetSupportedSuites(CPlusObject, data.CPlusObject);
end;
procedure TControl.AllAttached;
begin
// BControl_AllAttached(CPlusObject);
end;
procedure TControl.AllDetached;
begin
// BControl_AllDetached(CPlusObject);
end;
function TControl.Perform(d : TPerform_code; arg : Pointer) : TStatus_t;
begin
Result := BControl_Perform(CPlusObject, d, arg);
end;
//function TControl.IsFocusChanging : boolean;
//begin
// Result := BControl_IsFocusChanging(CPlusObject);
//end;
//
//function TControl.IsTracking : boolean;
//begin
// Result := BControl_IsTracking(CPlusObject);
//end;
//
//procedure TControl.SetTracking(state : boolean);
//begin
// BControl_SetTracking(CPlusObject, state);
//end;
//
//procedure TControl.SetValueNoUpdate(aValue : integer);
//begin
// BControl_SetValueNoUpdate(CPlusObject, aValue);
//end;
//procedure TControl._ReservedControl1;
//begin
// BControl__ReservedControl1(CPlusObject);
//end;
//
//procedure TControl._ReservedControl2;
//begin
// BControl__ReservedControl2(CPlusObject);
//end;
//
//procedure TControl._ReservedControl3;
//begin
// BControl__ReservedControl3(CPlusObject);
//end;
//
//procedure TControl._ReservedControl4;
//begin
// BControl__ReservedControl4(CPlusObject);
//end;
//function TControl.operator=( : TControl) : TControl;
//begin
// Result := BControl_operator=(CPlusObject, );
//end;
//procedure TControl.InitData(data : TMessage);
//begin
// BControl_InitData(CPlusObject, data.CPlusObject);
//end;
//procedure TControl.char *fLabel;
//begin
// BControl_char *fLabel(CPlusObject);
//end;
//
//procedure TControl.int32 fValue;
//begin
// BControl_int32 fValue(CPlusObject);
//end;
//
//procedure TControl.bool fEnabled;
//begin
// BControl_bool fEnabled(CPlusObject);
//end;
//
//procedure TControl.bool fFocusChanging;
//begin
// BControl_bool fFocusChanging(CPlusObject);
//end;
//
//procedure TControl.bool fTracking;
//begin
// BControl_bool fTracking(CPlusObject);
//end;
//
//procedure TControl.bool fWantsNav;
//begin
// BControl_bool fWantsNav(CPlusObject);
//end;
//
//procedure TControl.uint32 _reserved[4];
//begin
// BControl_uint32 _reserved[4](CPlusObject);
//end;
function TControl.GetInvoker : TInvoker;
begin
if FInvoker = nil then
begin
Result := TInvoker.Wrap(CPlusObject);
end;
Result := FInvoker;
end;
end.

View File

@@ -1,33 +0,0 @@
/* BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _FONT_H_
#define _FONT_H_
#include "Font.h"
#include "Rect.h"
#include <beobj.h>
class BPFont : public BFont, public BPasObject
{
public:
BPFont(TPasObject PasObject);
BPFont(TPasObject PasObject, const BFont &font);
};
#endif _FONT_H_ /* _FONT_H_ */

View File

@@ -1,494 +0,0 @@
{ BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
Eric Jourde
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
}
unit font;
interface
uses
beobj,flattenable,interfacedefs,supportdefs,rect,bstring;
type
Tfont_which= (
font_which_nil,
B_PLAIN_FONT,
B_BOLD_FONT,
B_FIXED_FONT,
B_SYMBOL_FONT,
B_SERIF_FONT
);
const
B__NUM_FONT = 5;
// Attention this is hexadecimal; need conversion !!!!
B_ITALIC_FACE = $0001;
B_UNDERSCORE_FACE = $0002;
B_NEGATIVE_FACE = $0004;
B_OUTLINED_FACE = $0008;
B_STRIKEOUT_FACE = $0010;
B_BOLD_FACE = $0020;
B_REGULAR_FACE = $0040;
type
Tfont_metric_mode = (
B_SCREEN_METRIC,
B_PRINTING_METRIC);
Tfont_file_format =(
B_TRUETYPE_WINDOWS ,
B_POSTSCRIPT_TYPE1_WINDOWS
);
const B_FONT_FAMILY_LENGTH= 63;
type TFONT_FAMILY = array[0..B_FONT_FAMILY_LENGTH] of char;
const B_FONT_STYLE_LENGTH= 63;
type Tfont_style = array[0..B_FONT_STYLE_LENGTH ] of char;
type
Tescapement_delta = record
nonspace : real;
space: real;
end;
Tedge_info = record
left: real;
right: real;
end;
Ttuned_font_info = record
size : real;
shear: real ;
rotation : real;
flags: cardinal;
face : integer;
end;
Tfont_height = record
ascent: real;
descent: real;
leading: real;
end;
Tfont_direction =(
B_FONT_LEFT_TO_RIGHT ,
B_FONT_RIGHT_TO_LEFT
);
type
TFont = class(TBeObject)
private
public
constructor Create;
constructor Create(font : TFont);virtual;
destructor Destroy;override;
function SetFamilyAndStyle(family : TFONT_FAMILY; style : Tfont_style) : TStatus_t;
procedure SetFamilyAndStyle(code : Cardinal);
function SetFamilyAndFace(family : TFONT_FAMILY; aface : integer) : TStatus_t;
procedure SetSize(asize : single);
procedure SetShear(ashear : single);
procedure SetRotation(arotation : single);
procedure SetSpacing(aspacing : integer);
procedure SetEncoding(aencoding : integer);
procedure SetFace(aface :integer );
procedure SetFlags(aflags : Cardinal);
procedure GetFamilyAndStyle(family : TFONT_FAMILY; style : Tfont_style);
function FamilyAndStyle : Cardinal;
function Size : single;
function Shear : single;
function Rotation : single;
function Spacing : integer;
function Encoding : integer;
function Face : integer;
function Flags : Cardinal;
function Direction : Tfont_direction;
function IsFixed : boolean;
function IsFullAndHalfFixed : boolean;
function BoundingBox : TRect;
// function Blocks : ;
function FileFormat : Tfont_file_format;
function CountTuned : integer;
procedure GetTunedInfo(index : integer; info : Ttuned_font_info);
procedure TruncateString(in_out : TString; mode : Cardinal; width : single);
// procedure GetTruncatedStrings(stringArray : PChar; numStrings : integer; mode : Cardinal; width : single; resultArray : Pchar);
// procedure GetTruncatedStrings(stringArray : PChar; numStrings : integer; mode : Cardinal; width : single; resultArray : PChar);
function StringWidth(astring : PChar) : single;
function StringWidth(astring : PChar; length : integer) : single;
// procedure GetStringWidths(stringArray : PChar; lengthArray : integer; numStrings : integer; widthArray : single);
// procedure GetEscapements(charArray : ; numChars : integer; escapementArray : single);
// procedure GetEscapements(charArray : ; numChars : integer; delta : ; escapementArray : single);
// procedure GetEscapements(charArray : ; numChars : integer; delta : ; escapementArray : TPoint);
// procedure GetEscapements(charArray : ; numChars : integer; delta : ; escapementArray : TPoint; offsetArray : TPoint);
// procedure GetEdges(charArray : ; numBytes : integer; edgeArray : );
procedure GetHeight(height : Tfont_height);
// procedure GetBoundingBoxesAsGlyphs(charArray : ; numChars : integer; mode : ; boundingBoxArray : TRect);
// procedure GetBoundingBoxesAsString(charArray : ; numChars : integer; mode : ; delta : ; boundingBoxArray : TRect);
// procedure GetBoundingBoxesForStrings(stringArray : PChar; numStrings : integer; mode : ; deltas : ; boundingBoxArray : TRect);
// procedure GetGlyphShapes(charArray : ; numChars : integer; glyphShapeArray : );
// procedure GetHasGlyphs(charArray : ; numChars : integer; hasArray : boolean);
procedure PrintToStream;
end;
{procedure edge_info_float left(AObject : TCPlusObject); cdecl; external BePascalLibName name 'edge_info_float left';
procedure edge_info_float right(AObject : TCPlusObject); cdecl; external BePascalLibName name 'edge_info_float right';
procedure font_height_float ascent(AObject : TCPlusObject); cdecl; external BePascalLibName name 'font_height_float ascent';
procedure font_height_float descent(AObject : TCPlusObject); cdecl; external BePascalLibName name 'font_height_float descent';
procedure font_height_float leading(AObject : TCPlusObject); cdecl; external BePascalLibName name 'font_height_float leading';
procedure escapement_delta_float nonspace(AObject : TCPlusObject); cdecl; external BePascalLibName name 'escapement_delta_float nonspace';
procedure escapement_delta_float space(AObject : TCPlusObject); cdecl; external BePascalLibName name 'escapement_delta_float space';
procedure font_cache_info_int32 sheared_font_penalty(AObject : TCPlusObject); cdecl; external BePascalLibName name 'font_cache_info_int32 sheared_font_penalty';
procedure font_cache_info_int32 rotated_font_penalty(AObject : TCPlusObject); cdecl; external BePascalLibName name 'font_cache_info_int32 rotated_font_penalty';
procedure font_cache_info_float oversize_threshold(AObject : TCPlusObject); cdecl; external BePascalLibName name 'font_cache_info_float oversize_threshold';
procedure font_cache_info_int32 oversize_penalty(AObject : TCPlusObject); cdecl; external BePascalLibName name 'font_cache_info_int32 oversize_penalty';
procedure font_cache_info_int32 cache_size(AObject : TCPlusObject); cdecl; external BePascalLibName name 'font_cache_info_int32 cache_size';
procedure font_cache_info_float spacing_size_threshold(AObject : TCPlusObject); cdecl; external BePascalLibName name 'font_cache_info_float spacing_size_threshold';
procedure tuned_font_info_float size(AObject : TCPlusObject); cdecl; external BePascalLibName name 'tuned_font_info_float size';
procedure tuned_font_info_float shear(AObject : TCPlusObject); cdecl; external BePascalLibName name 'tuned_font_info_float shear';
procedure tuned_font_info_float rotation(AObject : TCPlusObject); cdecl; external BePascalLibName name 'tuned_font_info_float rotation';
procedure tuned_font_info_uint32 flags(AObject : TCPlusObject); cdecl; external BePascalLibName name 'tuned_font_info_uint32 flags';
procedure tuned_font_info_uint16 face(AObject : TCPlusObject); cdecl; external BePascalLibName name 'tuned_font_info_uint16 face';
}
function BFont_Create(AObject : TBeObject): TCPlusObject; cdecl; external BePascalLibName name 'BFont_Create';
function BFont_Create(AObject : TBeObject; font : TFont): TCPlusObject; cdecl; external BePascalLibName name 'BFont_Create_1';
procedure BFont_Free(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BFont_Free';
function BFont_SetFamilyAndStyle(AObject : TCPlusObject; family : Tfont_family; style : Tfont_style) : TStatus_t; cdecl; external BePascalLibName name 'BFont_SetFamilyAndStyle';
procedure BFont_SetFamilyAndStyle(AObject : TCPlusObject; code : Cardinal); cdecl; external BePascalLibName name 'BFont_SetFamilyAndStyle';
function BFont_SetFamilyAndFace(AObject : TCPlusObject; family : Tfont_family; face : integer) : TStatus_t; cdecl; external BePascalLibName name 'BFont_SetFamilyAndFace';
procedure BFont_SetSize(AObject : TCPlusObject; size : single); cdecl; external BePascalLibName name 'BFont_SetSize';
procedure BFont_SetShear(AObject : TCPlusObject; shear : single); cdecl; external BePascalLibName name 'BFont_SetShear';
procedure BFont_SetRotation(AObject : TCPlusObject; rotation : single); cdecl; external BePascalLibName name 'BFont_SetRotation';
procedure BFont_SetSpacing(AObject : TCPlusObject; spacing : integer); cdecl; external BePascalLibName name 'BFont_SetSpacing';
procedure BFont_SetEncoding(AObject : TCPlusObject; encoding : integer); cdecl; external BePascalLibName name 'BFont_SetEncoding';
procedure BFont_SetFace(AObject : TCPlusObject; face :integer ); cdecl; external BePascalLibName name 'BFont_SetFace';
procedure BFont_SetFlags(AObject : TCPlusObject; flags : Cardinal); cdecl; external BePascalLibName name 'BFont_SetFlags';
procedure BFont_GetFamilyAndStyle(AObject : TCPlusObject; family : Tfont_family; style : Tfont_style); cdecl; external BePascalLibName name 'BFont_GetFamilyAndStyle';
function BFont_FamilyAndStyle(AObject : TCPlusObject) : Cardinal; cdecl; external BePascalLibName name 'BFont_FamilyAndStyle';
function BFont_Size(AObject : TCPlusObject) : single; cdecl; external BePascalLibName name 'BFont_Size';
function BFont_Shear(AObject : TCPlusObject) : single; cdecl; external BePascalLibName name 'BFont_Shear';
function BFont_Rotation(AObject : TCPlusObject) : single; cdecl; external BePascalLibName name 'BFont_Rotation';
function BFont_Spacing(AObject : TCPlusObject) : integer; cdecl; external BePascalLibName name 'BFont_Spacing';
function BFont_Encoding(AObject : TCPlusObject) : integer; cdecl; external BePascalLibName name 'BFont_Encoding';
function BFont_Face(AObject : TCPlusObject) : integer; cdecl; external BePascalLibName name 'BFont_Face';
function BFont_Flags(AObject : TCPlusObject) : Cardinal; cdecl; external BePascalLibName name 'BFont_Flags';
function BFont_Direction(AObject : TCPlusObject) : Tfont_direction; cdecl; external BePascalLibName name 'BFont_Direction';
function BFont_IsFixed(AObject : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BFont_IsFixed';
function BFont_IsFullAndHalfFixed(AObject : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BFont_IsFullAndHalfFixed';
function BFont_BoundingBox(AObject : TCPlusObject) : TRect; cdecl; external BePascalLibName name 'BFont_BoundingBox';
//function BFont_Blocks(AObject : TCPlusObject) : ; cdecl; external BePascalLibName name 'BFont_Blocks';
function BFont_FileFormat(AObject : TCPlusObject) :Tfont_file_format ; cdecl; external BePascalLibName name 'BFont_FileFormat';
function BFont_CountTuned(AObject : TCPlusObject) : integer; cdecl; external BePascalLibName name 'BFont_CountTuned';
procedure BFont_GetTunedInfo(AObject : TCPlusObject; index : integer; info : Ttuned_font_info); cdecl; external BePascalLibName name 'BFont_GetTunedInfo';
procedure BFont_TruncateString(AObject : TCPlusObject; in_out : TCPlusObject; mode : Cardinal; width : single); cdecl; external BePascalLibName name 'BFont_TruncateString';
//procedure BFont_GetTruncatedStrings(AObject : TCPlusObject; stringArray : PChar; numStrings : integer; mode : Cardinal; width : single; resultArray : ); cdecl; external BePascalLibName name 'BFont_GetTruncatedStrings';
//procedure BFont_GetTruncatedStrings(AObject : TCPlusObject; stringArray : PChar; numStrings : integer; mode : Cardinal; width : single; resultArray : PChar); cdecl; external BePascalLibName name 'BFont_GetTruncatedStrings';
function BFont_StringWidth(AObject : TCPlusObject; astring : PChar) : single; cdecl; external BePascalLibName name 'BFont_StringWidth';
function BFont_StringWidth(AObject : TCPlusObject; astring : PChar; length : integer) : single; cdecl; external BePascalLibName name 'BFont_StringWidth';
//procedure BFont_GetStringWidths(AObject : TCPlusObject; stringArray : PChar; lengthArray : ; numStrings : integer; widthArray : single); cdecl; external BePascalLibName name 'BFont_GetStringWidths';
//procedure BFont_GetEscapements(AObject : TCPlusObject; charArray : ; numChars : integer; escapementArray : single); cdecl; external BePascalLibName name 'BFont_GetEscapements';
//procedure BFont_GetEscapements(AObject : TCPlusObject; charArray : ; numChars : integer; delta : ; escapementArray : single); cdecl; external BePascalLibName name 'BFont_GetEscapements';
//procedure BFont_GetEscapements(AObject : TCPlusObject; charArray : ; numChars : integer; delta : ; escapementArray : TPoint); cdecl; external BePascalLibName name 'BFont_GetEscapements';
//procedure BFont_GetEscapements(AObject : TCPlusObject; charArray : ; numChars : integer; delta : ; escapementArray : TPoint; offsetArray : TPoint); cdecl; external BePascalLibName name 'BFont_GetEscapements';
//procedure BFont_GetEdges(AObject : TCPlusObject; charArray : ; numBytes : integer; edgeArray : ); cdecl; external BePascalLibName name 'BFont_GetEdges';
procedure BFont_GetHeight(AObject : TCPlusObject; height :Tfont_height ); cdecl; external BePascalLibName name 'BFont_GetHeight';
{procedure BFont_GetBoundingBoxesAsGlyphs(AObject : TCPlusObject; charArray : ; numChars : integer; mode : ; boundingBoxArray : TRect); cdecl; external BePascalLibName name 'BFont_GetBoundingBoxesAsGlyphs';
procedure BFont_GetBoundingBoxesAsString(AObject : TCPlusObject; charArray : ; numChars : integer; mode : ; delta : ; boundingBoxArray : TRect); cdecl; external BePascalLibName name 'BFont_GetBoundingBoxesAsString';
procedure BFont_GetBoundingBoxesForStrings(AObject : TCPlusObject; stringArray : PChar; numStrings : integer; mode : ; deltas : ; boundingBoxArray : TRect); cdecl; external BePascalLibName name 'BFont_GetBoundingBoxesForStrings';
procedure BFont_GetGlyphShapes(AObject : TCPlusObject; charArray : ; numChars : integer; glyphShapeArray : ); cdecl; external BePascalLibName name 'BFont_GetGlyphShapes';
procedure BFont_GetHasGlyphs(AObject : TCPlusObject; charArray : ; numChars : integer; hasArray : boolean); cdecl; external BePascalLibName name 'BFont_GetHasGlyphs';
function BFont_operator=(AObject : TCPlusObject; font : ) : ; cdecl; external BePascalLibName name 'BFont_operator=';
function BFont_operator==(AObject : TCPlusObject; font : ) : boolean; cdecl; external BePascalLibName name 'BFont_operator==';
function BFont_operator!=(AObject : TCPlusObject; font : ) : boolean; cdecl; external BePascalLibName name 'BFont_operator!=';
}
procedure BFont_PrintToStream(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BFont_PrintToStream';
{procedure BFont_uint16 fFamilyID(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BFont_uint16 fFamilyID';
procedure BFont_uint16 fStyleID(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BFont_uint16 fStyleID';
procedure BFont_float fSize(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BFont_float fSize';
procedure BFont_float fShear(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BFont_float fShear';
procedure BFont_float fRotation(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BFont_float fRotation';
procedure BFont_uint8 fSpacing(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BFont_uint8 fSpacing';
procedure BFont_uint8 fEncoding(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BFont_uint8 fEncoding';
procedure BFont_uint16 fFace(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BFont_uint16 fFace';
procedure BFont_uint32 fFlags(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BFont_uint32 fFlags';
procedure BFont_font_height fHeight(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BFont_font_height fHeight';
procedure BFont_int32 fPrivateFlags(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BFont_int32 fPrivateFlags';
procedure BFont_uint32 _reserved[2](AObject : TCPlusObject); cdecl; external BePascalLibName name 'BFont_uint32 _reserved[2]';
procedure BFont_SetPacket(AObject : TCPlusObject; packet : Pointer); cdecl; external BePascalLibName name 'BFont_SetPacket';
procedure BFont_GetTruncatedStrings64(AObject : TCPlusObject; stringArray : PChar; numStrings : integer; mode : Cardinal; width : single; resultArray : PChar); cdecl; external BePascalLibName name 'BFont_GetTruncatedStrings64';
procedure BFont_GetTruncatedStrings64(AObject : TCPlusObject; stringArray : PChar; numStrings : integer; mode : Cardinal; width : single; resultArray : ); cdecl; external BePascalLibName name 'BFont_GetTruncatedStrings64';
procedure BFont__GetEscapements_(AObject : TCPlusObject; charArray : ; numChars : integer; delta : ; mode : ; escapements : single; offsets : single); cdecl; external BePascalLibName name 'BFont__GetEscapements_';
procedure BFont__GetBoundingBoxes_(AObject : TCPlusObject; charArray : ; numChars : integer; mode : ; string_escapement : boolean; delta : ; boundingBoxArray : TRect); cdecl; external BePascalLibName name 'BFont__GetBoundingBoxes_';
}
implementation
constructor TFont.Create;
begin
inherited Create;
CPlusObject := BFont_Create(Self);
end;
constructor TFont.Create(font : TFont);
begin
inherited Create;
CPlusObject := BFont_Create(Self, font);
end;
destructor TFont.Destroy;
begin
if CPlusObject <> nil then
BFont_Free(CPlusObject);
inherited;
end;
function TFont.SetFamilyAndStyle(family : Tfont_family; style :Tfont_style ) : TStatus_t;
begin
Result := BFont_SetFamilyAndStyle(CPlusObject, family, style);
end;
procedure TFont.SetFamilyAndStyle(code : Cardinal);
begin
BFont_SetFamilyAndStyle(CPlusObject, code);
end;
function TFont.SetFamilyAndFace(family : Tfont_family; aface : integer) : TStatus_t;
begin
Result := BFont_SetFamilyAndFace(CPlusObject, family, aface);
end;
procedure TFont.SetSize(asize : single);
begin
BFont_SetSize(CPlusObject, asize);
end;
procedure TFont.SetShear(ashear : single);
begin
BFont_SetShear(CPlusObject, ashear);
end;
procedure TFont.SetRotation(arotation : single);
begin
BFont_SetRotation(CPlusObject, arotation);
end;
procedure TFont.SetSpacing(aspacing : integer);
begin
BFont_SetSpacing(CPlusObject, aspacing);
end;
procedure TFont.SetEncoding(aencoding : integer);
begin
BFont_SetEncoding(CPlusObject, aencoding);
end;
procedure TFont.SetFace(aface : integer);
begin
BFont_SetFace(CPlusObject, aface);
end;
procedure TFont.SetFlags(aflags : Cardinal);
begin
BFont_SetFlags(CPlusObject, aflags);
end;
procedure TFont.GetFamilyAndStyle(family : Tfont_family; style :Tfont_style );
begin
BFont_GetFamilyAndStyle(CPlusObject, family, style);
end;
function TFont.FamilyAndStyle : Cardinal;
begin
Result := BFont_FamilyAndStyle(CPlusObject);
end;
function TFont.Size : single;
begin
Result := BFont_Size(CPlusObject);
end;
function TFont.Shear : single;
begin
Result := BFont_Shear(CPlusObject);
end;
function TFont.Rotation : single;
begin
Result := BFont_Rotation(CPlusObject);
end;
function TFont.Spacing : integer;
begin
Result := BFont_Spacing(CPlusObject);
end;
function TFont.Encoding : integer;
begin
Result := BFont_Encoding(CPlusObject);
end;
function TFont.Face : integer;
begin
Result := BFont_Face(CPlusObject);
end;
function TFont.Flags : Cardinal;
begin
Result := BFont_Flags(CPlusObject);
end;
function TFont.Direction : Tfont_direction;
begin
Result := BFont_Direction(CPlusObject);
end;
function TFont.IsFixed : boolean;
begin
Result := BFont_IsFixed(CPlusObject);
end;
function TFont.IsFullAndHalfFixed : boolean;
begin
Result := BFont_IsFullAndHalfFixed(CPlusObject);
end;
function TFont.BoundingBox : TRect;
begin
Result := BFont_BoundingBox(CPlusObject);
end;
{function TFont.Blocks : ;
begin
Result := BFont_Blocks(CPlusObject);
end;
}
function TFont.FileFormat : Tfont_file_format;
begin
Result := BFont_FileFormat(CPlusObject);
end;
function TFont.CountTuned : integer;
begin
Result := BFont_CountTuned(CPlusObject);
end;
procedure TFont.GetTunedInfo(index : integer; info : Ttuned_font_info);
begin
BFont_GetTunedInfo(CPlusObject, index, info);
end;
procedure TFont.TruncateString(in_out : TString; mode : Cardinal; width : single);
begin
BFont_TruncateString(CPlusObject, in_out.CPlusObject, mode, width);
end;
{procedure TFont.GetTruncatedStrings(stringArray : PChar; numStrings : integer; mode : Cardinal; width : single; resultArray : );
begin
BFont_GetTruncatedStrings(CPlusObject, stringArray, numStrings, mode, width, resultArray.CPlusObject);
end;
procedure TFont.GetTruncatedStrings(stringArray : PChar; numStrings : integer; mode : Cardinal; width : single; resultArray : PChar);
begin
BFont_GetTruncatedStrings(CPlusObject, stringArray, numStrings, mode, width, resultArray);
end;
}
function TFont.StringWidth(astring : PChar) : single;
begin
Result := BFont_StringWidth(CPlusObject, astring);
end;
function TFont.StringWidth(astring : PChar; length : integer) : single;
begin
Result := BFont_StringWidth(CPlusObject, astring, length);
end;
{procedure TFont.GetStringWidths(stringArray : PChar; lengthArray : integer ; numStrings : integer; widthArray : single);
begin
BFont_GetStringWidths(CPlusObject, stringArray, lengthArray, numStrings, widthArray);
end;
procedure TFont.GetEscapements(charArray : PChar; numChars : integer; escapementArray : single);
begin
BFont_GetEscapements(CPlusObject, charArray, numChars, escapementArray);
end;
procedure TFont.GetEscapements(charArray : ; numChars : integer; delta : ; escapementArray : single);
begin
BFont_GetEscapements(CPlusObject, charArray, numChars, delta, escapementArray);
end;
procedure TFont.GetEscapements(charArray : ; numChars : integer; delta : ; escapementArray : TPoint);
begin
BFont_GetEscapements(CPlusObject, charArray, numChars, delta, escapementArray.CPlusObject);
end;
procedure TFont.GetEscapements(charArray : ; numChars : integer; delta : ; escapementArray : TPoint; offsetArray : TPoint);
begin
BFont_GetEscapements(CPlusObject, charArray, numChars, delta, escapementArray.CPlusObject, offsetArray.CPlusObject);
end;
procedure TFont.GetEdges(charArray : ; numBytes : integer; edgeArray : );
begin
BFont_GetEdges(CPlusObject, charArray, numBytes, edgeArray);
end;
}
procedure TFont.GetHeight(height :Tfont_height );
begin
BFont_GetHeight(CPlusObject, height);
end;
{
procedure TFont.GetBoundingBoxesAsGlyphs(charArray : ; numChars : integer; mode : ; boundingBoxArray : TRect);
begin
BFont_GetBoundingBoxesAsGlyphs(CPlusObject, charArray, numChars, mode, boundingBoxArray.CPlusObject);
end;
procedure TFont.GetBoundingBoxesAsString(charArray : ; numChars : integer; mode : ; delta : ; boundingBoxArray : TRect);
begin
BFont_GetBoundingBoxesAsString(CPlusObject, charArray, numChars, mode, delta, boundingBoxArray.CPlusObject);
end;
procedure TFont.GetBoundingBoxesForStrings(stringArray : PChar; numStrings : integer; mode : ; deltas : ; boundingBoxArray : TRect);
begin
BFont_GetBoundingBoxesForStrings(CPlusObject, stringArray, numStrings, mode, deltas, boundingBoxArray.CPlusObject);
end;
procedure TFont.GetGlyphShapes(charArray : ; numChars : integer; glyphShapeArray : );
begin
BFont_GetGlyphShapes(CPlusObject, charArray, numChars, glyphShapeArray.CPlusObject);
end;
procedure TFont.GetHasGlyphs(charArray : ; numChars : integer; hasArray : boolean);
begin
BFont_GetHasGlyphs(CPlusObject, charArray, numChars, hasArray);
end;
}
procedure TFont.PrintToStream;
begin
BFont_PrintToStream(CPlusObject);
end;
end.

View File

@@ -1,314 +0,0 @@
unit GraphicDefs;
{
(Manual) Translation of Be's GraphicDefs.h
Ok, if TBitmap doesn't work, the error its most likely to be in this unit.
What this unit needs? that someone take a look at the points marked with:
// Check/Confirm This one, please.
I'm not too sure about how to translate the enums, and also not sure about
the values of the index on a set. Excuse (and fix!) my ignorace :)
Maybe I also screwed up a little the integer types too, be warned :^P
-- BiPolar.
}
interface
uses
SupportDefs;
{$PACKRECORDS C}
type
// This one must be find a better place.
PCardinal = ^Cardinal;
(*----------------------------------------------------------------*)
type
{ TPattern = pattern }
TPattern = record
Data : array [0..7] of Byte; // uint8
end;
// How we do 'export' these global const?
// Check/Confirm This one, please.
var {const}
B_SOLID_HIGH : TPattern; cvar; external;
B_MIXED_COLORS : TPattern; cvar; external;
B_SOLID_LOW : TPattern; cvar; external;
(*----------------------------------------------------------------*)
type
{ I do prefer TRGBColor but... oh well... }
TRGB_Color = record
Red,
Green,
Blue,
Alpha : Byte;
end;
(*----------------------------------------------------------------*)
var
{const}
//extern const rgb_color B_TRANSPARENT_COLOR;
B_TRANSPARENT_COLOR : TRGB_Color; cvar; external;
//extern const uint8 B_TRANSPARENT_MAGIC_CMAP8;
B_TRANSPARENT_MAGIC_CMAP8 : Byte; cvar; external;
//extern const uint16 B_TRANSPARENT_MAGIC_RGBA15;
B_TRANSPARENT_MAGIC_RGBA15 : Word; cvar; external;
//extern const uint16 B_TRANSPARENT_MAGIC_RGBA15_BIG;
B_TRANSPARENT_MAGIC_RGBA15_BIG : Word; cvar; external;
//extern const uint32 B_TRANSPARENT_MAGIC_RGBA32;
B_TRANSPARENT_MAGIC_RGBA32 : Cardinal; cvar; external;
//extern const uint32 B_TRANSPARENT_MAGIC_RGBA32_BIG;
B_TRANSPARENT_MAGIC_RGBA32_BIG : Cardinal; cvar; external;
//extern const uint8 B_TRANSPARENT_8_BIT;
B_TRANSPARENT_8_BIT : Byte; cvar; external;
//extern const rgb_color B_TRANSPARENT_32_BIT;
B_TRANSPARENT_32_BIT : TRGB_Color; cvar; external;
(*----------------------------------------------------------------*)
type
TColorMap = record
ID : Integer; // int32
ColorList: array [0..255] of TRGB_Color;
InversionMap : array [0..255] of Byte; // uint8
IndexMap : array [0..32767] of Byte; // uint8
end;
{ TOverlayRectLimits = overlay_rect_limits }
TOverlayRectLimits = record
HorizontalAlignment,
VerticalAlignment,
WidthAlignment,
HeightAlignment,
MinWidth,
MaxWidth,
MinHeight,
MaxHeight : Word; // uint16
Reserved : array [0..7] of Cardinal; // uint32
end;
{ TOverlayRestrictions = overlay_restrictions }
TOverlayRestrictions = record
Source,
Destination : TOverlayRectLimits;
MinWidthScale,
MaxWidthScale,
MinHeightScale,
MaxHeightScale : Double; // float
Reserved : array [0..7] of Cardinal; // uint32
end;
(*----------------------------------------------------------------*)
//struct screen_id { int32 id; };
TScreenID = record
ID : Integer
end;
//extern const struct screen_id B_MAIN_SCREEN_ID;
var
{const}
B_MAIN_SCREEN_ID : TScreenID; cvar; external;
(*----------------------------------------------------------------*)
type
TColor_Space = Cardinal; // or is just word?
const
B_NO_COLOR_SPACE = $0000; // byte in memory order, high bit first
// linear color space (little endian is the default)
B_RGB32 = $0008; // B[7:0] G[7:0] R[7:0] -[7:0]
B_RGBA32 = $2008; // B[7:0] G[7:0] R[7:0] A[7:0]
B_RGB24 = $0003; // B[7:0] G[7:0] R[7:0]
B_RGB16 = $0005; // G[2:0],B[4:0] R[4:0],G[5:3]
B_RGB15 = $0010; // G[2:0],B[4:0] -[0],R[4:0],G[4:3]
B_RGBA15 = $2010; // G[2:0],B[4:0] A[0],R[4:0],G[4:3]
B_CMAP8 = $0004; // D[7:0]
B_GRAY8 = $0002; // Y[7:0]
B_GRAY1 = $0001; // Y0[0],Y1[0],Y2[0],Y3[0],Y4[0],Y5[0],Y6[0],Y7[0]
// big endian version, when the encoding is not endianess independant
B_RGB32_BIG = $1008; // -[7:0] R[7:0] G[7:0] B[7:0]
B_RGBA32_BIG = $3008; // A[7:0] R[7:0] G[7:0] B[7:0]
B_RGB24_BIG = $1003; // R[7:0] G[7:0] B[7:0]
B_RGB16_BIG = $1005; // R[4:0],G[5:3] G[2:0],B[4:0]
B_RGB15_BIG = $1010; // -[0],R[4:0],G[4:3] G[2:0],B[4:0]
B_RGBA15_BIG = $3010; // A[0],R[4:0],G[4:3] G[2:0],B[4:0]
// little-endian declarations, for completness
B_RGB32_LITTLE = B_RGB32;
B_RGBA32_LITTLE = B_RGBA32;
B_RGB24_LITTLE = B_RGB24;
B_RGB16_LITTLE = B_RGB16;
B_RGB15_LITTLE = B_RGB15;
B_RGBA15_LITTLE = B_RGBA15;
// non linear color space -- note that these are here for exchange purposes;
// a BBitmap or BView may not necessarily support all these color spaces.
// Loss/Saturation points are Y 16-235 (absoulte); Cb/Cr 16-240 (center 128)
B_YCbCr422 = $4000; // Y0[7:0] Cb0[7:0] Y1[7:0] Cr0[7:0] Y2[7:0]...
// Cb2[7:0] Y3[7:0] Cr2[7:0]
B_YCbCr411 = $4001; // Cb0[7:0] Y0[7:0] Cr0[7:0] Y1[7:0] Cb4[7:0]...
// Y2[7:0] Cr4[7:0] Y3[7:0] Y4[7:0] Y5[7:0]...
// Y6[7:0] Y7[7:0]
B_YCbCr444 = $4003; // Y0[7:0] Cb0[7:0] Cr0[7:0]
B_YCbCr420 = $4004; // Non-interlaced only, Cb0 Y0 Y1 Cb2 Y2 Y3 on even scan lines ...
// Cr0 Y0 Y1 Cr2 Y2 Y3 on odd scan lines
// Extrema points are Y 0 - 207 (absolute) U -91 - 91 (offset 128) V -127 - 127 (offset 128)
// note that YUV byte order is different from YCbCr
// USE YCbCr, not YUV, when that's what you mean!
B_YUV422 = $4020; // U0[7:0] Y0[7:0] V0[7:0] Y1[7:0] ...
// U2[7:0] Y2[7:0] V2[7:0] Y3[7:0]
B_YUV411 = $4021; // U0[7:0] Y0[7:0] Y1[7:0] V0[7:0] Y2[7:0] Y3[7:0]
// U4[7:0] Y4[7:0] Y5[7:0] V4[7:0] Y6[7:0] Y7[7:0]
B_YUV444 = $4023; // U0[7:0] Y0[7:0] V0[7:0] U1[7:0] Y1[7:0] V1[7:0]
B_YUV420 = $4024; // Non-interlaced only, U0 Y0 Y1 U2 Y2 Y3 on even scan lines ...
// V0 Y0 Y1 V2 Y2 Y3 on odd scan lines
B_YUV9 = $402C; // planar? 410?
B_YUV12 = $402D; // planar? 420?
B_UVL24 = $4030; // U0[7:0] V0[7:0] L0[7:0] ...
B_UVL32 = $4031; // U0[7:0] V0[7:0] L0[7:0] X0[7:0]...
B_UVLA32 = $6031; // U0[7:0] V0[7:0] L0[7:0] A0[7:0]...
B_LAB24 = $4032; // L0[7:0] a0[7:0] b0[7:0] ... (a is not alpha!)
B_LAB32 = $4033; // L0[7:0] a0[7:0] b0[7:0] X0[7:0] ... (b is not alpha!)
B_LABA32 = $6033; // L0[7:0] a0[7:0] b0[7:0] A0[7:0] ... (A is alpha)
// red is at hue = 0
B_HSI24 = $4040; // H[7:0] S[7:0] I[7:0]
B_HSI32 = $4041; // H[7:0] S[7:0] I[7:0] X[7:0]
B_HSIA32 = $6041; // H[7:0] S[7:0] I[7:0] A[7:0]
B_HSV24 = $4042; // H[7:0] S[7:0] V[7:0]
B_HSV32 = $4043; // H[7:0] S[7:0] V[7:0] X[7:0]
B_HSVA32 = $6043; // H[7:0] S[7:0] V[7:0] A[7:0]
B_HLS24 = $4044; // H[7:0] L[7:0] S[7:0]
B_HLS32 = $4045; // H[7:0] L[7:0] S[7:0] X[7:0]
B_HLSA32 = $6045; // H[7:0] L[7:0] S[7:0] A[7:0]
B_CMY24 = $C001; // C[7:0] M[7:0] Y[7:0] No gray removal done
B_CMY32 = $C002; // C[7:0] M[7:0] Y[7:0] X[7:0] No gray removal done
B_CMYA32 = $E002; // C[7:0] M[7:0] Y[7:0] A[7:0] No gray removal done
B_CMYK32 = $C003; // C[7:0] M[7:0] Y[7:0] K[7:0]
// compatibility declarations
B_MONOCHROME_1_BIT = B_GRAY1;
B_GRAYSCALE_8_BIT = B_GRAY8;
B_COLOR_8_BIT = B_CMAP8;
B_RGB_32_BIT = B_RGB32;
B_RGB_16_BIT = B_RGB15;
B_BIG_RGB_32_BIT = B_RGB32_BIG;
B_BIG_RGB_16_BIT = B_RGB15_BIG;
// Find out whether a specific color space is supported by BBitmaps.
// Support_flags will be set to what kinds of support are available.
// If support_flags is set to 0, false will be returned.
const
B_VIEWS_SUPPORT_DRAW_BITMAP = $1;
B_BITMAPS_SUPPORT_ATTACHED_VIEWS = $2;
// Check/Confirm This one, please.
function BitmapsSupportSpace(space : TColor_Space; support_flags : PCardinal)
: boolean; cdecl; external 'be' name 'bitmaps_support_space';
function GetPixelSizeFor(space : TColor_Space; pixel_chunk : TStatus_t;
row_alignment : TStatus_t; pixels_per_chunk : TStatus_t)
: TStatus_t; cdecl; external 'be' name 'get_pixel_size_for';
{
_IMPEXP_BE bool bitmaps_support_space(color_space space, uint32 * support_flags);
// "pixel_chunk" is the native increment from one pixel starting on an integral
// byte to the next.
// "row_alignment" is the native alignment for pixel scanline starts.
// "pixels_per_chunk" is the number of pixels in a pixel_chunk. For instance,
// B_GRAY1 sets pixel_chunk to 1, row_alignment to 4 and pixels_per_chunk to 8,
// whereas B_RGB24 sets pixel_chunk to 3, row_alignment to 4 and
// pixels_per_chunk to 1.
_IMPEXP_BE status_t get_pixel_size_for(color_space space, size_t * pixel_chunk,
size_t * row_alignment, size_t * pixels_per_chunk);
}
(*----------------------------------------------------------------*)
type
BufferOrientation = (B_BUFFER_TOP_TO_BOTTOM, B_BUFFER_BOTTOM_TO_TOP);
// Check/Confirm This one, please.
BufferLayout = (B_BUFFER_NONINTERLEAVED); // B_BUFFER_NONINTERLEAVED = 1
(*----------------------------------------------------------------*)
DrawingMode = (B_OP_COPY, B_OP_OVER, B_OP_ERASE, B_OP_INVERT, B_OP_ADD,
B_OP_SUBTRACT, B_OP_BLEND, B_OP_MIN, B_OP_MAX,
B_OP_SELECT, B_OP_ALPHA);
// Check/Confirm This one, please.
// this was:
// enum source_alpha {
// B_PIXEL_ALPHA=0,
// B_CONSTANT_ALPHA
// };
//
// enum alpha_function {
// B_ALPHA_OVERLAY=0,
// B_ALPHA_COMPOSITE
// };
SourceAlpha = (B_PIXEL_ALPHA, B_CONSTANT_ALPHA);
AlphaFunction = (B_ALPHA_OVERLAY, B_ALPHA_COMPOSITE);
const
B_8_BIT_640x480 = $00000001;
B_8_BIT_800x600 = $00000002;
B_8_BIT_1024x768 = $00000004;
B_8_BIT_1280x1024 = $00000008;
B_8_BIT_1600x1200 = $00000010;
B_16_BIT_640x480 = $00000020;
B_16_BIT_800x600 = $00000040;
B_16_BIT_1024x768 = $00000080;
B_16_BIT_1280x1024 = $00000100;
B_16_BIT_1600x1200 = $00000200;
B_32_BIT_640x480 = $00000400;
B_32_BIT_800x600 = $00000800;
B_32_BIT_1024x768 = $00001000;
B_32_BIT_1280x1024 = $00002000;
B_32_BIT_1600x1200 = $00004000;
B_8_BIT_1152x900 = $00008000;
B_16_BIT_1152x900 = $00010000;
B_32_BIT_1152x900 = $00020000;
B_15_BIT_640x480 = $00040000;
B_15_BIT_800x600 = $00080000;
B_15_BIT_1024x768 = $00100000;
B_15_BIT_1280x1024 = $00200000;
B_15_BIT_1600x1200 = $00400000;
B_15_BIT_1152x900 = $00800000;
// do not use B_FAKE_DEVICE--it will go away!
B_FAKE_DEVICE = $40000000;
B_8_BIT_640x400 = $80000000; // (int)
implementation
end.

View File

@@ -1,60 +0,0 @@
{ BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
Eric Jourde
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
}
unit interfacedefs;
interface
uses graphicdefs,beobj;
type
TAlignment = (B_ALIGN_LEFT,
B_ALIGN_RIGHT,
B_ALIGN_CENTER);
Tcolor_which =(Tcolor_nil,
B_PANEL_BACKGROUND_COLOR ,
B_MENU_BACKGROUND_COLOR ,
B_MENU_SELECTION_BACKGROUND_COLOR ,
B_MENU_ITEM_TEXT_COLOR ,
B_MENU_SELECTED_ITEM_TEXT_COLOR ,
B_WINDOW_TAB_COLOR ,
B_KEYBOARD_NAVIGATION_COLOR ,
B_DESKTOP_COLOR );
Torientation =(
B_HORIZONTAL,
B_VERTICAL);
Tborder_style =(
B_PLAIN_BORDER,
B_FANCY_BORDER,
B_NO_BORDER);
TButton_width = (
B_WIDTH_AS_USUAL,
B_WIDTH_FROM_WIDSET,
B_WIDTH_FROM_LABEL);
function ui_color(which : Tcolor_which) : Trgb_color; cdecl; external 'be' name 'ui_color__F11color_which';
function Ttint_color(color : Trgb_color; which :Tcolor_which) : Trgb_color;cdecl; external 'be' name 'tint_color__FG9rgb_colorf';
implementation
end.

View File

@@ -1,352 +0,0 @@
{ BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
Eric Jourde
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
}
unit listitem;
interface
uses
beobj, interfacedefs,view,Message, Archivable, SupportDefs, Rect, Handler,font;
type
TListItem = class(TBeObject)
private
public
constructor Create(aoutlineLevel : longint; expanded : boolean );virtual;
constructor Create(data : TMessage);
destructor Destroy;override;
function Archive(data : TMessage; deep : boolean) : TStatus_t;
function Height : double;
function Width : double;
function IsSelected : boolean;
procedure Select;
procedure Deselect;
procedure SetEnabled(aon : boolean);
function IsEnabled : boolean;
procedure SetHeight(aheight : double);
procedure SetWidth(awidth : double);
procedure DrawItem(owner : TView; bounds : TRect; complete : boolean);
procedure Update(owner : TView; font : TFont);
// function Perform(d : TPerform_code; var arg : Pointer) : TStatus_t;
function IsExpanded : boolean;
procedure SetExpanded(expanded : boolean);
function OutlineLevel : Cardinal;
function HasSubitems : boolean;
end;
type
TStringItem = class(TListItem)
private
public
constructor Create( atext: pchar;aoutlineLevel : longint; expanded : boolean);virtual;
destructor Destroy;override;
constructor Create(data : TMessage);
function Instantiate(data : TMessage) : TArchivable;
function Archive(data : TMessage; deep : boolean) : TStatus_t;
procedure DrawItem(owner : TView; frame : TRect; complete : boolean);
procedure SetText( atext : PChar);
function Text : PChar;
procedure Update(owner : TView; font : TFont);
// function Perform(d : TPerform_code; arg : Pointer) : TStatus_t;
end;
function BListItem_Create(AObject : TBeObject;outlineLevel : longint; expanded : boolean): TCPlusObject; cdecl; external BePascalLibName name 'BListItem_Create';
function BListItem_Create(AObject : TBeObject; data : TCPlusObject): TCPlusObject; cdecl; external BePascalLibName name 'BListItem_Create_1';
procedure BListItem_Free(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BListItem_Free';
function BListItem_Archive(AObject : TCPlusObject; data : TCPlusObject; deep : boolean) : TStatus_t; cdecl; external BePascalLibName name 'BListItem_Archive';
function BListItem_Height(AObject : TCPlusObject) : double; cdecl; external BePascalLibName name 'BListItem_Height';
function BListItem_Width(AObject : TCPlusObject) : double; cdecl; external BePascalLibName name 'BListItem_Width';
function BListItem_IsSelected(AObject : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BListItem_IsSelected';
procedure BListItem_Select(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BListItem_Select';
procedure BListItem_Deselect(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BListItem_Deselect';
procedure BListItem_SetEnabled(AObject : TCPlusObject; aon : boolean); cdecl; external BePascalLibName name 'BListItem_SetEnabled';
function BListItem_IsEnabled(AObject : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BListItem_IsEnabled';
procedure BListItem_SetHeight(AObject : TCPlusObject; aheight : double); cdecl; external BePascalLibName name 'BListItem_SetHeight';
procedure BListItem_SetWidth(AObject : TCPlusObject; awidth : double); cdecl; external BePascalLibName name 'BListItem_SetWidth';
procedure BListItem_Update(AObject : TCPlusObject; owner : TCPlusObject; font : TCPlusObject); cdecl; external BePascalLibName name 'BListItem_Update';
function BListItem_Perform(AObject : TCPlusObject; d : TCPlusObject; arg : Pointer) : TStatus_t; cdecl; external BePascalLibName name 'BListItem_Perform';
function BListItem_IsExpanded(AObject : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BListItem_IsExpanded';
procedure BListItem_SetExpanded(AObject : TCPlusObject; expanded : boolean); cdecl; external BePascalLibName name 'BListItem_SetExpanded';
function BListItem_OutlineLevel(AObject : TCPlusObject) : Cardinal; cdecl; external BePascalLibName name 'BListItem_OutlineLevel';
//function BListItem_HasSubitems(AObject : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BListItem_HasSubitems';
procedure BListItem_DrawItem(AObject : TCPlusObject; owner : TCPlusObject; bounds : TCPlusObject; complete : boolean); cdecl; external BePascalLibName name 'BListItem_DrawItem';
function BStringItem_Create(AObject : TBeObject ;text: pchar;lineLevel : longint; expanded : boolean): TCPlusObject; cdecl; external BePascalLibName name 'BStringItem_Create';
procedure BStringItem_Free(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BStringItem_Free';
function BStringItem_Create(AObject : TBeObject; data : TCPlusObject): TCPlusObject; cdecl; external BePascalLibName name 'BStringItem_Create';
function BStringItem_Instantiate(AObject : TCPlusObject; data : TCPlusObject) : TArchivable; cdecl; external BePascalLibName name 'BStringItem_Instantiate';
function BStringItem_Archive(AObject : TCPlusObject; data : TCPlusObject; deep : boolean) : TStatus_t; cdecl; external BePascalLibName name 'BStringItem_Archive';
procedure BStringItem_DrawItem(AObject : TCPlusObject; owner : TCPlusObject; frame : TCPlusObject; complete : boolean); cdecl; external BePascalLibName name 'BStringItem_DrawItem';
procedure BStringItem_SetText(AObject : TCPlusObject; text : PChar); cdecl; external BePascalLibName name 'BStringItem_SetText';
function BStringItem_Text(AObject : TCPlusObject) : PChar; cdecl; external BePascalLibName name 'BStringItem_Text';
procedure BStringItem_Update(AObject : TCPlusObject; owner : TCPlusObject; font : TCPlusObject); cdecl; external BePascalLibName name 'BStringItem_Update';
function BStringItem_Perform(AObject : TCPlusObject; d : TPerform_code; arg : Pointer) : TStatus_t; cdecl; external BePascalLibName name 'BStringItem_Perform';
implementation
var
ListItem_DrawItem_hook : Pointer; cvar; external;
ListString_DrawItem_hook : Pointer; cvar; external;
ListItem_Update_hook : Pointer; cvar; external;
ListString_Update_hook : Pointer; cvar; external;
constructor TListItem.Create(aoutlineLevel : longint; expanded : boolean );
begin
CreatePas;
CPlusObject := BListItem_Create(Self,aoutlineLevel , expanded );
end;
constructor TListItem.Create(data : TMessage);
begin
CreatePas;
CPlusObject := BListItem_Create(Self, data.CPlusObject);
end;
destructor TListItem.Destroy;
begin
BListItem_Free(CPlusObject);
inherited;
end;
function TListItem.Archive(data : TMessage; deep : boolean) : TStatus_t;
begin
Result := BListItem_Archive(CPlusObject, data.CPlusObject, deep);
end;
function TListItem.Height : double;
begin
Result := BListItem_Height(CPlusObject);
end;
function TListItem.Width : double;
begin
Result := BListItem_Width(CPlusObject);
end;
function TListItem.IsSelected : boolean;
begin
Result := BListItem_IsSelected(CPlusObject);
end;
procedure TListItem.Select;
begin
BListItem_Select(CPlusObject);
end;
procedure TListItem.Deselect;
begin
BListItem_Deselect(CPlusObject);
end;
procedure TListItem.SetEnabled(aon : boolean);
begin
BListItem_SetEnabled(CPlusObject, aon);
end;
function TListItem.IsEnabled : boolean;
begin
Result := BListItem_IsEnabled(CPlusObject);
end;
procedure TListItem.SetHeight(aheight : double);
begin
BListItem_SetHeight(CPlusObject, aheight);
end;
procedure TListItem.SetWidth(awidth : double);
begin
BListItem_SetWidth(CPlusObject, awidth);
end;
procedure TListItem.DrawItem(owner : TView; bounds : TRect; complete : boolean);
begin
//BListItem_DrawItem(CPlusObject, owner.CPlusObject, bounds.CPlusObject, complete);
end;
procedure TListItem.Update(owner : TView; font : TFont);
begin
// BListItem_Update(CPlusObject, owner.CPlusObject, font);
end;
{function TListItem.Perform(d : TPerform_code; var arg : Pointer) : TStatus_t;
begin
Result := BListItem_Perform(CPlusObject, d, arg);
end;
}
function TListItem.IsExpanded : boolean;
begin
Result := BListItem_IsExpanded(CPlusObject);
end;
procedure TListItem.SetExpanded(expanded : boolean);
begin
BListItem_SetExpanded(CPlusObject, expanded);
end;
function TListItem.OutlineLevel : Cardinal;
begin
Result := BListItem_OutlineLevel(CPlusObject);
end;
function TListItem.HasSubitems : boolean;
begin
// Result := BListItem_HasSubitems(CPlusObject);
end;
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// TStringItem
//
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
constructor TStringItem.Create( atext: pchar;aoutlineLevel : longint; expanded : boolean);
begin
CreatePas;
CPlusObject := BStringItem_Create(Self,atext,aoutlineLevel,expanded);
end;
destructor TStringItem.Destroy;
begin
BStringItem_Free(CPlusObject);
inherited;
end;
constructor TStringItem.Create(data : TMessage);
begin
CreatePas;
CPlusObject := BStringItem_Create(Self, data.CPlusObject);
end;
function TStringItem.Instantiate(data : TMessage) : TArchivable;
begin
Result := BStringItem_Instantiate(CPlusObject, data.CPlusObject);
end;
function TStringItem.Archive(data : TMessage; deep : boolean) : TStatus_t;
begin
//Result := BStringItem_Archive(CPlusObject, data.CPlusObject, deep);
end;
procedure TStringItem.DrawItem(owner : TView; frame : TRect; complete : boolean);
begin
//BStringItem_DrawItem(CPlusObject, owner.CPlusObject, frame.CPlusObject, complete);
end;
procedure TStringItem.SetText( atext : PChar);
begin
BStringItem_SetText(CPlusObject, atext);
end;
function TStringItem.Text : PChar;
begin
Result := BStringItem_Text(CPlusObject);
end;
procedure TStringItem.Update(owner : TView; font : TFont);
begin
//BStringItem_Update(CPlusObject, owner.CPlusObject, font);
end;
{function TStringItem.Perform(d : TPerform_code; arg : Pointer) : TStatus_t;
begin
Result := BStringItem_Perform(CPlusObject, d, arg);
end;
}
procedure ListItem_DrawItem_hook_func(Liste : TListItem;owner : TCPlusObject; bounds : TCPlusObject; complete : boolean); cdecl;
var Rect : TRect;
ow : TView;
begin
Rect:=TRect.Wrap(bounds);
ow:=TView.Wrap(owner);
try
if Liste <> nil then
begin
Liste.DrawItem(ow ,Rect, complete );
end;
finally
Rect.UnWrap;
ow.UnWrap;
end;
end;
procedure ListString_DrawItem_hook_func(Liste : TStringItem;owner : TCPlusObject; bounds : TCPlusObject; complete : boolean); cdecl;
var Rect : TRect;
ow : TView;
begin
Rect:=TRect.Wrap(bounds);
ow:=TView.Wrap(owner);
try
if Liste <> nil then
begin
Liste.DrawItem(ow ,Rect, complete );
end;
finally
Rect.UnWrap;
ow.UnWrap;
end;
end;
procedure ListItem_Update_hook_func(Liste : TListItem;owner : TCPlusObject; font : TCPlusObject); cdecl;
var afont: TFont;
ow : TView;
begin
afont:=TFont.Wrap(font);
ow:=TView.Wrap(owner);
try
if Liste <> nil then
begin
Liste.Update(ow ,afont );
end;
finally
afont.UnWrap;
ow.UnWrap;
end;
end;
procedure ListString_Update_hook_func(Liste : TStringItem;owner : TCPlusObject; font : TCPlusObject); cdecl;
var afont: TFont;
ow : TView;
begin
afont:=TFont.Wrap(font);
ow:=TView.Wrap(owner);
try
if Liste <> nil then
begin
Liste.Update(ow ,afont );
end;
finally
afont.UnWrap;
ow.UnWrap;
end;
end;
initialization
ListItem_DrawItem_hook := @ListItem_DrawItem_hook_func;
ListString_DrawItem_hook := @ListString_DrawItem_hook_func;
ListItem_Update_hook := @ListItem_Update_hook_func;
ListString_Update_hook := @ListString_Update_hook_func;
end.

View File

@@ -1,79 +0,0 @@
/* BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _LISTVIEW_H_
#define _LISTVIEW_H_
#include <ListView.h>
#include <view.h>
#include <beobj.h>
#include <OS.h>
#include <handler.h>
#include <beobj.h>
class BPListView : public BListView, virtual public BPView
{
public:
BPListView(TPasObject PasObject,BRect frame,
const char *name,
list_view_type type = B_SINGLE_SELECTION_LIST,
uint32 resizeMask = B_FOLLOW_LEFT |
B_FOLLOW_TOP,
uint32 flags = B_WILL_DRAW | B_FRAME_EVENTS |
B_NAVIGABLE);
BPListView(TPasObject PasObject,BMessage *data);
static BArchivable *Instantiate(BMessage *data);
//virtual status_t Archive(BMessage *data, bool deep = true) const;
virtual void Draw(BRect updateRect);
virtual void MessageReceived(BMessage *msg);
virtual void MouseDown(BPoint where);
virtual void KeyDown(const char *bytes, int32 numBytes);
//virtual void MakeFocus(bool state = true);
virtual void FrameResized(float newWidth, float newHeight);
virtual void AttachedToWindow();
//virtual void FrameMoved(BPoint new_position);
/*virtual BHandler *ResolveSpecifier(BMessage *msg,
int32 index,
BMessage *specifier,
int32 form,
const char *property);*/
//virtual status_t Perform(perform_code d, void *arg);
virtual void WindowActivated(bool state);
virtual void MouseUp(BPoint pt);
virtual void MouseMoved(BPoint pt, uint32 code, const BMessage *msg);
virtual void DetachedFromWindow();
//virtual void ResizeToPreferred();
//virtual void GetPreferredSize(float *width, float *height);
virtual void AllAttached();
virtual void AllDetached();
bool InitiateDrag(BPoint pt, int32 itemIndex,
bool initialySelected);
void SelectionChanged();
protected:
};
#endif /* _LISTVIEW_H_ */

View File

@@ -1,548 +0,0 @@
{ BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
Eric Jourde
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
}
unit listview;
interface
uses
beobj, view, message, archivable, SupportDefs, rect, list,
handler, messenger,interfacedefs,font,graphicdefs,scrollview,listitem;
type
Tlist_view_type =(
B_SINGLE_SELECTION_LIST,
B_MULTIPLE_SELECTION_LIST
);
type
TListView = class(TView)
private
public
constructor Create(frame : TRect; name : pchar; atype : Tlist_view_type; resizeMask: longint; flags : longint); virtual;
constructor Create(data : TMessage);
destructor Destroy;override;
function Instantiate(data : TMessage) : TArchivable;
function Archive(data : TMessage; deep : boolean) : TStatus_t;
procedure Draw(updateRect : TRect);override;
procedure MessageReceived(msg : TMessage);override;
procedure MouseDown(where : TPoint);override;
procedure KeyDown(bytes : PChar; numBytes : integer);override;
procedure MakeFocus(state : boolean);
procedure FrameResized(newWidth : double; newHeight : double);override;
procedure TargetedByScrollView(scroller : TScrollView);
procedure ScrollTo(x : double; y : double);
procedure ScrollTo(where : TPoint);
function AddItem(item : TListItem) : boolean;
function AddItem(item : TListItem; atIndex : integer) : boolean;
function AddList(newItems : TList) : boolean;
function AddList(newItems : TList; atIndex : integer) : boolean;
function RemoveItem(item : TListItem) : boolean;
function RemoveItem(index : integer) : TListItem;
function RemoveItems(index : integer; count : integer) : boolean;
procedure SetSelectionMessage(message : TMessage);
procedure SetInvocationMessage(message : TMessage);
function SelectionMessage : TMessage;
function SelectionCommand : Cardinal;
function InvocationMessage : TMessage;
function InvocationCommand : Cardinal;
procedure SetListType(atype : TList_view_type);
function ListType : TList_view_type;
function ItemAt(index : integer) : TListItem;
function IndexOf(point : TPoint) : integer;
function IndexOf(item : TListItem) : integer;
function FirstItem : TListItem;
function LastItem : TListItem;
function HasItem(item : TListItem) : boolean;
function CountItems : integer;
procedure MakeEmpty;
function IsEmpty : boolean;
function Items : TListView;
procedure InvalidateItem(index : integer);
procedure ScrollToSelection;
procedure Select(index : integer; extend : boolean);
procedure Select(from : integer; ato : integer; extend : boolean);
function IsItemSelected(index : integer) : boolean;
function CurrentSelection(index : integer) : integer;
function Invoke(msg : TMessage) : TStatus_t;
procedure DeselectAll;
procedure DeselectExcept(except_from : integer; except_to : integer);
procedure Deselect(index : integer);
procedure SelectionChanged; virtual;
function SwapItems(a : integer; b : integer) : boolean;
function MoveItem(from : integer; ato : integer) : boolean;
function ReplaceItem(index : integer; item : TListItem) : boolean;
procedure AttachedToWindow;override;
procedure FrameMoved(new_position : TPoint);override;
function ItemFrame(index : integer) : TRect;
function ResolveSpecifier(msg : TMessage; index : integer; specifier : TMessage; form : integer; properti : PChar) : THandler;
function GetSupportedSuites(data : TMessage) : TStatus_t;
function Perform(d : TPerform_code; arg : Pointer) : TStatus_t;
procedure WindowActivated(state : boolean);override;
procedure MouseUp(pt : TPoint);override;
procedure MouseMoved(pt : TPoint; code : Cardinal; msg : TMessage);override;
procedure DetachedFromWindow;override;
function InitiateDrag(pt : TPoint; itemIndex : integer; initialySelected : boolean) : boolean;
procedure ResizeToPreferred;override;
procedure GetPreferredSize(width : double; height : double);
procedure AllAttached;override;
procedure AllDetached;override;
// procedure enum MiscCode { B_NO_OP, B_REPLACE_OP, B_MOVE_OP, B_SWAP_OP };
end;
function BListView_Create(AObject : TBeObject;frame : TCPlusObject; name : pchar; atype : Tlist_view_type; resizeMask: longint; flags : longint): TCPlusObject; cdecl; external BePascalLibName name 'BListView_Create';
function BListView_Create(AObject : TBeObject;data : TCPlusObject): TCPlusObject; cdecl; external BePascalLibName name 'BListView_Create_1';
procedure BListView_Free(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BListView_Free';
function BListView_Instantiate(AObject : TCPlusObject; data : TCPlusObject) : TArchivable; cdecl; external BePascalLibName name 'BListView_Instantiate';
function BListView_Archive(AObject : TCPlusObject; data : TCPlusObject; deep : boolean) : TStatus_t; cdecl; external BePascalLibName name 'BListView_Archive';
procedure BListView_Draw(AObject : TCPlusObject; updateRect : TCPlusObject); cdecl; external BePascalLibName name 'BListView_Draw';
procedure BListView_MessageReceived(AObject : TCPlusObject; msg : TCPlusObject); cdecl; external BePascalLibName name 'BListView_MessageReceived';
procedure BListView_MouseDown(AObject : TCPlusObject; where : TCPlusObject); cdecl; external BePascalLibName name 'BListView_MouseDown';
procedure BListView_KeyDown(AObject : TCPlusObject; bytes : PChar; numBytes : integer); cdecl; external BePascalLibName name 'BListView_KeyDown';
procedure BListView_MakeFocus(AObject : TCPlusObject; state : boolean); cdecl; external BePascalLibName name 'BListView_MakeFocus';
procedure BListView_FrameResized(AObject : TCPlusObject; newWidth : double; newHeight : double); cdecl; external BePascalLibName name 'BListView_FrameResized';
procedure BListView_TargetedByScrollView(AObject : TCPlusObject; scroller : TCPlusObject); cdecl; external BePascalLibName name 'BListView_TargetedByScrollView';
procedure BListView_ScrollTo(AObject : TCPlusObject; x : double; y : double); cdecl; external BePascalLibName name 'BListView_ScrollTo';
procedure BListView_ScrollTo(AObject : TCPlusObject; where : TCPlusObject); cdecl; external BePascalLibName name 'BListView_ScrollTo';
function BListView_AddItem(AObject : TCPlusObject; item : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BListView_AddItem';
function BListView_AddItem(AObject : TCPlusObject; item : TCPlusObject; atIndex : integer) : boolean; cdecl; external BePascalLibName name 'BListView_AddItem';
function BListView_AddList(AObject : TCPlusObject; newItems : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BListView_AddList';
function BListView_AddList(AObject : TCPlusObject; newItems : TCPlusObject; atIndex : integer) : boolean; cdecl; external BePascalLibName name 'BListView_AddList';
function BListView_RemoveItem(AObject : TCPlusObject; item : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BListView_RemoveItem';
function BListView_RemoveItem(AObject : TCPlusObject; index : integer) : TListItem; cdecl; external BePascalLibName name 'BListView_RemoveItem_1';
function BListView_RemoveItems(AObject : TCPlusObject; index : integer; count : integer) : boolean; cdecl; external BePascalLibName name 'BListView_RemoveItems_2';
procedure BListView_SetSelectionMessage(AObject : TCPlusObject; message : TCPlusObject); cdecl; external BePascalLibName name 'BListView_SetSelectionMessage';
procedure BListView_SetInvocationMessage(AObject : TCPlusObject; message : TCPlusObject); cdecl; external BePascalLibName name 'BListView_SetInvocationMessage';
function BListView_SelectionMessage(AObject : TCPlusObject) : TMessage; cdecl; external BePascalLibName name 'BListView_SelectionMessage';
function BListView_SelectionCommand(AObject : TCPlusObject) : Cardinal; cdecl; external BePascalLibName name 'BListView_SelectionCommand';
function BListView_InvocationMessage(AObject : TCPlusObject) : TMessage; cdecl; external BePascalLibName name 'BListView_InvocationMessage';
function BListView_InvocationCommand(AObject : TCPlusObject) : Cardinal; cdecl; external BePascalLibName name 'BListView_InvocationCommand';
procedure BListView_SetListType(AObject : TCPlusObject; atype : TList_view_type); cdecl; external BePascalLibName name 'BListView_SetListType';
function BListView_ListType(AObject : TCPlusObject) : TList_view_type; cdecl; external BePascalLibName name 'BListView_ListType';
function BListView_ItemAt(AObject : TCPlusObject; index : integer) : TListItem; cdecl; external BePascalLibName name 'BListView_ItemAt';
function BListView_IndexOf(AObject : TCPlusObject; point : TCPlusObject) : integer; cdecl; external BePascalLibName name 'BListView_IndexOf';
function BListView_IndexOf_1(AObject : TCPlusObject; item : TCPlusObject) : integer; cdecl; external BePascalLibName name 'BListView_IndexOf';
function BListView_FirstItem(AObject : TCPlusObject) : TListItem; cdecl; external BePascalLibName name 'BListView_FirstItem';
function BListView_LastItem(AObject : TCPlusObject) : TListItem; cdecl; external BePascalLibName name 'BListView_LastItem';
function BListView_HasItem(AObject : TCPlusObject; item : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BListView_HasItem';
function BListView_CountItems(AObject : TCPlusObject) : integer; cdecl; external BePascalLibName name 'BListView_CountItems';
procedure BListView_MakeEmpty(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BListView_MakeEmpty';
function BListView_IsEmpty(AObject : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BListView_IsEmpty';
function BListView_Items(AObject : TCPlusObject) : TListView; cdecl; external BePascalLibName name 'BListView_Items';
procedure BListView_InvalidateItem(AObject : TCPlusObject; index : integer); cdecl; external BePascalLibName name 'BListView_InvalidateItem';
procedure BListView_ScrollToSelection(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BListView_ScrollToSelection';
procedure BListView_Select(AObject : TCPlusObject; index : integer; extend : boolean); cdecl; external BePascalLibName name 'BListView_Select';
procedure BListView_Select(AObject : TCPlusObject; from : integer; ato : integer; extend : boolean); cdecl; external BePascalLibName name 'BListView_Select';
function BListView_IsItemSelected(AObject : TCPlusObject; index : integer) : boolean; cdecl; external BePascalLibName name 'BListView_IsItemSelected';
function BListView_CurrentSelection(AObject : TCPlusObject; index : integer) : integer; cdecl; external BePascalLibName name 'BListView_CurrentSelection';
function BListView_Invoke(AObject : TCPlusObject; msg : TCPlusObject) : TStatus_t; cdecl; external BePascalLibName name 'BListView_Invoke';
procedure BListView_DeselectAll(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BListView_DeselectAll';
procedure BListView_DeselectExcept(AObject : TCPlusObject; except_from : integer; except_to : integer); cdecl; external BePascalLibName name 'BListView_DeselectExcept';
procedure BListView_Deselect(AObject : TCPlusObject; index : integer); cdecl; external BePascalLibName name 'BListView_Deselect';
procedure BListView_SelectionChanged(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BListView_SelectionChanged';
function BListView_SwapItems(AObject : TCPlusObject; a : integer; b : integer) : boolean; cdecl; external BePascalLibName name 'BListView_SwapItems';
function BListView_MoveItem(AObject : TCPlusObject; from : integer; ato : integer) : boolean; cdecl; external BePascalLibName name 'BListView_MoveItem';
function BListView_ReplaceItem(AObject : TCPlusObject; index : integer; item : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BListView_ReplaceItem';
procedure BListView_AttachedToWindow(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BListView_AttachedToWindow';
procedure BListView_FrameMoved(AObject : TCPlusObject; new_position : TCPlusObject); cdecl; external BePascalLibName name 'BListView_FrameMoved';
function BListView_ItemFrame(AObject : TCPlusObject; index : integer) : TRect; cdecl; external BePascalLibName name 'BListView_ItemFrame';
function BListView_ResolveSpecifier(AObject : TCPlusObject; msg : TCPlusObject; index : integer; specifier : TCPlusObject; form : integer; properti : PChar) : THandler; cdecl; external BePascalLibName name 'BListView_ResolveSpecifier';
function BListView_GetSupportedSuites(AObject : TCPlusObject; data : TCPlusObject) : TStatus_t; cdecl; external BePascalLibName name 'BListView_GetSupportedSuites';
function BListView_Perform(AObject : TCPlusObject; d : TPerform_code; arg : Pointer) : TStatus_t; cdecl; external BePascalLibName name 'BListView_Perform';
procedure BListView_WindowActivated(AObject : TCPlusObject; state : boolean); cdecl; external BePascalLibName name 'BListView_WindowActivated';
procedure BListView_MouseUp(AObject : TCPlusObject; pt : TCPlusObject); cdecl; external BePascalLibName name 'BListView_MouseUp';
procedure BListView_MouseMoved(AObject : TCPlusObject; pt : TCPlusObject; code : Cardinal; msg : TCPlusObject); cdecl; external BePascalLibName name 'BListView_MouseMoved';
procedure BListView_DetachedFromWindow(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BListView_DetachedFromWindow';
function BListView_InitiateDrag(AObject : TCPlusObject; pt : TCPlusObject; itemIndex : integer; initialySelected : boolean) : boolean; cdecl; external BePascalLibName name 'BListView_InitiateDrag';
procedure BListView_ResizeToPreferred(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BListView_ResizeToPreferred';
procedure BListView_GetPreferredSize(AObject : TCPlusObject; width : double; height : double); cdecl; external BePascalLibName name 'BListView_GetPreferredSize';
procedure BListView_AllAttached(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BListView_AllAttached';
procedure BListView_AllDetached(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BListView_AllDetached';
//procedure BListView_enum MiscCode { B_NO_OP, B_REPLACE_OP, B_MOVE_OP, B_SWAP_OP }(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BListView_enum MiscCode { B_NO_OP, B_REPLACE_OP, B_MOVE_OP, B_SWAP_OP }';
//procedure Replace_int32 index(AObject : TCPlusObject); cdecl; external BePascalLibName name 'Replace_int32 index';
//procedure Replace_BListItem *item(AObject : TCPlusObject); cdecl; external BePascalLibName name 'Replace_BListItem *item';
//procedure Move_int32 from(AObject : TCPlusObject); cdecl; external BePascalLibName name 'Move_int32 from';
//procedure Move_int32 to(AObject : TCPlusObject); cdecl; external BePascalLibName name 'Move_int32 to';
//procedure Swap_int32 a(AObject : TCPlusObject); cdecl; external BePascalLibName name 'Swap_int32 a';
//procedure Swap_int32 b(AObject : TCPlusObject); cdecl; external BePascalLibName name 'Swap_int32 b';
implementation
var
ListItem_SelectionChanged_hook: Pointer; cvar; external;
ListString_InitiateDrag_hook: Pointer; cvar; external;
constructor TListView.Create(frame : TRect; name : pchar; atype : Tlist_view_type; resizeMask: longint; flags : longint);
begin
CreatePas;
CPlusObject := BListView_Create(Self,frame.CPlusObject,name,atype,resizeMask,flags);
end;
constructor TListView.Create(data : TMessage);
begin
CreatePas;
CPlusObject := BListView_Create(Self,data.CPlusObject);
end;
destructor TListView.Destroy;
begin
BListView_Free(CPlusObject);
inherited;
end;
function TListView.Instantiate(data : TMessage) : TArchivable;
begin
Result := BListView_Instantiate(CPlusObject, data.CPlusObject);
end;
function TListView.Archive(data : TMessage; deep : boolean) : TStatus_t;
begin
Result := BListView_Archive(CPlusObject, data.CPlusObject, deep);
end;
procedure TListView.Draw(updateRect : TRect);
begin
//BListView_Draw(CPlusObject, updateRect.CPlusObject);
end;
procedure TListView.MessageReceived(msg : TMessage);
begin
//BListView_MessageReceived(CPlusObject, msg.CPlusObject);
end;
procedure TListView.MouseDown(where : TPoint);
begin
//BListView_MouseDown(CPlusObject, where.CPlusObject);
end;
procedure TListView.KeyDown(bytes : PChar; numBytes : integer);
begin
//BListView_KeyDown(CPlusObject, bytes, numBytes);
end;
procedure TListView.MakeFocus(state : boolean);
begin
//BListView_MakeFocus(CPlusObject, state);
end;
procedure TListView.FrameResized(newWidth : double; newHeight : double);
begin
//BListView_FrameResized(CPlusObject, newWidth, newHeight);
end;
procedure TListView.TargetedByScrollView(scroller : TScrollView);
begin
BListView_TargetedByScrollView(CPlusObject, scroller.CPlusObject);
end;
procedure TListView.ScrollTo(x : double; y : double);
begin
BListView_ScrollTo(CPlusObject, x, y);
end;
procedure TListView.ScrollTo(where : TPoint);
begin
BListView_ScrollTo(CPlusObject, where.CPlusObject);
end;
function TListView.AddItem(item : TListItem) : boolean;
begin
Result := BListView_AddItem(CPlusObject, item.CPlusObject);
end;
function TListView.AddItem(item : TListItem; atIndex : integer) : boolean;
begin
Result := BListView_AddItem(CPlusObject, item.CPlusObject, atIndex);
end;
function TListView.AddList(newItems : TList) : boolean;
begin
Result := BListView_AddList(CPlusObject, newItems.CPlusObject);
end;
function TListView.AddList(newItems : TList; atIndex : integer) : boolean;
begin
Result := BListView_AddList(CPlusObject, newItems.CPlusObject, atIndex);
end;
function TListView.RemoveItem(item : TListItem) : boolean;
begin
Result := BListView_RemoveItem(CPlusObject, item.CPlusObject);
end;
function TListView.RemoveItem(index : integer) : TListItem;
begin
Result := BListView_RemoveItem(CPlusObject, index);
end;
function TListView.RemoveItems(index : integer; count : integer) : boolean;
begin
Result := BListView_RemoveItems(CPlusObject, index, count);
end;
procedure TListView.SetSelectionMessage(message : TMessage);
begin
BListView_SetSelectionMessage(CPlusObject, message.CPlusObject);
end;
procedure TListView.SetInvocationMessage(message : TMessage);
begin
BListView_SetInvocationMessage(CPlusObject, message.CPlusObject);
end;
function TListView.SelectionMessage : TMessage;
begin
Result := BListView_SelectionMessage(CPlusObject);
end;
function TListView.SelectionCommand : Cardinal;
begin
Result := BListView_SelectionCommand(CPlusObject);
end;
function TListView.InvocationMessage : TMessage;
begin
Result := BListView_InvocationMessage(CPlusObject);
end;
function TListView.InvocationCommand : Cardinal;
begin
Result := BListView_InvocationCommand(CPlusObject);
end;
procedure TListView.SetListType(atype : TList_view_type);
begin
BListView_SetListType(CPlusObject, atype);
end;
function TListView.ListType : TList_view_type;
begin
Result := BListView_ListType(CPlusObject);
end;
function TListView.ItemAt(index : integer) : TListItem;
begin
Result := BListView_ItemAt(CPlusObject, index);
end;
function TListView.IndexOf(point : TPoint) : integer;
begin
Result := BListView_IndexOf(CPlusObject, point.CPlusObject);
end;
function TListView.IndexOf(item : TListItem) : integer;
begin
Result := BListView_IndexOf(CPlusObject, item.CPlusObject);
end;
function TListView.FirstItem : TListItem;
begin
Result := BListView_FirstItem(CPlusObject);
end;
function TListView.LastItem : TListItem;
begin
Result := BListView_LastItem(CPlusObject);
end;
function TListView.HasItem(item : TListItem) : boolean;
begin
Result := BListView_HasItem(CPlusObject, item.CPlusObject);
end;
function TListView.CountItems : integer;
begin
Result := BListView_CountItems(CPlusObject);
end;
procedure TListView.MakeEmpty;
begin
BListView_MakeEmpty(CPlusObject);
end;
function TListView.IsEmpty : boolean;
begin
Result := BListView_IsEmpty(CPlusObject);
end;
function TListView.Items : TListView;
begin
Result := BListView_Items(CPlusObject);
end;
procedure TListView.InvalidateItem(index : integer);
begin
BListView_InvalidateItem(CPlusObject, index);
end;
procedure TListView.ScrollToSelection;
begin
BListView_ScrollToSelection(CPlusObject);
end;
procedure TListView.Select(index : integer; extend : boolean);
begin
BListView_Select(CPlusObject, index, extend);
end;
procedure TListView.Select(from : integer; ato : integer; extend : boolean);
begin
BListView_Select(CPlusObject, from, ato, extend);
end;
function TListView.IsItemSelected(index : integer) : boolean;
begin
Result := BListView_IsItemSelected(CPlusObject, index);
end;
function TListView.CurrentSelection(index : integer) : integer;
begin
Result := BListView_CurrentSelection(CPlusObject, index);
end;
function TListView.Invoke(msg : TMessage) : TStatus_t;
begin
Result := BListView_Invoke(CPlusObject, msg.CPlusObject);
end;
procedure TListView.DeselectAll;
begin
BListView_DeselectAll(CPlusObject);
end;
procedure TListView.DeselectExcept(except_from : integer; except_to : integer);
begin
BListView_DeselectExcept(CPlusObject, except_from, except_to);
end;
procedure TListView.Deselect(index : integer);
begin
BListView_Deselect(CPlusObject, index);
end;
procedure TListView.SelectionChanged;
begin
//BListView_SelectionChanged(CPlusObject);
end;
function TListView.SwapItems(a : integer; b : integer) : boolean;
begin
Result := BListView_SwapItems(CPlusObject, a, b);
end;
function TListView.MoveItem(from : integer; ato : integer) : boolean;
begin
Result := BListView_MoveItem(CPlusObject, from, ato);
end;
function TListView.ReplaceItem(index : integer; item : TListItem) : boolean;
begin
Result := BListView_ReplaceItem(CPlusObject, index, item.CPlusObject);
end;
procedure TListView.AttachedToWindow;
begin
//BListView_AttachedToWindow(CPlusObject);
end;
procedure TListView.FrameMoved(new_position : TPoint);
begin
//BListView_FrameMoved(CPlusObject, new_position.CPlusObject);
end;
function TListView.ItemFrame(index : integer) : TRect;
begin
Result := BListView_ItemFrame(CPlusObject, index);
end;
function TListView.ResolveSpecifier(msg : TMessage; index : integer; specifier : TMessage; form : integer; properti : PChar) : THandler;
begin
Result := BListView_ResolveSpecifier(CPlusObject, msg.CPlusObject, index, specifier.CPlusObject, form, properti);
end;
function TListView.GetSupportedSuites(data : TMessage) : TStatus_t;
begin
Result := BListView_GetSupportedSuites(CPlusObject, data.CPlusObject);
end;
function TListView.Perform(d : TPerform_code; arg : Pointer) : TStatus_t;
begin
Result := BListView_Perform(CPlusObject, d, arg);
end;
procedure TListView.WindowActivated(state : boolean);
begin
//BListView_WindowActivated(CPlusObject, state);
end;
procedure TListView.MouseUp(pt : TPoint);
begin
//BListView_MouseUp(CPlusObject, pt.CPlusObject);
end;
procedure TListView.MouseMoved(pt : TPoint; code : Cardinal; msg : TMessage);
begin
//BListView_MouseMoved(CPlusObject, pt.CPlusObject, code, msg);
end;
procedure TListView.DetachedFromWindow;
begin
//BListView_DetachedFromWindow(CPlusObject);
end;
function TListView.InitiateDrag(pt : TPoint; itemIndex : integer; initialySelected : boolean) : boolean;
begin
Result := BListView_InitiateDrag(CPlusObject, pt.CPlusObject, itemIndex, initialySelected);
end;
procedure TListView.ResizeToPreferred;
begin
//BListView_ResizeToPreferred(CPlusObject);
end;
procedure TListView.GetPreferredSize(width : double; height : double);
begin
// BListView_GetPreferredSize(CPlusObject, width, height);
end;
procedure TListView.AllAttached;
begin
//BListView_AllAttached(CPlusObject);
end;
procedure TListView.AllDetached;
begin
//BListView_AllDetached(CPlusObject);
end;
procedure ListItem_SelectionChanged_hook_func(Liste : TListView); cdecl;
begin
try
if Liste <> nil then
begin
Liste.SelectionChanged;
end;
finally
end;
end;
initialization
ListItem_SelectionChanged_hook:=@ListItem_SelectionChanged_hook_func;
end.

View File

@@ -1,43 +0,0 @@
#ifndef _MENU_H_
#define _MENU_H_
#include "Menu.h"
#include "menu.h"
#include "Messenger.h"
#include "view.h"
#include <beobj.h>
class BPMenu : public BMenu, virtual public BPView
{
public:
BPMenu(TPasObject PasObject, const char *name, menu_layout layout = B_ITEMS_IN_COLUMN);
BPMenu(TPasObject PasObject, const char *name, float width, float height);
BPMenu(TPasObject PasObject, BMessage *archive);
BPMenu(TPasObject PasObject, BRect frame, const char *name, uint32 resizingMode, uint32 flags, menu_layout layout, bool resizeToFit);
virtual void MessageReceived(BMessage *message);
virtual void Draw(BRect updateRect);
virtual void AttachedToWindow(void);
virtual void MakeDefault(bool flag);
virtual void WindowActivated(bool active);
virtual void AllAttached(void);
virtual void AllDetached(void);
virtual void DetachedFromWindow(void);
virtual void DrawAfterChildren(BRect updateRect);
virtual void FrameMoved(BPoint parentPoint);
virtual void FrameResized(float width, float height);
virtual void GetPreferredSize(float *width, float *height);
virtual void ResizeToPreferred(void);
virtual void KeyDown(const char *bytes, int32 numBytes);
virtual void KeyUp(const char *bytes, int32 numBytes);
virtual void MouseDown(BPoint point);
virtual void MouseMoved(BPoint point, uint32 transit, const BMessage *message);
virtual void MouseUp(BPoint point);
virtual void Pulse(void);
// virtual void TargetedByScrollView(BScrollView *scroller);
virtual void SetEnabled(bool enabled);
virtual void SetValue(int32 value);
private:
};
#endif /* _MENU_H_ */

File diff suppressed because it is too large Load Diff

View File

@@ -1,43 +0,0 @@
#ifndef _MENUBAR_H_
#define _MENUBAR_H_
#include "MenuBar.h"
#include "menu.h"
#include <beobj.h>
class BPMenuBar : public BMenuBar, virtual public BPMenu
{
public:
BPMenuBar(TPasObject PasObject, BRect frame, const char *name,
uint32 resizingMode = B_FOLLOW_LEFT_RIGHT | B_FOLLOW_TOP,
menu_layout layout = B_ITEMS_IN_COLUMN, bool resizeToFit = true);
BPMenuBar(TPasObject PasObject, const char *name, float width, float height);
BPMenuBar(TPasObject PasObject, BMessage *archive);
BPMenuBar(TPasObject PasObject, BRect frame, const char *name, uint32 resizingMode, uint32 flags, menu_layout layout, bool resizeToFit);
virtual void MessageReceived(BMessage *message);
virtual void Draw(BRect updateRect);
virtual void AttachedToWindow(void);
virtual void MakeDefault(bool flag);
virtual void WindowActivated(bool active);
virtual void AllAttached(void);
virtual void AllDetached(void);
virtual void DetachedFromWindow(void);
virtual void DrawAfterChildren(BRect updateRect);
virtual void FrameMoved(BPoint parentPoint);
virtual void FrameResized(float width, float height);
virtual void GetPreferredSize(float *width, float *height);
virtual void ResizeToPreferred(void);
virtual void KeyDown(const char *bytes, int32 numBytes);
virtual void KeyUp(const char *bytes, int32 numBytes);
virtual void MouseDown(BPoint point);
virtual void MouseMoved(BPoint point, uint32 transit, const BMessage *message);
virtual void MouseUp(BPoint point);
virtual void Pulse(void);
// virtual void TargetedByScrollView(BScrollView *scroller);
virtual void SetEnabled(bool enabled);
virtual void SetValue(int32 value);
private:
};
#endif /* _MENU_H_ */

View File

@@ -1,350 +0,0 @@
{ BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
Eric Jourde
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
}
unit menubar;
interface
uses
beobj, menu, SupportDefs, Message, Rect, archivable, handler;
type
TMenu_Bar_Border = (B_BORDER_FRAME,
B_BORDER_CONTENTS,
B_BORDER_EACH_ITEM);
TMenuBar = class(TMenu)
private
public
constructor Create(frame : TRect; viewName : PChar; resizingMode : Cardinal; layout : TMenu_Layout; resizeToFit : boolean);
constructor Create; override;
destructor Destroy; override;
function Instantiate(data : TMessage) : TArchivable;
function Archive(data : TMessage; deep : boolean) : TStatus_t;
procedure SetBorder(aBorder : TMenu_Bar_Border);
function Border : TMenu_Bar_Border;
procedure Draw(updateRect : TRect); override;
procedure AttachedToWindow; override;
procedure DetachedFromWindow; override;
procedure MessageReceived(msg : TMessage); override;
procedure MouseDown(where : TPoint); override;
procedure WindowActivated(state : boolean); override;
procedure MouseUp(where : TPoint); override;
procedure FrameMoved(new_position : TPoint); override;
procedure FrameResized(new_width : double; new_height : double); override;
procedure Show;
procedure Hide;
function ResolveSpecifier(msg : TMessage; index : integer; specifier : TMessage; form : integer; aProperty : PChar) : THandler;
function GetSupportedSuites(data : TMessage) : TStatus_t;
procedure ResizeToPreferred; override;
procedure GetPreferredSize(width : double; height : double);
procedure MakeFocus(state : boolean);
procedure AllAttached; override;
procedure AllDetached; override;
{ function Perform(d : TPerform_code; arg : Pointer) : TStatus_t;
procedure _ReservedMenuBar1;
procedure _ReservedMenuBar2;
procedure _ReservedMenuBar3;
procedure _ReservedMenuBar4;
function operator=( : TMenuBar) : TMenuBar;
procedure StartMenuBar(menuIndex : integer; sticky : boolean; show_menu : boolean; special_rect : TRect);
function TrackTask(arg : Pointer) : integer;
function Track(action : ^integer; startIndex : integer; showMenu : boolean) : TMenuItem;
procedure StealFocus;
procedure RestoreFocus;
procedure InitData(layout : TMenu_Layout);
procedure menu_bar_border fBorder;
procedure thread_id fTrackingPID;
procedure int32 fPrevFocusToken;
procedure sem_id fMenuSem;
procedure BRect *fLastBounds;
procedure uint32 _reserved[2];
procedure bool fTracking;
}
end;
function BMenuBar_Create(AObject : TBeObject; frame : TCPlusObject; viewName : PChar; resizingMode : Cardinal; layout : Integer; resizeToFit : boolean) : TCPlusObject; cdecl; external BePascalLibName name 'BMenuBar_Create';
//function BMenuBar_Create(AObject : TBeObject) : TCPlusObject; cdecl; external BePascalLibName name 'BMenuBar_Create';
procedure BMenuBar_Free(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuBar_Free';
function BMenuBar_Instantiate(AObject : TCPlusObject; data : TCPlusObject) : TArchivable; cdecl; external BePascalLibName name 'BMenuBar_Instantiate';
function BMenuBar_Archive(AObject : TCPlusObject; data : TCPlusObject; deep : boolean) : TStatus_t; cdecl; external BePascalLibName name 'BMenuBar_Archive';
procedure BMenuBar_SetBorder(AObject : TCPlusObject; aBorder : TMenu_Bar_Border); cdecl; external BePascalLibName name 'BMenuBar_SetBorder';
function BMenuBar_Border(AObject : TCPlusObject) : TMenu_Bar_Border; cdecl; external BePascalLibName name 'BMenuBar_Border';
procedure BMenuBar_Draw(AObject : TCPlusObject; updateRect : TCPlusObject); cdecl; external BePascalLibName name 'BMenuBar_Draw';
procedure BMenuBar_AttachedToWindow(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuBar_AttachedToWindow';
procedure BMenuBar_DetachedFromWindow(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuBar_DetachedFromWindow';
procedure BMenuBar_MessageReceived(AObject : TCPlusObject; msg : TCPlusObject); cdecl; external BePascalLibName name 'BMenuBar_MessageReceived';
procedure BMenuBar_MouseDown(AObject : TCPlusObject; where : TCPlusObject); cdecl; external BePascalLibName name 'BMenuBar_MouseDown';
procedure BMenuBar_WindowActivated(AObject : TCPlusObject; state : boolean); cdecl; external BePascalLibName name 'BMenuBar_WindowActivated';
procedure BMenuBar_MouseUp(AObject : TCPlusObject; where : TCPlusObject); cdecl; external BePascalLibName name 'BMenuBar_MouseUp';
procedure BMenuBar_FrameMoved(AObject : TCPlusObject; new_position : TCPlusObject); cdecl; external BePascalLibName name 'BMenuBar_FrameMoved';
procedure BMenuBar_FrameResized(AObject : TCPlusObject; new_width : double; new_height : double); cdecl; external BePascalLibName name 'BMenuBar_FrameResized';
procedure BMenuBar_Show(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuBar_Show';
procedure BMenuBar_Hide(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuBar_Hide';
function BMenuBar_ResolveSpecifier(AObject : TCPlusObject; msg : TCPlusObject; index : integer; specifier : TCPlusObject; form : integer; aProperty : PChar) : THandler; cdecl; external BePascalLibName name 'BMenuBar_ResolveSpecifier';
function BMenuBar_GetSupportedSuites(AObject : TCPlusObject; data : TCPlusObject) : TStatus_t; cdecl; external BePascalLibName name 'BMenuBar_GetSupportedSuites';
procedure BMenuBar_ResizeToPreferred(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuBar_ResizeToPreferred';
procedure BMenuBar_GetPreferredSize(AObject : TCPlusObject; width : double; height : double); cdecl; external BePascalLibName name 'BMenuBar_GetPreferredSize';
procedure BMenuBar_MakeFocus(AObject : TCPlusObject; state : boolean); cdecl; external BePascalLibName name 'BMenuBar_MakeFocus';
procedure BMenuBar_AllAttached(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuBar_AllAttached';
procedure BMenuBar_AllDetached(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuBar_AllDetached';
{function BMenuBar_Perform(AObject : TCPlusObject; d : TPerform_code; arg : Pointer) : TStatus_t; cdecl; external BePascalLibName name 'BMenuBar_Perform';
procedure BMenuBar__ReservedMenuBar1(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuBar__ReservedMenuBar1';
procedure BMenuBar__ReservedMenuBar2(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuBar__ReservedMenuBar2';
procedure BMenuBar__ReservedMenuBar3(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuBar__ReservedMenuBar3';
procedure BMenuBar__ReservedMenuBar4(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuBar__ReservedMenuBar4';
function BMenuBar_operator=(AObject : TCPlusObject; : TMenuBar) : TMenuBar; cdecl; external BePascalLibName name 'BMenuBar_operator=';
procedure BMenuBar_StartMenuBar(AObject : TCPlusObject; menuIndex : integer; sticky : boolean; show_menu : boolean; special_rect : TCPlusObject); cdecl; external BePascalLibName name 'BMenuBar_StartMenuBar';
function BMenuBar_TrackTask(AObject : TCPlusObject; arg : Pointer) : integer; cdecl; external BePascalLibName name 'BMenuBar_TrackTask';
function BMenuBar_Track(AObject : TCPlusObject; action : ^integer; startIndex : integer; showMenu : boolean) : TMenuItem; cdecl; external BePascalLibName name 'BMenuBar_Track';
procedure BMenuBar_StealFocus(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuBar_StealFocus';
procedure BMenuBar_RestoreFocus(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuBar_RestoreFocus';
procedure BMenuBar_InitData(AObject : TCPlusObject; layout : TMenu_Layout); cdecl; external BePascalLibName name 'BMenuBar_InitData';
procedure BMenuBar_menu_bar_border fBorder(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuBar_menu_bar_border fBorder';
procedure BMenuBar_thread_id fTrackingPID(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuBar_thread_id fTrackingPID';
procedure BMenuBar_int32 fPrevFocusToken(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuBar_int32 fPrevFocusToken';
procedure BMenuBar_sem_id fMenuSem(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuBar_sem_id fMenuSem';
procedure BMenuBar_BRect *fLastBounds(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuBar_BRect *fLastBounds';
procedure BMenuBar_uint32 _reserved[2](AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuBar_uint32 _reserved[2]';
procedure BMenuBar_bool fTracking(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMenuBar_bool fTracking';
}
implementation
constructor TMenuBar.Create(frame : TRect; viewName : PChar; resizingMode : Cardinal; layout : TMenu_Layout; resizeToFit : boolean);
begin
CPlusObject := BMenuBar_Create(Self, frame.CPlusObject, viewName, resizingMode, 0, resizeToFit);
end;
constructor TMenuBar.Create;
begin
CreatePas;
// CPlusObject := BMenuBar_Create_1(Self);
end;
destructor TMenuBar.Destroy;
begin
BMenuBar_Free(CPlusObject);
end;
function TMenuBar.Instantiate(data : TMessage) : TArchivable;
begin
Result := BMenuBar_Instantiate(CPlusObject, data.CPlusObject);
end;
function TMenuBar.Archive(data : TMessage; deep : boolean) : TStatus_t;
begin
Result := BMenuBar_Archive(CPlusObject, data.CPlusObject, deep);
end;
procedure TMenuBar.SetBorder(aBorder : TMenu_Bar_Border);
begin
BMenuBar_SetBorder(CPlusObject, aBorder);
end;
function TMenuBar.Border : TMenu_Bar_Border;
begin
Result := BMenuBar_Border(CPlusObject);
end;
procedure TMenuBar.Draw(updateRect : TRect);
begin
// BMenuBar_Draw(CPlusObject, updateRect.CPlusObject);
end;
procedure TMenuBar.AttachedToWindow;
begin
// BMenuBar_AttachedToWindow(CPlusObject);
end;
procedure TMenuBar.DetachedFromWindow;
begin
// BMenuBar_DetachedFromWindow(CPlusObject);
end;
procedure TMenuBar.MessageReceived(msg : TMessage);
begin
// BMenuBar_MessageReceived(CPlusObject, msg.CPlusObject);
end;
procedure TMenuBar.MouseDown(where : TPoint);
begin
// BMenuBar_MouseDown(CPlusObject, where.CPlusObject);
end;
procedure TMenuBar.WindowActivated(state : boolean);
begin
// BMenuBar_WindowActivated(CPlusObject, state);
end;
procedure TMenuBar.MouseUp(where : TPoint);
begin
// BMenuBar_MouseUp(CPlusObject, where.CPlusObject);
end;
procedure TMenuBar.FrameMoved(new_position : TPoint);
begin
// BMenuBar_FrameMoved(CPlusObject, new_position.CPlusObject);
end;
procedure TMenuBar.FrameResized(new_width : double; new_height : double);
begin
// BMenuBar_FrameResized(CPlusObject, new_width, new_height);
end;
procedure TMenuBar.Show;
begin
BMenuBar_Show(CPlusObject);
end;
procedure TMenuBar.Hide;
begin
BMenuBar_Hide(CPlusObject);
end;
function TMenuBar.ResolveSpecifier(msg : TMessage; index : integer; specifier : TMessage; form : integer; aProperty : PChar) : THandler;
begin
Result := BMenuBar_ResolveSpecifier(CPlusObject, msg.CPlusObject, index, specifier.CPlusObject, form, aProperty);
end;
function TMenuBar.GetSupportedSuites(data : TMessage) : TStatus_t;
begin
Result := BMenuBar_GetSupportedSuites(CPlusObject, data.CPlusObject);
end;
procedure TMenuBar.ResizeToPreferred;
begin
// BMenuBar_ResizeToPreferred(CPlusObject);
end;
procedure TMenuBar.GetPreferredSize(width : double; height : double);
begin
// BMenuBar_GetPreferredSize(CPlusObject, width, height);
end;
procedure TMenuBar.MakeFocus(state : boolean);
begin
// BMenuBar_MakeFocus(CPlusObject, state);
end;
procedure TMenuBar.AllAttached;
begin
// BMenuBar_AllAttached(CPlusObject);
end;
procedure TMenuBar.AllDetached;
begin
// BMenuBar_AllDetached(CPlusObject);
end;
{function TMenuBar.Perform(d : TPerform_code; arg : Pointer) : TStatus_t;
begin
Result := BMenuBar_Perform(CPlusObject, d, arg);
end;
procedure TMenuBar._ReservedMenuBar1;
begin
BMenuBar__ReservedMenuBar1(CPlusObject);
end;
procedure TMenuBar._ReservedMenuBar2;
begin
BMenuBar__ReservedMenuBar2(CPlusObject);
end;
procedure TMenuBar._ReservedMenuBar3;
begin
BMenuBar__ReservedMenuBar3(CPlusObject);
end;
procedure TMenuBar._ReservedMenuBar4;
begin
BMenuBar__ReservedMenuBar4(CPlusObject);
end;
function TMenuBar.operator=( : TMenuBar) : TMenuBar;
begin
Result := BMenuBar_operator=(CPlusObject, );
end;
procedure TMenuBar.StartMenuBar(menuIndex : integer; sticky : boolean; show_menu : boolean; special_rect : TRect);
begin
BMenuBar_StartMenuBar(CPlusObject, menuIndex, sticky, show_menu, special_rect.CPlusObject);
end;
function TMenuBar.TrackTask(arg : Pointer) : integer;
begin
Result := BMenuBar_TrackTask(CPlusObject, arg);
end;
function TMenuBar.Track(action : ^integer; startIndex : integer; showMenu : boolean) : TMenuItem;
begin
Result := BMenuBar_Track(CPlusObject, action, startIndex, showMenu);
end;
procedure TMenuBar.StealFocus;
begin
BMenuBar_StealFocus(CPlusObject);
end;
procedure TMenuBar.RestoreFocus;
begin
BMenuBar_RestoreFocus(CPlusObject);
end;
procedure TMenuBar.InitData(layout : TMenu_Layout);
begin
BMenuBar_InitData(CPlusObject, layout);
end;
procedure TMenuBar.menu_bar_border fBorder;
begin
BMenuBar_menu_bar_border fBorder(CPlusObject);
end;
procedure TMenuBar.thread_id fTrackingPID;
begin
BMenuBar_thread_id fTrackingPID(CPlusObject);
end;
procedure TMenuBar.int32 fPrevFocusToken;
begin
BMenuBar_int32 fPrevFocusToken(CPlusObject);
end;
procedure TMenuBar.sem_id fMenuSem;
begin
BMenuBar_sem_id fMenuSem(CPlusObject);
end;
procedure TMenuBar.BRect *fLastBounds;
begin
BMenuBar_BRect *fLastBounds(CPlusObject);
end;
procedure TMenuBar.uint32 _reserved[2];
begin
BMenuBar_uint32 _reserved[2](CPlusObject);
end;
procedure TMenuBar.bool fTracking;
begin
BMenuBar_bool fTracking(CPlusObject);
end;
}
end.

View File

@@ -1,51 +0,0 @@
/* BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _MENUITEM_H_
#define _MENUITEM_H_
#include <Menu.h>
#include <MenuItem.h>
#include <beobj.h>
class BPMenuItem : public BMenuItem, virtual public BPasObject
{
public:
BPMenuItem(TPasObject PasObject, const char *label, BMessage *message, char shortcut = 0, uint32 modifiers = 0);
BPMenuItem(TPasObject PasObject, BMenu *submenu, BMessage *message = NULL);
BPMenuItem(TPasObject PasObejct, BMessage *data);
virtual void Draw(void);
virtual void DrawContent(void);
virtual void GetContentSize(float *width, float *height);
virtual void TruncateLabel(float max, char *new_label);
virtual void Highlight(bool on);
bool IsSelected() const;
BPoint ContentLocation() const;
private:
};
class BPSeparatorItem : public BSeparatorItem, virtual public BPMenuItem
{
public:
BPSeparatorItem(TPasObject PasObject);
BPSeparatorItem(TPasObject PasObject, BMessage *data);
virtual void Draw(void);
virtual void DrawContent(void);
};
#endif /* _MENUITEM_H_ */

View File

@@ -1,357 +0,0 @@
{ BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
Eric Jourde
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
}
unit outlinelistview;
interface
uses
beobj, view, message, archivable, SupportDefs, rect, list,
handler, messenger,interfacedefs,font,graphicdefs,scrollview,listitem,listview;
type
TOutlineListView = class(TListView)
private
public
constructor Create(frame : TRect; name : pchar; atype : Tlist_view_type; resizeMask: longint; flags : longint); override;
constructor Create(data : TMessage);
destructor Destroy;override;
function Instantiate(data : TMessage) : TArchivable;
function Archive(data : TMessage; deep : boolean) : TStatus_t;
procedure MouseDown(where : TPoint);override;
procedure KeyDown(bytes : PChar; numBytes : integer);override;
procedure FrameMoved(new_position : TPoint);override;
procedure FrameResized(new_width : double; new_height : double);override;
procedure MouseUp(where : TPoint);override;
function AddUnder(item : TListItem; underItem : TListItem) : boolean;
function AddItem(item : TListItem) : boolean;
function AddItem(item : TListItem; fullListIndex : integer) : boolean;
function AddList(newItems : TList) : boolean;
function AddList(newItems : TList; fullListIndex : integer) : boolean;
function RemoveItem(item : TListItem) : boolean;
function RemoveItem(fullListIndex : integer) : TListItem;
function RemoveItems(fullListIndex : integer; count : integer) : boolean;
function FullListItemAt(fullListIndex : integer) : TListItem;
function FullListIndexOf(point : TPoint) : integer;
function FullListIndexOf(item : TListItem) : integer;
function FullListFirstItem : TListItem;
function FullListLastItem : TListItem;
function FullListHasItem(item : TListItem) : boolean;
function FullListCountItems : integer;
function FullListCurrentSelection(index : integer) : integer;
procedure MakeEmpty;
function FullListIsEmpty : boolean;
function Superitem(item : TListItem) : TListItem;
procedure Expand(item : TListItem);
procedure Collapse(item : TListItem);
function IsExpanded(fullListIndex : integer) : boolean;
function ResolveSpecifier(msg : TMessage; index : integer; specifier : TMessage; form : integer; properti : PChar) : THandler;
function GetSupportedSuites(data : TMessage) : TStatus_t;
function Perform(d : TPerform_code; arg : Pointer) : TStatus_t;
procedure ResizeToPreferred;override;
procedure GetPreferredSize(width : double; height : double);
procedure MakeFocus(state : boolean);
procedure AllAttached;override;
procedure AllDetached;override;
procedure DetachedFromWindow;override;
function CountItemsUnder(under : TListItem; oneLevelOnly : boolean) : integer;
function ItemUnderAt(underItem : TListItem; oneLevelOnly : boolean; index : integer) : TListItem;
// function DoMiscellaneous(code : ; data : ) : boolean;
// procedure MessageReceived( : TMessage);
end;
function BOutlineListView_Create(AObject : TBeObject; frame : TCPlusObject; name : pchar; atype : Tlist_view_type; resizeMask: longint; flags : longint):TCPlusObject; cdecl; external BePascalLibName name 'BOutlineListView_Create';
function BOutlineListView_Create_1(AObject : TBeObject;data : TCPlusObject):TCPlusObject; cdecl; external BePascalLibName name 'BOutlineListView_Create_1';
procedure BOutlineListView_Free(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BOutlineListView_Free';
function BOutlineListView_Instantiate(AObject : TCPlusObject; data : TCPlusObject) : TArchivable; cdecl; external BePascalLibName name 'BOutlineListView_Instantiate';
function BOutlineListView_Archive(AObject : TCPlusObject; data : TCPlusObject; deep : boolean) : TStatus_t; cdecl; external BePascalLibName name 'BOutlineListView_Archive';
procedure BOutlineListView_MouseDown(AObject : TCPlusObject; where : TCPlusObject); cdecl; external BePascalLibName name 'BOutlineListView_MouseDown';
procedure BOutlineListView_KeyDown(AObject : TCPlusObject; bytes : PChar; numBytes : integer); cdecl; external BePascalLibName name 'BOutlineListView_KeyDown';
procedure BOutlineListView_FrameMoved(AObject : TCPlusObject; new_position : TCPlusObject); cdecl; external BePascalLibName name 'BOutlineListView_FrameMoved';
procedure BOutlineListView_FrameResized(AObject : TCPlusObject; new_width : double; new_height : double); cdecl; external BePascalLibName name 'BOutlineListView_FrameResized';
procedure BOutlineListView_MouseUp(AObject : TCPlusObject; where : TCPlusObject); cdecl; external BePascalLibName name 'BOutlineListView_MouseUp';
function BOutlineListView_AddUnder(AObject : TCPlusObject; item : TCPlusObject; underItem : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BOutlineListView_AddUnder';
function BOutlineListView_AddItem(AObject : TCPlusObject; item : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BOutlineListView_AddItem';
function BOutlineListView_AddItem(AObject : TCPlusObject; item : TCPlusObject; fullListIndex : integer) : boolean; cdecl; external BePascalLibName name 'BOutlineListView_AddItem';
function BOutlineListView_AddList(AObject : TCPlusObject; newItems : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BOutlineListView_AddList';
function BOutlineListView_AddList(AObject : TCPlusObject; newItems : TCPlusObject; fullListIndex : integer) : boolean; cdecl; external BePascalLibName name 'BOutlineListView_AddList';
function BOutlineListView_RemoveItem(AObject : TCPlusObject; item : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BOutlineListView_RemoveItem';
function BOutlineListView_RemoveItem_1(AObject : TCPlusObject; fullListIndex : integer) : TCPlusObject; cdecl; external BePascalLibName name 'BOutlineListView_RemoveItem_1';
function BOutlineListView_RemoveItems(AObject : TCPlusObject; fullListIndex : integer; count : integer) : boolean; cdecl; external BePascalLibName name 'BOutlineListView_RemoveItems';
function BOutlineListView_FullListItemAt(AObject : TCPlusObject; fullListIndex : integer) : TListItem; cdecl; external BePascalLibName name 'BOutlineListView_FullListItemAt';
function BOutlineListView_FullListIndexOf(AObject : TCPlusObject; point : TCPlusObject) : integer; cdecl; external BePascalLibName name 'BOutlineListView_FullListIndexOf';
function BOutlineListView_FullListIndexOf_1(AObject : TCPlusObject; item : TCPlusObject) : integer; cdecl; external BePascalLibName name 'BOutlineListView_FullListIndexOf_1';
function BOutlineListView_FullListFirstItem(AObject : TCPlusObject) : TListItem; cdecl; external BePascalLibName name 'BOutlineListView_FullListFirstItem';
function BOutlineListView_FullListLastItem(AObject : TCPlusObject) : TListItem; cdecl; external BePascalLibName name 'BOutlineListView_FullListLastItem';
function BOutlineListView_FullListHasItem(AObject : TCPlusObject; item : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BOutlineListView_FullListHasItem';
function BOutlineListView_FullListCountItems(AObject : TCPlusObject) : integer; cdecl; external BePascalLibName name 'BOutlineListView_FullListCountItems';
function BOutlineListView_FullListCurrentSelection(AObject : TCPlusObject; index : integer) : integer; cdecl; external BePascalLibName name 'BOutlineListView_FullListCurrentSelection';
procedure BOutlineListView_MakeEmpty(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BOutlineListView_MakeEmpty';
function BOutlineListView_FullListIsEmpty(AObject : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BOutlineListView_FullListIsEmpty';
function BOutlineListView_Superitem(AObject : TCPlusObject; item : TCPlusObject) : TListItem; cdecl; external BePascalLibName name 'BOutlineListView_Superitem';
procedure BOutlineListView_Expand(AObject : TCPlusObject; item : TCPlusObject); cdecl; external BePascalLibName name 'BOutlineListView_Expand';
procedure BOutlineListView_Collapse(AObject : TCPlusObject; item : TCPlusObject); cdecl; external BePascalLibName name 'BOutlineListView_Collapse';
function BOutlineListView_IsExpanded(AObject : TCPlusObject; fullListIndex : integer) : boolean; cdecl; external BePascalLibName name 'BOutlineListView_IsExpanded';
function BOutlineListView_ResolveSpecifier(AObject : TCPlusObject; msg : TCPlusObject; index : integer; specifier : TCPlusObject; form : integer; properti : PChar) : THandler; cdecl; external BePascalLibName name 'BOutlineListView_ResolveSpecifier';
function BOutlineListView_GetSupportedSuites(AObject : TCPlusObject; data : TCPlusObject) : TStatus_t; cdecl; external BePascalLibName name 'BOutlineListView_GetSupportedSuites';
function BOutlineListView_Perform(AObject : TCPlusObject; d : TPerform_code; arg : Pointer) : TStatus_t; cdecl; external BePascalLibName name 'BOutlineListView_Perform';
procedure BOutlineListView_ResizeToPreferred(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BOutlineListView_ResizeToPreferred';
procedure BOutlineListView_GetPreferredSize(AObject : TCPlusObject; width : double; height : double); cdecl; external BePascalLibName name 'BOutlineListView_GetPreferredSize';
procedure BOutlineListView_MakeFocus(AObject : TCPlusObject; state : boolean); cdecl; external BePascalLibName name 'BOutlineListView_MakeFocus';
procedure BOutlineListView_AllAttached(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BOutlineListView_AllAttached';
procedure BOutlineListView_AllDetached(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BOutlineListView_AllDetached';
procedure BOutlineListView_DetachedFromWindow(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BOutlineListView_DetachedFromWindow';
function BOutlineListView_CountItemsUnder(AObject : TCPlusObject; under : TCPlusObject; oneLevelOnly : boolean) : integer; cdecl; external BePascalLibName name 'BOutlineListView_CountItemsUnder';
function BOutlineListView_ItemUnderAt(AObject : TCPlusObject; underItem : TCPlusObject; oneLevelOnly : boolean; index : integer) : TListItem; cdecl; external BePascalLibName name 'BOutlineListView_ItemUnderAt';
//function BOutlineListView_DoMiscellaneous(AObject : TCPlusObject; code : ; data : ) : boolean; cdecl; external BePascalLibName name 'BOutlineListView_DoMiscellaneous';
//procedure BOutlineListView_MessageReceived(AObject : TCPlusObject; : TCPlusObject); cdecl; external BePascalLibName name 'BOutlineListView_MessageReceived';
implementation
constructor TOutlineListView.Create(frame : TRect; name : pchar; atype : Tlist_view_type; resizeMask: longint; flags : longint);
begin
CreatePas;
CPlusObject := BOutlineListView_Create(Self,frame.CPlusObject,name,atype,resizeMask,flags);
end;
constructor TOutlineListView.Create(data : TMessage);
begin
CreatePas;
CPlusObject := BOutlineListView_Create_1(Self,data.CPlusObject);
end;
destructor TOutlineListView.Destroy;
begin
BOutlineListView_Free(CPlusObject);
inherited;
end;
function TOutlineListView.Instantiate(data : TMessage) : TArchivable;
begin
Result := BOutlineListView_Instantiate(CPlusObject, data.CPlusObject);
end;
function TOutlineListView.Archive(data : TMessage; deep : boolean) : TStatus_t;
begin
Result := BOutlineListView_Archive(CPlusObject, data.CPlusObject, deep);
end;
procedure TOutlineListView.MouseDown(where : TPoint);
begin
// BOutlineListView_MouseDown(CPlusObject, where.CPlusObject);
end;
procedure TOutlineListView.KeyDown(bytes : PChar; numBytes : integer);
begin
// BOutlineListView_KeyDown(CPlusObject, bytes, numBytes);
end;
procedure TOutlineListView.FrameMoved(new_position : TPoint);
begin
// BOutlineListView_FrameMoved(CPlusObject, new_position.CPlusObject);
end;
procedure TOutlineListView.FrameResized(new_width : double; new_height : double);
begin
// BOutlineListView_FrameResized(CPlusObject, new_width, new_height);
end;
procedure TOutlineListView.MouseUp(where : TPoint);
begin
// BOutlineListView_MouseUp(CPlusObject, where.CPlusObject);
end;
function TOutlineListView.AddUnder(item : TListItem; underItem : TListItem) : boolean;
begin
Result := BOutlineListView_AddUnder(CPlusObject, item.CPlusObject, underItem.CPlusObject);
end;
function TOutlineListView.AddItem(item : TListItem) : boolean;
begin
Result := BOutlineListView_AddItem(CPlusObject, item.CPlusObject);
end;
function TOutlineListView.AddItem(item : TListItem; fullListIndex : integer) : boolean;
begin
Result := BOutlineListView_AddItem(CPlusObject, item.CPlusObject, fullListIndex);
end;
function TOutlineListView.AddList(newItems : TList) : boolean;
begin
Result := BOutlineListView_AddList(CPlusObject, newItems.CPlusObject);
end;
function TOutlineListView.AddList(newItems : TList; fullListIndex : integer) : boolean;
begin
Result := BOutlineListView_AddList(CPlusObject, newItems.CPlusObject, fullListIndex);
end;
function TOutlineListView.RemoveItem(item : TListItem) : boolean;
begin
Result := BOutlineListView_RemoveItem(CPlusObject, item.CPlusObject);
end;
function TOutlineListView.RemoveItem(fullListIndex : integer) : TListItem;
begin
// Result := BOutlineListView_RemoveItem_1(CPlusObject, fullListIndex);
end;
function TOutlineListView.RemoveItems(fullListIndex : integer; count : integer) : boolean;
begin
Result := BOutlineListView_RemoveItems(CPlusObject, fullListIndex, count);
end;
function TOutlineListView.FullListItemAt(fullListIndex : integer) : TListItem;
begin
Result := BOutlineListView_FullListItemAt(CPlusObject, fullListIndex);
end;
function TOutlineListView.FullListIndexOf(point : TPoint) : integer;
begin
Result := BOutlineListView_FullListIndexOf(CPlusObject, point.CPlusObject);
end;
function TOutlineListView.FullListIndexOf(item : TListItem) : integer;
begin
Result := BOutlineListView_FullListIndexOf(CPlusObject, item.CPlusObject);
end;
function TOutlineListView.FullListFirstItem : TListItem;
begin
Result := BOutlineListView_FullListFirstItem(CPlusObject);
end;
function TOutlineListView.FullListLastItem : TListItem;
begin
Result := BOutlineListView_FullListLastItem(CPlusObject);
end;
function TOutlineListView.FullListHasItem(item : TListItem) : boolean;
begin
Result := BOutlineListView_FullListHasItem(CPlusObject, item.CPlusObject);
end;
function TOutlineListView.FullListCountItems : integer;
begin
Result := BOutlineListView_FullListCountItems(CPlusObject);
end;
function TOutlineListView.FullListCurrentSelection(index : integer) : integer;
begin
Result := BOutlineListView_FullListCurrentSelection(CPlusObject, index);
end;
procedure TOutlineListView.MakeEmpty;
begin
BOutlineListView_MakeEmpty(CPlusObject);
end;
function TOutlineListView.FullListIsEmpty : boolean;
begin
Result := BOutlineListView_FullListIsEmpty(CPlusObject);
end;
function TOutlineListView.Superitem(item : TListItem) : TListItem;
begin
Result := BOutlineListView_Superitem(CPlusObject, item);
end;
procedure TOutlineListView.Expand(item : TListItem);
begin
BOutlineListView_Expand(CPlusObject, item.CPlusObject);
end;
procedure TOutlineListView.Collapse(item : TListItem);
begin
BOutlineListView_Collapse(CPlusObject, item.CPlusObject);
end;
function TOutlineListView.IsExpanded(fullListIndex : integer) : boolean;
begin
Result := BOutlineListView_IsExpanded(CPlusObject, fullListIndex);
end;
function TOutlineListView.ResolveSpecifier(msg : TMessage; index : integer; specifier : TMessage; form : integer; properti : PChar) : THandler;
begin
Result := BOutlineListView_ResolveSpecifier(CPlusObject, msg.CPlusObject, index, specifier.CPlusObject, form, properti);
end;
function TOutlineListView.GetSupportedSuites(data : TMessage) : TStatus_t;
begin
Result := BOutlineListView_GetSupportedSuites(CPlusObject, data.CPlusObject);
end;
function TOutlineListView.Perform(d : TPerform_code; arg : Pointer) : TStatus_t;
begin
Result := BOutlineListView_Perform(CPlusObject, d, arg);
end;
procedure TOutlineListView.ResizeToPreferred;
begin
BOutlineListView_ResizeToPreferred(CPlusObject);
end;
procedure TOutlineListView.GetPreferredSize(width : double; height : double);
begin
BOutlineListView_GetPreferredSize(CPlusObject, width, height);
end;
procedure TOutlineListView.MakeFocus(state : boolean);
begin
BOutlineListView_MakeFocus(CPlusObject, state);
end;
procedure TOutlineListView.AllAttached;
begin
BOutlineListView_AllAttached(CPlusObject);
end;
procedure TOutlineListView.AllDetached;
begin
BOutlineListView_AllDetached(CPlusObject);
end;
procedure TOutlineListView.DetachedFromWindow;
begin
BOutlineListView_DetachedFromWindow(CPlusObject);
end;
function TOutlineListView.CountItemsUnder(under : TListItem; oneLevelOnly : boolean) : integer;
begin
Result := BOutlineListView_CountItemsUnder(CPlusObject, under.CPlusObject, oneLevelOnly);
end;
function TOutlineListView.ItemUnderAt(underItem : TListItem; oneLevelOnly : boolean; index : integer) : TListItem;
begin
Result := BOutlineListView_ItemUnderAt(CPlusObject, underItem.CPlusObject, oneLevelOnly, index);
end;
{function TOutlineListView.DoMiscellaneous(code : ; data : ) : boolean;
begin
Result := BOutlineListView_DoMiscellaneous(CPlusObject, code, data);
end;
procedure TOutlineListView.MessageReceived( : TMessage);
begin
BOutlineListView_MessageReceived(CPlusObject, .CPlusObject);
end;
}
end.

View File

@@ -1,34 +0,0 @@
/* BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _POINT_H_
#define _POINT_H_
#include <Point.h>
#include <beobj.h>
class BPPoint : public BPoint, public BPasObject
{
public:
BPPoint(TPasObject PasObject, float x, float y);
BPPoint(TPasObject PasObject, const BPoint& point);
BPPoint(TPasObject PasObject);
};
#endif _POINT_H_ /* _POINT_H_ */

View File

@@ -1,72 +0,0 @@
unit Point;
interface
uses
beobj, rect;
type
// TRect = class;
TPoint = class(TBeObject)
public
constructor Create(x, y : single); virtual;
constructor Create(point : TPoint); virtual;
constructor Create; override;
destructor Destroy; override;
procedure ConstrainTo(Rect : TRect);
procedure PrintToStream;
procedure Sept(x, y : single);
end;
function BPoint_Create(AObject : TBeObject; x, y : single) : TCPlusObject; cdecl; external BePascalLibName name 'BPoint_Create_1';
function BPoint_Create(AObject : TBeObject; point : TCPlusObject) : TCPlusObject; cdecl; external BePascalLibName name 'BPoint_Create_2';
function BPoint_Create(AObject : TBeObject) : TCPlusObject; cdecl; external BePascalLibName name 'BPoint_Create_3';
procedure BPoint_Free(Point : TCPlusObject); cdecl; external BePascalLibName name 'BPoint_Free';
procedure BPoint_ConstrainTo(Point : TCPlusObject; Rect : TCPlusObject); cdecl; external BePascalLibName name 'BPoint_ConstrainTo';
procedure BPoint_PrintToStream(Point : TCPlusObject); cdecl; external bePascalLibName name 'BPoint_PrintToStream';
procedure BPoint_Set(Point : TCPlusObject; x, y : single); cdecl; external BePascalLibName name 'BPoint_Set';
implementation
constructor TPoint.Create(x, y : single);
begin
inherited Create;
CPlusObject := BPoint_Create(Self, x, y);
end;
constructor TPoint.Create(point : TPoint);
begin
inherited Create;
CPlusObject := BPoint_Create(Self, point.CPlusObject)
end;
constructor TPoint.Create;
begin
inherited Create;
CPlusObject := BPoint_Create(Self);
end;
destructor TPoint.Destroy;
begin
BPoint_Free(CPlusObject);
inherited;
end;
procedure TPoint.ConstrainTo(Rect : TRect);
begin
BPoint_ConstrainTo(CPlusObject, Rect.CPlusObject);
end;
procedure TPoint.PrintToStream;
begin
BPoint_PrintToStream(CPlusObject);
end;
procedure TPoint.Sept(x, y : single);
begin
BPoint_Set(CPlusObject, x, y);
end;
initialization
end.

View File

@@ -1,270 +0,0 @@
{ BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2003 Olivier Coursiere
Eric Jourde
Oscar Lesta
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
}
unit radiobutton;
interface
uses
beobj, Control, Message, Archivable, SupportDefs, Rect, Handler;
type
TRadioButton = class(TControl)
private
public
constructor Create(frame : TRect; name, aLabel : PChar; message : TMessage; resizingMode, flags : Cardinal); virtual;
constructor Create(data : TMessage); override;
destructor Destroy; override;
function Instantiate(data : TMessage) : TArchivable;
function Archive(data : TMessage; deep : boolean) : TStatus_t;
procedure Draw(updateRect : TRect); override;
procedure MouseDown(where : TPoint); override;
procedure AttachedToWindow; override;
procedure KeyDown(bytes : PChar; numBytes : integer); override;
procedure SetValue(aValue : integer);
procedure GetPreferredSize(width : double; height : double);
procedure ResizeToPreferred; override;
function Invoke(msg : TMessage) : TStatus_t;
procedure MessageReceived(msg : TMessage); override;
procedure WindowActivated(state : boolean); override;
procedure MouseUp(pt : TPoint); override;
procedure MouseMoved(pt : TPoint; code : Cardinal; msg : TMessage); override;
procedure DetachedFromWindow; override;
procedure FrameMoved(new_position : TPoint); override;
procedure FrameResized(new_width : double; new_height : double); override;
function ResolveSpecifier(msg : TMessage; index : integer; specifier : TMessage; form : integer; properti : PChar) : THandler;
procedure MakeFocus(state : boolean); override;
procedure AllAttached; override;
procedure AllDetached; override;
function GetSupportedSuites(data : TMessage) : TStatus_t;
function Perform(d : TPerform_code; arg : Pointer) : TStatus_t;
// procedure _ReservedRadioButton1;
// procedure _ReservedRadioButton2;
// function operator=( : TRadioButton) : TRadioButton;
// procedure BBitmap *sBitmaps[2][3];
// procedure bool fOutlined;
// procedure uint32 _reserved[2];
end;
function BRadioButton_Create(AObject : TBeObject; frame : TCPlusObject;
name, aLabel : PChar; message : TCPlusObject;
resizingMode, flags : Cardinal) : TCPlusObject;
cdecl; external BePascalLibName name 'BRadioButton_Create';
function BRadioButton_Create_1(AObject : TBeObject; data : TCPlusObject) : TCPlusObject; cdecl; external BePascalLibName name 'BRadioButton_Create_1';
procedure BRadioButton_Free(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BRadioButton_FREE';
function BRadioButton_Instantiate(AObject : TCPlusObject; data : TCPlusObject) : TArchivable; cdecl; external BePascalLibName name 'BRadioButton_Instantiate';
function BRadioButton_Archive(AObject : TCPlusObject; data : TCPlusObject; deep : boolean) : TStatus_t; cdecl; external BePascalLibName name 'BRadioButton_Archive';
procedure BRadioButton_Draw(AObject : TCPlusObject; updateRect : TRect); cdecl; external BePascalLibName name 'BRadioButton_Draw';
procedure BRadioButton_MouseDown(AObject : TCPlusObject; where : TPoint); cdecl; external BePascalLibName name 'BRadioButton_MouseDown';
procedure BRadioButton_AttachedToWindow(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BRadioButton_AttachedToWindow';
procedure BRadioButton_KeyDown(AObject : TCPlusObject; bytes : PChar; numBytes : integer); cdecl; external BePascalLibName name 'BRadioButton_KeyDown';
procedure BRadioButton_SetValue(AObject : TCPlusObject; value : integer); cdecl; external BePascalLibName name 'BRadioButton_SetValue';
procedure BRadioButton_GetPreferredSize(AObject : TCPlusObject; width : double; height : double); cdecl; external BePascalLibName name 'BRadioButton_GetPreferredSize';
procedure BRadioButton_ResizeToPreferred(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BRadioButton_ResizeToPreferred';
function BRadioButton_Invoke(AObject : TCPlusObject; msg : TCPlusObject) : TStatus_t; cdecl; external BePascalLibName name 'BRadioButton_Invoke';
procedure BRadioButton_MessageReceived(AObject : TCPlusObject; msg : TCPlusObject); cdecl; external BePascalLibName name 'BRadioButton_MessageReceived';
procedure BRadioButton_WindowActivated(AObject : TCPlusObject; state : boolean); cdecl; external BePascalLibName name 'BRadioButton_WindowActivated';
procedure BRadioButton_MouseUp(AObject : TCPlusObject; pt : TPoint); cdecl; external BePascalLibName name 'BRadioButton_MouseUp';
procedure BRadioButton_MouseMoved(AObject : TCPlusObject; pt : TPoint; code : Cardinal; msg : TCPlusObject); cdecl; external BePascalLibName name 'BRadioButton_MouseMoved';
procedure BRadioButton_DetachedFromWindow(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BRadioButton_DetachedFromWindow';
procedure BRadioButton_FrameMoved(AObject : TCPlusObject; new_position : TCPlusObject); cdecl; external BePascalLibName name 'BRadioButton_FrameMoved';
procedure BRadioButton_FrameResized(AObject : TCPlusObject; new_width : double; new_height : double); cdecl; external BePascalLibName name 'BRadioButton_FrameResized';
function BRadioButton_ResolveSpecifier(AObject : TCPlusObject; msg : TCPlusObject; index : integer; specifier : TCPlusObject; form : integer; properti : PChar) : THandler; cdecl; external BePascalLibName name 'BRadioButton_ResolveSpecifier';
procedure BRadioButton_MakeFocus(AObject : TCPlusObject; state : boolean); cdecl; external BePascalLibName name 'BRadioButton_MakeFocus';
procedure BRadioButton_AllAttached(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BRadioButton_AllAttached';
procedure BRadioButton_AllDetached(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BRadioButton_AllDetached';
function BRadioButton_GetSupportedSuites(AObject : TCPlusObject; data : TCPlusObject) : TStatus_t; cdecl; external BePascalLibName name 'BRadioButton_GetSupportedSuites';
function BRadioButton_Perform(AObject : TCPlusObject; d : TPerform_code; arg : Pointer) : TStatus_t; cdecl; external BePascalLibName name 'BRadioButton_Perform';
//procedure BRadioButton__ReservedRadioButton1(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BRadioButton__ReservedRadioButton1';
//procedure BRadioButton__ReservedRadioButton2(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BRadioButton__ReservedRadioButton2';
//function BRadioButton_operator=(AObject : TCPlusObject; : TRadioButton) : TRadioButton; cdecl; external BePascalLibName name 'BRadioButton_operator=';
//procedure BRadioButton_BBitmap *sBitmaps[2][3](AObject : TCPlusObject); cdecl; external BePascalLibName name 'BRadioButton_BBitmap *sBitmaps[2][3]';
//procedure BRadioButton_bool fOutlined(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BRadioButton_bool fOutlined';
//procedure BRadioButton_uint32 _reserved[2](AObject : TCPlusObject); cdecl; external BePascalLibName name 'BRadioButton_uint32 _reserved[2]';
implementation
constructor TRadioButton.Create(frame : TRect; name, aLabel : PChar; message : TMessage; resizingMode, flags : Cardinal);
begin
CreatePas;
CPlusObject := BRadioButton_Create(Self, frame.CPlusObject, name, aLabel, message.CPlusObject, resizingMode, flags);
end;
constructor TRadioButton.Create(data : TMessage);
begin
CreatePas;
CPlusObject := BRadioButton_Create_1(Self, data.CPlusObject);
end;
destructor TRadioButton.Destroy;
begin
BRadioButton_Free(CPlusObject);
inherited;
end;
function TRadioButton.Instantiate(data : TMessage) : TArchivable;
begin
Result := BRadioButton_Instantiate(CPlusObject, data.CPlusObject);
end;
function TRadioButton.Archive(data : TMessage; deep : boolean) : TStatus_t;
begin
Result := BRadioButton_Archive(CPlusObject, data.CPlusObject, deep);
end;
procedure TRadioButton.Draw(updateRect : TRect);
begin
// BRadioButton_Draw(CPlusObject, updateRect.CPlusObject);
end;
procedure TRadioButton.MouseDown(where : TPoint);
begin
// BRadioButton_MouseDown(CPlusObject, where.CPlusObject);
end;
procedure TRadioButton.AttachedToWindow;
begin
// BRadioButton_AttachedToWindow(CPlusObject);
end;
procedure TRadioButton.KeyDown(bytes : PChar; numBytes : integer);
begin
// BRadioButton_KeyDown(CPlusObject, bytes, numBytes);
end;
procedure TRadioButton.SetValue(aValue : integer);
begin
BRadioButton_SetValue(CPlusObject, aValue);
end;
procedure TRadioButton.GetPreferredSize(width : double; height : double);
begin
BRadioButton_GetPreferredSize(CPlusObject, width, height);
end;
procedure TRadioButton.ResizeToPreferred;
begin
BRadioButton_ResizeToPreferred(CPlusObject);
end;
function TRadioButton.Invoke(msg : TMessage) : TStatus_t;
begin
Result := BRadioButton_Invoke(CPlusObject, msg.CPlusObject);
end;
procedure TRadioButton.MessageReceived(msg : TMessage);
begin
// BRadioButton_MessageReceived(CPlusObject, msg.CPlusObject);
end;
procedure TRadioButton.WindowActivated(state : boolean);
begin
// BRadioButton_WindowActivated(CPlusObject, state);
end;
procedure TRadioButton.MouseUp(pt : TPoint);
begin
// BRadioButton_MouseUp(CPlusObject, pt.CPlusObject);
end;
procedure TRadioButton.MouseMoved(pt : TPoint; code : Cardinal; msg : TMessage);
begin
// BRadioButton_MouseMoved(CPlusObject, pt.CPlusObject, code, msg);
end;
procedure TRadioButton.DetachedFromWindow;
begin
// BRadioButton_DetachedFromWindow(CPlusObject);
end;
procedure TRadioButton.FrameMoved(new_position : TPoint);
begin
// BRadioButton_FrameMoved(CPlusObject, new_position.CPlusObject);
end;
procedure TRadioButton.FrameResized(new_width : double; new_height : double);
begin
// BRadioButton_FrameResized(CPlusObject, new_width, new_height);
end;
function TRadioButton.ResolveSpecifier(msg : TMessage; index : integer; specifier : TMessage; form : integer; properti : PChar) : THandler;
begin
Result := BRadioButton_ResolveSpecifier(CPlusObject, msg.CPlusObject, index, specifier.CPlusObject, form, properti);
end;
procedure TRadioButton.MakeFocus(state : boolean);
begin
BRadioButton_MakeFocus(CPlusObject, state);
end;
procedure TRadioButton.AllAttached;
begin
// BRadioButton_AllAttached(CPlusObject);
end;
procedure TRadioButton.AllDetached;
begin
// BRadioButton_AllDetached(CPlusObject);
end;
function TRadioButton.GetSupportedSuites(data : TMessage) : TStatus_t;
begin
Result := BRadioButton_GetSupportedSuites(CPlusObject, data.CPlusObject);
end;
function TRadioButton.Perform(d : TPerform_code; arg : Pointer) : TStatus_t;
begin
Result := BRadioButton_Perform(CPlusObject, d, arg);
end;
{
procedure TRadioButton._ReservedRadioButton1;
begin
BRadioButton__ReservedRadioButton1(CPlusObject);
end;
procedure TRadioButton._ReservedRadioButton2;
begin
BRadioButton__ReservedRadioButton2(CPlusObject);
end;
function TRadioButton.operator=( : TRadioButton) : TRadioButton;
begin
Result := BRadioButton_operator=(CPlusObject, );
end;
procedure TRadioButton.BBitmap *sBitmaps[2][3];
begin
BRadioButton_BBitmap *sBitmaps[2][3](CPlusObject);
end;
procedure TRadioButton.bool fOutlined;
begin
BRadioButton_bool fOutlined(CPlusObject);
end;
procedure TRadioButton.uint32 _reserved[2];
begin
BRadioButton_uint32 _reserved[2](CPlusObject);
end;
}
end.

View File

@@ -1,37 +0,0 @@
/* BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _RECT_H_
#define _RECT_H_
#include <Point.h>
#include <Rect.h>
#include <rect.h>
#include <beobj.h>
class BPRect : public BRect, public BPasObject
{
public:
BPRect(TPasObject PasObject);
BPRect(TPasObject PasObject, const BRect & rect);
BPRect(TPasObject PasObject, float l, float t, float r, float b);
BPRect(TPasObject PasObject, BPoint leftTop, BPoint rightBottom);
};
#endif _RECT_H_ /* _RECT_H_ */

View File

@@ -1,144 +0,0 @@
{ BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
}
unit rect;
interface
uses
beobj;
type
// TPoint and TRect are defined in the same unit to avoid circular reference
TPoint = class;
TRect = class(TBeObject)
public
constructor Create; override;
constructor Create(rect : TRect); virtual; // Problème de référence circulaire avec TPoint
constructor Create(l, t, r, b : single); virtual;
constructor Create(leftTop, rightBottom : TPoint); virtual;
destructor Destroy; override;
procedure PrintToStream;
end;
function BRect_Create(AObject : TBeObject) : TCPlusObject; cdecl; external BePascalLibName name 'BRect_Create_1';
function BRect_Create(AObject : TBeObject; rect : TCPlusObject) : TCPlusObject; cdecl; external BePascalLibName name 'BRect_Create_2';
function BRect_Create(AObject : TBeObject; l, t, r, b : single) : TCPlusObject; cdecl; external BePascalLibName name 'BRect_Create_3';
function BRect_Create(AObject : TBeObject; leftTop, rightBottom : TCPlusObject) : TCPlusObject; cdecl; external BePascalLibName name 'BRect_Create_4';
procedure BRect_Free(rect : TCPlusObject); cdecl; external BePascalLibName name 'BRect_Free';
procedure BRect_PrintToStream(Rect : TCPlusObject); cdecl; external bePascalLibName name 'BRect_PrintToStream';
type
TPoint = class(TBeObject)
public
constructor Create; override;
constructor Create(x, y : single); virtual;
constructor Create(point : TPoint); virtual;
destructor Destroy; override;
procedure ConstrainTo(Rect : TRect);
procedure PrintToStream;
procedure Sept(x, y : single);
end;
function BPoint_Create(AObject : TBeObject; x, y : single) : TCPlusObject; cdecl; external BePascalLibName name 'BPoint_Create_1';
function BPoint_Create(AObject : TBeObject; point : TCPlusObject) : TCPlusObject; cdecl; external BePascalLibName name 'BPoint_Create_2';
function BPoint_Create(AObject : TBeObject) : TCPlusObject; cdecl; external BePascalLibName name 'BPoint_Create_3';
procedure BPoint_Free(Point : TCPlusObject); cdecl; external BePascalLibName name 'BPoint_Free';
procedure BPoint_ConstrainTo(Point : TCPlusObject; Rect : TCPlusObject); cdecl; external BePascalLibName name 'BPoint_ConstrainTo';
procedure BPoint_PrintToStream(Point : TCPlusObject); cdecl; external bePascalLibName name 'BPoint_PrintToStream';
procedure BPoint_Set(Point : TCPlusObject; x, y : single); cdecl; external BePascalLibName name 'BPoint_Set';
implementation
constructor TRect.Create;
begin
inherited Create;
CPlusObject := BRect_Create(Self);
end;
constructor TRect.Create(rect : TRect);
begin
inherited Create;
CPlusObject := BRect_Create(Self, rect.CPlusObject);
end;
constructor TRect.Create(l, t, r, b : single);
begin
inherited Create;
CPlusObject := BRect_Create(Self, l, t, r, b);
end;
constructor TRect.Create(leftTop, rightBottom : TPoint);
begin
inherited Create;
CPlusObject := BRect_Create(Self, leftTop.CPlusObject, rightBottom.CPlusObject);
end;
destructor TRect.Destroy;
begin
BRect_Free(CPlusObject);
inherited Destroy;
end;
procedure TRect.PrintToStream;
begin
BRect_PrintToStream(CPlusObject);
end;
constructor TPoint.Create(x, y : single);
begin
inherited Create;
CPlusObject := BPoint_Create(Self, x, y);
end;
constructor TPoint.Create(point : TPoint);
begin
inherited Create;
CPlusObject := BPoint_Create(Self, point.CPlusObject)
end;
constructor TPoint.Create;
begin
inherited Create;
CPlusObject := BPoint_Create(Self);
end;
destructor TPoint.Destroy;
begin
BPoint_Free(CPlusObject);
inherited;
end;
procedure TPoint.ConstrainTo(Rect : TRect);
begin
BPoint_ConstrainTo(CPlusObject, Rect.CPlusObject);
end;
procedure TPoint.PrintToStream;
begin
BPoint_PrintToStream(CPlusObject);
end;
procedure TPoint.Sept(x, y : single);
begin
BPoint_Set(CPlusObject, x, y);
end;
initialization
end.

View File

@@ -1,284 +0,0 @@
{ BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
Eric Jourde
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
}
unit scrollbar;
interface
uses
beobj,view,rect,interfacedefs,Message,Archivable,SupportDefs,Handler;
type
TScrollBar = class(TView)
private
public
constructor Create(frame : TRect; name : pchar; atarget : TView; min,max : real; direction : Torientation);
constructor Create_1(data : TMessage);
destructor Destroy;override;
function Instantiate(data : TMessage) : TArchivable;
function Archive(data : TMessage; deep : boolean) : TStatus_t;
procedure AttachedToWindow;override;
procedure SetValue(avalue : double);
function Value : double;
procedure SetProportion( avalue: double);
function Proportion : double;
procedure ValueChanged(newValue : double);
procedure SetRange(min : double; max : double);
procedure GetRange(min : double; max : double);
procedure SetSteps(smallStep : double; largeStep : double);
procedure GetSteps(smallStep : double; largeStep : double);
procedure SetTarget(atarget : TView);
procedure SetTarget(targetName : PChar);
function Target : TView;
function Orientation : TOrientation;
procedure MessageReceived(msg : TMessage);override;
procedure MouseDown(pt : TPoint);override;
procedure MouseUp(pt : TPoint);override;
procedure MouseMoved(pt : TPoint; code : Cardinal; msg : TMessage);override;
procedure DetachedFromWindow;override;
procedure Draw(updateRect : TRect);override;
procedure FrameMoved(new_position : TPoint);override;
procedure FrameResized(new_width : double; new_height : double);override;
function ResolveSpecifier(msg : TMessage; index : integer; specifier : TMessage; form : integer; properti : PChar) : THandler;
procedure ResizeToPreferred;override;
procedure GetPreferredSize(width : double; height : double);
procedure MakeFocus(state : boolean);
procedure AllAttached;override;
procedure AllDetached;override;
function GetSupportedSuites(data : TMessage) : TStatus_t;
function Perform(d : TPerform_code; arg : Pointer) : TStatus_t;
end;
function BScrollBar_Create(AObject : TBeObject;frame : TCPlusObject; name : pchar; target : TCPlusObject; min,max : real; direction : Torientation): TCPlusObject; cdecl; external BePascalLibName name 'BScrollBar_Create';
function BScrollBar_Create_1(AObject : TBeObject; data : TCPlusObject):TCPlusObject; cdecl; external BePascalLibName name 'BScrollBar_Create_1';
procedure BScrollBar_Free(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BScrollBar_Free';
function BScrollBar_Instantiate(AObject : TCPlusObject; data : TCPlusObject) : TArchivable; cdecl; external BePascalLibName name 'BScrollBar_Instantiate';
function BScrollBar_Archive(AObject : TCPlusObject; data : TCPlusObject; deep : boolean) : TStatus_t; cdecl; external BePascalLibName name 'BScrollBar_Archive';
procedure BScrollBar_AttachedToWindow(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BScrollBar_AttachedToWindow';
procedure BScrollBar_SetValue(AObject : TCPlusObject; value : double); cdecl; external BePascalLibName name 'BScrollBar_SetValue';
function BScrollBar_Value(AObject : TCPlusObject) : double; cdecl; external BePascalLibName name 'BScrollBar_Value';
procedure BScrollBar_SetProportion(AObject : TCPlusObject; avalue: double); cdecl; external BePascalLibName name 'BScrollBar_SetProportion';
function BScrollBar_Proportion(AObject : TCPlusObject) : double; cdecl; external BePascalLibName name 'BScrollBar_Proportion';
procedure BScrollBar_ValueChanged(AObject : TCPlusObject; newValue : double); cdecl; external BePascalLibName name 'BScrollBar_ValueChanged';
procedure BScrollBar_SetRange(AObject : TCPlusObject; min : double; max : double); cdecl; external BePascalLibName name 'BScrollBar_SetRange';
procedure BScrollBar_GetRange(AObject : TCPlusObject; min : double; max : double); cdecl; external BePascalLibName name 'BScrollBar_GetRange';
procedure BScrollBar_SetSteps(AObject : TCPlusObject; smallStep : double; largeStep : double); cdecl; external BePascalLibName name 'BScrollBar_SetSteps';
procedure BScrollBar_GetSteps(AObject : TCPlusObject; smallStep : double; largeStep : double); cdecl; external BePascalLibName name 'BScrollBar_GetSteps';
procedure BScrollBar_SetTarget(AObject : TCPlusObject; target : TView); cdecl; external BePascalLibName name 'BScrollBar_SetTarget';
procedure BScrollBar_SetTarget(AObject : TCPlusObject; targetName : PChar); cdecl; external BePascalLibName name 'BScrollBar_SetTarget';
function BScrollBar_Target(AObject : TCPlusObject) : TView; cdecl; external BePascalLibName name 'BScrollBar_Target';
function BScrollBar_Orientation(AObject : TCPlusObject) : TOrientation; cdecl; external BePascalLibName name 'BScrollBar_Orientation';
procedure BScrollBar_MessageReceived(AObject : TCPlusObject; msg : TCPlusObject); cdecl; external BePascalLibName name 'BScrollBar_MessageReceived';
procedure BScrollBar_MouseDown(AObject : TCPlusObject; pt : TCPlusObject); cdecl; external BePascalLibName name 'BScrollBar_MouseDown';
procedure BScrollBar_MouseUp(AObject : TCPlusObject; pt : TCPlusObject); cdecl; external BePascalLibName name 'BScrollBar_MouseUp';
procedure BScrollBar_MouseMoved(AObject : TCPlusObject; pt : TCPlusObject; code : Cardinal; msg : TMessage); cdecl; external BePascalLibName name 'BScrollBar_MouseMoved';
procedure BScrollBar_DetachedFromWindow(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BScrollBar_DetachedFromWindow';
procedure BScrollBar_Draw(AObject : TCPlusObject; updateRect : TCPlusObject); cdecl; external BePascalLibName name 'BScrollBar_Draw';
procedure BScrollBar_FrameMoved(AObject : TCPlusObject; new_position : TCPlusObject); cdecl; external BePascalLibName name 'BScrollBar_FrameMoved';
procedure BScrollBar_FrameResized(AObject : TCPlusObject; new_width : double; new_height : double); cdecl; external BePascalLibName name 'BScrollBar_FrameResized';
function BScrollBar_ResolveSpecifier(AObject : TCPlusObject; msg : TCPlusObject; index : integer; specifier : TCPlusObject; form : integer; properti : PChar) : THandler; cdecl; external BePascalLibName name 'BScrollBar_ResolveSpecifier';
procedure BScrollBar_ResizeToPreferred(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BScrollBar_ResizeToPreferred';
procedure BScrollBar_GetPreferredSize(AObject : TCPlusObject; width : double; height : double); cdecl; external BePascalLibName name 'BScrollBar_GetPreferredSize';
procedure BScrollBar_MakeFocus(AObject : TCPlusObject; state : boolean); cdecl; external BePascalLibName name 'BScrollBar_MakeFocus';
procedure BScrollBar_AllAttached(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BScrollBar_AllAttached';
procedure BScrollBar_AllDetached(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BScrollBar_AllDetached';
function BScrollBar_GetSupportedSuites(AObject : TCPlusObject; data : TCPlusObject) : TStatus_t; cdecl; external BePascalLibName name 'BScrollBar_GetSupportedSuites';
function BScrollBar_Perform(AObject : TCPlusObject; d : TPerform_code; arg : Pointer) : TStatus_t; cdecl; external BePascalLibName name 'BScrollBar_Perform';
implementation
constructor TScrollBar.Create(frame : TRect; name : pchar; atarget : TView; min,max : real; direction : Torientation);
begin
CreatePas;
CPlusObject := BScrollBar_Create(Self,frame.CPlusObject, name, target.CPlusObject,min,max, direction );
end;
constructor TScrollBar.Create_1(data : TMessage);
begin
CreatePas;
CPlusObject := BScrollBar_Create_1(Self, data.CPlusObject);
end;
destructor TScrollBar.Destroy;
begin
BScrollBar_Free(CPlusObject);
inherited;
end;
function TScrollBar.Instantiate(data : TMessage) : TArchivable;
begin
Result := BScrollBar_Instantiate(CPlusObject, data.CPlusObject);
end;
function TScrollBar.Archive(data : TMessage; deep : boolean) : TStatus_t;
begin
Result := BScrollBar_Archive(CPlusObject, data.CPlusObject, deep);
end;
procedure TScrollBar.AttachedToWindow;
begin
// BScrollBar_AttachedToWindow(CPlusObject);
end;
procedure TScrollBar.SetValue(avalue : double);
begin
BScrollBar_SetValue(CPlusObject, avalue);
end;
function TScrollBar.Value : double;
begin
Result := BScrollBar_Value(CPlusObject);
end;
procedure TScrollBar.SetProportion( avalue: double);
begin
BScrollBar_SetProportion(CPlusObject, avalue);
end;
function TScrollBar.Proportion : double;
begin
Result := BScrollBar_Proportion(CPlusObject);
end;
procedure TScrollBar.ValueChanged(newValue : double);
begin
BScrollBar_ValueChanged(CPlusObject, newValue);
end;
procedure TScrollBar.SetRange(min : double; max : double);
begin
BScrollBar_SetRange(CPlusObject, min, max);
end;
procedure TScrollBar.GetRange(min : double; max : double);
begin
BScrollBar_GetRange(CPlusObject, min, max);
end;
procedure TScrollBar.SetSteps(smallStep : double; largeStep : double);
begin
BScrollBar_SetSteps(CPlusObject, smallStep, largeStep);
end;
procedure TScrollBar.GetSteps(smallStep : double; largeStep : double);
begin
BScrollBar_GetSteps(CPlusObject, smallStep, largeStep);
end;
procedure TScrollBar.SetTarget(atarget : TView);
begin
BScrollBar_SetTarget(CPlusObject, target.CPlusObject);
end;
procedure TScrollBar.SetTarget(targetName : PChar);
begin
BScrollBar_SetTarget(CPlusObject, targetName);
end;
function TScrollBar.Target : TView;
begin
Result := BScrollBar_Target(CPlusObject);
end;
function TScrollBar.Orientation : TOrientation;
begin
Result := BScrollBar_Orientation(CPlusObject);
end;
procedure TScrollBar.MessageReceived(msg : TMessage);
begin
// BScrollBar_MessageReceived(CPlusObject, msg.CPlusObject);
end;
procedure TScrollBar.MouseDown(pt : TPoint);
begin
// BScrollBar_MouseDown(CPlusObject, pt.CPlusObject);
end;
procedure TScrollBar.MouseUp(pt : TPoint);
begin
// BScrollBar_MouseUp(CPlusObject, pt.CPlusObject);
end;
procedure TScrollBar.MouseMoved(pt : TPoint; code : Cardinal; msg : TMessage);
begin
// BScrollBar_MouseMoved(CPlusObject, pt.CPlusObject, code, msg);
end;
procedure TScrollBar.DetachedFromWindow;
begin
// BScrollBar_DetachedFromWindow(CPlusObject);
end;
procedure TScrollBar.Draw(updateRect : TRect);
begin
//BScrollBar_Draw(CPlusObject, updateRect.CPlusObject);
end;
procedure TScrollBar.FrameMoved(new_position : TPoint);
begin
// BScrollBar_FrameMoved(CPlusObject, new_position.CPlusObject);
end;
procedure TScrollBar.FrameResized(new_width : double; new_height : double);
begin
// BScrollBar_FrameResized(CPlusObject, new_width, new_height);
end;
function TScrollBar.ResolveSpecifier(msg : TMessage; index : integer; specifier : TMessage; form : integer; properti : PChar) : THandler;
begin
Result := BScrollBar_ResolveSpecifier(CPlusObject, msg.CPlusObject, index, specifier.CPlusObject, form, properti);
end;
procedure TScrollBar.ResizeToPreferred;
begin
// BScrollBar_ResizeToPreferred(CPlusObject);
end;
procedure TScrollBar.GetPreferredSize(width : double; height : double);
begin
BScrollBar_GetPreferredSize(CPlusObject, width, height);
end;
procedure TScrollBar.MakeFocus(state : boolean);
begin
BScrollBar_MakeFocus(CPlusObject, state);
end;
procedure TScrollBar.AllAttached;
begin
BScrollBar_AllAttached(CPlusObject);
end;
procedure TScrollBar.AllDetached;
begin
BScrollBar_AllDetached(CPlusObject);
end;
function TScrollBar.GetSupportedSuites(data : TMessage) : TStatus_t;
begin
Result := BScrollBar_GetSupportedSuites(CPlusObject, data.CPlusObject);
end;
function TScrollBar.Perform(d : TPerform_code; arg : Pointer) : TStatus_t;
begin
Result := BScrollBar_Perform(CPlusObject, d, arg);
end;
end.

View File

@@ -1,259 +0,0 @@
{ BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
Eric Jourde
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
}
unit scrollview;
interface
uses
beobj, view, message, archivable, SupportDefs, rect, list,
handler, messenger,interfacedefs,font,graphicdefs,scrollbar;
type
TScrollView = class(TView)
private
public
constructor Create(name : pchar;
atarget :TView;
resizeMask : longint;
flags : longint;
horizontal,
vertical : boolean;
aborder :Tborder_style ); virtual;
destructor Destroy;override;
function Instantiate(data : TMessage) : TArchivable;
function Archive(data : TMessage; deep : boolean) : TStatus_t;
procedure Draw(updateRect : TRect);override;
procedure AttachedToWindow;override;
function ScrollBar(flag : TOrientation) : TScrollBar;
procedure SetBorder(aborder : Tborder_style);
function Border : Tborder_style;
function SetBorderHighlighted(state : boolean) : TStatus_t;
function IsBorderHighlighted : boolean;
procedure SetTarget(new_target : TView);
function Target : TView;
procedure MessageReceived(msg : TMessage);override;
procedure MouseDown(pt : TPoint);override;
procedure WindowActivated(state : boolean);override;
procedure MouseUp(pt : TPoint);override;
procedure MouseMoved(pt : TPoint; code : Cardinal; msg : TMessage);override;
procedure DetachedFromWindow;override;
procedure AllAttached;override;
procedure AllDetached;override;
procedure FrameMoved(new_position : TPoint);override;
procedure FrameResized(new_width : double; new_height : double);override;
function ResolveSpecifier(msg : TMessage; index : integer; specifier : TMessage; form : integer; properti : PChar) : THandler;
procedure ResizeToPreferred;override;
procedure GetPreferredSize(width : double; height : double);
procedure MakeFocus(state : boolean);
function GetSupportedSuites(data : TMessage) : TStatus_t;
function Perform(d : TPerform_code; arg : Pointer) : TStatus_t;
end;
function BScrollView_Create(AObject : TBeObject;name : pchar;target :TCPlusObject; resizeMask : longint; flags : longint;horizontal,vertical : boolean;border :Tborder_style ):TCPlusObject; cdecl; external BePascalLibName name 'BScrollView_Create';
//function BScrollView_Create_1(AObject : TBeObject):TCPlusObject; cdecl; external BePascalLibName name 'BScrollView_Create_1';
procedure BScrollView_Free(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BScrollView_Free';
function BScrollView_Instantiate(AObject : TCPlusObject; data : TCPlusObject) : TArchivable; cdecl; external BePascalLibName name 'BScrollView_Instantiate';
function BScrollView_Archive(AObject : TCPlusObject; data : TCPlusObject; deep : boolean) : TStatus_t; cdecl; external BePascalLibName name 'BScrollView_Archive';
procedure BScrollView_Draw(AObject : TCPlusObject; updateRect : TCPlusObject); cdecl; external BePascalLibName name 'BScrollView_Draw';
procedure BScrollView_AttachedToWindow(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BScrollView_AttachedToWindow';
function BScrollView_ScrollBar(AObject : TCPlusObject; flag : TOrientation) : TScrollBar; cdecl; external BePascalLibName name 'BScrollView_ScrollBar';
procedure BScrollView_SetBorder(AObject : TCPlusObject; border : Tborder_style); cdecl; external BePascalLibName name 'BScrollView_SetBorder';
function BScrollView_Border(AObject : TCPlusObject) : Tborder_style; cdecl; external BePascalLibName name 'BScrollView_Border';
function BScrollView_SetBorderHighlighted(AObject : TCPlusObject; state : boolean) : TStatus_t; cdecl; external BePascalLibName name 'BScrollView_SetBorderHighlighted';
function BScrollView_IsBorderHighlighted(AObject : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BScrollView_IsBorderHighlighted';
procedure BScrollView_SetTarget(AObject : TCPlusObject; new_target : TCPlusObject); cdecl; external BePascalLibName name 'BScrollView_SetTarget';
function BScrollView_Target(AObject : TCPlusObject) : TView; cdecl; external BePascalLibName name 'BScrollView_Target';
procedure BScrollView_MessageReceived(AObject : TCPlusObject; msg : TCPlusObject); cdecl; external BePascalLibName name 'BScrollView_MessageReceived';
procedure BScrollView_MouseDown(AObject : TCPlusObject; pt : TCPlusObject); cdecl; external BePascalLibName name 'BScrollView_MouseDown';
procedure BScrollView_WindowActivated(AObject : TCPlusObject; state : boolean); cdecl; external BePascalLibName name 'BScrollView_WindowActivated';
procedure BScrollView_MouseUp(AObject : TCPlusObject; pt : TCPlusObject); cdecl; external BePascalLibName name 'BScrollView_MouseUp';
procedure BScrollView_MouseMoved(AObject : TCPlusObject; pt : TCPlusObject; code : Cardinal; msg : TCPlusObject); cdecl; external BePascalLibName name 'BScrollView_MouseMoved';
procedure BScrollView_DetachedFromWindow(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BScrollView_DetachedFromWindow';
procedure BScrollView_AllAttached(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BScrollView_AllAttached';
procedure BScrollView_AllDetached(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BScrollView_AllDetached';
procedure BScrollView_FrameMoved(AObject : TCPlusObject; new_position : TPoint); cdecl; external BePascalLibName name 'BScrollView_FrameMoved';
procedure BScrollView_FrameResized(AObject : TCPlusObject; new_width : double; new_height : double); cdecl; external BePascalLibName name 'BScrollView_FrameResized';
function BScrollView_ResolveSpecifier(AObject : TCPlusObject; msg : TCPlusObject; index : integer; specifier : TCPlusObject; form : integer; properti : PChar) : THandler; cdecl; external BePascalLibName name 'BScrollView_ResolveSpecifier';
procedure BScrollView_ResizeToPreferred(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BScrollView_ResizeToPreferred';
procedure BScrollView_GetPreferredSize(AObject : TCPlusObject; width : double; height : double); cdecl; external BePascalLibName name 'BScrollView_GetPreferredSize';
procedure BScrollView_MakeFocus(AObject : TCPlusObject; state : boolean); cdecl; external BePascalLibName name 'BScrollView_MakeFocus';
function BScrollView_GetSupportedSuites(AObject : TCPlusObject; data : TCPlusObject) : TStatus_t; cdecl; external BePascalLibName name 'BScrollView_GetSupportedSuites';
function BScrollView_Perform(AObject : TCPlusObject; d : TPerform_code; arg : Pointer) : TStatus_t; cdecl; external BePascalLibName name 'BScrollView_Perform';
implementation
constructor TScrollView.Create(name : pchar;
atarget :TView;
resizeMask : longint;
flags : longint;
horizontal,
vertical : boolean;
aborder :Tborder_style );
begin
CreatePas;
CPlusObject := BScrollView_Create(Self,name,atarget.CplusObject,resizeMask,flags,horizontal,vertical,aborder);
end;
destructor TScrollView.Destroy;
begin
BScrollView_Free(CPlusObject);
inherited;
end;
function TScrollView.Instantiate(data : TMessage) : TArchivable;
begin
Result := BScrollView_Instantiate(CPlusObject, data.CPlusObject);
end;
function TScrollView.Archive(data : TMessage; deep : boolean) : TStatus_t;
begin
Result := BScrollView_Archive(CPlusObject, data.CPlusObject, deep);
end;
procedure TScrollView.Draw(updateRect : TRect);
begin
// BScrollView_Draw(CPlusObject, updateRect.CPlusObject);
end;
procedure TScrollView.AttachedToWindow;
begin
//BScrollView_AttachedToWindow(CPlusObject);
end;
function TScrollView.ScrollBar(flag : TOrientation) : TScrollBar;
begin
Result := BScrollView_ScrollBar(CPlusObject, flag);
end;
procedure TScrollView.SetBorder(aborder : Tborder_style);
begin
BScrollView_SetBorder(CPlusObject, aborder);
end;
function TScrollView.Border : Tborder_style;
begin
Result := BScrollView_Border(CPlusObject);
end;
function TScrollView.SetBorderHighlighted(state : boolean) : TStatus_t;
begin
Result := BScrollView_SetBorderHighlighted(CPlusObject, state);
end;
function TScrollView.IsBorderHighlighted : boolean;
begin
Result := BScrollView_IsBorderHighlighted(CPlusObject);
end;
procedure TScrollView.SetTarget(new_target : TView);
begin
BScrollView_SetTarget(CPlusObject, new_target.CPlusObject);
end;
function TScrollView.Target : TView;
begin
Result := BScrollView_Target(CPlusObject);
end;
procedure TScrollView.MessageReceived(msg : TMessage);
begin
inherited;
//BScrollView_MessageReceived(CPlusObject, msg.CPlusObject);
end;
procedure TScrollView.MouseDown(pt : TPoint);
begin
// BScrollView_MouseDown(CPlusObject, pt.CPlusObject);
end;
procedure TScrollView.WindowActivated(state : boolean);
begin
//BScrollView_WindowActivated(CPlusObject, state);
end;
procedure TScrollView.MouseUp(pt : TPoint);
begin
//BScrollView_MouseUp(CPlusObject, pt.CPlusObject);
end;
procedure TScrollView.MouseMoved(pt : TPoint; code : Cardinal; msg : TMessage);
begin
//BScrollView_MouseMoved(CPlusObject, pt.CPlusObject, code, msg);
end;
procedure TScrollView.DetachedFromWindow;
begin
//BScrollView_DetachedFromWindow(CPlusObject);
end;
procedure TScrollView.AllAttached;
begin
//BScrollView_AllAttached(CPlusObject);
end;
procedure TScrollView.AllDetached;
begin
//BScrollView_AllDetached(CPlusObject);
end;
procedure TScrollView.FrameMoved(new_position : TPoint);
begin
// BScrollView_FrameMoved(CPlusObject, new_position.CPlusObject);
end;
procedure TScrollView.FrameResized(new_width : double; new_height : double);
begin
//BScrollView_FrameResized(CPlusObject, new_width, new_height);
end;
function TScrollView.ResolveSpecifier(msg : TMessage; index : integer; specifier : TMessage; form : integer; properti : PChar) : THandler;
begin
Result := BScrollView_ResolveSpecifier(CPlusObject, msg.CPlusObject, index, specifier.CPlusObject, form, properti);
end;
procedure TScrollView.ResizeToPreferred;
begin
BScrollView_ResizeToPreferred(CPlusObject);
end;
procedure TScrollView.GetPreferredSize(width : double; height : double);
begin
BScrollView_GetPreferredSize(CPlusObject, width, height);
end;
procedure TScrollView.MakeFocus(state : boolean);
begin
BScrollView_MakeFocus(CPlusObject, state);
end;
function TScrollView.GetSupportedSuites(data : TMessage) : TStatus_t;
begin
Result := BScrollView_GetSupportedSuites(CPlusObject, data.CPlusObject);
end;
function TScrollView.Perform(d : TPerform_code; arg : Pointer) : TStatus_t;
begin
Result := BScrollView_Perform(CPlusObject, d, arg);
end;
end.

View File

@@ -1,303 +0,0 @@
{ BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
Eric Jourde
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
}
unit statusbar;
interface
uses
beobj, view, message, archivable, SupportDefs, rect, list,
handler, messenger,interfacedefs,font,graphicdefs;
type
TStatusBar = class(TView)
private
public
constructor Create( frame : TRect;
name : pchar;
alabel : Pchar;
trailing_label : Pchar);virtual;
constructor Create(data : TMessage);virtual;
destructor Destroy;override;
function Instantiate(data : TMessage) : TArchivable;
function Archive(data : TMessage; deep : boolean) : TStatus_t;
procedure AttachedToWindow;override;
procedure MessageReceived(msg : TMessage);override;
procedure Draw(updateRect : TRect);override;
procedure SetBarColor(color : trgb_color);
procedure SetBarHeight(height : double);
procedure SetText(str : PChar);
procedure SetTrailingText(str : PChar);
procedure SetMaxValue(max : double);
procedure Update(delta : single; main_text : PChar; trailing_text : PChar);
procedure Reset(alabel : PChar; trailing_label : PChar);
function CurrentValue : double;
function MaxValue : double;
function BarColor : trgb_color;
function BarHeight : double;
function Text : PChar;
function TrailingText : PChar;
function GetLabel : PChar;
function TrailingLabel : PChar;
procedure MouseDown(pt : TPoint);override;
procedure MouseUp(pt : TPoint);override;
procedure WindowActivated(state : boolean);override;
procedure MouseMoved(pt : TPoint; code : Cardinal; msg : TMessage);override;
procedure DetachedFromWindow;override;
procedure FrameMoved(new_position : TPoint);override;
procedure FrameResized(new_width : double; new_height : double);override;
function ResolveSpecifier(msg : TMessage; index : integer; specifier : TMessage; form : integer; properti : PChar) : THandler;
procedure ResizeToPreferred;override;
procedure GetPreferredSize(width : double; height : double);
procedure MakeFocus(state : boolean);
procedure AllAttached;override;
procedure AllDetached;override;
end;
function BStatusBar_Create(AObject : TBeObject;frame : TCPlusObject;
name : pchar;
slabel : Pchar;
trailing_label : Pchar): TCPlusObject; cdecl; external BePascalLibName name 'BStatusBar_Create';
function BStatusBar_Create(AObject : TBeObject; data : TCPlusObject): TCPlusObject; cdecl; external BePascalLibName name 'BStatusBar_Create';
procedure BStatusBar_Free(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BStatusBar_Free';
function BStatusBar_Instantiate(AObject : TCPlusObject; data : TCPlusObject) : TArchivable; cdecl; external BePascalLibName name 'BStatusBar_Instantiate';
function BStatusBar_Archive(AObject : TCPlusObject; data : TCPlusObject; deep : boolean) : TStatus_t; cdecl; external BePascalLibName name 'BStatusBar_Archive';
procedure BStatusBar_AttachedToWindow(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BStatusBar_AttachedToWindow';
procedure BStatusBar_MessageReceived(AObject : TCPlusObject; msg : TCPlusObject); cdecl; external BePascalLibName name 'BStatusBar_MessageReceived';
procedure BStatusBar_Draw(AObject : TCPlusObject; updateRect : TCPlusObject); cdecl; external BePascalLibName name 'BStatusBar_Draw';
procedure BStatusBar_SetBarColor(AObject : TCPlusObject; color : trgb_color); cdecl; external BePascalLibName name 'BStatusBar_SetBarColor';
procedure BStatusBar_SetBarHeight(AObject : TCPlusObject; height : double); cdecl; external BePascalLibName name 'BStatusBar_SetBarHeight';
procedure BStatusBar_SetText(AObject : TCPlusObject; str : PChar); cdecl; external BePascalLibName name 'BStatusBar_SetText';
procedure BStatusBar_SetTrailingText(AObject : TCPlusObject; str : PChar); cdecl; external BePascalLibName name 'BStatusBar_SetTrailingText';
procedure BStatusBar_SetMaxValue(AObject : TCPlusObject; max : double); cdecl; external BePascalLibName name 'BStatusBar_SetMaxValue';
procedure BStatusBar_Update(AObject : TCPlusObject; delta : single; main_text : PChar; trailing_text : PChar); cdecl; external BePascalLibName name 'BStatusBar_Update';
procedure BStatusBar_Reset(AObject : TCPlusObject; alabel : PChar; trailing_label : PChar); cdecl; external BePascalLibName name 'BStatusBar_Reset';
function BStatusBar_CurrentValue(AObject : TCPlusObject) : double; cdecl; external BePascalLibName name 'BStatusBar_CurrentValue';
function BStatusBar_MaxValue(AObject : TCPlusObject) : double; cdecl; external BePascalLibName name 'BStatusBar_MaxValue';
function BStatusBar_BarColor(AObject : TCPlusObject) : trgb_color; cdecl; external BePascalLibName name 'BStatusBar_BarColor';
function BStatusBar_BarHeight(AObject : TCPlusObject) : double; cdecl; external BePascalLibName name 'BStatusBar_BarHeight';
function BStatusBar_Text(AObject : TCPlusObject) : PChar; cdecl; external BePascalLibName name 'BStatusBar_Text';
function BStatusBar_TrailingText(AObject : TCPlusObject) : PChar; cdecl; external BePascalLibName name 'BStatusBar_TrailingText';
function BStatusBar_Label(AObject : TCPlusObject) : PChar; cdecl; external BePascalLibName name 'BStatusBar_Label';
function BStatusBar_TrailingLabel(AObject : TCPlusObject) : PChar; cdecl; external BePascalLibName name 'BStatusBar_TrailingLabel';
procedure BStatusBar_MouseDown(AObject : TCPlusObject; pt : TCPlusObject); cdecl; external BePascalLibName name 'BStatusBar_MouseDown';
procedure BStatusBar_MouseUp(AObject : TCPlusObject; pt : TCPlusObject); cdecl; external BePascalLibName name 'BStatusBar_MouseUp';
procedure BStatusBar_WindowActivated(AObject : TCPlusObject; state : boolean); cdecl; external BePascalLibName name 'BStatusBar_WindowActivated';
procedure BStatusBar_MouseMoved(AObject : TCPlusObject; pt : TCPlusObject; code : Cardinal; msg : TMessage); cdecl; external BePascalLibName name 'BStatusBar_MouseMoved';
procedure BStatusBar_DetachedFromWindow(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BStatusBar_DetachedFromWindow';
procedure BStatusBar_FrameMoved(AObject : TCPlusObject; new_position : TCPlusObject); cdecl; external BePascalLibName name 'BStatusBar_FrameMoved';
procedure BStatusBar_FrameResized(AObject : TCPlusObject; new_width : double; new_height : double); cdecl; external BePascalLibName name 'BStatusBar_FrameResized';
function BStatusBar_ResolveSpecifier(AObject : TCPlusObject; msg : TCPlusObject; index : integer; specifier : TCPlusObject; form : integer; properti : PChar) : THandler; cdecl; external BePascalLibName name 'BStatusBar_ResolveSpecifier';
procedure BStatusBar_ResizeToPreferred(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BStatusBar_ResizeToPreferred';
procedure BStatusBar_GetPreferredSize(AObject : TCPlusObject; width : double; height : double); cdecl; external BePascalLibName name 'BStatusBar_GetPreferredSize';
procedure BStatusBar_MakeFocus(AObject : TCPlusObject; state : boolean); cdecl; external BePascalLibName name 'BStatusBar_MakeFocus';
procedure BStatusBar_AllAttached(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BStatusBar_AllAttached';
procedure BStatusBar_AllDetached(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BStatusBar_AllDetached';
function BStatusBar_GetSupportedSuites(AObject : TCPlusObject; data : TCPlusObject) : TStatus_t; cdecl; external BePascalLibName name 'BStatusBar_GetSupportedSuites';
implementation
constructor TStatusBar.Create(frame : TRect;
name : pchar;
alabel : Pchar;
trailing_label : Pchar);
begin
CreatePas;
CPlusObject := BStatusBar_Create(Self,frame.CPlusObject,name,alabel,trailing_label);
end;
constructor TStatusBar.Create(data : TMessage);
begin
CreatePas;
CPlusObject := BStatusBar_Create(Self, data.CPlusObject);
end;
destructor TStatusBar.Destroy;
begin
BStatusBar_Free(CPlusObject);
inherited;
end;
function TStatusBar.Instantiate(data : TMessage) : TArchivable;
begin
Result := BStatusBar_Instantiate(CPlusObject, data.CPlusObject);
end;
function TStatusBar.Archive(data : TMessage; deep : boolean) : TStatus_t;
begin
Result := BStatusBar_Archive(CPlusObject, data.CPlusObject, deep);
end;
procedure TStatusBar.AttachedToWindow;
begin
//BStatusBar_AttachedToWindow(CPlusObject);
end;
procedure TStatusBar.MessageReceived(msg : TMessage);
begin
//BStatusBar_MessageReceived(CPlusObject, msg.CPlusObject);
end;
procedure TStatusBar.Draw(updateRect : TRect);
begin
// BStatusBar_Draw(CPlusObject, updateRect.CPlusObject);
end;
procedure TStatusBar.SetBarColor(color : trgb_color);
begin
BStatusBar_SetBarColor(CPlusObject, color);
end;
procedure TStatusBar.SetBarHeight(height : double);
begin
BStatusBar_SetBarHeight(CPlusObject, height);
end;
procedure TStatusBar.SetText(str : PChar);
begin
BStatusBar_SetText(CPlusObject, str);
end;
procedure TStatusBar.SetTrailingText(str : PChar);
begin
BStatusBar_SetTrailingText(CPlusObject, str);
end;
procedure TStatusBar.SetMaxValue(max : double);
begin
BStatusBar_SetMaxValue(CPlusObject, max);
end;
procedure TStatusBar.Update(delta : single; main_text : PChar; trailing_text : PChar);
begin
BStatusBar_Update(CPlusObject, delta, main_text, trailing_text);
end;
procedure TStatusBar.Reset(alabel : PChar; trailing_label : PChar);
begin
BStatusBar_Reset(CPlusObject, alabel, trailing_label);
end;
function TStatusBar.CurrentValue : double;
begin
Result := BStatusBar_CurrentValue(CPlusObject);
end;
function TStatusBar.MaxValue : double;
begin
Result := BStatusBar_MaxValue(CPlusObject);
end;
function TStatusBar.BarColor : trgb_color;
begin
Result := BStatusBar_BarColor(CPlusObject);
end;
function TStatusBar.BarHeight : double;
begin
Result := BStatusBar_BarHeight(CPlusObject);
end;
function TStatusBar.Text : PChar;
begin
Result := BStatusBar_Text(CPlusObject);
end;
function TStatusBar.TrailingText : PChar;
begin
Result := BStatusBar_TrailingText(CPlusObject);
end;
function TStatusBar.GetLabel : PChar;
begin
Result := BStatusBar_Label(CPlusObject);
end;
function TStatusBar.TrailingLabel : PChar;
begin
Result := BStatusBar_TrailingLabel(CPlusObject);
end;
procedure TStatusBar.MouseDown(pt : TPoint);
begin
// BStatusBar_MouseDown(CPlusObject, pt.CPlusObject);
end;
procedure TStatusBar.MouseUp(pt : TPoint);
begin
// BStatusBar_MouseUp(CPlusObject, pt.CPlusObject);
end;
procedure TStatusBar.WindowActivated(state : boolean);
begin
// BStatusBar_WindowActivated(CPlusObject, state);
end;
procedure TStatusBar.MouseMoved(pt : TPoint; code : Cardinal; msg : TMessage);
begin
// BStatusBar_MouseMoved(CPlusObject, pt.CPlusObject, code, msg);
end;
procedure TStatusBar.DetachedFromWindow;
begin
// BStatusBar_DetachedFromWindow(CPlusObject);
end;
procedure TStatusBar.FrameMoved(new_position : TPoint);
begin
// BStatusBar_FrameMoved(CPlusObject, new_position.CPlusObject);
end;
procedure TStatusBar.FrameResized(new_width : double; new_height : double);
begin
// BStatusBar_FrameResized(CPlusObject, new_width, new_height);
end;
function TStatusBar.ResolveSpecifier(msg : TMessage; index : integer; specifier : TMessage; form : integer; properti : PChar) : THandler;
begin
// Result := BStatusBar_ResolveSpecifier(CPlusObject, msg.CPlusObject, index, specifier.CPlusObject, form, properti);
end;
procedure TStatusBar.ResizeToPreferred;
begin
BStatusBar_ResizeToPreferred(CPlusObject);
end;
procedure TStatusBar.GetPreferredSize(width : double; height : double);
begin
BStatusBar_GetPreferredSize(CPlusObject, width, height);
end;
procedure TStatusBar.MakeFocus(state : boolean);
begin
BStatusBar_MakeFocus(CPlusObject, state);
end;
procedure TStatusBar.AllAttached;
begin
BStatusBar_AllAttached(CPlusObject);
end;
procedure TStatusBar.AllDetached;
begin
BStatusBar_AllDetached(CPlusObject);
end;
end.

View File

@@ -1,262 +0,0 @@
{ BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
Eric Jourde
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
}
unit stringview;
interface
uses
beobj, interfacedefs,view,Message, Archivable, SupportDefs, Rect, Handler;
type
TStringView = class(TView)
private
public
constructor Create(bounds : TRect; name : pchar; texte : pchar; resizeflags, flags : cardinal); virtual;
destructor Destroy; override;
function Instantiate(data : TMessage) : TArchivable;
function Archive(data : TMessage; deep : boolean) : TStatus_t;
procedure SetText(texte : PChar);
function Text : PChar;
procedure SetAlignment(flag : TAlignment);
function Alignment : TAlignment;
procedure AttachedToWindow; override;
procedure Draw(bounds : TRect); override;
procedure MessageReceived(msg : TMessage);override;
procedure MouseDown(pt : TPoint);override;
procedure MouseUp(pt : TPoint);override;
procedure MouseMoved(pt : TPoint; code : Cardinal; msg : TMessage);override;
procedure DetachedFromWindow;override;
procedure FrameMoved(new_position : TPoint);override;
procedure FrameResized(new_width : double; new_height : double);override;
function ResolveSpecifier(msg : TMessage; index : integer; specifier : TMessage; form : integer; properti : PChar) : THandler;
procedure ResizeToPreferred;override;
procedure GetPreferredSize(width : double; height : double);
procedure MakeFocus(state : boolean);
procedure AllAttached;override;
procedure AllDetached;override;
function GetSupportedSuites(data : TMessage) : TStatus_t;
function Perform(d : TPerform_code; arg : Pointer) : TStatus_t;
// procedure _ReservedStringView1;
// procedure _ReservedStringView2;
// procedure _ReservedStringView3;
// function operator=( : TStringView) : TStringView;
// procedure char *fText;
// procedure alignment fAlign;
// procedure uint32 _reserved[3];
end;
function BStringView_Create(AObject : TBeObject;bounds : TCPlusObject; name : pchar; texte : pchar; resizeflags, flags : cardinal): TCPlusObject; cdecl; external BePascalLibName name 'BStringView_Create';
procedure BStringView_Free(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BStringView_Free';
function BStringView_Instantiate(AObject : TCPlusObject; data : TCPlusObject) : TArchivable; cdecl; external BePascalLibName name 'BStringView_Instantiate';
function BStringView_Archive(AObject : TCPlusObject; data : TCPlusObject; deep : boolean) : TStatus_t; cdecl; external BePascalLibName name 'BStringView_Archive';
procedure BStringView_SetText(AObject : TCPlusObject; text : PChar); cdecl; external BePascalLibName name 'BStringView_SetText';
function BStringView_Text(AObject : TCPlusObject) : PChar; cdecl; external BePascalLibName name 'BStringView_Text';
procedure BStringView_SetAlignment(AObject : TCPlusObject; flag : TAlignment); cdecl; external BePascalLibName name 'BStringView_SetAlignment';
function BStringView_Alignment(AObject : TCPlusObject) : TAlignment; cdecl; external BePascalLibName name 'BStringView_Alignment';
procedure BStringView_AttachedToWindow(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BStringView_AttachedToWindow';
procedure BStringView_Draw(AObject : TCPlusObject; bounds : TCPlusObject); cdecl; external BePascalLibName name 'BStringView_Draw';
procedure BStringView_MessageReceived(AObject : TCPlusObject; msg : TCPlusObject); cdecl; external BePascalLibName name 'BStringView_MessageReceived';
procedure BStringView_MouseDown(AObject : TCPlusObject; pt : TCPlusObject); cdecl; external BePascalLibName name 'BStringView_MouseDown';
procedure BStringView_MouseUp(AObject : TCPlusObject; pt : TCPlusObject); cdecl; external BePascalLibName name 'BStringView_MouseUp';
procedure BStringView_MouseMoved(AObject : TCPlusObject; pt : TCPlusObject; code : Cardinal; msg : TCPlusObject); cdecl; external BePascalLibName name 'BStringView_MouseMoved';
procedure BStringView_DetachedFromWindow(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BStringView_DetachedFromWindow';
procedure BStringView_FrameMoved(AObject : TCPlusObject; new_position : TCPlusObject); cdecl; external BePascalLibName name 'BStringView_FrameMoved';
procedure BStringView_FrameResized(AObject : TCPlusObject; new_width : double; new_height : double); cdecl; external BePascalLibName name 'BStringView_FrameResized';
function BStringView_ResolveSpecifier(AObject : TCPlusObject; msg : TCPlusObject; index : integer; specifier : TCPlusObject; form : integer; properti : PChar) : THandler; cdecl; external BePascalLibName name 'BStringView_ResolveSpecifier';
procedure BStringView_ResizeToPreferred(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BStringView_ResizeToPreferred';
procedure BStringView_GetPreferredSize(AObject : TCPlusObject; width : double; height : double); cdecl; external BePascalLibName name 'BStringView_GetPreferredSize';
procedure BStringView_MakeFocus(AObject : TCPlusObject; state : boolean); cdecl; external BePascalLibName name 'BStringView_MakeFocus';
procedure BStringView_AllAttached(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BStringView_AllAttached';
procedure BStringView_AllDetached(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BStringView_AllDetached';
function BStringView_GetSupportedSuites(AObject : TCPlusObject; data : TCPlusObject) : TStatus_t; cdecl; external BePascalLibName name 'BStringView_GetSupportedSuites';
function BStringView_Perform(AObject : TCPlusObject; d : TPerform_code; arg : Pointer) : TStatus_t; cdecl; external BePascalLibName name 'BStringView_Perform';
//procedure BStringView__ReservedStringView1(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BStringView__ReservedStringView1';
//procedure BStringView__ReservedStringView2(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BStringView__ReservedStringView2';
//procedure BStringView__ReservedStringView3(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BStringView__ReservedStringView3';
//function BStringView_operator=(AObject : TCPlusObject; : TStringView) : TStringView; cdecl; external BePascalLibName name 'BStringView_operator=';
//procedure BStringView_char *fText(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BStringView_char *fText';
//procedure BStringView_alignment fAlign(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BStringView_alignment fAlign';
//procedure BStringView_uint32 _reserved[3](AObject : TCPlusObject); cdecl; external BePascalLibName name 'BStringView_uint32 _reserved[3]';
implementation
constructor TStringView.Create(bounds : TRect; name : pchar; texte : pchar; resizeflags, flags : cardinal);
begin
CreatePas;
CPlusObject := BStringView_Create(Self,bounds.CPlusObject,name,texte,resizeflags, flags);
end;
destructor TStringView.Destroy;
begin
BStringView_Free(CPlusObject);
inherited;
end;
function TStringView.Instantiate(data : TMessage) : TArchivable;
begin
Result := BStringView_Instantiate(CPlusObject, data.CPlusObject);
end;
function TStringView.Archive(data : TMessage; deep : boolean) : TStatus_t;
begin
Result := BStringView_Archive(CPlusObject, data.CPlusObject, deep);
end;
procedure TStringView.SetText(texte : PChar);
begin
BStringView_SetText(CPlusObject, texte);
end;
function TStringView.Text : PChar;
begin
Result := BStringView_Text(CPlusObject);
end;
procedure TStringView.SetAlignment(flag : TAlignment);
begin
BStringView_SetAlignment(CPlusObject, flag);
end;
function TStringView.Alignment : TAlignment;
begin
Result := BStringView_Alignment(CPlusObject);
end;
procedure TStringView.AttachedToWindow;
begin
// BStringView_AttachedToWindow(CPlusObject);
end;
procedure TStringView.Draw(bounds : TRect);
begin
// BStringView_Draw(CPlusObject, bounds.CPlusObject);
end;
procedure TStringView.MessageReceived(msg : TMessage);
begin
//BStringView_MessageReceived(CPlusObject, msg.CPlusObject);
end;
procedure TStringView.MouseDown(pt : TPoint);
begin
//BStringView_MouseDown(CPlusObject, pt.CPlusObject);
end;
procedure TStringView.MouseUp(pt : TPoint);
begin
//BStringView_MouseUp(CPlusObject, pt.CPlusObject);
end;
procedure TStringView.MouseMoved(pt : TPoint; code : Cardinal; msg : TMessage);
begin
//BStringView_MouseMoved(CPlusObject, pt.CPlusObject, code, msg);
end;
procedure TStringView.DetachedFromWindow;
begin
//BStringView_DetachedFromWindow(CPlusObject);
end;
procedure TStringView.FrameMoved(new_position : TPoint);
begin
//BStringView_FrameMoved(CPlusObject, new_position.CPlusObject);
end;
procedure TStringView.FrameResized(new_width : double; new_height : double);
begin
//BStringView_FrameResized(CPlusObject, new_width, new_height);
end;
function TStringView.ResolveSpecifier(msg : TMessage; index : integer; specifier : TMessage; form : integer; properti : PChar) : THandler;
begin
// Result := BStringView_ResolveSpecifier(CPlusObject, msg.CPlusObject, index, specifier.CPlusObject, form, properti);
end;
procedure TStringView.ResizeToPreferred;
begin
//BStringView_ResizeToPreferred(CPlusObject);
end;
procedure TStringView.GetPreferredSize(width : double; height : double);
begin
BStringView_GetPreferredSize(CPlusObject, width, height);
end;
procedure TStringView.MakeFocus(state : boolean);
begin
BStringView_MakeFocus(CPlusObject, state);
end;
procedure TStringView.AllAttached;
begin
//BStringView_AllAttached(CPlusObject);
end;
procedure TStringView.AllDetached;
begin
//BStringView_AllDetached(CPlusObject);
end;
function TStringView.GetSupportedSuites(data : TMessage) : TStatus_t;
begin
Result := BStringView_GetSupportedSuites(CPlusObject, data.CPlusObject);
end;
function TStringView.Perform(d : TPerform_code; arg : Pointer) : TStatus_t;
begin
//Result := BStringView_Perform(CPlusObject, d, arg);
end;
{procedure TStringView._ReservedStringView1;
begin
BStringView__ReservedStringView1(CPlusObject);
end;
procedure TStringView._ReservedStringView2;
begin
BStringView__ReservedStringView2(CPlusObject);
end;
procedure TStringView._ReservedStringView3;
begin
BStringView__ReservedStringView3(CPlusObject);
end;
function TStringView.operator=( : TStringView) : TStringView;
begin
Result := BStringView_operator=(CPlusObject, );
end;
procedure TStringView.char *fText;
begin
BStringView_char *fText(CPlusObject);
end;
procedure TStringView.alignment fAlign;
begin
BStringView_alignment fAlign(CPlusObject);
end;
procedure TStringView.uint32 _reserved[3];
begin
BStringView_uint32 _reserved[3](CPlusObject);
end;
}
end.

View File

@@ -1,603 +0,0 @@
{ BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
Eric Jourde
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
}
unit tabview;
interface
uses
beobj, interfacedefs,view,Message, Archivable, SupportDefs, Rect, Handler,font;
const
B_TAB_FIRST = 999;
B_TAB_FRONT=1;
B_TAB_ANY=2;
type
TTab = class(TBeObject)
private
public
constructor Create(View : TView);virtual;
constructor Create_1(data : TMessage);virtual;
destructor Destroy;override;
function Instantiate(data : TMessage) : TArchivable;
function Archive(data : TMessage; deep : boolean) : TStatus_t;
function Perform(d : Cardinal; arg : Pointer) : TStatus_t;
function GetLabel : PChar;
procedure SetLabel(alabel : PChar);
function IsSelected : boolean;
procedure Select(owner : TView);
procedure Deselect;
procedure SetEnabled(aon : boolean);
function IsEnabled : boolean;
procedure MakeFocus(infocus : boolean);
function IsFocus : boolean;
procedure SetView(contents : TView);
function GetView : TView;
procedure DrawFocusMark(owner : TView; tabFrame : TRect);
procedure DrawLabel(owner : TView; tabFrame : TRect);
procedure DrawTab(owner : TView; tabFrame : TRect; position : byte; full : boolean);
end;
type
TTabView = class(TView)
private
public
destructor Destroy;override;
constructor Create(frame : TRect; name : Pchar; width : Tbutton_width; resizingMode : cardinal; flags : cardinal);virtual;
constructor Create(msg : TMessage);virtual;
function Instantiate( msg: TMessage) : TArchivable;
function Archive( msg : TMessage; deep : boolean) : TStatus_t;
function Perform(d : TPerform_code; arg : Pointer) : TStatus_t;
procedure WindowActivated(state : boolean);override;
procedure AttachedToWindow;override;
procedure AllAttached;override;
procedure AllDetached;override;
procedure DetachedFromWindow;override;
procedure MessageReceived(msg : TMessage);override;
procedure FrameMoved(new_position : TPoint);override;
procedure FrameResized(w : double; h : double);override;
procedure KeyDown(bytes : PChar; n : integer);override;
procedure MouseDown( pt: TPoint);override;
procedure MouseUp( pt: TPoint);override;
procedure MouseMoved(pt : TPoint; code : Cardinal; msg : TMessage);override;
procedure Pulse;override;
procedure Select(tabIndex : integer);
function Selection : integer;
procedure MakeFocus(focusState : boolean);
procedure SetFocusTab(tabIndex : integer; focusState : boolean);
function FocusTab : integer;
procedure Draw( rect: TRect);override;
function DrawTabs : TRect;
procedure DrawBox(selectedTabFrame : TRect);
function TabFrame(tabIndex : integer) : TRect;
procedure SetFlags(flags : Cardinal);
procedure SetResizingMode(mode : Cardinal);
procedure GetPreferredSize(width : double; height : double);
procedure ResizeToPreferred;override;
function ResolveSpecifier(msg : TMessage; index : integer; specifier : TMessage; form : integer; properti : PChar) : THandler;
function GetSupportedSuites(data : TMessage) : TStatus_t;
procedure AddTab(tabContents : TView; tab : TTab);
function RemoveTab(tabIndex : integer) : TTab;
function TabAt(tabIndex : integer) : TTab;
procedure SetTabWidth(s : Tbutton_width);
function TabWidth : Tbutton_width;
procedure SetTabHeight(height : double);
function TabHeight : double;
function ContainerView : TView;
function CountTabs : integer;
function ViewForTab(tabIndex : integer) : TView;
end;
function BTab_Create(AObject : TBeObject;View : TCPlusObject): TCPlusObject; cdecl; external BePascalLibName name 'BTab_Create';
procedure BTab_Free(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTab_Free';
function BTab_Create_1(AObject : TBeObject; data : TCPlusObject): TCPlusObject; cdecl; external BePascalLibName name 'BTab_Create_1';
function BTab_Instantiate(AObject : TCPlusObject; data : TCPlusObject) : TArchivable; cdecl; external BePascalLibName name 'BTab_Instantiate';
function BTab_Archive(AObject : TCPlusObject; data : TCPlusObject; deep : boolean) : TStatus_t; cdecl; external BePascalLibName name 'BTab_Archive';
function BTab_Perform(AObject : TCPlusObject; d : Cardinal; arg : Pointer) : TStatus_t; cdecl; external BePascalLibName name 'BTab_Perform';
function BTab_Label(AObject : TCPlusObject) : PChar; cdecl; external BePascalLibName name 'BTab_Label';
procedure BTab_SetLabel(AObject : TCPlusObject; alabel : PChar); cdecl; external BePascalLibName name 'BTab_SetLabel';
function BTab_IsSelected(AObject : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BTab_IsSelected';
procedure BTab_Select(AObject : TCPlusObject; owner : TCPlusObject); cdecl; external BePascalLibName name 'BTab_Select';
procedure BTab_Deselect(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTab_Deselect';
procedure BTab_SetEnabled(AObject : TCPlusObject; aon : boolean); cdecl; external BePascalLibName name 'BTab_SetEnabled';
function BTab_IsEnabled(AObject : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BTab_IsEnabled';
procedure BTab_MakeFocus(AObject : TCPlusObject; infocus : boolean); cdecl; external BePascalLibName name 'BTab_MakeFocus';
function BTab_IsFocus(AObject : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BTab_IsFocus';
procedure BTab_SetView(AObject : TCPlusObject; contents : TCPlusObject); cdecl; external BePascalLibName name 'BTab_SetView';
function BTab_View(AObject : TCPlusObject) : TView; cdecl; external BePascalLibName name 'BTab_View';
procedure BTab_DrawFocusMark(AObject : TCPlusObject; owner : TCPlusObject; tabFrame : TCPlusObject); cdecl; external BePascalLibName name 'BTab_DrawFocusMark';
procedure BTab_DrawLabel(AObject : TCPlusObject; owner : TCPlusObject; tabFrame : TCPlusObject); cdecl; external BePascalLibName name 'BTab_DrawLabel';
procedure BTab_DrawTab(AObject : TCPlusObject; owner : TCPlusObject; tabFrame : TCPlusObject; position : byte; full : boolean); cdecl; external BePascalLibName name 'BTab_DrawTab';
procedure BTabView_Free(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTabView_Free';
function BTabView_Create(AObject : TBeObject;frame : TCPlusObject; name : Pchar; width : Integer; resizingMode : cardinal; flags : cardinal): TCPlusObject; cdecl; external BePascalLibName name 'BTabView_Create';
function BTabView_Create_1(AObject : TBeObject; msg : TCPlusObject): TCPlusObject; cdecl; external BePascalLibName name 'BTabView_Create_1';
function BTabView_Instantiate(AObject : TCPlusObject; msg : TCPlusObject) : TArchivable; cdecl; external BePascalLibName name 'BTabView_Instantiate';
function BTabView_Archive(AObject : TCPlusObject; msg : TCPlusObject; deep : boolean) : TStatus_t; cdecl; external BePascalLibName name 'BTabView_Archive';
function BTabView_Perform(AObject : TCPlusObject; d : TPerform_code; arg : Pointer) : TStatus_t; cdecl; external BePascalLibName name 'BTabView_Perform';
procedure BTabView_WindowActivated(AObject : TCPlusObject; state : boolean); cdecl; external BePascalLibName name 'BTabView_WindowActivated';
procedure BTabView_AttachedToWindow(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTabView_AttachedToWindow';
procedure BTabView_AllAttached(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTabView_AllAttached';
procedure BTabView_AllDetached(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTabView_AllDetached';
procedure BTabView_DetachedFromWindow(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTabView_DetachedFromWindow';
procedure BTabView_MessageReceived(AObject : TCPlusObject; msg : TCPlusObject); cdecl; external BePascalLibName name 'BTabView_MessageReceived';
procedure BTabView_FrameMoved(AObject : TCPlusObject; new_position : TCPlusObject); cdecl; external BePascalLibName name 'BTabView_FrameMoved';
procedure BTabView_FrameResized(AObject : TCPlusObject; w : double; h : double); cdecl; external BePascalLibName name 'BTabView_FrameResized';
procedure BTabView_KeyDown(AObject : TCPlusObject; bytes : PChar; n : integer); cdecl; external BePascalLibName name 'BTabView_KeyDown';
procedure BTabView_MouseDown(AObject : TCPlusObject; pt: TCPlusObject); cdecl; external BePascalLibName name 'BTabView_MouseDown';
procedure BTabView_MouseUp(AObject : TCPlusObject; pt: TCPlusObject); cdecl; external BePascalLibName name 'BTabView_MouseUp';
procedure BTabView_MouseMoved(AObject : TCPlusObject; pt : TCPlusObject; code : Cardinal; msg : TCPlusObject); cdecl; external BePascalLibName name 'BTabView_MouseMoved';
procedure BTabView_Pulse(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTabView_Pulse';
procedure BTabView_Select(AObject : TCPlusObject; tabIndex : integer); cdecl; external BePascalLibName name 'BTabView_Select';
//function BTabView_Selection(AObject : TCPlusObject) : integer; cdecl; external BePascalLibName name 'BTabView_Selection';
procedure BTabView_MakeFocus(AObject : TCPlusObject; focusState : boolean); cdecl; external BePascalLibName name 'BTabView_MakeFocus';
procedure BTabView_SetFocusTab(AObject : TCPlusObject; tabIndex : integer; focusState : boolean); cdecl; external BePascalLibName name 'BTabView_SetFocusTab';
function BTabView_FocusTab(AObject : TCPlusObject) : integer; cdecl; external BePascalLibName name 'BTabView_FocusTab';
procedure BTabView_Draw(AObject : TCPlusObject; rect : TCPlusObject); cdecl; external BePascalLibName name 'BTabView_Draw';
//function BTabView_DrawTabs(AObject : TCPlusObject) : TRect; cdecl; external BePascalLibName name 'BTabView_DrawTabs';
procedure BTabView_DrawBox(AObject : TCPlusObject; selectedTabFrame : TCPlusObject); cdecl; external BePascalLibName name 'BTabView_DrawBox';
function BTabView_TabFrame(AObject : TCPlusObject; tabIndex : integer) : TRect; cdecl; external BePascalLibName name 'BTabView_TabFrame';
procedure BTabView_SetFlags(AObject : TCPlusObject; flags : Cardinal); cdecl; external BePascalLibName name 'BTabView_SetFlags';
procedure BTabView_SetResizingMode(AObject : TCPlusObject; mode : Cardinal); cdecl; external BePascalLibName name 'BTabView_SetResizingMode';
procedure BTabView_GetPreferredSize(AObject : TCPlusObject; width : double; height : double); cdecl; external BePascalLibName name 'BTabView_GetPreferredSize';
procedure BTabView_ResizeToPreferred(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTabView_ResizeToPreferred';
function BTabView_ResolveSpecifier(AObject : TCPlusObject; msg : TCPlusObject; index : integer; specifier : TCPlusObject; form : integer; properto : PChar) : THandler; cdecl; external BePascalLibName name 'BTabView_ResolveSpecifier';
function BTabView_GetSupportedSuites(AObject : TCPlusObject; data : TCPlusObject) : TStatus_t; cdecl; external BePascalLibName name 'BTabView_GetSupportedSuites';
procedure BTabView_AddTab(AObject : TCPlusObject; tabContents : TCPlusObject; tab : TCPlusObject); cdecl; external BePascalLibName name 'BTabView_AddTab';
function BTabView_RemoveTab(AObject : TCPlusObject; tabIndex : integer) : TTab; cdecl; external BePascalLibName name 'BTabView_RemoveTab';
function BTabView_TabAt(AObject : TCPlusObject; tabIndex : integer) : TTab; cdecl; external BePascalLibName name 'BTabView_TabAt';
procedure BTabView_SetTabWidth(AObject : TCPlusObject; s : Tbutton_width); cdecl; external BePascalLibName name 'BTabView_SetTabWidth';
function BTabView_TabWidth(AObject : TCPlusObject) : Tbutton_width; cdecl; external BePascalLibName name 'BTabView_TabWidth';
procedure BTabView_SetTabHeight(AObject : TCPlusObject; height : double); cdecl; external BePascalLibName name 'BTabView_SetTabHeight';
function BTabView_TabHeight(AObject : TCPlusObject) : double; cdecl; external BePascalLibName name 'BTabView_TabHeight';
function BTabView_ContainerView(AObject : TCPlusObject) : TView; cdecl; external BePascalLibName name 'BTabView_ContainerView';
function BTabView_CountTabs(AObject : TCPlusObject) : integer; cdecl; external BePascalLibName name 'BTabView_CountTabs';
function BTabView_ViewForTab(AObject : TCPlusObject; tabIndex : integer) : TView; cdecl; external BePascalLibName name 'BTabView_ViewForTab';
implementation
var
TabView_AddTab_hook : Pointer; cvar; external;
TabView_Draw_hook : Pointer; cvar; external;
TabView_DrawBox_hook : Pointer; cvar; external;
TabView_DrawTabs_hook : Pointer; cvar; external;
TabView_MakeFocus_hook : Pointer; cvar; external;
TabView_RemoveTab_hook : Pointer; cvar; external;
TabView_Select_hook: Pointer; cvar; external;
TabView_SetFocusTab_hook : Pointer; cvar; external;
TabView_SetTabHeight_hook : Pointer; cvar; external;
TabView_SetTabWidth_hook : Pointer; cvar; external;
TabView_TabAt_hook : Pointer; cvar; external;
TabView_TabFrame_hook : Pointer; cvar; external;
constructor TTab.Create(View : TView);
begin
CreatePas;
CPlusObject := BTab_Create(Self,View.CPlusObject);
end;
destructor TTab.Destroy;
begin
BTab_Free(CPlusObject);
inherited;
end;
constructor TTab.Create_1(data : TMessage);
begin
CreatePas;
CPlusObject := BTab_Create_1(Self, data.CPlusObject);
end;
function TTab.Instantiate(data : TMessage) : TArchivable;
begin
Result := BTab_Instantiate(CPlusObject, data.CPlusObject);
end;
function TTab.Archive(data : TMessage; deep : boolean) : TStatus_t;
begin
Result := BTab_Archive(CPlusObject, data.CPlusObject, deep);
end;
function TTab.Perform(d : Cardinal; arg : Pointer) : TStatus_t;
begin
Result := BTab_Perform(CPlusObject, d, arg);
end;
function TTab.GetLabel : PChar;
begin
Result := BTab_Label(CPlusObject);
end;
procedure TTab.SetLabel(alabel : PChar);
begin
BTab_SetLabel(CPlusObject, alabel);
end;
function TTab.IsSelected : boolean;
begin
Result := BTab_IsSelected(CPlusObject);
end;
procedure TTab.Select(owner : TView);
begin
BTab_Select(CPlusObject, owner.CPlusObject);
end;
procedure TTab.Deselect;
begin
BTab_Deselect(CPlusObject);
end;
procedure TTab.SetEnabled(aon : boolean);
begin
BTab_SetEnabled(CPlusObject, aon);
end;
function TTab.IsEnabled : boolean;
begin
Result := BTab_IsEnabled(CPlusObject);
end;
procedure TTab.MakeFocus(infocus : boolean);
begin
BTab_MakeFocus(CPlusObject, infocus);
end;
function TTab.IsFocus : boolean;
begin
Result := BTab_IsFocus(CPlusObject);
end;
procedure TTab.SetView(contents : TView);
begin
BTab_SetView(CPlusObject, contents.CPlusObject);
end;
function TTab.GetView : TView;
begin
Result := BTab_View(CPlusObject);
end;
procedure TTab.DrawFocusMark(owner : TView; tabFrame : TRect);
begin
BTab_DrawFocusMark(CPlusObject, owner.CPlusObject, tabFrame.CPlusObject);
end;
procedure TTab.DrawLabel(owner : TView; tabFrame : TRect);
begin
BTab_DrawLabel(CPlusObject, owner.CPlusObject, tabFrame.CPlusObject);
end;
procedure TTab.DrawTab(owner : TView; tabFrame : TRect; position: byte; full : boolean);
begin
BTab_DrawTab(CPlusObject, owner.CPlusObject, tabFrame.CPlusObject, position, full);
end;
//--------------------TTabView
destructor TTabView.Destroy;
begin
BTabView_Free(CPlusObject);
inherited;
end;
constructor TTabView.Create( frame : TRect; name : Pchar; width : Tbutton_width; resizingMode : cardinal; flags : cardinal);
begin
createPas;
CPlusObject := BTabView_Create(Self, frame.CPlusObject, name, Integer(width),resizingMode,flags);
end;
constructor TTabView.Create( msg: TMessage);
begin
createPas;
CPlusObject := BTabView_Create_1(Self, msg.CPlusObject);
end;
function TTabView.Instantiate( msg : TMessage) : TArchivable;
begin
Result := BTabView_Instantiate(CPlusObject, msg.CPlusObject);
end;
function TTabView.Archive( msg : TMessage; deep : boolean) : TStatus_t;
begin
Result := BTabView_Archive(CPlusObject, msg.CPlusObject, deep);
end;
function TTabView.Perform(d : TPerform_code; arg : Pointer) : TStatus_t;
begin
// Result := BTabView_Perform(CPlusObject, d, arg);
end;
procedure TTabView.WindowActivated(state : boolean);
begin
//BTabView_WindowActivated(CPlusObject, state);
end;
procedure TTabView.AttachedToWindow;
begin
//BTabView_AttachedToWindow(CPlusObject);
end;
procedure TTabView.AllAttached;
begin
//BTabView_AllAttached(CPlusObject);
end;
procedure TTabView.AllDetached;
begin
//BTabView_AllDetached(CPlusObject);
end;
procedure TTabView.DetachedFromWindow;
begin
// BTabView_DetachedFromWindow(CPlusObject);
end;
procedure TTabView.MessageReceived(msg : TMessage);
begin
// BTabView_MessageReceived(CPlusObject, msg.CPlusObject);
end;
procedure TTabView.FrameMoved(new_position : TPoint);
begin
//BTabView_FrameMoved(CPlusObject, new_position.CPlusObject);
end;
procedure TTabView.FrameResized(w : double; h : double);
begin
// BTabView_FrameResized(CPlusObject, w, h);
end;
procedure TTabView.KeyDown(bytes : PChar; n : integer);
begin
// BTabView_KeyDown(CPlusObject, bytes, n);
end;
procedure TTabView.MouseDown( pt: TPoint);
begin
//BTabView_MouseDown(CPlusObject, pt.CPlusObject);
end;
procedure TTabView.MouseUp( pt: TPoint);
begin
//BTabView_MouseUp(CPlusObject, pt.CPlusObject);
end;
procedure TTabView.MouseMoved(pt : TPoint; code : Cardinal; msg : TMessage);
begin
//BTabView_MouseMoved(CPlusObject, pt.CPlusObject, code, msg);
end;
procedure TTabView.Pulse;
begin
// BTabView_Pulse(CPlusObject);
end;
procedure TTabView.Select(tabIndex : integer);
begin
BTabView_Select(CPlusObject, tabIndex);
end;
function TTabView.Selection : integer;
begin
// Result := BTabView_Selection(CPlusObject);
end;
procedure TTabView.MakeFocus(focusState : boolean);
begin
BTabView_MakeFocus(CPlusObject, focusState);
end;
procedure TTabView.SetFocusTab(tabIndex : integer; focusState : boolean);
begin
BTabView_SetFocusTab(CPlusObject, tabIndex, focusState);
end;
function TTabView.FocusTab : integer;
begin
Result := BTabView_FocusTab(CPlusObject);
end;
procedure TTabView.Draw( rect: TRect);
begin
// BTabView_Draw(CPlusObject, rect.CPlusObject);
end;
function TTabView.DrawTabs : TRect;
begin
// Result := BTabView_DrawTabs(CPlusObject);
end;
procedure TTabView.DrawBox(selectedTabFrame : TRect);
begin
//BTabView_DrawBox(CPlusObject, selectedTabFrame.CPlusObject);
end;
function TTabView.TabFrame(tabIndex : integer) : TRect;
begin
Result := BTabView_TabFrame(CPlusObject, tabIndex);
end;
procedure TTabView.SetFlags(flags : Cardinal);
begin
BTabView_SetFlags(CPlusObject, flags);
end;
procedure TTabView.SetResizingMode(mode : Cardinal);
begin
BTabView_SetResizingMode(CPlusObject, mode);
end;
procedure TTabView.GetPreferredSize(width : double; height : double);
begin
// BTabView_GetPreferredSize(CPlusObject, width, height);
end;
procedure TTabView.ResizeToPreferred;
begin
// BTabView_ResizeToPreferred(CPlusObject);
end;
function TTabView.ResolveSpecifier(msg : TMessage; index : integer; specifier : TMessage; form : integer; properti : PChar) : THandler;
begin
//Result := BTabView_ResolveSpecifier(CPlusObject, msg.CPlusObject, index, specifier.CPlusObject, form, properti);
end;
function TTabView.GetSupportedSuites(data : TMessage) : TStatus_t;
begin
//Result := BTabView_GetSupportedSuites(CPlusObject, data.CPlusObject);
end;
procedure TTabView.AddTab(tabContents : TView; tab : TTab);
begin
BTabView_AddTab(CPlusObject, tabContents.CPlusObject, tab.CPlusObject);
end;
function TTabView.RemoveTab(tabIndex : integer) : TTab;
begin
Result := BTabView_RemoveTab(CPlusObject, tabIndex);
end;
function TTabView.TabAt(tabIndex : integer) : TTab;
begin
Result := BTabView_TabAt(CPlusObject, tabIndex);
end;
procedure TTabView.SetTabWidth(s : Tbutton_width);
begin
BTabView_SetTabWidth(CPlusObject, s);
end;
function TTabView.TabWidth : Tbutton_width;
begin
Result := BTabView_TabWidth(CPlusObject);
end;
procedure TTabView.SetTabHeight(height : double);
begin
BTabView_SetTabHeight(CPlusObject, height);
end;
function TTabView.TabHeight : double;
begin
Result := BTabView_TabHeight(CPlusObject);
end;
function TTabView.ContainerView : TView;
begin
Result := BTabView_ContainerView(CPlusObject);
end;
function TTabView.CountTabs : integer;
begin
Result := BTabView_CountTabs(CPlusObject);
end;
function TTabView.ViewForTab(tabIndex : integer) : TView;
begin
Result := BTabView_ViewForTab(CPlusObject, tabIndex);
end;
// Hook
procedure BTabView_AddTab_hook_func(tabw : TTabView; target : TCPlusObject; tab : TCPlusObject); cdecl;
Var targetv : TView;
tabtab : TTab;
begin
targetv:=TView.Wrap(target);
tabtab:=TTab.Wrap(tab);
if Tabw <> nil Then Tabw.AddTab(targetv,tabtab);
targetv.UnWrap;
tabtab.UNWrap;
end;
procedure BTabView_Draw_hook_func(tabw : TTabView; updaterect : TCPlusObject);cdecl;
var rect : TRect;
begin
rect:=TRect.Wrap(updaterect);
if tabw <> nil then tabw.draw(rect);
rect.UnWrap;
end;
procedure BTabView_DrawBox_hook_func(tabw : TTabView; updaterect : TCPlusObject);cdecl;
var rect : TRect;
begin
rect:=TRect.Wrap(updaterect);
if tabw <> nil then tabw.drawBox(rect);
rect.UnWrap;
end;
procedure BTabView_DrawTabs_hook_func(tabw : TTabView);cdecl;
begin
if tabw <> nil then tabw.drawTabs;
end;
procedure BTabView_MakeFocus_hook_func;cdecl;
begin
end;
procedure BTabView_RemoveTab_hook_func;cdecl;
begin
end;
procedure BTabView_Select_hook_func;cdecl;
begin
end;
procedure BTabView_SetFocusTab_hook_func;cdecl;
begin
end;
procedure BTabView_SetTabHeight_hook_func;cdecl;
begin
end;
procedure BTabView_SetTabWidth_hook_func;cdecl;
begin
end;
procedure BTabView_TabAt_hook_func;cdecl;
begin
end;
procedure BTabView_TabFrame_hook_func;cdecl;
begin
end;
initialization
TabView_AddTab_hook := @BTabView_AddTab_hook_func;
TabView_Draw_hook :=@BTabView_Draw_hook_func;
TabView_DrawBox_hook :=@BTabView_DrawBox_hook_func;
TabView_DrawTabs_hook :=@BTabView_DrawTabs_hook_func;
TabView_MakeFocus_hook :=@BTabView_MakeFocus_hook_func;
TabView_RemoveTab_hook :=@BTabView_RemoveTab_hook_func;
TabView_Select_hook:=@BTabView_Select_hook_func;
TabView_SetFocusTab_hook :=@BTabView_SetFocusTab_hook_func;
TabView_SetTabHeight_hook :=@BTabView_SetTabHeight_hook_func;
TabView_SetTabWidth_hook :=@BTabView_SetTabWidth_hook_func;
TabView_TabAt_hook :=@BTabView_TabAt_hook_func;
TabView_TabFrame_hook :=@BTabView_TabFrame_hook_func;
end.

View File

@@ -1,434 +0,0 @@
{ BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
Eric Jourde
Oscar Lesta
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
}
unit TextControl;
interface
uses
beobj, Control, Message, Archivable, SupportDefs, Rect, Handler,interfacedefs;
type
TTextControl = class(TControl)
private
public
destructor Destroy;override;
constructor Create(frame : TRect; name, aLabel,initial : PChar; message : TMessage; resizingMode, flags : Cardinal); virtual;
constructor Create(data : TMessage);override;
function Instantiate(data : TMessage) : TArchivable;
function Archive(data : TMessage; deep : boolean) : TStatus_t;
procedure SetText(texte : PChar);
function Text : PChar;
procedure SetValue(valu : integer);
function Invoke(msg : TMessage) : TStatus_t;
function TextView : TTextControl;
procedure SetModificationMessage(message : TMessage);
function ModificationMessage : TMessage;
procedure SetAlignment(alabel : TAlignment; texte : TAlignment);
procedure GetAlignment(alabel : TAlignment; texte : TAlignment);
procedure SetDivider(dividing_line : single);
function Divider : single;
procedure Draw(updateRect : TRect);override;
procedure MouseDown(where : TPoint);override;
procedure AttachedToWindow;override;
procedure MakeFocus(focusState : boolean);override;
procedure SetEnabled(state : boolean);
procedure FrameMoved(new_position : TPoint);override;
procedure FrameResized(new_width : double; new_height : double);override;
procedure WindowActivated(active : boolean);override;
procedure GetPreferredSize(width : double; height : double);
procedure ResizeToPreferred;override;
procedure MessageReceived(msg : TMessage);override;
function ResolveSpecifier(msg : TMessage; index : integer; specifier : TMessage; form : integer; properti : PChar) : THandler;
procedure MouseUp(pt : TPoint);override;
procedure MouseMoved(pt : TPoint; code : Cardinal; msg : TMessage);override;
procedure DetachedFromWindow;override;
procedure AllAttached;override;
procedure AllDetached;override;
function GetSupportedSuites(data : TMessage) : TStatus_t;
procedure SetFlags(flags : Cardinal);
function Perform(d : TPerform_code; arg : Pointer) : TStatus_t;
{ procedure _ReservedTextControl1;
procedure _ReservedTextControl2;
procedure _ReservedTextControl3;
procedure _ReservedTextControl4;
function operator=( : TTextControl) : TTextControl;
procedure CommitValue;
procedure InitData(label : PChar; initial_text : PChar; data : TMessage);
procedure _BTextInput_ *fText;
procedure char *fLabel;
procedure BMessage *fModificationMessage;
procedure alignment fLabelAlign;
procedure float fDivider;
procedure uint16 fPrevWidth;
procedure uint16 fPrevHeight;
procedure uint32 _reserved[3];
procedure uint32 _more_reserved[4];
procedure bool fClean;
procedure bool fSkipSetFlags;
procedure bool fUnusedBool1;
procedure bool fUnusedBool2;
}
end;
procedure BTextControl_Free(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextControl_Free';
function BTextControl_Create(AObject : TBeObject; frame : TCPlusObject; name, aLabel ,initial: PChar; message : TCPlusObject; resizingMode, flags : Cardinal): TCPlusObject; cdecl; external BePascalLibName name 'BTextControl_Create';
function BTextControl_Create(AObject : TBeObject; data : TCPlusObject): TCPlusObject; cdecl; external BePascalLibName name 'BTextControl_Create_1';
function BTextControl_Instantiate(AObject : TCPlusObject; data : TCPlusObject) : TArchivable; cdecl; external BePascalLibName name 'BTextControl_Instantiate';
function BTextControl_Archive(AObject : TCPlusObject; data : TCPlusObject; deep : boolean) : TStatus_t; cdecl; external BePascalLibName name 'BTextControl_Archive';
procedure BTextControl_SetText(AObject : TCPlusObject; text : PChar); cdecl; external BePascalLibName name 'BTextControl_SetText';
function BTextControl_Text(AObject : TCPlusObject) : PChar; cdecl; external BePascalLibName name 'BTextControl_Text';
procedure BTextControl_SetValue(AObject : TCPlusObject; value : integer); cdecl; external BePascalLibName name 'BTextControl_SetValue';
function BTextControl_Invoke(AObject : TCPlusObject; msg : TCPlusObject) : TStatus_t; cdecl; external BePascalLibName name 'BTextControl_Invoke';
function BTextControl_TextView(AObject : TCPlusObject) : TTextControl; cdecl; external BePascalLibName name 'BTextControl_TextView';
procedure BTextControl_SetModificationMessage(AObject : TCPlusObject; message : TCPlusObject); cdecl; external BePascalLibName name 'BTextControl_SetModificationMessage';
function BTextControl_ModificationMessage(AObject : TCPlusObject) : TMessage; cdecl; external BePascalLibName name 'BTextControl_ModificationMessage';
procedure BTextControl_SetAlignment(AObject : TCPlusObject; alabel : TAlignment; texte : TAlignment); cdecl; external BePascalLibName name 'BTextControl_SetAlignment';
procedure BTextControl_GetAlignment(AObject : TCPlusObject; alabel : TAlignment; texte : TAlignment); cdecl; external BePascalLibName name 'BTextControl_GetAlignment';
procedure BTextControl_SetDivider(AObject : TCPlusObject; dividing_line : single); cdecl; external BePascalLibName name 'BTextControl_SetDivider';
function BTextControl_Divider(AObject : TCPlusObject) : single; cdecl; external BePascalLibName name 'BTextControl_Divider';
procedure BTextControl_Draw(AObject : TCPlusObject; updateRect : TCPlusObject); cdecl; external BePascalLibName name 'BTextControl_Draw';
procedure BTextControl_MouseDown(AObject : TCPlusObject; where : TCPlusObject); cdecl; external BePascalLibName name 'BTextControl_MouseDown';
procedure BTextControl_AttachedToWindow(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextControl_AttachedToWindow';
procedure BTextControl_MakeFocus(AObject : TCPlusObject; focusState : boolean); cdecl; external BePascalLibName name 'BTextControl_MakeFocus';
procedure BTextControl_SetEnabled(AObject : TCPlusObject; state : boolean); cdecl; external BePascalLibName name 'BTextControl_SetEnabled';
procedure BTextControl_FrameMoved(AObject : TCPlusObject; new_position : TCPlusObject); cdecl; external BePascalLibName name 'BTextControl_FrameMoved';
procedure BTextControl_FrameResized(AObject : TCPlusObject; new_width : double; new_height : double); cdecl; external BePascalLibName name 'BTextControl_FrameResized';
procedure BTextControl_WindowActivated(AObject : TCPlusObject; active : boolean); cdecl; external BePascalLibName name 'BTextControl_WindowActivated';
procedure BTextControl_GetPreferredSize(AObject : TCPlusObject; width : double; height : double); cdecl; external BePascalLibName name 'BTextControl_GetPreferredSize';
procedure BTextControl_ResizeToPreferred(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextControl_ResizeToPreferred';
procedure BTextControl_MessageReceived(AObject : TCPlusObject; msg : TCPlusObject); cdecl; external BePascalLibName name 'BTextControl_MessageReceived';
function BTextControl_ResolveSpecifier(AObject : TCPlusObject; msg : TCPlusObject; index : integer; specifier : TCPlusObject; form : integer; properti : PChar) : THandler; cdecl; external BePascalLibName name 'BTextControl_ResolveSpecifier';
procedure BTextControl_MouseUp(AObject : TCPlusObject; pt : TCPlusObject); cdecl; external BePascalLibName name 'BTextControl_MouseUp';
procedure BTextControl_MouseMoved(AObject : TCPlusObject; pt : TCPlusObject; code : Cardinal; msg : TCPlusObject); cdecl; external BePascalLibName name 'BTextControl_MouseMoved';
procedure BTextControl_DetachedFromWindow(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextControl_DetachedFromWindow';
procedure BTextControl_AllAttached(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextControl_AllAttached';
procedure BTextControl_AllDetached(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextControl_AllDetached';
function BTextControl_GetSupportedSuites(AObject : TCPlusObject; data : TCPlusObject) : TStatus_t; cdecl; external BePascalLibName name 'BTextControl_GetSupportedSuites';
procedure BTextControl_SetFlags(AObject : TCPlusObject; flags : Cardinal); cdecl; external BePascalLibName name 'BTextControl_SetFlags';
function BTextControl_Perform(AObject : TCPlusObject; d : TPerform_code; arg : Pointer) : TStatus_t; cdecl; external BePascalLibName name 'BTextControl_Perform';
{procedure BTextControl__ReservedTextControl1(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextControl__ReservedTextControl1';
procedure BTextControl__ReservedTextControl2(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextControl__ReservedTextControl2';
procedure BTextControl__ReservedTextControl3(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextControl__ReservedTextControl3';
procedure BTextControl__ReservedTextControl4(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextControl__ReservedTextControl4';
function BTextControl_operator=(AObject : TCPlusObject; : TTextControl) : TTextControl; cdecl; external BePascalLibName name 'BTextControl_operator=';
procedure BTextControl_CommitValue(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextControl_CommitValue';
procedure BTextControl_InitData(AObject : TCPlusObject; label : PChar; initial_text : PChar; data : TMessage); cdecl; external BePascalLibName name 'BTextControl_InitData';
procedure BTextControl__BTextInput_ *fText(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextControl__BTextInput_ *fText';
procedure BTextControl_char *fLabel(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextControl_char *fLabel';
procedure BTextControl_BMessage *fModificationMessage(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextControl_BMessage *fModificationMessage';
procedure BTextControl_alignment fLabelAlign(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextControl_alignment fLabelAlign';
procedure BTextControl_float fDivider(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextControl_float fDivider';
procedure BTextControl_uint16 fPrevWidth(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextControl_uint16 fPrevWidth';
procedure BTextControl_uint16 fPrevHeight(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextControl_uint16 fPrevHeight';
procedure BTextControl_uint32 _reserved[3](AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextControl_uint32 _reserved[3]';
procedure BTextControl_uint32 _more_reserved[4](AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextControl_uint32 _more_reserved[4]';
procedure BTextControl_bool fClean(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextControl_bool fClean';
procedure BTextControl_bool fSkipSetFlags(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextControl_bool fSkipSetFlags';
procedure BTextControl_bool fUnusedBool1(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextControl_bool fUnusedBool1';
procedure BTextControl_bool fUnusedBool2(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextControl_bool fUnusedBool2';
}
implementation
destructor TTextControl.Destroy;
begin
BTextControl_Free(CPlusObject);
inherited;
end;
constructor TTextControl.Create(frame : TRect; name, aLabel,initial : PChar; message : TMessage; resizingMode, flags : Cardinal);
begin
CreatePas;
CPlusObject := BTextControl_Create(Self, frame.CPlusObject, name, aLabel,initial, message.CPlusObject, resizingMode, flags);
end;
constructor TTextControl.Create(data : TMessage);
begin
CreatePas;
CPlusObject := BTextControl_Create(Self, data.CPlusObject);
end;
function TTextControl.Instantiate(data : TMessage) : TArchivable;
begin
Result := BTextControl_Instantiate(CPlusObject, data.CPlusObject);
end;
function TTextControl.Archive(data : TMessage; deep : boolean) : TStatus_t;
begin
Result := BTextControl_Archive(CPlusObject, data.CPlusObject, deep);
end;
procedure TTextControl.SetText(texte : PChar);
begin
BTextControl_SetText(CPlusObject, texte);
end;
function TTextControl.Text : PChar;
begin
Result := BTextControl_Text(CPlusObject);
end;
procedure TTextControl.SetValue(valu : integer);
begin
BTextControl_SetValue(CPlusObject, valu);
end;
function TTextControl.Invoke(msg : TMessage) : TStatus_t;
begin
Result := BTextControl_Invoke(CPlusObject, msg.CPlusObject);
end;
function TTextControl.TextView : TTextControl;
begin
Result := BTextControl_TextView(CPlusObject);
end;
procedure TTextControl.SetModificationMessage(message : TMessage);
begin
BTextControl_SetModificationMessage(CPlusObject, message.CPlusObject);
end;
function TTextControl.ModificationMessage : TMessage;
begin
Result := BTextControl_ModificationMessage(CPlusObject);
end;
procedure TTextControl.SetAlignment(alabel : TAlignment; texte : TAlignment);
begin
BTextControl_SetAlignment(CPlusObject, alabel, texte);
end;
procedure TTextControl.GetAlignment(alabel : TAlignment; texte : TAlignment);
begin
BTextControl_GetAlignment(CPlusObject, alabel, texte);
end;
procedure TTextControl.SetDivider(dividing_line : single);
begin
BTextControl_SetDivider(CPlusObject, dividing_line);
end;
function TTextControl.Divider : single;
begin
Result := BTextControl_Divider(CPlusObject);
end;
procedure TTextControl.Draw(updateRect : TRect);
begin
end;
procedure TTextControl.MouseDown(where : TPoint);
begin
end;
procedure TTextControl.AttachedToWindow;
begin
end;
procedure TTextControl.MakeFocus(focusState : boolean);
begin
BTextControl_MakeFocus(CPlusObject, focusState);
end;
procedure TTextControl.SetEnabled(state : boolean);
begin
BTextControl_SetEnabled(CPlusObject, state);
end;
procedure TTextControl.FrameMoved(new_position : TPoint);
begin
end;
procedure TTextControl.FrameResized(new_width : double; new_height : double);
begin
// BTextControl_FrameResized(CPlusObject, new_width, new_height);
end;
procedure TTextControl.WindowActivated(active : boolean);
begin
//BTextControl_WindowActivated(CPlusObject, active);
end;
procedure TTextControl.GetPreferredSize(width : double; height : double);
begin
//BTextControl_GetPreferredSize(CPlusObject, width, height);
end;
procedure TTextControl.ResizeToPreferred;
begin
//BTextControl_ResizeToPreferred(CPlusObject);
end;
procedure TTextControl.MessageReceived(msg : TMessage);
begin
//BTextControl_MessageReceived(CPlusObject, msg.CPlusObject);
end;
function TTextControl.ResolveSpecifier(msg : TMessage; index : integer; specifier : TMessage; form : integer; properti : PChar) : THandler;
begin
Result := BTextControl_ResolveSpecifier(CPlusObject, msg.CPlusObject, index, specifier.CPlusObject, form, properti);
end;
procedure TTextControl.MouseUp(pt : TPoint);
begin
//BTextControl_MouseUp(CPlusObject, pt.CPlusObject);
end;
procedure TTextControl.MouseMoved(pt : TPoint; code : Cardinal; msg : TMessage);
begin
//BTextControl_MouseMoved(CPlusObject, pt.CPlusObject, code, msg);
end;
procedure TTextControl.DetachedFromWindow;
begin
//BTextControl_DetachedFromWindow(CPlusObject);
end;
procedure TTextControl.AllAttached;
begin
//BTextControl_AllAttached(CPlusObject);
end;
procedure TTextControl.AllDetached;
begin
//BTextControl_AllDetached(CPlusObject);
end;
function TTextControl.GetSupportedSuites(data : TMessage) : TStatus_t;
begin
Result := BTextControl_GetSupportedSuites(CPlusObject, data.CPlusObject);
end;
procedure TTextControl.SetFlags(flags : Cardinal);
begin
BTextControl_SetFlags(CPlusObject, flags);
end;
function TTextControl.Perform(d : TPerform_code; arg : Pointer) : TStatus_t;
begin
Result := BTextControl_Perform(CPlusObject, d, arg);
end;
{procedure TTextControl._ReservedTextControl1;
begin
BTextControl__ReservedTextControl1(CPlusObject);
end;
procedure TTextControl._ReservedTextControl2;
begin
BTextControl__ReservedTextControl2(CPlusObject);
end;
procedure TTextControl._ReservedTextControl3;
begin
BTextControl__ReservedTextControl3(CPlusObject);
end;
procedure TTextControl._ReservedTextControl4;
begin
BTextControl__ReservedTextControl4(CPlusObject);
end;
function TTextControl.operator=( : TTextControl) : TTextControl;
begin
Result := BTextControl_operator=(CPlusObject, );
end;
procedure TTextControl.CommitValue;
begin
BTextControl_CommitValue(CPlusObject);
end;
procedure TTextControl.InitData(label : PChar; initial_text : PChar; data : TMessage);
begin
BTextControl_InitData(CPlusObject, label, initial_text, data.CPlusObject);
end;
procedure TTextControl._BTextInput_ *fText;
begin
BTextControl__BTextInput_ *fText(CPlusObject);
end;
procedure TTextControl.char *fLabel;
begin
BTextControl_char *fLabel(CPlusObject);
end;
procedure TTextControl.BMessage *fModificationMessage;
begin
BTextControl_BMessage *fModificationMessage(CPlusObject);
end;
procedure TTextControl.alignment fLabelAlign;
begin
BTextControl_alignment fLabelAlign(CPlusObject);
end;
procedure TTextControl.float fDivider;
begin
BTextControl_float fDivider(CPlusObject);
end;
procedure TTextControl.uint16 fPrevWidth;
begin
BTextControl_uint16 fPrevWidth(CPlusObject);
end;
procedure TTextControl.uint16 fPrevHeight;
begin
BTextControl_uint16 fPrevHeight(CPlusObject);
end;
procedure TTextControl.uint32 _reserved[3];
begin
BTextControl_uint32 _reserved[3](CPlusObject);
end;
procedure TTextControl.uint32 _more_reserved[4];
begin
BTextControl_uint32 _more_reserved[4](CPlusObject);
end;
procedure TTextControl.bool fClean;
begin
BTextControl_bool fClean(CPlusObject);
end;
procedure TTextControl.bool fSkipSetFlags;
begin
BTextControl_bool fSkipSetFlags(CPlusObject);
end;
procedure TTextControl.bool fUnusedBool1;
begin
BTextControl_bool fUnusedBool1(CPlusObject);
end;
procedure TTextControl.bool fUnusedBool2;
begin
BTextControl_bool fUnusedBool2(CPlusObject);
end;
}
end.

View File

@@ -1,850 +0,0 @@
{ BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
Eric Jourde
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
}
unit textview;
interface
uses
beobj, view, message, archivable, SupportDefs, rect, list,
handler, messenger,interfacedefs,font,graphicdefs;
type
Ttext_run = Record
offset : LongInt;
font : TFont;
color : Trgb_color;
end;
type
Ttext_run_array = Record
count : LongInt;
runs : Array[1..1] of Ttext_run ;
end;
type
Tundo_state =(undo_state_nil,
B_UNDO_UNAVAILABLE,
B_UNDO_TYPING,
B_UNDO_CUT,
B_UNDO_PASTE,
B_UNDO_CLEAR,
B_UNDO_DROP);
type
TTextView = class(TView)
private
public
constructor Create(frame : TRect; name : pchar;atextRect: TRect ; resizeMask, flags : cardinal); virtual;
// constructor Create(bounds : TRect; name : pchar; texte : pchar; resizeflags, flags : cardinal); virtual;
constructor Create(data : TMessage);virtual;
destructor Destroy;override;
function Instantiate(data : TMessage) : TArchivable;
function Archive(data : TMessage; deep : boolean) : TStatus_t;
procedure AttachedToWindow;override;
procedure DetachedFromWindow;override;
procedure Draw(inRect : TRect);override;
procedure MouseDown(where : TPoint);override;
procedure MouseUp(where : TPoint);override;
procedure MouseMoved(where : TPoint; code : Cardinal; message : TMessage);override;
procedure WindowActivated(state : boolean);override;
procedure KeyDown(bytes : PChar; numBytes : integer);override;
procedure Pulse;override;
procedure FrameResized(width : double; height : double);override;
procedure MakeFocus(focusState : boolean);
procedure MessageReceived(message : TMessage);override;
function ResolveSpecifier(message : TMessage; index : integer; specifier : TMessage; form : integer; properti : PChar) : THandler;
function GetSupportedSuites(data : TMessage) : TStatus_t;
function Perform(d : TPerform_code; arg : Pointer) : TStatus_t;
procedure SetText(inText : PChar; var inRuns : Ttext_run_array);
procedure SetText(inText : PChar; inLength : integer; var inRuns : Ttext_run_array);
// procedure SetText(inFile : TFile; startOffset : integer; inLength : integer; var inRuns : Ttext_run_array);
procedure Insert(inText : PChar; var inRuns : Ttext_run_array);
procedure Insert(inText : PChar; inLength : integer; var inRuns : Ttext_run_array);
procedure Insert(startOffset : integer; inText : PChar; inLength : integer;var inRuns : Ttext_run_array);
procedure Delete;
procedure Delete(startOffset : integer; endOffset : integer);
function aText : PChar;
function TextLength : integer;
procedure GetText(offset : integer; length : integer; buffer : PChar);
function ByteAt(offset : integer) : PChar;
function CountLines : integer;
function CurrentLine : integer;
procedure GoToLine(lineNum : integer);
{ procedure Cut(clipboard : TClipboard);
procedure Copy(clipboard : TClipboard);
procedure Paste(clipboard : TClipboard);
procedure Clear;
function AcceptsPaste(clipboard : TClipboard) : boolean;
} function AcceptsDrop(inMessage : TMessage) : boolean;
procedure Select(startOffset : integer; endOffset : integer);
procedure SelectAll;
// procedure GetSelection(outStart : integer; outEnd : integer);
procedure SetFontAndColor(inFont : TFont; inMode : Cardinal; var inColor : TRGB_color);
// procedure SetFontAndColor(inFont : TFont; inMode : Cardinal);
// procedure SetFontAndColor(inFont : TFont);
procedure SetFontAndColor(startOffset : Cardinal; endOffset : Cardinal; inFont : TFont; inMode : Cardinal; var inColor : Trgb_color);
procedure GetFontAndColor(inOffset : integer; outFont : TFont; outColor : Trgb_color);
procedure GetFontAndColor(outFont : TFont; outMode : integer; outColor : Trgb_color; outEqColor : boolean);
{ procedure SetRunArray(startOffset : integer; endOffset : integer; inRuns : Ttext_tun_array);
function RunArray(startOffset : integer; endOffset : integer; outSize : ^integer) : Ttext_run_array;
} function LineAt(offset : integer) : integer;
function LineAt(point : TPoint) : integer;
function PointAt(inOffset : integer; outHeight : double) : TPoint;
function OffsetAt(point : TPoint) : integer;
function OffsetAt(line : integer) : integer;
procedure FindWord(inOffset : integer; outFromOffset : integer; outToOffset : integer);
function CanEndLine(offset : integer) : boolean;
function LineWidth(lineNum : integer) : double;
function LineHeight(lineNum : integer) : double;
function TextHeight(startLine : integer; endLine : integer) : double;
// procedure GetTextRegion(startOffset : integer; endOffset : integer; outRegion : TRegion);
procedure ScrollToOffset(inOffset : integer);
procedure ScrollToSelection;
procedure Highlight(startOffset : integer; endOffset : integer);
procedure SetTextRect(rect : TRect);
function TextRect : TRect;
procedure SetStylable(stylable : boolean);
function IsStylable : boolean;
procedure SetTabWidth(width : double);
function TabWidth : double;
procedure MakeSelectable(selectable : boolean);
function IsSelectable : boolean;
procedure MakeEditable(editable : boolean);
function IsEditable : boolean;
procedure SetWordWrap(awrap : boolean);
function DoesWordWrap : boolean;
procedure SetMaxBytes(max : integer);
function MaxBytes : integer;
procedure DisallowChar(aChar : Cardinal);
procedure AllowChar(aChar : Cardinal);
procedure SetAlignment(flag : Talignment);
function Alignment : Talignment;
procedure SetAutoindent(state : boolean);
function DoesAutoindent : boolean;
{ procedure SetColorSpace(colors : TColor_Space);
function ColorSpace : TColor_Space;
} procedure MakeResizable(resize : boolean; resizeView : TView);
function IsResizable : boolean;
procedure SetDoesUndo(undo : boolean);
function DoesUndo : boolean;
procedure HideTyping(enabled : boolean);
function IsTypingHidden : boolean;
procedure ResizeToPreferred;override;
procedure GetPreferredSize(width : double; height : double);virtual;
procedure AllAttached;override;
procedure AllDetached;override;
{ function FlattenRunArray(inArray : Ttext_tun_array; outSize : ^integer) : Pointer;
function UnflattenRunArray(data : Pointer; outSize : ^integer) : Ttext_run_array;
procedure InsertText(inText : PChar; inLength : integer; inOffset : integer; inRuns : Ttext_tun_array);
}
// procedure Undo(clipboard : TClipboard);
// procedure GetDragParameters(drag : TMessage; bitmap : TBitmap; point : TPoint; handler : THandler);
// procedure InitObject(atextRect : TRect; initialFont : TFont; initialColor : Trgb_color);
end;
function BTextView_Create(AObject : TBeObject;frame : TCPlusObject; name : pchar; atextRect: TCPlusObject ; resizeMask, flags : cardinal): TCPlusObject; cdecl; external BePascalLibName name 'BTextView_Create';
function BTextView_Create(AObject : TBeObject; data : TCPlusObject): TCPlusObject; cdecl; external BePascalLibName name 'BTextView_Create_1';
procedure BTextView_Free(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextView_FREE';
function BTextView_Instantiate(AObject : TCPlusObject; data : TCPlusObject) : TArchivable; cdecl; external BePascalLibName name 'BTextView_Instantiate';
function BTextView_Archive(AObject : TCPlusObject; data : TCPlusObject; deep : boolean) : TStatus_t; cdecl; external BePascalLibName name 'BTextView_Archive';
procedure BTextView_AttachedToWindow(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextView_AttachedToWindow';
procedure BTextView_DetachedFromWindow(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextView_DetachedFromWindow';
procedure BTextView_Draw(AObject : TCPlusObject; inRect : TCPlusObject); cdecl; external BePascalLibName name 'BTextView_Draw';
procedure BTextView_MouseDown(AObject : TCPlusObject; where : TCPlusObject); cdecl; external BePascalLibName name 'BTextView_MouseDown';
procedure BTextView_MouseUp(AObject : TCPlusObject; where : TCPlusObject); cdecl; external BePascalLibName name 'BTextView_MouseUp';
procedure BTextView_MouseMoved(AObject : TCPlusObject; where : TCPlusObject; code : Cardinal; message : TCPlusObject); cdecl; external BePascalLibName name 'BTextView_MouseMoved';
procedure BTextView_WindowActivated(AObject : TCPlusObject; state : boolean); cdecl; external BePascalLibName name 'BTextView_WindowActivated';
procedure BTextView_KeyDown(AObject : TCPlusObject; bytes : PChar; numBytes : integer); cdecl; external BePascalLibName name 'BTextView_KeyDown';
procedure BTextView_Pulse(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextView_Pulse';
procedure BTextView_FrameResized(AObject : TCPlusObject; width : double; height : double); cdecl; external BePascalLibName name 'BTextView_FrameResized';
procedure BTextView_MakeFocus(AObject : TCPlusObject; focusState : boolean); cdecl; external BePascalLibName name 'BTextView_MakeFocus';
procedure BTextView_MessageReceived(AObject : TCPlusObject; message : TCPlusObject); cdecl; external BePascalLibName name 'BTextView_MessageReceived';
function BTextView_ResolveSpecifier(AObject : TCPlusObject; message : TCPlusObject; index : integer; specifier : TCPlusObject; form : integer; properti : PChar) : THandler; cdecl; external BePascalLibName name 'BTextView_ResolveSpecifier';
function BTextView_GetSupportedSuites(AObject : TCPlusObject; data : TCPlusObject) : TStatus_t; cdecl; external BePascalLibName name 'BTextView_GetSupportedSuites';
function BTextView_Perform(AObject : TCPlusObject; d : TPerform_code; arg : Pointer) : TStatus_t; cdecl; external BePascalLibName name 'BTextView_Perform';
procedure BTextView_SetText(AObject : TCPlusObject; inText : PChar;var inRuns : Ttext_run_array); cdecl; external BePascalLibName name 'BTextView_SetText';
procedure BTextView_SetText(AObject : TCPlusObject; inText : PChar; inLength : integer;var inRuns : Ttext_run_array); cdecl; external BePascalLibName name 'BTextView_SetText_1';
//procedure BTextView_SetText(AObject : TCPlusObject; inFile : TFile; startOffset : integer; inLength : integer; inRuns : Ttext_tun_array); cdecl; external BePascalLibName name 'BTextView_SetText';
procedure BTextView_Insert(AObject : TCPlusObject; inText : PChar;var inRuns : Ttext_run_array); cdecl; external BePascalLibName name 'BTextView_Insert';
procedure BTextView_Insert(AObject : TCPlusObject; inText : PChar; inLength : integer;var inRuns : Ttext_run_array); cdecl; external BePascalLibName name 'BTextView_Insert_1';
procedure BTextView_Insert(AObject : TCPlusObject; startOffset : integer; inText : PChar; inLength : integer;var inRuns : Ttext_run_array); cdecl; external BePascalLibName name 'BTextView_Insert_2';
procedure BTextView_Delete(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextView_Delete';
procedure BTextView_Delete(AObject : TCPlusObject; startOffset : integer; endOffset : integer); cdecl; external BePascalLibName name 'BTextView_Delete_1';
function BTextView_Text(AObject : TCPlusObject) : PChar; cdecl; external BePascalLibName name 'BTextView_Text';
function BTextView_TextLength(AObject : TCPlusObject) : integer; cdecl; external BePascalLibName name 'BTextView_TextLength';
procedure BTextView_GetText(AObject : TCPlusObject; offset : integer; length : integer; buffer : PChar); cdecl; external BePascalLibName name 'BTextView_GetText';
function BTextView_ByteAt(AObject : TCPlusObject; offset : integer) : PChar; cdecl; external BePascalLibName name 'BTextView_ByteAt';
function BTextView_CountLines(AObject : TCPlusObject) : integer; cdecl; external BePascalLibName name 'BTextView_CountLines';
function BTextView_CurrentLine(AObject : TCPlusObject) : integer; cdecl; external BePascalLibName name 'BTextView_CurrentLine';
procedure BTextView_GoToLine(AObject : TCPlusObject; lineNum : integer); cdecl; external BePascalLibName name 'BTextView_GoToLine';
//procedure BTextView_Cut(AObject : TCPlusObject; clipboard : TClipboard); cdecl; external BePascalLibName name 'BTextView_Cut';
//procedure BTextView_Copy(AObject : TCPlusObject; clipboard : TClipboard); cdecl; external BePascalLibName name 'BTextView_Copy';
//procedure BTextView_Paste(AObject : TCPlusObject; clipboard : TClipboard); cdecl; external BePascalLibName name 'BTextView_Paste';
procedure BTextView_Clear(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextView_Clear';
//function BTextView_AcceptsPaste(AObject : TCPlusObject; clipboard : TClipboard) : boolean; cdecl; external BePascalLibName name 'BTextView_AcceptsPaste';
function BTextView_AcceptsDrop(AObject : TCPlusObject; inMessage : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BTextView_AcceptsDrop';
procedure BTextView_Select(AObject : TCPlusObject; startOffset : integer; endOffset : integer); cdecl; external BePascalLibName name 'BTextView_Select';
procedure BTextView_SelectAll(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextView_SelectAll';
//procedure BTextView_GetSelection(AObject : TCPlusObject; outStart : ^integer; outEnd : ^integer); cdecl; external BePascalLibName name 'BTextView_GetSelection';
procedure BTextView_SetFontAndColor(AObject : TCPlusObject; inFont : TCPlusObject; inMode : Cardinal; var inColor : Trgb_color); cdecl; external BePascalLibName name 'BTextView_SetFontAndColor';
//procedure BTextView_SetFontAndColor(AObject : TCPlusObject; inFont : TCPlusObject; inMode : Cardinal); cdecl; external BePascalLibName name 'BTextView_SetFontAndColor_1';
//procedure BTextView_SetFontAndColor(AObject : TCPlusObject; inFont : TCPlusObject); cdecl; external BePascalLibName name 'BTextView_SetFontAndColor_1';
procedure BTextView_SetFontAndColor(AObject : TCPlusObject; startOffset : cardinal; endOffset : cardinal; inFont : TCPlusObject; inMode : Cardinal; var inColor : Trgb_color); cdecl; external BePascalLibName name 'BTextView_SetFontAndColor_1';
procedure BTextView_GetFontAndColor(AObject : TCPlusObject; inOffset : cardinal; outFont : TCPlusObject; outColor : Trgb_color); cdecl; external BePascalLibName name 'BTextView_GetFontAndColor';
procedure BTextView_GetFontAndColor(AObject : TCPlusObject; outFont : TCPlusObject; outMode : integer; outColor : Trgb_color; outEqColor : boolean); cdecl; external BePascalLibName name 'BTextView_GetFontAndColor_1';
//procedure BTextView_SetRunArray(AObject : TCPlusObject; startOffset : integer; endOffset : integer; inRuns : Ttext_tun_array); cdecl; external BePascalLibName name 'BTextView_SetRunArray';
//function BTextView_RunArray(AObject : TCPlusObject; startOffset : integer; endOffset : integer; outSize : ^integer) : Ttext_run_array; cdecl; external BePascalLibName name 'BTextView_RunArray';
function BTextView_LineAt(AObject : TCPlusObject; offset : integer) : integer; cdecl; external BePascalLibName name 'BTextView_LineAt';
function BTextView_LineAt(AObject : TCPlusObject; point : TCPlusObject) : integer; cdecl; external BePascalLibName name 'BTextView_LineAt_1';
function BTextView_PointAt(AObject : TCPlusObject; inOffset : integer; outHeight : double) : TPoint; cdecl; external BePascalLibName name 'BTextView_PointAt';
function BTextView_OffsetAt(AObject : TCPlusObject; point : TCPlusObject) : integer; cdecl; external BePascalLibName name 'BTextView_OffsetAt';
function BTextView_OffsetAt(AObject : TCPlusObject; line : integer) : integer; cdecl; external BePascalLibName name 'BTextView_OffsetAt_1';
procedure BTextView_FindWord(AObject : TCPlusObject; inOffset : integer; outFromOffset : integer; outToOffset : integer); cdecl; external BePascalLibName name 'BTextView_FindWord';
function BTextView_CanEndLine(AObject : TCPlusObject; offset : integer) : boolean; cdecl; external BePascalLibName name 'BTextView_CanEndLine';
function BTextView_LineWidth(AObject : TCPlusObject; lineNum : integer) : double; cdecl; external BePascalLibName name 'BTextView_LineWidth';
function BTextView_LineHeight(AObject : TCPlusObject; lineNum : integer) : double; cdecl; external BePascalLibName name 'BTextView_LineHeight';
function BTextView_TextHeight(AObject : TCPlusObject; startLine : integer; endLine : integer) : double; cdecl; external BePascalLibName name 'BTextView_TextHeight';
//procedure BTextView_GetTextRegion(AObject : TCPlusObject; startOffset : integer; endOffset : integer; outRegion : TRegion); cdecl; external BePascalLibName name 'BTextView_GetTextRegion';
procedure BTextView_ScrollToOffset(AObject : TCPlusObject; inOffset : integer); cdecl; external BePascalLibName name 'BTextView_ScrollToOffset';
procedure BTextView_ScrollToSelection(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextView_ScrollToSelection';
procedure BTextView_Highlight(AObject : TCPlusObject; startOffset : integer; endOffset : integer); cdecl; external BePascalLibName name 'BTextView_Highlight';
procedure BTextView_SetTextRect(AObject : TCPlusObject; rect : TCPlusObject); cdecl; external BePascalLibName name 'BTextView_SetTextRect';
function BTextView_TextRect(AObject : TCPlusObject) : TRect; cdecl; external BePascalLibName name 'BTextView_TextRect';
procedure BTextView_SetStylable(AObject : TCPlusObject; stylable : boolean); cdecl; external BePascalLibName name 'BTextView_SetStylable';
function BTextView_IsStylable(AObject : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BTextView_IsStylable';
procedure BTextView_SetTabWidth(AObject : TCPlusObject; width : double); cdecl; external BePascalLibName name 'BTextView_SetTabWidth';
function BTextView_TabWidth(AObject : TCPlusObject) : double; cdecl; external BePascalLibName name 'BTextView_TabWidth';
procedure BTextView_MakeSelectable(AObject : TCPlusObject; selectable : boolean); cdecl; external BePascalLibName name 'BTextView_MakeSelectable';
function BTextView_IsSelectable(AObject : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BTextView_IsSelectable';
procedure BTextView_MakeEditable(AObject : TCPlusObject; editable : boolean); cdecl; external BePascalLibName name 'BTextView_MakeEditable';
function BTextView_IsEditable(AObject : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BTextView_IsEditable';
procedure BTextView_SetWordWrap(AObject : TCPlusObject; wrap : boolean); cdecl; external BePascalLibName name 'BTextView_SetWordWrap';
function BTextView_DoesWordWrap(AObject : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BTextView_DoesWordWrap';
procedure BTextView_SetMaxBytes(AObject : TCPlusObject; max : integer); cdecl; external BePascalLibName name 'BTextView_SetMaxBytes';
function BTextView_MaxBytes(AObject : TCPlusObject) : integer; cdecl; external BePascalLibName name 'BTextView_MaxBytes';
procedure BTextView_DisallowChar(AObject : TCPlusObject; aChar : Cardinal); cdecl; external BePascalLibName name 'BTextView_DisallowChar';
procedure BTextView_AllowChar(AObject : TCPlusObject; aChar : Cardinal); cdecl; external BePascalLibName name 'BTextView_AllowChar';
procedure BTextView_SetAlignment(AObject : TCPlusObject; flag : Talignment); cdecl; external BePascalLibName name 'BTextView_SetAlignment';
function BTextView_Alignment(AObject : TCPlusObject) : Talignment; cdecl; external BePascalLibName name 'BTextView_Alignment';
procedure BTextView_SetAutoindent(AObject : TCPlusObject; state : boolean); cdecl; external BePascalLibName name 'BTextView_SetAutoindent';
function BTextView_DoesAutoindent(AObject : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BTextView_DoesAutoindent';
//procedure BTextView_SetColorSpace(AObject : TCPlusObject; colors : TColor_Space); cdecl; external BePascalLibName name 'BTextView_SetColorSpace';
//function BTextView_ColorSpace(AObject : TCPlusObject) : TColor_Space; cdecl; external BePascalLibName name 'BTextView_ColorSpace';
procedure BTextView_MakeResizable(AObject : TCPlusObject; resize : boolean; resizeView : TCPlusObject); cdecl; external BePascalLibName name 'BTextView_MakeResizable';
function BTextView_IsResizable(AObject : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BTextView_IsResizable';
procedure BTextView_SetDoesUndo(AObject : TCPlusObject; undo : boolean); cdecl; external BePascalLibName name 'BTextView_SetDoesUndo';
function BTextView_DoesUndo(AObject : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BTextView_DoesUndo';
procedure BTextView_HideTyping(AObject : TCPlusObject; enabled : boolean); cdecl; external BePascalLibName name 'BTextView_HideTyping';
function BTextView_IsTypingHidden(AObject : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BTextView_IsTypingHidden';
procedure BTextView_ResizeToPreferred(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextView_ResizeToPreferred';
procedure BTextView_GetPreferredSize(AObject : TCPlusObject; width : double; height : double); cdecl; external BePascalLibName name 'BTextView_GetPreferredSize';
procedure BTextView_AllAttached(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextView_AllAttached';
procedure BTextView_AllDetached(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextView_AllDetached';
//function BTextView_FlattenRunArray(AObject : TCPlusObject; inArray : Ttext_tun_array; outSize : ^integer) : Pointer; cdecl; external BePascalLibName name 'BTextView_FlattenRunArray';
//function BTextView_UnflattenRunArray(AObject : TCPlusObject; data : Pointer; outSize : ^integer) : Ttext_run_array; cdecl; external BePascalLibName name 'BTextView_UnflattenRunArray';
//procedure BTextView_InsertText(AObject : TCPlusObject; inText : PChar; inLength : integer; inOffset : integer; inRuns : Ttext_tun_array); cdecl; external BePascalLibName name 'BTextView_InsertText';
//procedure BTextView_Undo(AObject : TCPlusObject; clipboard : TClipboard); cdecl; external BePascalLibName name 'BTextView_Undo';
//function BTextView_UndoState(AObject : TCPlusObject; isRedo : boolean) : Tunde_state; cdecl; external BePascalLibName name 'BTextView_UndoState';
//procedure BTextView_GetDragParameters(AObject : TCPlusObject; drag : TMessage; bitmap : TBitmap; point : TPoint; handler : THandler); cdecl; external BePascalLibName name 'BTextView_GetDragParameters';
procedure BTextView__ReservedTextView3(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextView__ReservedTextView3';
procedure BTextView__ReservedTextView4(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextView__ReservedTextView4';
procedure BTextView__ReservedTextView5(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextView__ReservedTextView5';
procedure BTextView__ReservedTextView6(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextView__ReservedTextView6';
procedure BTextView__ReservedTextView7(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextView__ReservedTextView7';
procedure BTextView__ReservedTextView8(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextView__ReservedTextView8';
procedure BTextView__ReservedTextView9(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextView__ReservedTextView9';
procedure BTextView__ReservedTextView10(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextView__ReservedTextView10';
procedure BTextView__ReservedTextView11(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextView__ReservedTextView11';
procedure BTextView__ReservedTextView12(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextView__ReservedTextView12';
//procedure BTextView_InitObject(AObject : TCPlusObject; textRect : TRect; initialFont : TFont; initialColor : Trgb_color); cdecl; external BePascalLibName name 'BTextView_InitObject';
procedure BTextView_HandleBackspace(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextView_HandleBackspace';
procedure BTextView_HandleArrowKey(AObject : TCPlusObject; inArrowKey : Cardinal); cdecl; external BePascalLibName name 'BTextView_HandleArrowKey';
procedure BTextView_HandleDelete(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextView_HandleDelete';
procedure BTextView_HandlePageKey(AObject : TCPlusObject; inPageKey : Cardinal); cdecl; external BePascalLibName name 'BTextView_HandlePageKey';
procedure BTextView_HandleAlphaKey(AObject : TCPlusObject; bytes : PChar; numBytes : integer); cdecl; external BePascalLibName name 'BTextView_HandleAlphaKey';
procedure BTextView_Refresh(AObject : TCPlusObject; fromOffset : integer; toOffset : integer; erase : boolean; scroll : boolean); cdecl; external BePascalLibName name 'BTextView_Refresh';
//procedure BTextView_RecalLineBreaks(AObject : TCPlusObject; startLine : ^integer; endLine : ^integer); cdecl; external BePascalLibName name 'BTextView_RecalLineBreaks';
function BTextView_FindLineBreak(AObject : TCPlusObject; fromOffset : integer; outAscent : double; outDescent : double; ioWidth : double) : integer; cdecl; external BePascalLibName name 'BTextView_FindLineBreak';
function BTextView_StyledWidth(AObject : TCPlusObject; fromOffset : integer; length : integer; outAscent : double; outDescent : double) : double; cdecl; external BePascalLibName name 'BTextView_StyledWidth';
function BTextView_ActualTabWidth(AObject : TCPlusObject; location : double) : double; cdecl; external BePascalLibName name 'BTextView_ActualTabWidth';
//procedure BTextView_DoInsertText(AObject : TCPlusObject; inText : PChar; inLength : integer; inOffset : integer; inRuns : Ttext_tun_array; outResult : ); cdecl; external BePascalLibName name 'BTextView_DoInsertText';
//procedure BTextView_DoDeleteText(AObject : TCPlusObject; fromOffset : integer; toOffset : integer; outResult : ); cdecl; external BePascalLibName name 'BTextView_DoDeleteText';
procedure BTextView_DrawLines(AObject : TCPlusObject; startLine : integer; endLine : integer; startOffset : integer; erase : boolean); cdecl; external BePascalLibName name 'BTextView_DrawLines';
procedure BTextView_DrawCaret(AObject : TCPlusObject; offset : integer); cdecl; external BePascalLibName name 'BTextView_DrawCaret';
procedure BTextView_InvertCaret(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextView_InvertCaret';
procedure BTextView_DragCaret(AObject : TCPlusObject; offset : integer); cdecl; external BePascalLibName name 'BTextView_DragCaret';
procedure BTextView_StopMouseTracking(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextView_StopMouseTracking';
function BTextView_PerformMouseUp(AObject : TCPlusObject; where : TPoint) : boolean; cdecl; external BePascalLibName name 'BTextView_PerformMouseUp';
function BTextView_PerformMouseMoved(AObject : TCPlusObject; where : TPoint; code : Cardinal) : boolean; cdecl; external BePascalLibName name 'BTextView_PerformMouseMoved';
procedure BTextView_TrackMouse(AObject : TCPlusObject; where : TPoint; message : TMessage; force : boolean); cdecl; external BePascalLibName name 'BTextView_TrackMouse';
procedure BTextView_TrackDrag(AObject : TCPlusObject; where : TPoint); cdecl; external BePascalLibName name 'BTextView_TrackDrag';
procedure BTextView_InitiateDrag(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextView_InitiateDrag';
function BTextView_MessageDropped(AObject : TCPlusObject; inMessage : TMessage; where : TPoint; offset : TPoint) : boolean; cdecl; external BePascalLibName name 'BTextView_MessageDropped';
procedure BTextView_UpdateScrollbars(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextView_UpdateScrollbars';
procedure BTextView_AutoResize(AObject : TCPlusObject; doredraw : boolean); cdecl; external BePascalLibName name 'BTextView_AutoResize';
procedure BTextView_NewOffscreen(AObject : TCPlusObject; padding : double); cdecl; external BePascalLibName name 'BTextView_NewOffscreen';
procedure BTextView_DeleteOffscreen(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextView_DeleteOffscreen';
procedure BTextView_Activate(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextView_Activate';
procedure BTextView_Deactivate(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextView_Deactivate';
//procedure BTextView_NormalizeFont(AObject : TCPlusObject; font : TFont); cdecl; external BePascalLibName name 'BTextView_NormalizeFont';
function BTextView_CharClassification(AObject : TCPlusObject; offset : integer) : Cardinal; cdecl; external BePascalLibName name 'BTextView_CharClassification';
function BTextView_NextInitialByte(AObject : TCPlusObject; offset : integer) : integer; cdecl; external BePascalLibName name 'BTextView_NextInitialByte';
function BTextView_PreviousInitialByte(AObject : TCPlusObject; offset : integer) : integer; cdecl; external BePascalLibName name 'BTextView_PreviousInitialByte';
//function BTextView_GetProperty(AObject : TCPlusObject; specifier : TMessage; form : integer; property : PChar; reply : TMessage) : boolean; cdecl; external BePascalLibName name 'BTextView_GetProperty';
function BTextView_SetProperty(AObject : TCPlusObject; specifier : TMessage; form : integer; properti : PChar; reply : TMessage) : boolean; cdecl; external BePascalLibName name 'BTextView_SetProperty';
function BTextView_CountProperties(AObject : TCPlusObject; specifier : TMessage; form : integer; properti : PChar; reply : TMessage) : boolean; cdecl; external BePascalLibName name 'BTextView_CountProperties';
procedure BTextView_HandleInputMethodChanged(AObject : TCPlusObject; message : TMessage); cdecl; external BePascalLibName name 'BTextView_HandleInputMethodChanged';
procedure BTextView_HandleInputMethodLocationRequest(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextView_HandleInputMethodLocationRequest';
procedure BTextView_CancelInputMethod(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextView_CancelInputMethod';
procedure BTextView_LockWidthBuffer(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextView_LockWidthBuffer';
procedure BTextView_UnlockWidthBuffer(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BTextView_UnlockWidthBuffer';
implementation
constructor TTextView.Create(frame : TRect; name : pchar;atextRect: TRect ; resizeMask, flags : cardinal);
begin
CreatePas;
CPlusObject := BTextView_Create(Self, frame.CplusObject,name,atextRect.CPlusObject,resizeMask,flags);
end;
constructor TTextView.Create(data : TMessage);
begin
CreatePas;
CPlusObject := BTextView_Create(Self, data.CPlusObject);
end;
destructor TTextView.Destroy;
begin
BTextView_Free(CPlusObject);
inherited;
end;
function TTextView.Instantiate(data : TMessage) : TArchivable;
begin
Result := BTextView_Instantiate(CPlusObject, data.CPlusObject);
end;
function TTextView.Archive(data : TMessage; deep : boolean) : TStatus_t;
begin
Result := BTextView_Archive(CPlusObject, data.CPlusObject, deep);
end;
procedure TTextView.AttachedToWindow;
begin
// BTextView_AttachedToWindow(CPlusObject);
end;
procedure TTextView.DetachedFromWindow;
begin
// BTextView_DetachedFromWindow(CPlusObject);
end;
procedure TTextView.Draw(inRect : TRect);
begin
// BTextView_Draw(CPlusObject, inRect.CPlusObject);
end;
procedure TTextView.MouseDown(where : TPoint);
begin
// BTextView_MouseDown(CPlusObject, where.CPlusObject);
end;
procedure TTextView.MouseUp(where : TPoint);
begin
//BTextView_MouseUp(CPlusObject, where.CPlusObject);
end;
procedure TTextView.MouseMoved(where : TPoint; code : Cardinal; message : TMessage);
begin
//BTextView_MouseMoved(CPlusObject, where.CPlusObject, code, message);
end;
procedure TTextView.WindowActivated(state : boolean);
begin
//BTextView_WindowActivated(CPlusObject, state);
end;
procedure TTextView.KeyDown(bytes : PChar; numBytes : integer);
begin
//writeln('keydown textview');
//BTextView_KeyDown(CPlusObject, bytes, numBytes);
end;
procedure TTextView.Pulse;
begin
//BTextView_Pulse(CPlusObject);
end;
procedure TTextView.FrameResized(width : double; height : double);
begin
// BTextView_FrameResized(CPlusObject, width, height);
end;
procedure TTextView.MakeFocus(focusState : boolean);
begin
BTextView_MakeFocus(CPlusObject, focusState);
end;
procedure TTextView.MessageReceived(message : TMessage);
begin
inherited;
// BTextView_MessageReceived(CPlusObject, message.CPlusObject);
end;
function TTextView.ResolveSpecifier(message : TMessage; index : integer; specifier : TMessage; form : integer; properti : PChar) : THandler;
begin
//Result := BTextView_ResolveSpecifier(CPlusObject, message.CPlusObject, index, specifier.CPlusObject, form, properti);
end;
function TTextView.GetSupportedSuites(data : TMessage) : TStatus_t;
begin
Result := BTextView_GetSupportedSuites(CPlusObject, data.CPlusObject);
end;
function TTextView.Perform(d : TPerform_code; arg : Pointer) : TStatus_t;
begin
Result := BTextView_Perform(CPlusObject, d, arg);
end;
procedure TTextView.SetText(inText : PChar; var inRuns : Ttext_run_array);
begin
BTextView_SetText(CPlusObject, inText, inRuns);
end;
procedure TTextView.SetText(inText : PChar; inLength : integer; var inRuns : Ttext_run_array);
begin
BTextView_SetText(CPlusObject, inText, inLength, inRuns);
end;
{procedure TTextView.SetText(inFile : TFile; startOffset : integer; inLength : integer; inRuns : Ttext_run_array);
begin
BTextView_SetText(CPlusObject, inFile.CPlusObject, startOffset, inLength, inRuns);
end;
}
procedure TTextView.Insert(inText : PChar;var inRuns : Ttext_run_array);
begin
BTextView_Insert(CPlusObject, inText, inRuns);
end;
procedure TTextView.Insert(inText : PChar; inLength : integer; var inRuns : Ttext_run_array);
begin
BTextView_Insert(CPlusObject, inText, inLength, inRuns);
end;
procedure TTextView.Insert(startOffset : integer; inText : PChar; inLength : integer; var inRuns : Ttext_run_array);
begin
BTextView_Insert(CPlusObject, startOffset, inText, inLength, inRuns);
end;
procedure TTextView.Delete;
begin
BTextView_Delete(CPlusObject);
end;
procedure TTextView.Delete(startOffset : integer; endOffset : integer);
begin
BTextView_Delete(CPlusObject, startOffset, endOffset);
end;
function TTextView.aText : PChar;
begin
Result := BTextView_Text(CPlusObject);
end;
function TTextView.TextLength : integer;
begin
Result := BTextView_TextLength(CPlusObject);
end;
procedure TTextView.GetText(offset : integer; length : integer; buffer : PChar);
begin
BTextView_GetText(CPlusObject, offset, length, buffer);
end;
function TTextView.ByteAt(offset : integer) : PChar;
begin
Result := BTextView_ByteAt(CPlusObject, offset);
end;
function TTextView.CountLines : integer;
begin
Result := BTextView_CountLines(CPlusObject);
end;
function TTextView.CurrentLine : integer;
begin
Result := BTextView_CurrentLine(CPlusObject);
end;
procedure TTextView.GoToLine(lineNum : integer);
begin
BTextView_GoToLine(CPlusObject, lineNum);
end;
{procedure TTextView.Cut(clipboard : TClipboard);
begin
BTextView_Cut(CPlusObject, clipboard.CPlusObject);
end;
procedure TTextView.Copy(clipboard : TClipboard);
begin
BTextView_Copy(CPlusObject, clipboard.CPlusObject);
end;
procedure TTextView.Paste(clipboard : TClipboard);
begin
BTextView_Paste(CPlusObject, clipboard.CPlusObject);
end;
procedure TTextView.Clear;
begin
BTextView_Clear(CPlusObject);
end;
function TTextView.AcceptsPaste(clipboard : TClipboard) : boolean;
begin
Result := BTextView_AcceptsPaste(CPlusObject, clipboard.CPlusObject);
end;
}
function TTextView.AcceptsDrop(inMessage : TMessage) : boolean;
begin
Result := BTextView_AcceptsDrop(CPlusObject, inMessage);
end;
procedure TTextView.Select(startOffset : integer; endOffset : integer);
begin
BTextView_Select(CPlusObject, startOffset, endOffset);
end;
procedure TTextView.SelectAll;
begin
BTextView_SelectAll(CPlusObject);
end;
{procedure TTextView.GetSelection(outStart : integer; outEnd : integer);
begin
BTextView_GetSelection(CPlusObject, outStart, outEnd);
end;
}
procedure TTextView.SetFontAndColor(inFont : TFont; inMode : Cardinal; var inColor : Trgb_color);
begin
BTextView_SetFontAndColor(CPlusObject, inFont.CPlusObject, inMode, inColor);
end;
//procedure TTextView.SetFontAndColor(inFont : TFont; inMode : Cardinal);
//begin
// BTextView_SetFontAndColor(CPlusObject, inFont.CPlusObject, inMode);
//end;
//procedure TTextView.SetFontAndColor(inFont : TFont);
//begin
// BTextView_SetFontAndColor(CPlusObject, inFont.CPlusObject);
//end;
procedure TTextView.SetFontAndColor(startOffset : cardinal; endOffset : cardinal; inFont : TFont; inMode : Cardinal; var inColor : Trgb_color);
begin
BTextView_SetFontAndColor(CPlusObject, startOffset, endOffset, inFont.CPlusObject, inMode, inColor);
end;
procedure TTextView.GetFontAndColor(inOffset : integer; outFont : TFont; outColor : Trgb_color);
begin
BTextView_GetFontAndColor(CPlusObject, inOffset, outFont.CPlusObject, outColor);
end;
procedure TTextView.GetFontAndColor(outFont : TFont; outMode : integer; outColor : Trgb_color; outEqColor : boolean);
begin
BTextView_GetFontAndColor(CPlusObject, outFont.CPlusObject, outMode, outColor, outEqColor);
end;
{
procedure TTextView.SetRunArray(startOffset : integer; endOffset : integer; inRuns : Ttext_tun_array);
begin
BTextView_SetRunArray(CPlusObject, startOffset, endOffset, inRuns);
end;
function TTextView.RunArray(startOffset : integer; endOffset : integer; outSize : ^integer) : Ttext_run_array;
begin
Result := BTextView_RunArray(CPlusObject, startOffset, endOffset, outSize);
end;
}
function TTextView.LineAt(offset : integer) : integer;
begin
Result := BTextView_LineAt(CPlusObject, offset);
end;
function TTextView.LineAt(point : TPoint) : integer;
begin
Result := BTextView_LineAt(CPlusObject, point.CPlusObject);
end;
function TTextView.PointAt(inOffset : integer; outHeight : double) : TPoint;
begin
Result := BTextView_PointAt(CPlusObject, inOffset, outHeight);
end;
function TTextView.OffsetAt(point : TPoint) : integer;
begin
Result := BTextView_OffsetAt(CPlusObject, point.CPlusObject);
end;
function TTextView.OffsetAt(line : integer) : integer;
begin
Result := BTextView_OffsetAt(CPlusObject, line);
end;
procedure TTextView.FindWord(inOffset : integer; outFromOffset : integer; outToOffset : integer);
begin
BTextView_FindWord(CPlusObject, inOffset, outFromOffset, outToOffset);
end;
function TTextView.CanEndLine(offset : integer) : boolean;
begin
Result := BTextView_CanEndLine(CPlusObject, offset);
end;
function TTextView.LineWidth(lineNum : integer) : double;
begin
Result := BTextView_LineWidth(CPlusObject, lineNum);
end;
function TTextView.LineHeight(lineNum : integer) : double;
begin
Result := BTextView_LineHeight(CPlusObject, lineNum);
end;
function TTextView.TextHeight(startLine : integer; endLine : integer) : double;
begin
Result := BTextView_TextHeight(CPlusObject, startLine, endLine);
end;
{procedure TTextView.GetTextRegion(startOffset : integer; endOffset : integer; outRegion : TRegion);
begin
BTextView_GetTextRegion(CPlusObject, startOffset, endOffset, outRegion.CPlusObject);
end;
}
procedure TTextView.ScrollToOffset(inOffset : integer);
begin
BTextView_ScrollToOffset(CPlusObject, inOffset);
end;
procedure TTextView.ScrollToSelection;
begin
BTextView_ScrollToSelection(CPlusObject);
end;
procedure TTextView.Highlight(startOffset : integer; endOffset : integer);
begin
BTextView_Highlight(CPlusObject, startOffset, endOffset);
end;
procedure TTextView.SetTextRect(rect : TRect);
begin
BTextView_SetTextRect(CPlusObject, rect.CPlusObject);
end;
function TTextView.TextRect : TRect;
begin
Result := BTextView_TextRect(CPlusObject);
end;
procedure TTextView.SetStylable(stylable : boolean);
begin
BTextView_SetStylable(CPlusObject, stylable);
end;
function TTextView.IsStylable : boolean;
begin
Result := BTextView_IsStylable(CPlusObject);
end;
procedure TTextView.SetTabWidth(width : double);
begin
BTextView_SetTabWidth(CPlusObject, width);
end;
function TTextView.TabWidth : double;
begin
Result := BTextView_TabWidth(CPlusObject);
end;
procedure TTextView.MakeSelectable(selectable : boolean);
begin
BTextView_MakeSelectable(CPlusObject, selectable);
end;
function TTextView.IsSelectable : boolean;
begin
Result := BTextView_IsSelectable(CPlusObject);
end;
procedure TTextView.MakeEditable(editable : boolean);
begin
BTextView_MakeEditable(CPlusObject, editable);
end;
function TTextView.IsEditable : boolean;
begin
Result := BTextView_IsEditable(CPlusObject);
end;
procedure TTextView.SetWordWrap(awrap : boolean);
begin
BTextView_SetWordWrap(CPlusObject, awrap);
end;
function TTextView.DoesWordWrap : boolean;
begin
Result := BTextView_DoesWordWrap(CPlusObject);
end;
procedure TTextView.SetMaxBytes(max : integer);
begin
BTextView_SetMaxBytes(CPlusObject, max);
end;
function TTextView.MaxBytes : integer;
begin
Result := BTextView_MaxBytes(CPlusObject);
end;
procedure TTextView.DisallowChar(aChar : Cardinal);
begin
BTextView_DisallowChar(CPlusObject, aChar);
end;
procedure TTextView.AllowChar(aChar : Cardinal);
begin
BTextView_AllowChar(CPlusObject, aChar);
end;
procedure TTextView.SetAlignment(flag : Talignment);
begin
BTextView_SetAlignment(CPlusObject, flag);
end;
function TTextView.Alignment : Talignment;
begin
Result := BTextView_Alignment(CPlusObject);
end;
procedure TTextView.SetAutoindent(state : boolean);
begin
BTextView_SetAutoindent(CPlusObject, state);
end;
function TTextView.DoesAutoindent : boolean;
begin
Result := BTextView_DoesAutoindent(CPlusObject);
end;
{procedure TTextView.SetColorSpace(colors : TColor_Space);
begin
BTextView_SetColorSpace(CPlusObject, colors);
end;
function TTextView.ColorSpace : TColor_Space;
begin
Result := BTextView_ColorSpace(CPlusObject);
end;
}
procedure TTextView.MakeResizable(resize : boolean; resizeView : TView);
begin
BTextView_MakeResizable(CPlusObject, resize, resizeView.CPlusObject);
end;
function TTextView.IsResizable : boolean;
begin
Result := BTextView_IsResizable(CPlusObject);
end;
procedure TTextView.SetDoesUndo(undo : boolean);
begin
BTextView_SetDoesUndo(CPlusObject, undo);
end;
function TTextView.DoesUndo : boolean;
begin
Result := BTextView_DoesUndo(CPlusObject);
end;
procedure TTextView.HideTyping(enabled : boolean);
begin
BTextView_HideTyping(CPlusObject, enabled);
end;
function TTextView.IsTypingHidden : boolean;
begin
Result := BTextView_IsTypingHidden(CPlusObject);
end;
procedure TTextView.ResizeToPreferred;
begin
BTextView_ResizeToPreferred(CPlusObject);
end;
procedure TTextView.GetPreferredSize(width : double; height : double);
begin
BTextView_GetPreferredSize(CPlusObject, width, height);
end;
procedure TTextView.AllAttached;
begin
BTextView_AllAttached(CPlusObject);
end;
procedure TTextView.AllDetached;
begin
BTextView_AllDetached(CPlusObject);
end;
{function TTextView.FlattenRunArray(inArray : Ttext_tun_array; outSize : integer) : Pointer;
begin
Result := BTextView_FlattenRunArray(CPlusObject, inArray, outSize);
end;
function TTextView.UnflattenRunArray(data : Pointer; outSize : integer) : Ttext_run_array;
begin
Result := BTextView_UnflattenRunArray(CPlusObject, data, outSize);
end;
procedure TTextView.InsertText(inText : PChar; inLength : integer; inOffset : integer; inRuns : Ttext_tun_array);
begin
BTextView_InsertText(CPlusObject, inText, inLength, inOffset, inRuns);
end;
}
{procedure TTextView.Undo(clipboard : TClipboard);
begin
BTextView_Undo(CPlusObject, clipboard.CPlusObject);
end;
function TTextView.UndoState(isRedo : boolean) : Tundo_state;
begin
Result := BTextView_UndoState(CPlusObject, isRedo);
end;
procedure TTextView.GetDragParameters(drag : TMessage; bitmap : TBitmap; point : TPoint; handler : THandler);
begin
BTextView_GetDragParameters(CPlusObject, drag.CPlusObject, bitmap.CPlusObject, point.CPlusObject, handler.CPlusObject);
end;
}
end.

View File

@@ -1,78 +0,0 @@
/* BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _VIEW_H_
#define _VIEW_H_
#include <View.h>
#include <OS.h>
#include <handler.h>
#include <beobj.h>
class BPView : public BView, public virtual BPHandler
{
public:
BPView(TPasObject PasObject,
BRect frame,
const char *name,
uint32 resizingMode,
uint32 flags);
BPView(TPasObject PasObject, BMessage *archive);
virtual void MessageReceived(BMessage *message);
virtual void AllAttached(void);
virtual void AttachedToWindow(void);
virtual void AllDetached(void);
virtual void DetachedFromWindow(void);
virtual void Draw(BRect updateRect);
virtual void DrawAfterChildren(BRect updateRect);
virtual void FrameMoved(BPoint parentPoint);
virtual void FrameResized(float width, float height);
virtual void GetPreferredSize(float *width, float *height);
virtual void ResizeToPreferred(void);
virtual void KeyDown(const char *bytes, int32 numBytes);
virtual void KeyUp(const char *bytes, int32 numBytes);
virtual void MouseDown(BPoint point);
virtual void MouseMoved(BPoint point, uint32 transit, const BMessage *message);
virtual void MouseUp(BPoint point);
virtual void Pulse(void);
// virtual void TargetedByScrollView(BScrollView *scroller);
virtual void WindowActivated(bool active);
virtual void Draw_hookCall(BRect updateRect);
virtual void AttachedToWindow_hookCall(void);
virtual void AllAttached_hookCall(void);
virtual void AllDetached_hookCall(void);
virtual void DetachedFromWindow_hookCall(void);
virtual void DrawAfterChildren_hookCall(BRect updateRect);
virtual void FrameMoved_hookCall(BPoint parentPoint);
virtual void FrameResized_hookCall(float width, float height);
virtual void GetPreferredSize_hookCall(float *width, float *height);
virtual void ResizeToPreferred_hookCall(void);
virtual void KeyDown_hookCall(const char *bytes, int32 numBytes);
virtual void KeyUp_hookCall(const char *bytes, int32 numBytes);
virtual void MouseDown_hookCall(BPoint point);
virtual void MouseMoved_hookCall(BPoint point, uint32 transit, const BMessage *message);
virtual void MouseUp_hookCall(BPoint point);
virtual void Pulse_hookCall(void);
// virtual void TargetedByScrollView_hookCall(BScrollView *scroller);
virtual void WindowActivated_hookCall(bool active);
private:
};
#endif /* _VIEW_H_ */

View File

@@ -1,519 +0,0 @@
{ BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
}
unit View;
interface
uses
beobj, handler, rect, os, application, appdefs, message,
graphicdefs, fdblib;
type
// TWindow = class(TBeObject);
TView = class(THandler)
public
constructor Create(frame : TRect; name : PChar; resizingMode, flags : Cardinal);
destructor Destroy; override;
// hook functions
procedure AllAttached; virtual;
procedure AllDetached; virtual;
procedure AttachedToWindow; virtual;
procedure DetachedFromWindow; virtual;
procedure Draw(updateRect : TRect); virtual;
procedure DrawAfterChildren(updateRect : TRect); virtual;
procedure FrameMoved(parentPoint : TPoint); virtual;
procedure FrameResized(width, height : double); virtual;
procedure GetPreferredSize(var width : double; var height : double); virtual;
procedure ResizeToPreferred; virtual;
procedure KeyDown(bytes : PChar; numBytes : integer); virtual;
procedure KeyUp(bytes : PChar; numBytes : integer); virtual;
procedure MouseDown(point : TPoint); virtual;
procedure MouseMoved(point : TPoint; transit : Cardinal; message : TMessage); virtual;
procedure MouseUp(point : TPoint); virtual;
procedure Pulse; virtual;
// procedure TargetedByScrollView(scroller : TScrollView); virtual; // Need BScrollView
procedure WindowActivated(active : boolean); virtual;
procedure MessageReceived(aMessage : TMessage); override;
// End hook functions
function RemoveSelf : boolean;
procedure AddChild(aView, before : TView);
function RemoveChild(aView : TView) : boolean;
function CountChildren : integer;
function ChildAt(index : integer) : TView;
function NextSibling : TView;
function PreviousSibling : TView;
// function Window : TWindow;
procedure SetViewColor(rgb_color : TRGB_color);
end;
function BView_Create(AObject : TObject; frame : TCPlusObject; name : PChar;
resizingMode, flags : cardinal) : TCplusObject; cdecl; external BePascalLibName name 'BView_Create_1';
procedure BView_Free(CPlusObject : TCPlusObject); cdecl; external BePascalLibName name 'BView_Free';
function BView_RemoveSelf(CPlusObject : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BView_RemoveSelf';
procedure BView_AddChild(CPlusObject : TCPlusObject; aView : TCPlusObject; before : TCPlusObject); cdecl; external BePascalLibName name 'BView_AddChild';
function BView_RemoveChild(CPlusObject : TCPlusObject; aView : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BView_RemoveChild';
function BView_CountChildren(CPlusObject : TCPlusObject) : integer; cdecl; external BePascalLibName name 'BView_CountChildren';
function BView_NextSibling(CPlusObject : TCPlusObject) : TCPlusObject; cdecl; external BePascalLibName name 'BView_NextSibling';
function BView_PreviousSibling(CPlusObject : TCPlusObject) : TCPlusObject; cdecl; external BePascalLibName name 'BView_NextSibling';
function BView_ChildAt(CPlusObject : TCPlusObject; index : integer) : TCPlusObject; cdecl; external BePascalLibName name 'BView_ChildAt';
function BView_Window(CPlusObject : TCPlusObject) : TCPlusObject; cdecl; external BePascalLibName name 'BView_Window';
procedure BView_Draw(CPlusObject : TCPlusObject; aRect : TCPlusObject); cdecl; external BePascalLibName name 'BView_Draw';
procedure BView_SetViewColor(CPlusObject : TCPlusObject; c : TRGB_color); cdecl; external BePascalLibName name 'BView_SetViewColor';
var
// resizingMode mask
B_FOLLOW_NONE : Cardinal;
B_FOLLOW_ALL_SIDES : Cardinal;
B_FOLLOW_ALL : Cardinal;
B_FOLLOW_LEFT : Cardinal;
B_FOLLOW_RIGHT : Cardinal;
B_FOLLOW_LEFT_RIGHT : Cardinal;
B_FOLLOW_H_CENTER : Cardinal;
B_FOLLOW_TOP : Cardinal;
B_FOLLOW_BOTTOM : Cardinal;
B_FOLLOW_TOP_BOTTOM : Cardinal;
B_FOLLOW_V_CENTER : Cardinal;
const
// flags
B_FULL_UPDATE_ON_RESIZE : Cardinal = $80000000;//31;
_B_RESERVED1_ : Cardinal = $40000000;//30;
B_WILL_DRAW : Cardinal = $20000000;//29;
B_PULSE_NEEDED : Cardinal = $10000000;//28;
B_NAVIGABLE_JUMP : Cardinal = $08000000;//27;
B_FRAME_EVENTS : Cardinal = $04000000;//26;
B_NAVIGABLE : Cardinal = $02000000;//25;
B_SUBPIXEL_PRECISE : Cardinal = $00800000;//24;
B_DRAW_ON_CHILDREN : Cardinal = $00400000;//23;
_B_RESERVED7_ : Cardinal = $00200000;//22;
B_FONT_FAMILY_AND_STYLE = 1;
B_FONT_SIZE = 2;
B_FONT_SHEAR = 4;
B_FONT_ROTATION = 8;
B_FONT_SPACING = 16;
B_FONT_ENCODING = 32;
B_FONT_FACE = 64;
B_FONT_FLAGS = 128;
B_FONT_ALL = 255;
implementation
var
View_AllAttached_hook : Pointer; cvar; external;
View_AllDetached_hook : Pointer; cvar; external;
View_AttachedToWindow_hook : Pointer; cvar; external;
View_DetachedFromWindow_hook : Pointer; cvar; external;
View_Draw_hook : Pointer; cvar; external;
View_DrawAfterChildren_hook : Pointer; cvar; external;
View_FrameMoved_hook : Pointer; cvar; external;
View_FrameResized_hook : Pointer; cvar; external;
View_GetPreferredSize_hook : Pointer; cvar; external;
View_ResizeToPreferred_hook : Pointer; cvar; external;
View_KeyDown_hook : Pointer; cvar; external;
View_KeyUp_hook : Pointer; cvar; external;
View_MouseDown_hook : Pointer; cvar; external;
View_MouseMoved_hook : Pointer; cvar; external;
View_MouseUp_hook : Pointer; cvar; external;
View_Pulse_hook : Pointer; cvar; external;
View_TargetedByScrollView_hook : Pointer; cvar; external;
View_WindowActivated_hook : Pointer; cvar; external;
// View hook functions
{
View_AllAttached_hook
View_AllDetached_hook
View_AttachedToWindow_hook
View_DetachedFromWindow_hook
View_Draw_hook
View_DrawAfterChildren_hook
View_FrameMoved_hook
View_FrameResized_hook
View_GetPreferredSize_hook
View_ResizeToPreferred_hook
View_KeyDown_hook
View_KeyUp_hook
View_MouseDown_hook
View_MouseMoved_hook
View_MouseUp_hook
View_Pulse_hook
View_TargetedByScrollView_hook
View_WindowActivated_hook}
constructor TView.Create(frame : TRect; name : PChar; resizingMode, flags : Cardinal);
begin
inherited Create;
CPlusObject := BView_Create(Self, frame.CPlusObject, name, resizingMode, flags);
end;
destructor TView.Destroy;
begin
BView_Free(Self.CPlusObject);
inherited;
end;
// Hook functions
procedure TView.AllAttached;
begin
end;
procedure TView.AllDetached;
begin
end;
procedure TView.AttachedToWindow;
begin
end;
procedure TView.DetachedFromWindow;
begin
end;
procedure TView.Draw(updateRect : TRect);
begin
SendText('Drawing view');
end;
procedure TView.DrawAfterChildren(updateRect : TRect);
begin
end;
procedure TView.FrameMoved(parentPoint : TPoint);
begin
end;
procedure TView.FrameResized(width, height : double);
begin
end;
procedure TView.GetPreferredSize(var width : double; var height : double);
begin
end;
procedure TView.ResizeToPreferred;
begin
end;
procedure TView.KeyDown(bytes : PChar; numBytes : integer);
begin
end;
procedure TView.KeyUp(bytes : PChar; numBytes : integer);
begin
end;
procedure TView.MouseDown(point : TPoint);
begin
end;
procedure TView.MouseMoved(point : TPoint; transit : Cardinal; message : TMessage);
begin
end;
procedure TView.MouseUp(point : TPoint);
begin
end;
procedure TView.Pulse;
begin
end;
// procedure TView.TargetedByScrollView(); // Need BScrollView
//begin
//end;
procedure TView.WindowActivated(active : boolean);
begin
end;
procedure TView.MessageReceived(aMessage : TMessage);
begin
inherited;
end;
function TView.RemoveSelf : boolean;
begin
Result := BView_RemoveSelf(Self.CPlusObject);
end;
procedure TView.AddChild(aView, before : TView);
begin
if before <> nil then
BView_AddChild(Self.CPlusObject, aView.CPlusObject, before.CPlusObject)
else
BView_AddChild(Self.CPlusObject, aView.CPlusObject, nil);
end;
function TView.RemoveChild(aView : TView) : boolean;
begin
Result := BView_RemoveChild(Self.CPlusObject, aView);
end;
function TView.CountChildren : integer;
begin
Result := BView_CountChildren(Self.CPlusObject);
end;
function TView.ChildAt(index : integer) : TView;
begin
Result := TView.Wrap(BView_ChildAt(Self.CPlusObject, index));
end;
function TView.NextSibling : TView;
begin
Result := TView.Wrap(BView_NextSibling(Self.CPlusObject));
end;
function TView.PreviousSibling : TView;
begin
Result := TView.Wrap(BView_PreviousSibling(Self.CPlusObject));
end;
{function TView.Window : TWindow;
begin
Result := TWindow.Wrap(BView_Window(Self.CPlusObject));
end;}
procedure TView.SetViewColor(rgb_color : TRGB_color);
begin
BView_SetViewColor(Self.CPlusObject, rgb_color);
end;
// Hook functions
procedure View_AllAttached_hook_func(View : TView); cdecl;
begin
if View <> nil then
View.AllAttached;
end;
procedure View_AllDetached_hook_func(View : TView); cdecl;
begin
if View <> nil then
View.AllDetached;
end;
procedure View_AttachedToWindow_hook_func(View : TView); cdecl;
begin
if View <> nil then
View.AttachedToWindow;
end;
procedure View_DetachedFromWindow_hook_func(View : TView); cdecl;
begin
if View <> nil then
View.DetachedFromWindow;
end;
procedure View_Draw_hook_func(View : TView; aRect : TCPlusObject); cdecl;
var
Rect : TRect;
begin
Rect := TRect.Wrap(aRect);
try
if View <> nil then
View.Draw(Rect);
finally
Rect.UnWrap;
end;
end;
procedure View_DrawAfterChildren_hook_func(View : TView; aRect : TCPlusObject); cdecl;
var
Rect : TRect;
begin
Rect := TRect.Wrap(aRect);
try
if View <> nil then
View.DrawAfterChildren(Rect);
finally
Rect.UnWrap;
end;
end;
procedure View_FrameMoved_hook_func(View : TView; aPoint : TCPlusObject); cdecl;
var
Point : TPoint;
begin
Point := TPoint.Wrap(aPoint);
try
if View <> nil then
View.FrameMoved(Point);
finally
Point.UnWrap;
end;
end;
procedure View_FrameResized_hook_func(View : TView; width, height : double); cdecl;
begin
if View <> nil then
View.FrameResized(width, height);
end;
procedure View_GetPreferredSize_hook_func(View : TView; var width, height : double); cdecl;
begin
if View <> nil then
View.GetPreferredSize(width, height);
end;
procedure View_ResizeToPreferred_hook_func(View : TView); cdecl;
begin
if View <> nil then
View.ResizeToPreferred;
end;
procedure View_KeyDown_hook_func(View : TView; bytes : PChar; numBytes : integer); cdecl;
begin
if View <> nil then
View.KeyDown(bytes, numBytes);
end;
procedure View_KeyUp_hook_func(View : TView; bytes : PChar; numBytes : integer); cdecl;
begin
if View <> nil then
View.KeyUp(bytes, numBytes);
end;
procedure View_MouseDown_hook_func(View : TView; aPoint : TCPlusObject); cdecl;
var
Point : TPoint;
begin
Point := TPoint.Wrap(aPoint);
try
if View <> nil then
View.MouseDown(Point);
finally
Point.UnWrap;
end;
end;
procedure View_MouseMoved_hook_func(View : TView; aPoint : TCPlusObject; transit : Cardinal; aMessage : TCPlusObject); cdecl;
var
Point : TPoint;
Message : TMessage;
begin
Point := TPoint.Wrap(aPoint);
try
Message := TMessage.Wrap(aMessage);
try
if View <> nil then
View.MouseMoved(Point, transit, Message);
finally
Message.UnWrap;
end;
finally
Point.UnWrap;
end;
end;
procedure View_MouseUp_hook_func(View : TView; aPoint : TCPlusObject); cdecl;
var
Point : TPoint;
begin
Point := TPoint.Wrap(aPoint);
try
if View <> nil then
View.MouseDown(Point);
finally
Point.UnWrap;
end;
end;
procedure View_Pulse_hook_func(View : TView); cdecl;
begin
if View <> nil then
View.Pulse;
end;
//procedure View_TargetedByScrollView_hook_func(View : TView; scroller : TScrollView); cdecl;
//var
// ScrollView : TScrollView;
//begin
// ScrollView := TScrollView.Wrap(scroller);
// try
// if View <> nil then
// View.TargetedByScrollView(ScrollView);
// finally
// ScrollView.UnWrap;
// end;
//end;
procedure View_WindowActivated_hook_func(View : TView; active : boolean); cdecl;
begin
if View <> nil then
View.WindowActivated(active);
end;
var
_B_FOLLOW_NONE : Cardinal; cvar; external;
_B_FOLLOW_ALL_SIDES : Cardinal; cvar; external;
_B_FOLLOW_ALL : Cardinal; cvar; external;
_B_FOLLOW_LEFT : Cardinal; cvar; external;
_B_FOLLOW_RIGHT : Cardinal; cvar; external;
_B_FOLLOW_LEFT_RIGHT : Cardinal; cvar; external;
_B_FOLLOW_H_CENTER : Cardinal; cvar; external;
_B_FOLLOW_TOP : Cardinal; cvar; external;
_B_FOLLOW_BOTTOM : Cardinal; cvar; external;
_B_FOLLOW_TOP_BOTTOM : Cardinal; cvar; external;
_B_FOLLOW_V_CENTER : Cardinal; cvar; external;
initialization
B_FOLLOW_NONE := _B_FOLLOW_NONE;
B_FOLLOW_ALL_SIDES := _B_FOLLOW_ALL_SIDES;
B_FOLLOW_ALL := _B_FOLLOW_ALL;
B_FOLLOW_LEFT := _B_FOLLOW_LEFT;
B_FOLLOW_RIGHT := _B_FOLLOW_RIGHT;
B_FOLLOW_LEFT_RIGHT := _B_FOLLOW_LEFT_RIGHT;
B_FOLLOW_H_CENTER := _B_FOLLOW_H_CENTER;
B_FOLLOW_TOP := _B_FOLLOW_TOP;
B_FOLLOW_BOTTOM := _B_FOLLOW_BOTTOM;
B_FOLLOW_TOP_BOTTOM := _B_FOLLOW_TOP_BOTTOM;
B_FOLLOW_V_CENTER := _B_FOLLOW_V_CENTER;
// Connecting hook functions
View_AllAttached_hook := @View_AllAttached_hook_func;
View_AllDetached_hook := @View_AllDetached_hook_func;
View_AttachedToWindow_hook := @View_AttachedToWindow_hook_func;
View_DetachedFromWindow_hook := @View_DetachedFromWindow_hook_func;
View_Draw_hook := @View_Draw_hook_func;
View_DrawAfterChildren_hook := @View_DrawAfterChildren_hook_func;
View_FrameMoved_hook := @View_FrameMoved_hook_func;
View_FrameResized_hook := @View_FrameResized_hook_func;
View_GetPreferredSize_hook := @View_GetPreferredSize_hook_func;
View_ResizeToPreferred_hook := @View_ResizeToPreferred_hook_func;
View_KeyDown_hook := @View_KeyDown_hook_func;
View_KeyUp_hook := @View_KeyUp_hook_func;
View_MouseDown_hook := @View_MouseDown_hook_func;
View_MouseMoved_hook := @View_MouseMoved_hook_func;
View_MouseUp_hook := @View_MouseUp_hook_func;
View_Pulse_hook := @View_Pulse_hook_func;
// View_TargetedByScrollView_hook := @View_TargetedByScrollView_hook_func;
View_WindowActivated_hook := @View_WindowActivated_hook_func;
end.

View File

@@ -1,46 +0,0 @@
/* BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., s59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _WINDOW_H_
#define _WINDOW_H_
#include <Window.h>
#include <OS.h>
#include <looper.h>
#include <window.h>
#include <beobj.h>
class BPWindow : public BWindow, public BPLooper
{
public:
BPWindow(TPasObject PasObject,
BRect frame,
const char *title,
window_type type,
uint32 flags,
uint32 workspaces = B_CURRENT_WORKSPACE);
virtual void MessageReceived(BMessage *message);
virtual void DispatchMessage(BMessage *message, BHandler *target);
virtual bool QuitRequested(void);
virtual void WindowActivated(bool active);
private:
};
#endif /* _WINDOW_H_ */

File diff suppressed because it is too large Load Diff

View File

@@ -1,92 +0,0 @@
{ BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
}
unit os;
interface
uses
SupportDefs;
const
B_LOW_LATENCY = 5;
B_LOW_PRIORITY = 5;
B_NORMAL_PRIORITY = 10;
B_DISPLAY_PRIORITY = 15;
B_URGENT_DISPLAY_PRIORITY = 20;
B_REAL_TIME_DISPLAY_PRIORITY = 100;
B_URGENT_PRIORITY = 110;
B_REAL_TIME_PRIORITY = 120;
const
B_OS_NAME_LENGTH = 32;
B_PAGE_SIZE = 4096;
B_INFINITE_TIMEOUT = 9223372036854775807;
type
TArea_id = Longint;
TPort_id = Longint;
TSem_id = Longint;
TThread_id = Longint;
TTeam_id = Longint;
const
B_NO_LOCK = 0;
B_LAZY_LOCK = 1;
B_FULL_LOCK = 2;
B_CONTIGUOUS = 3;
B_LOMEM = 4;
B_ANY_ADDRESS = 0;
B_EXACT_ADDRESS = 1;
B_BASE_ADDRESS = 2;
B_CLONE_ADDRESS = 3;
B_ANY_KERNEL_ADDRESS = 4;
B_READ_AREA = 1;
B_WRITE_AREA = 2;
// area
type
TArea_Info = record
area : TArea_id;
name : array [0..B_OS_NAME_LENGTH] of char;
size : TSize_t;
lock : Cardinal;
protection : Cardinal;
team : TTeam_id;
ram_size : Cardinal;
copy_count : Cardinal;
in_count : Cardinal;
out_count : Cardinal;
address : Pointer;
end;
// Semaphores
type
TSem_Info = record
sem : TSem_id;
team : TTeam_id;
name : array [0..B_OS_NAME_LENGTH] of char;
count : integer;
latest_holder : TThread_id;
end;
implementation
end.

View File

@@ -1,277 +0,0 @@
/* BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Eric Jourde
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _MAIL_CPP_
#define _MAIL_CPP_
#include "E-mail.h"
#include <beobj.h>
#if defined(__cplusplus)
extern "C" {
#endif
/*
* Method: BMailMessage::BMailMessage()
* Descr:
*/
TCPlusObject BMailMessage_Create()
{
return new BMailMessage();
}
void BMail_Free(BMailMessage *Mail)
{
delete Mail;
}
/*
* Method: BMailMessage::AddContent()
* Descr:
*/
status_t
BMailMessage_AddContent(BMailMessage *MailMessage, const char *text,
int32 length,
uint32 encoding,
bool clobber)
{
return MailMessage->AddContent(text,
length,
encoding,
clobber);
}
/*
* Method: BMailMessage::AddContent()
* Descr:
*/
status_t
BMailMessage_AddContent_1
(BMailMessage *MailMessage, const char *text,
int32 length,
const char *encoding,
bool clobber)
{
return MailMessage->AddContent(text,
length,
encoding,
clobber);
}
/*
* Method: BMailMessage::AddEnclosure()
* Descr:
*/
status_t
BMailMessage_AddEnclosure(BMailMessage *MailMessage, entry_ref *ref,
bool clobber)
{
return MailMessage->AddEnclosure(ref,
clobber);
}
/*
* Method: BMailMessage::AddEnclosure()
* Descr:
*/
status_t
BMailMessage_AddEnclosure_1
(BMailMessage *MailMessage, const char *path,
bool clobber)
{
return MailMessage->AddEnclosure(path,
clobber);
}
/*
* Method: BMailMessage::AddEnclosure()
* Descr:
*/
status_t
BMailMessage_AddEnclosure_2
(BMailMessage *MailMessage, const char *MIME_type,
void *data,
int32 len,
bool clobber)
{
return MailMessage->AddEnclosure(MIME_type,
data,
len,
clobber);
}
/*
* Method: BMailMessage::AddHeaderField()
* Descr:
*/
status_t
BMailMessage_AddHeaderField(BMailMessage *MailMessage, uint32 encoding,
const char *field_name,
const char *str,
bool clobber)
{
return MailMessage->AddHeaderField(encoding,
field_name,
str,
clobber);
}
/*
* Method: BMailMessage::AddHeaderField()
* Descr:
*/
status_t
BMailMessage_AddHeaderField_1
(BMailMessage *MailMessage, const char *field_name,
const char *str,
bool clobber)
{
return MailMessage->AddHeaderField(field_name,
str,
clobber);
}
/*
* Method: BMailMessage::Send()
* Descr:
*/
status_t
BMailMessage_Send(BMailMessage *MailMessage, bool send_now,
bool remove_when_I_have_completed_sending_this_message_to_your_preferred_SMTP_server)
{
return MailMessage->Send(send_now,
remove_when_I_have_completed_sending_this_message_to_your_preferred_SMTP_server);
}
/*
* Method: BMailMessage::concatinate()
* Descr:
*/
/*int32
BMailMessage_concatinate(BMailMessage *MailMessage, char **,
int32,
char *)
{
return MailMessage->concatinate(,
,
);
}
*/
/*
* Method: BMailMessage::count_fields()
* Descr:
*/
/*int32
BMailMessage_count_fields(BMailMessage *MailMessage, char *name)
{
return MailMessage->count_fields(name);
}
*/
/*
* Method: BMailMessage::find_field()
* Descr:
*/
/*status_t
BMailMessage_find_field(BMailMessage *MailMessage, char *,
type_code *,
char **,
void **,
int32 *,
uint32 *,
char **,
bool *,
int32)
{
return MailMessage->find_field(,
,
,
,
,
,
,
,
);
}
*/
/*
* Method: BMailMessage::find_field()
* Descr:
*/
/*BList *
BMailMessage_find_field_1
(BMailMessage *MailMessage, const char *)
{
return MailMessage->find_field();
}
*/
/*
* Method: BMailMessage::get_field_name()
* Descr:
*/
/*status_t
BMailMessage_get_field_name(BMailMessage *MailMessage, char **,
int32)
{
return MailMessage->get_field_name(,
);
}
*/
/*
* Method: BMailMessage::set_field()
* Descr:
*/
/*status_t
BMailMessage_set_field(BMailMessage *MailMessage, const char *,
type_code,
const char *,
const void *,
int32,
uint32,
const char *,
bool)
{
return MailMessage->set_field(,
,
,
,
,
,
,
);
}
*/
#if defined(__cplusplus)
}
#endif
#endif /* _MAIL_CPP_ */

View File

@@ -1,125 +0,0 @@
{ BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Eric Jourde
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
}
unit Email;
interface
uses
beobj, SupportDefs, os,utf8;
// null because begin at 1 form e-mail.h
type mail_flags =(B_Mail_null,B_MAIL_PENDING,B_MAIL_SENT,B_MAIL_SAVE);
Const
B_MAIL_ATTR_NAME='MAIL:name';
B_MAIL_ATTR_STATUS='MAIL:status';
B_MAIL_ATTR_PRIORITY='MAIL:priority';
B_MAIL_ATTR_TO='MAIL:to';
B_MAIL_ATTR_CC='MAIL:cc';
B_MAIL_ATTR_FROM='MAIL:from';
B_MAIL_ATTR_SUBJECT='MAIL:subject';
B_MAIL_ATTR_REPLY='MAIL:reply';
B_MAIL_ATTR_WHEN='MAIL:when';
B_MAIL_ATTR_FLAGS='MAIL:flags';
B_MAIL_ATTR_RECIPIENTS='MAIL:recipients';
B_MAIL_ATTR_MIME='MAIL:mime';
B_MAIL_ATTR_HEADER='MAIL:header_length';
B_MAIL_ATTR_CONTENT='MAIL:content_length';
type TEMail = class(TbeObject)
private
public
constructor Create; override;
destructor Destroy; override;
function Add_Content(text : PChar;length: cardinal;encoding : TCharSet; clobber : boolean) : TStatus_t;
function Add_Content(text : PChar;length: cardinal;encoding : Pchar; clobber : boolean) : TStatus_t;
function AddEnclosure( path : Pchar; clobber:boolean) : TStatus_t;
function AddEnclosure(MIME_type : Pchar;data : pointer;len : cardinal; clobber:boolean) : TStatus_t;
function AddHeaderField( encoding: TCharSet; field_name : Pchar; str : PChar;clobber:boolean) : TStatus_t;
function AddHeaderField( field_name : Pchar; str : PChar;clobber:boolean) : TStatus_t;
function Send( send_now : boolean; remove_when_I_have_completed_sending_this_message_to_your_preferred_SMTP_server : boolean) : TStatus_t;
end;
function BMailMessage_Create() : TCPlusObject;cdecl; external BePascalLibName name 'BMailMessage_Create';
procedure BMail_Free(AObject : TCPlusObject);cdecl; external BePascalLibName name 'BMail_Free';
function BMailMessage_AddContent(AObject : TCPlusObject;text : PChar;length: cardinal;encoding : cardinal; clobber : boolean) : TStatus_t;cdecl; external BePascalLibName name 'BMailMessage_AddContent';
function BMailMessage_AddContent_1(AObject : TCPlusObject;text : PChar;length: cardinal;encoding : Pchar; clobber : boolean) : TStatus_t;cdecl; external BePascalLibName name 'BMailMessage_AddContent_1';
//function BMailMessage_AddEnclosure(AObject : TCPlusObject; entry_ref *ref, bool clobber) : TStatus_t;cdecl; external BePascalLibName name 'BMailMessage_AddEnclosure';
function BMailMessage_AddEnclosure_1(AObject : TCPlusObject; path : Pchar; clobber:boolean) : TStatus_t;cdecl; external BePascalLibName name 'BMailMessage_AddEnclosure_1';
function BMailMessage_AddEnclosure_2(AObject : TCPlusObject; MIME_type : Pchar;data : pointer;len : cardinal; clobber:boolean) : TStatus_t;cdecl; external BePascalLibName name 'BMailMessage_AddEnclosure_2';
function BMailMessage_AddHeaderField(AObject : TCPlusObject; encoding: cardinal; field_name : Pchar; str : PChar;clobber:boolean) : TStatus_t;cdecl; external BePascalLibName name 'BMailMessage_AddHeaderField';
function BMailMessage_AddHeaderField_1(AObject : TCPlusObject; field_name : Pchar; str : PChar;clobber:boolean) : TStatus_t;cdecl; external BePascalLibName name 'BMailMessage_AddHeaderField_1';
function BMailMessage_Send(AObject : TCPlusObject; send_now : boolean; remove_when_I_have_completed_sending_this_message_to_your_preferred_SMTP_server : boolean) : TStatus_t;cdecl; external BePascalLibName name 'BMailMessage_Send';
implementation
constructor TEmail.Create;
begin
inherited;
CPlusObject := BMailMessage_Create();
end;
destructor TEmail.Destroy;
begin
if CPlusObject <> nil then
BMail_Free(CPlusObject);
inherited;
end;
function TEmail.Add_Content(text : PChar;length: cardinal;encoding : TCharSet; clobber : boolean) : TStatus_t;
begin
result:=BMailMessage_AddContent(CPlusObject,text,length,cardinal(encoding),clobber );
end;
function TEmail.Add_Content(text : PChar;length: cardinal;encoding : Pchar; clobber : boolean) : TStatus_t;
begin
result:=BMailMessage_AddContent_1(CPlusObject,text,length,encoding,clobber );
end;
function TEmail.AddEnclosure( path : Pchar; clobber:boolean) : TStatus_t;
begin
result:=BMailMessage_AddEnclosure_1(CPlusObject,path,clobber);
end;
function TEmail.AddEnclosure(MIME_type : Pchar;data : pointer;len : cardinal; clobber:boolean) : TStatus_t;
begin
result:=BMailMessage_AddEnclosure_2(CPlusObject,MIME_type,data,len,clobber);
end;
function TEmail.AddHeaderField( encoding: TCharSet; field_name : Pchar; str : PChar;clobber:boolean) : TStatus_t;
begin
result:=BMailMessage_AddHeaderField(CPlusObject, cardinal(encoding), field_name , str,clobber);
end;
function TEmail.AddHeaderField( field_name : Pchar; str : PChar;clobber:boolean) : TStatus_t;
begin
result:=BMailMessage_AddHeaderField_1(CPlusObject, field_name, str,clobber) ;
end;
function TEmail.Send( send_now : boolean; remove_when_I_have_completed_sending_this_message_to_your_preferred_SMTP_server : boolean) : TStatus_t;
begin
result:=BMailMessage_Send(CPlusObject, send_now, remove_when_I_have_completed_sending_this_message_to_your_preferred_SMTP_server );
end;
end.

View File

@@ -1,398 +0,0 @@
/* BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Eric Jourde
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _VOLUME_CPP_
#define _VOLUME_CPP_
#include "Volume.h"
#include <beobj.h>
#if defined(__cplusplus)
extern "C" {
#endif
/*
* Method: BVolume::BVolume()
* Descr:
*/
TCPlusObject BVolume_Create(TPasObject PasObject)
{
return new BVolume();
}
/*
* Method: BVolume::BVolume()
* Descr:
*/
TCPlusObject BVolume_Create_1
(TPasObject PasObject, dev_t dev)
{
return new BVolume( dev);
}
/*
* Method: BVolume::BVolume()
* Descr:
*/
TCPlusObject BVolume_Create_2
(TPasObject PasObject, const BVolume &vol)
{
return new BVolume( vol);
}
/*
* Method: BVolume::~BVolume()
* Descr:
*/
void BVolume_BVolume(BVolume *Volume)
{
delete Volume;
}
/*
* Method: BVolume::InitCheck()
* Descr:
*/
status_t
BVolume_InitCheck(BVolume *Volume)
{
return Volume->InitCheck();
}
/*
* Method: BVolume::SetTo()
* Descr:
*/
status_t
BVolume_SetTo(BVolume *Volume, dev_t dev)
{
return Volume->SetTo(dev);
}
/*
* Method: BVolume::Unset()
* Descr:
*/
void
BVolume_Unset(BVolume *Volume, void)
{
Volume->Unset();
}
/*
* Method: BVolume::Device()
* Descr:
*/
dev_t
BVolume_Device(BVolume *Volume)
{
return Volume->Device();
}
/*
* Method: BVolume::GetRootDirectory()
* Descr:
*/
status_t
BVolume_GetRootDirectory(BVolume *Volume, BDirectory *dir)
{
return Volume->GetRootDirectory(dir);
}
/*
* Method: BVolume::Capacity()
* Descr:
*/
off_t
BVolume_Capacity(BVolume *Volume)
{
return Volume->Capacity();
}
/*
* Method: BVolume::FreeBytes()
* Descr:
*/
off_t
BVolume_FreeBytes(BVolume *Volume)
{
return Volume->FreeBytes();
}
/*
* Method: BVolume::GetName()
* Descr:
*/
status_t
BVolume_GetName(BVolume *Volume, char *name)
{
return Volume->GetName(name);
}
/*
* Method: BVolume::SetName()
* Descr:
*/
status_t
BVolume_SetName(BVolume *Volume, const char *name)
{
return Volume->SetName(name);
}
/*
* Method: BVolume::GetIcon()
* Descr:
*/
status_t
BVolume_GetIcon(BVolume *Volume, BBitmap *icon,
icon_size which)
{
return Volume->GetIcon(icon,
which);
}
/*
* Method: BVolume::IsRemovable()
* Descr:
*/
bool
BVolume_IsRemovable(BVolume *Volume)
{
return Volume->IsRemovable();
}
/*
* Method: BVolume::IsReadOnly()
* Descr:
*/
bool
BVolume_IsReadOnly(BVolume *Volume)
{
return Volume->IsReadOnly();
}
/*
* Method: BVolume::IsPersistent()
* Descr:
*/
bool
BVolume_IsPersistent(BVolume *Volume)
{
return Volume->IsPersistent();
}
/*
* Method: BVolume::IsShared()
* Descr:
*/
bool
BVolume_IsShared(BVolume *Volume)
{
return Volume->IsShared();
}
/*
* Method: BVolume::KnowsMime()
* Descr:
*/
bool
BVolume_KnowsMime(BVolume *Volume)
{
return Volume->KnowsMime();
}
/*
* Method: BVolume::KnowsAttr()
* Descr:
*/
bool
BVolume_KnowsAttr(BVolume *Volume)
{
return Volume->KnowsAttr();
}
/*
* Method: BVolume::KnowsQuery()
* Descr:
*/
bool
BVolume_KnowsQuery(BVolume *Volume)
{
return Volume->KnowsQuery();
}
/*
* Method: BVolume::operator==()
* Descr:
*/
/*bool
BVolume_operator==(BVolume *Volume, const BVolume &vol)
{
return Volume->operator==(vol);
}
*/
/*
* Method: BVolume::operator!=()
* Descr:
*/
/*
bool
BVolume_operator!=(BVolume *Volume, const BVolume &vol)
{
return Volume->operator!=(vol);
}
*/
/*
* Method: BVolume::operator=()
* Descr:
*/
/*
BVolume &
BVolume_operator=(BVolume *Volume, const BVolume &vol)
{
return Volume->operator=(vol);
}
*/
/*
* Method: BVolume::_TurnUpTheVolume1()
* Descr:
*/
/*
void
BVolume__TurnUpTheVolume1(BVolume *Volume)
{
Volume->_TurnUpTheVolume1();
}
*/
/*
* Method: BVolume::_TurnUpTheVolume2()
* Descr:
*/
/*
void
BVolume__TurnUpTheVolume2(BVolume *Volume)
{
Volume->_TurnUpTheVolume2();
}
*/
/*
* Method: BVolume::_TurnUpTheVolume3()
* Descr:
*/
/*
void
BVolume__TurnUpTheVolume3(BVolume *Volume)
{
Volume->_TurnUpTheVolume3();
}
*/
/*
* Method: BVolume::_TurnUpTheVolume4()
* Descr:
*/
/*
void
BVolume__TurnUpTheVolume4(BVolume *Volume)
{
Volume->_TurnUpTheVolume4();
}
*/
/*
* Method: BVolume::_TurnUpTheVolume5()
* Descr:
*/
/*
void
BVolume__TurnUpTheVolume5(BVolume *Volume)
{
Volume->_TurnUpTheVolume5();
}
*/
/*
* Method: BVolume::_TurnUpTheVolume6()
* Descr:
*/
/*
void
BVolume__TurnUpTheVolume6(BVolume *Volume)
{
Volume->_TurnUpTheVolume6();
}
*/
/*
* Method: BVolume::_TurnUpTheVolume7()
* Descr:
*/
/*
void
BVolume__TurnUpTheVolume7(BVolume *Volume)
{
Volume->_TurnUpTheVolume7();
}
*/
/*
* Method: BVolume::_TurnUpTheVolume8()
* Descr:
*/
/*
void
BVolume__TurnUpTheVolume8(BVolume *Volume)
{
Volume->_TurnUpTheVolume8();
}
*/
#if defined(__cplusplus)
}
#endif
#endif /* _VOLUME_CPP_ */

View File

@@ -1,169 +0,0 @@
{ BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Eric Jourde
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
}
unit Volume;
interface
uses
beobj, SupportDefs, os;
type
TVolume = class(TBeObject)
public
constructor Create; override;
destructor Destroy; override;
function InitCheck : Tstatus_t;
function SetTo(dev : Tdev_t) : Tstatus_t;
procedure Unset;
function Device : Tdev_t;
function Capacity : Toff_t;
function FreeBytes : Toff_t;
function GetName( name : pchar ):Tstatus_t;
function SetName( name : pchar ):Tstatus_t;
function IsRemovable : boolean;
function IsReadOnly : boolean;
function IsPersistent : boolean;
function IsShared : boolean;
function KnowsMime : boolean;
function KnowsAttr : boolean;
function KnowsQuery : boolean;
end;
function BVolume_Create: TCPlusObject;cdecl; external BePascalLibName name 'BVolume_Create';
function BVolume_Create_1(dev :Tdev_t ): TCPlusObject;cdecl; external BePascalLibName name 'BVolume_Create_1';
function BVolume_Create_2(vol : TCPlusObject ): TCPlusObject;cdecl; external BePascalLibName name 'BVolume_Create_2';
procedure BVolume_Free(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BVolume_BVolume';
function BVolume_InitCheck(AObject : TCPlusObject) : Tstatus_t;cdecl; external BePascalLibName name 'BVolume_InitCheck';
function BVolume_SetTo(AObject : TCPlusObject; dev :Tdev_t ): Tstatus_t;cdecl; external BePascalLibName name 'BVolume_SetTo';
procedure BVolume_Unset(AObject : TCPlusObject);cdecl; external BePascalLibName name 'BVolume_Unset';
function BVolume_Device(AObject : TCPlusObject) : TDev_t;cdecl; external BePascalLibName name 'BVolume_Device';
//status_t BVolume_GetRootDirectory(BVolume *Volume, BDirectory *dir)
function BVolume_Capacity(AObject : TCPlusObject) : Toff_t;cdecl; external BePascalLibName name 'BVolume_Capacity';
function BVolume_FreeBytes(AObject : TCPlusObject) : Toff_t;cdecl; external BePascalLibName name 'BVolume_FreeBytes';
function BVolume_GetName(AObject : TCPlusObject; name : pchar ): Tstatus_t;cdecl; external BePascalLibName name 'BVolume_GetName';
function BVolume_SetName(AObject : TCPlusObject; name : pchar ): Tstatus_t;cdecl; external BePascalLibName name 'BVolume_SetName';
//status_t BVolume_GetIcon(BVolume *Volume, BBitmap *icon, icon_size which)
function BVolume_IsRemovable(AObject : TCPlusObject) : boolean;cdecl; external BePascalLibName name 'BVolume_IsRemovable';
function BVolume_IsReadOnly(AObject : TCPlusObject) : boolean;cdecl; external BePascalLibName name 'BVolume_IsReadOnly';
function BVolume_IsPersistent(AObject : TCPlusObject) : boolean;cdecl; external BePascalLibName name 'BVolume_IsPersistent';
function BVolume_IsShared(AObject : TCPlusObject) : boolean;cdecl; external BePascalLibName name 'BVolume_IsShared';
function BVolume_KnowsMime(AObject : TCPlusObject) : boolean;cdecl; external BePascalLibName name 'BVolume_KnowsMime';
function BVolume_KnowsAttr(AObject : TCPlusObject) : boolean;cdecl; external BePascalLibName name 'BVolume_KnowsAttr';
function BVolume_KnowsQuery(AObject : TCPlusObject) : boolean;cdecl; external BePascalLibName name 'BVolume_KnowsQuery';
implementation
constructor TVolume.Create;
begin
inherited;
CPlusObject:=BVolume_Create;
end;
destructor TVolume.Destroy;
begin
if CPlusObject <> nil then BVolume_Free(CPlusObject);
inherited;
end;
function TVolume.InitCheck: Tstatus_t;
begin
result:=BVolume_InitCheck(CPlusObject);
end;
function TVolume.SetTo(dev : Tdev_t) : Tstatus_t;
begin
result:=BVolume_SetTo(CPlusObject,dev);
end;
procedure TVolume.Unset;
begin
BVolume_Unset(CPlusObject);
end;
function TVolume.Device : Tdev_t;
begin
result:=BVolume_Device(CPlusObject);
end;
function TVolume.Capacity : Toff_t;
begin
result:=BVolume_Capacity(CPlusObject);
end;
function TVolume.FreeBytes : Toff_t;
begin
result:=BVolume_FreeBytes(CPlusObject);
end;
function TVolume.GetName( name : pchar ):Tstatus_t;
begin
result:=BVolume_GetName(CPlusObject,name);
end;
function TVolume.SetName( name : pchar ):Tstatus_t;
begin
result:=BVolume_SetName(CPlusObject,name);
end;
function TVolume.IsRemovable : boolean;
begin
result:=BVolume_IsRemovable(CPlusObject);
end;
function TVolume.IsReadOnly : boolean;
begin
result:=BVolume_IsReadOnly(CPlusObject);
end;
function TVolume.IsPersistent : boolean;
begin
result:=BVolume_IsPersistent(CPlusObject);
end;
function TVolume.IsShared : boolean;
begin
result:=BVolume_IsShared(CPlusObject);
end;
function TVolume.KnowsMime : boolean;
begin
result:=BVolume_KnowsMime(CPlusObject);
end;
function TVolume.KnowsAttr : boolean;
begin
result:=BVolume_KnowsAttr(CPlusObject);
end;
function TVolume.KnowsQuery : boolean;
begin
result:=BVolume_KnowsQuery(CPlusObject);
end;
end.

Some files were not shown because too many files have changed in this diff Show More