From 8da1e7bb5019486d5d80aa60541c89fcb95c0d83 Mon Sep 17 00:00:00 2001 From: "Samuel D. Crow" Date: Thu, 11 Mar 2021 21:30:38 -0600 Subject: [PATCH] removed old files that shouldn't have been committed in the first place (unstaged) --- src/CalendarControl.cpp | 252 - src/CalendarControl.h | 97 - src/ControlLook.cpp | 2293 ------- src/DateTextView.cpp | 620 -- src/Makefile | 181 - src/MediaPlay.h | 11 - src/MonthView.cpp | 960 --- src/MonthWindow.cpp | 112 - src/MouseSenseStringView.cpp | 95 - src/RdefApply | 34 - src/Spinner.cpp | 654 -- src/Spinner.h | 59 - src/SplitPane.cpp | 726 --- src/SplitPane.h | 93 - src/URLView.cpp | 1147 ---- src/URLView.h | 152 - src/YAB.rdef | 38 - src/YAB.rdef.rsrc | Bin 3037 -> 0 bytes src/YabBitmapView.cpp | 117 - src/YabBitmapView.h | 31 - src/YabFilePanel.cpp | 79 - src/YabFilePanel.h | 10 - src/YabFilePanelLooper.cpp | 57 - src/YabFilePanelLooper.h | 19 - src/YabInterface.cpp | 11085 -------------------------------- src/YabInterface.h | 534 -- src/YabList.cpp | 92 - src/YabList.h | 28 - src/YabMain.cpp | 54 - src/YabMenu.h | 17 - src/YabStackView.cpp | 50 - src/YabStackView.h | 23 - src/YabTabView.cpp | 219 - src/YabTabView.h | 73 - src/YabText.cpp | 920 --- src/YabText.h | 90 - src/YabToolTip.cpp | 138 - src/YabView.cpp | 341 - src/YabView.h | 47 - src/YabWindow.cpp | 362 -- src/YabWindow.h | 38 - src/column/ColorTools.cpp | 110 - src/column/ColorTools.h | 107 - src/column/ColumnListView.cpp | 4887 -------------- src/column/ColumnListView.h | 409 -- src/column/ColumnTypes.cpp | 704 -- src/column/ColumnTypes.h | 289 - src/column/ObjectList.h | 800 --- src/column/YabColumnType.cpp | 444 -- src/column/YabColumnType.h | 107 - src/config.h | 216 - src/function.c | 2061 ------ src/global.h | 3 - src/graphic.c | 2592 -------- src/io.c | 1598 ----- src/libyab1.so | Bin 942286 -> 0 bytes src/main.c | 2252 ------- src/resattr.cpp | 313 - src/resattrMakefile | 27 - src/symbol.c | 1775 ----- src/yabasic.bison | 944 --- src/yabasic.flex | 562 -- src/yabasic.h | 888 --- 63 files changed, 43036 deletions(-) delete mode 100644 src/CalendarControl.cpp delete mode 100644 src/CalendarControl.h delete mode 100644 src/ControlLook.cpp delete mode 100644 src/DateTextView.cpp delete mode 100644 src/Makefile delete mode 100644 src/MediaPlay.h delete mode 100644 src/MonthView.cpp delete mode 100644 src/MonthWindow.cpp delete mode 100644 src/MouseSenseStringView.cpp delete mode 100755 src/RdefApply delete mode 100644 src/Spinner.cpp delete mode 100644 src/Spinner.h delete mode 100644 src/SplitPane.cpp delete mode 100644 src/SplitPane.h delete mode 100644 src/URLView.cpp delete mode 100644 src/URLView.h delete mode 100644 src/YAB.rdef delete mode 100644 src/YAB.rdef.rsrc delete mode 100644 src/YabBitmapView.cpp delete mode 100644 src/YabBitmapView.h delete mode 100644 src/YabFilePanel.cpp delete mode 100644 src/YabFilePanel.h delete mode 100644 src/YabFilePanelLooper.cpp delete mode 100644 src/YabFilePanelLooper.h delete mode 100644 src/YabInterface.cpp delete mode 100644 src/YabInterface.h delete mode 100644 src/YabList.cpp delete mode 100644 src/YabList.h delete mode 100644 src/YabMain.cpp delete mode 100644 src/YabMenu.h delete mode 100644 src/YabStackView.cpp delete mode 100644 src/YabStackView.h delete mode 100644 src/YabTabView.cpp delete mode 100644 src/YabTabView.h delete mode 100644 src/YabText.cpp delete mode 100644 src/YabText.h delete mode 100644 src/YabToolTip.cpp delete mode 100644 src/YabView.cpp delete mode 100644 src/YabView.h delete mode 100644 src/YabWindow.cpp delete mode 100644 src/YabWindow.h delete mode 100644 src/column/ColorTools.cpp delete mode 100644 src/column/ColorTools.h delete mode 100644 src/column/ColumnListView.cpp delete mode 100644 src/column/ColumnListView.h delete mode 100644 src/column/ColumnTypes.cpp delete mode 100644 src/column/ColumnTypes.h delete mode 100644 src/column/ObjectList.h delete mode 100644 src/column/YabColumnType.cpp delete mode 100644 src/column/YabColumnType.h delete mode 100644 src/config.h delete mode 100644 src/function.c delete mode 100644 src/global.h delete mode 100644 src/graphic.c delete mode 100644 src/io.c delete mode 100755 src/libyab1.so delete mode 100644 src/main.c delete mode 100644 src/resattr.cpp delete mode 100644 src/resattrMakefile delete mode 100644 src/symbol.c delete mode 100644 src/yabasic.bison delete mode 100644 src/yabasic.flex delete mode 100644 src/yabasic.h diff --git a/src/CalendarControl.cpp b/src/CalendarControl.cpp deleted file mode 100644 index 6c7e5a7..0000000 --- a/src/CalendarControl.cpp +++ /dev/null @@ -1,252 +0,0 @@ -// Calendar Control version 2.5 -// by Al.V. Sarikov. -// Kherson, Ukraine, 2006. -// E-mail: avix@ukrpost.net. -// Home page: http://avix.pp.ru. - -// Updated for Haiku and removed all stuff that is not needed and refactored by jan__64 2009 - -// Control which allows to work with dates: -// enter date to text field and choose it from calendar. - -// Distributed under BSD license (see LICENSE file). - -#define __LANG_ENGLISH // to compile english version - -#include "CalendarControl.h" - -#define myButtonMessage 'DCBP' - -#include "DateTextView.cpp" -#include "MonthWindow.cpp" - -#include -#include -#include -#include -#include -#include - - -CalendarControl::CalendarControl(BPoint p, const char* name, int day, int month, int year, uint32 flags, uint32 look) - :BControl(BRect(100,100,200,200),name, NULL, NULL, B_FOLLOW_LEFT | B_FOLLOW_TOP, B_WILL_DRAW) -{ - - uint32 divider=look & CC_ALL_DIVIDERS; - - myDateTextView = new DateTextView(day,month,year,flags,divider); - myButton = new CalendarButton(BRect(70,0,85,15), "CalendarButton", "", new BMessage(myButtonMessage), B_FOLLOW_LEFT | B_FOLLOW_TOP, B_WILL_DRAW); - myOrigin = p; - - AddChild(myDateTextView); - myDateTextView->MoveTo(3,3); - ResizeTo(myDateTextView->Bounds().Width()+6,myDateTextView->Bounds().Height()+7); - - AddChild(myButton); - - myButton->ResizeTo(Bounds().Height()*0.7,Bounds().Height()-1); - myButton->MoveTo(Bounds().right+1, Bounds().top); - ResizeBy(myButton->Bounds().Width()+1, 0); -} - - -CalendarControl::~CalendarControl() -{ - RemoveChild(myDateTextView); - delete myDateTextView; - RemoveChild(myButton); - delete myButton; -} - - -void CalendarControl::AttachedToWindow(void) -{ - BControl::AttachedToWindow(); - - myButton->SetTarget(this); - - if(Parent()!=NULL) - view_color=Parent()->ViewColor(); - else - view_color.red=view_color.green=view_color.blue=view_color.alpha=255; - - SetViewColor(view_color); // function of CalendarControl class - - // MakeButton(); // for BeOS interface is called only from here, - MoveTo(myOrigin); -} - - -void CalendarControl::Draw(BRect r) -{ - BRect bounds(Bounds()); - bounds.bottom--; - bounds.right = myButton->Frame().left - 1; - - rgb_color base = ui_color(B_PANEL_BACKGROUND_COLOR); - - bool active = myDateTextView->IsFocus() && Window()->IsActive(); - uint32 flags = 0; - if (!IsEnabled()) - flags |= BControlLook::B_DISABLED; - if (active) - flags |= BControlLook::B_FOCUSED; - be_control_look->DrawTextControlBorder((BView*)this, bounds, r, base, flags, 15); -} - - -void CalendarControl::KeyDown(const char *bytes, int32 numBytes) -{ - BControl::KeyDown(bytes, numBytes); - if(bytes[0]==B_TAB) Draw(Bounds()); -} - - -void CalendarControl::MakeFocus(bool focused) -{ - myDateTextView->MakeFocus(focused); -} - - -void CalendarControl::MessageReceived(BMessage *msg) -{ - switch(msg->what) - { - case myButtonMessage: - { - if(IsEnabled()) - { - MakeFocus(true); - int day, month, year; - int first_year, last_year; - GetDate(&day, &month, &year); - GetYearRange(&first_year, &last_year); - new MonthWindow(ConvertToScreen(BPoint(Bounds().left+1,Bounds().bottom+1)), - new BMessenger(this), day, month, year, first_year, last_year); - } - break; - } - case 'MVME': // message has come from window with calendar - { - int32 day, month, year; - msg->FindInt32("day",&day); - msg->FindInt32("month",&month); - msg->FindInt32("year",&year); - SetDate((int)day, (int)month, (int)year); - break; - } - default: - BControl::MessageReceived(msg); - } -} - - -void CalendarControl::SetEnabled(bool enabled) -{ - if(enabled==IsEnabled()) return; - BControl::SetEnabled(enabled); - myButton->SetEnabled(enabled); - myDateTextView->SetEnabled(enabled); - Invalidate(); -} - - -void CalendarControl::SetViewColor(rgb_color color) -{ - view_color=color; - BControl::SetViewColor(view_color); - Draw(Bounds()); - Invalidate(); -} - - -void CalendarControl::SetViewColor(uchar red, uchar green, - uchar blue, uchar alpha) -{ - rgb_color color={red, green, blue, alpha}; - SetViewColor(color); -} - - -void CalendarControl::WindowActivated(bool active) -{ - myWindowActive = active; // true if window where control is placed is active - Draw(Bounds()); -} - - -const char* CalendarControl::Text() const -{ - return myDateTextView->Text(); -} - - -void CalendarControl::GetDate(int *day, int *month, int *year) -{ - myDateTextView->GetDate(day,month,year); -} - - -void CalendarControl::SetDate(int day, int month, int year) -{ - myDateTextView->SetDate(day,month,year); -} - - -void CalendarControl::SetDate(const char *tdate) -{ - myDateTextView->SetDate(tdate); -} - - -void CalendarControl::GetYearRange(int *first_year, int *last_year) -{ - myDateTextView->GetYearRange(first_year, last_year); -} - - -uint32 CalendarControl::GetLook() -{ - return (myDateTextView->GetDivider()); -} - - -void CalendarControl::SetLook(uint32 look) -{ - myDateTextView->SetDivider(look & CC_ALL_DIVIDERS); -} - - -uint32 CalendarControl::GetFlags() -{ - return myDateTextView->GetDateFlags(); -} - - -void CalendarControl::SetFlags(uint32 flags) -{ - myDateTextView->SetDateFlags(flags); -} - - -BTextView *CalendarControl::TextView(void) const -{ - return (BTextView *)myDateTextView; -} - - -void CalendarButton::Draw(BRect update) -{ - BButton::Draw(update); - BRect rect = Bounds(); - rect.InsetBy(2.0,4.0); - uint32 flags = 0; - rgb_color base = ui_color(B_PANEL_TEXT_COLOR); - float tint = B_NO_TINT; - if(!IsEnabled()) - { - tint = B_LIGHTEN_MAX_TINT; - flags |= BControlLook::B_DISABLED; - } - be_control_look->DrawArrowShape(this, rect, update, base, 3, flags, tint); -} diff --git a/src/CalendarControl.h b/src/CalendarControl.h deleted file mode 100644 index 005b132..0000000 --- a/src/CalendarControl.h +++ /dev/null @@ -1,97 +0,0 @@ -// Calendar Control version 2.5 -// by Al.V. Sarikov. -// Kherson, Ukraine, 2006. -// E-mail: avix@ukrpost.net. -// Home page: http://avix.pp.ru. - -// Control which allows to work with dates: -// enter date to text field and choose it from calendar. - -// Distributed under BSD license (see LICENSE file). - -#include -#include -#include -#include - -class DateTextView; - -class CalendarButton : public BButton -{ - public: - CalendarButton(BRect frame, const char* name, const char* label, - BMessage* message, uint32 resizingMode, uint32 flags) - : BButton(frame, name, label, message, resizingMode, flags) - {}; - ~CalendarButton() {}; - void Draw(BRect update); -}; - -// Formats of date - -enum date_format { - CC_DD_MM_YYYY_FORMAT = 0, - CC_MM_DD_YYYY_FORMAT -}; - -enum full_short_year { - CC_FULL_YEAR = 0, // DD.MM.YYYY - CC_SHORT_YEAR = 8 // DD.MM.YY -}; - -enum century_begin { - CC_FULL_CENTURY = 0, // first year is first year of century (01-00) - CC_HALF_CENTURY = 16 // first year is 51th year of century (51-50) -}; - -enum divider_format { - CC_DOT_DIVIDER = 0, // . - CC_SLASH_DIVIDER, // / - CC_MINUS_DIVIDER, // - - CC_ALL_DIVIDERS // 2 bits, and some one bit is reserved -}; - - -class CalendarControl: public BControl -{ - public: - CalendarControl(BPoint p, - const char* name, - int day=0, - int month=0, - int year=0, - uint32 flags=CC_DD_MM_YYYY_FORMAT | CC_FULL_YEAR, - uint32 look=CC_DOT_DIVIDER); - ~CalendarControl(); - virtual void AttachedToWindow(void); - virtual void Draw(BRect r); - virtual void KeyDown(const char *bytes, int32 numBytes); - virtual void MakeFocus(bool focused=true); - virtual void MessageReceived(BMessage *msg); - virtual void SetEnabled(bool enabled); - virtual void SetViewColor(rgb_color color); - void SetViewColor(uchar red, uchar green, uchar blue, uchar alpha=255); - virtual void WindowActivated(bool active); - - void GetDate(int *day, int *month, int *year); - void SetDate(int day=0, int month=0, int year=0); - void SetDate(const char *tdate); - void GetYearRange(int *first_year, int *last_year); - uint32 GetLook(); - void SetLook(uint32 look); - uint32 GetFlags(); - void SetFlags(uint32 flags); - const char* Text() const; - BTextView *TextView(void) const; - const char* Version(); - - private: - void MakeButton(); - - DateTextView *myDateTextView; - CalendarButton *myButton; - bool myWindowActive; - BPoint myOrigin; - rgb_color view_color; -}; - diff --git a/src/ControlLook.cpp b/src/ControlLook.cpp deleted file mode 100644 index 984502e..0000000 --- a/src/ControlLook.cpp +++ /dev/null @@ -1,2293 +0,0 @@ -/* - * Copyright 2009, Stephan Aßmus - * Distributed under the terms of the MIT License. - */ -#include - -#include - -#include -#include -#include -#include -#include -#include - -namespace BPrivate { - -static const float kEdgeBevelLightTint = 0.59; -static const float kEdgeBevelShadowTint = 1.0735; - - -BControlLook::BControlLook() -{ -} - - -BControlLook::~BControlLook() -{ -} - - -BAlignment -BControlLook::DefaultLabelAlignment() const -{ - return BAlignment(B_ALIGN_LEFT, B_ALIGN_VERTICAL_CENTER); -} - - -float -BControlLook::DefaultLabelSpacing() const -{ - return 4.0;//ceilf(be_plain_font->Size() / 4.0); -} - - -uint32 -BControlLook::Flags(BControl* control) const -{ - uint32 flags = 0; - - if (!control->IsEnabled()) - flags |= B_DISABLED; - - if (control->IsFocus()) - flags |= B_FOCUSED; - - if (control->Value() == B_CONTROL_ON) - flags |= B_ACTIVATED; - - return flags; -} - - -// #pragma mark - - - -void -BControlLook::DrawButtonFrame(BView* view, BRect& rect, const BRect& updateRect, - const rgb_color& base, const rgb_color& background, uint32 flags, - uint32 borders) -{ - _DrawButtonFrame(view, rect, updateRect, base, background, 1.0, 1.0, flags, - borders); -} - - -void -BControlLook::DrawButtonBackground(BView* view, BRect& rect, - const BRect& updateRect, const rgb_color& base, uint32 flags, - uint32 borders, enum orientation orientation) -{ - if (!rect.IsValid() || !updateRect.Intersects(rect)) - return; - - // the surface edges - - // colors - rgb_color buttonBgColor = tint_color(base, B_LIGHTEN_1_TINT); - rgb_color maxLightColor; - - rgb_color bevelColor1; - rgb_color bevelColor2; - - if ((flags & B_DISABLED) == 0) { - maxLightColor = tint_color(base, 0.2); - bevelColor1 = tint_color(base, 1.08); - bevelColor2 = base; - } else { - maxLightColor = tint_color(base, 0.7); - bevelColor1 = base; - bevelColor2 = buttonBgColor; - buttonBgColor = maxLightColor; - } - - if (flags & B_ACTIVATED) { - view->BeginLineArray(4); - - bevelColor1 = tint_color(bevelColor1, B_DARKEN_1_TINT); - bevelColor2 = tint_color(bevelColor2, B_DARKEN_1_TINT); - - // shadow along left/top borders - if (borders & B_LEFT_BORDER) { - view->AddLine(BPoint(rect.left, rect.top), - BPoint(rect.left, rect.bottom), bevelColor1); - rect.left++; - } - if (borders & B_TOP_BORDER) { - view->AddLine(BPoint(rect.left, rect.top), - BPoint(rect.right, rect.top), bevelColor1); - rect.top++; - } - - // softer shadow along left/top borders - if (borders & B_LEFT_BORDER) { - view->AddLine(BPoint(rect.left, rect.top), - BPoint(rect.left, rect.bottom), bevelColor2); - rect.left++; - } - if (borders & B_TOP_BORDER) { - view->AddLine(BPoint(rect.left, rect.top), - BPoint(rect.right, rect.top), bevelColor2); - rect.top++; - } - - view->EndLineArray(); - } else { - _DrawFrame(view, rect, - maxLightColor, maxLightColor, - bevelColor1, bevelColor1, - buttonBgColor, buttonBgColor, borders); - } - - // the actual surface top - - float topTint = 0.49; - float middleTint1 = 0.62; - float middleTint2 = 0.76; - float bottomTint = 0.90; - - if (flags & B_ACTIVATED) { - topTint = 1.11; - bottomTint = 1.08; - } - - if (flags & B_DISABLED) { - topTint = (topTint + B_NO_TINT) / 2; - middleTint1 = (middleTint1 + B_NO_TINT) / 2; - middleTint2 = (middleTint2 + B_NO_TINT) / 2; - bottomTint = (bottomTint + B_NO_TINT) / 2; - } else if (flags & B_HOVER) { - static const float kHoverTintFactor = 0.85; - topTint *= kHoverTintFactor; - middleTint1 *= kHoverTintFactor; - middleTint2 *= kHoverTintFactor; - bottomTint *= kHoverTintFactor; - } - - if (flags & B_ACTIVATED) { - _FillGradient(view, rect, base, topTint, bottomTint, orientation); - } else { - _FillGlossyGradient(view, rect, base, topTint, middleTint1, - middleTint2, bottomTint, orientation); - } -} - - -void -BControlLook::DrawMenuBarBackground(BView* view, BRect& rect, - const BRect& updateRect, const rgb_color& base, uint32 flags, - uint32 borders) -{ - if (!rect.IsValid() || !updateRect.Intersects(rect)) - return; - - // the surface edges - - // colors - float topTint; - float bottomTint; - - if (flags & B_ACTIVATED) { - rgb_color bevelColor1 = tint_color(base, 1.40); - rgb_color bevelColor2 = tint_color(base, 1.25); - - topTint = 1.25; - bottomTint = 1.20; - - _DrawFrame(view, rect, - bevelColor1, bevelColor1, - bevelColor2, bevelColor2, - borders & B_TOP_BORDER); - } else { - rgb_color cornerColor = tint_color(base, 0.9); - rgb_color bevelColorTop = tint_color(base, 0.5); - rgb_color bevelColorLeft = tint_color(base, 0.7); - rgb_color bevelColorRightBottom = tint_color(base, 1.08); - - topTint = 0.69; - bottomTint = 1.03; - - _DrawFrame(view, rect, - bevelColorLeft, bevelColorTop, - bevelColorRightBottom, bevelColorRightBottom, - cornerColor, cornerColor, - borders); - } - - // the actual surface top - - _FillGradient(view, rect, base, topTint, bottomTint); -} - - -void -BControlLook::DrawMenuFieldFrame(BView* view, BRect& rect, - const BRect& updateRect, const rgb_color& base, - const rgb_color& background, uint32 flags, uint32 borders) -{ - _DrawButtonFrame(view, rect, updateRect, base, background, 0.6, 1.0, flags, - borders); -} - - -void -BControlLook::DrawMenuFieldBackground(BView* view, BRect& rect, - const BRect& updateRect, const rgb_color& base, bool popupIndicator, - uint32 flags) -{ - if (popupIndicator) { - BRect leftRect(rect); - leftRect.right -= 10; - - BRect rightRect(rect); - rightRect.left = rightRect.right - 9; - - DrawMenuFieldBackground(view, leftRect, updateRect, base, flags, - B_LEFT_BORDER | B_TOP_BORDER | B_BOTTOM_BORDER); - - rgb_color indicatorBase; - rgb_color markColor; - if (flags & B_DISABLED) { - indicatorBase = tint_color(base, 1.05); - markColor = tint_color(base, 1.35); - } else { - indicatorBase = tint_color(base, 1.12); - markColor = tint_color(base, 1.65); - } - - DrawMenuFieldBackground(view, rightRect, updateRect, indicatorBase, - flags, B_RIGHT_BORDER | B_TOP_BORDER | B_BOTTOM_BORDER); - - // popup marker - BPoint center(roundf((rightRect.left + rightRect.right) / 2.0), - roundf((rightRect.top + rightRect.bottom) / 2.0)); - BPoint triangle[3]; - triangle[0] = center + BPoint(-2.5, -0.5); - triangle[1] = center + BPoint(2.5, -0.5); - triangle[2] = center + BPoint(0.0, 2.0); - - uint32 viewFlags = view->Flags(); - view->SetFlags(viewFlags | B_SUBPIXEL_PRECISE); - - view->SetHighColor(markColor); - view->FillTriangle(triangle[0], triangle[1], triangle[2]); - - view->SetFlags(viewFlags); - - rect = leftRect; - } else { - DrawMenuFieldBackground(view, rect, updateRect, base, flags); - } -} - -void -BControlLook::DrawMenuFieldBackground(BView* view, BRect& rect, - const BRect& updateRect, const rgb_color& base, uint32 flags, - uint32 borders) -{ - if (!rect.IsValid() || !updateRect.Intersects(rect)) - return; - - // the surface edges - - // colors - rgb_color cornerColor = tint_color(base, 0.85); - rgb_color bevelColor1 = tint_color(base, 0.3); - rgb_color bevelColor2 = tint_color(base, 0.5); - rgb_color bevelColor3 = tint_color(base, 1.03); - - if (flags & B_DISABLED) { - cornerColor = tint_color(base, 0.8); - bevelColor1 = tint_color(base, 0.7); - bevelColor2 = tint_color(base, 0.8); - bevelColor3 = tint_color(base, 1.01); - } else { - cornerColor = tint_color(base, 0.85); - bevelColor1 = tint_color(base, 0.3); - bevelColor2 = tint_color(base, 0.5); - bevelColor3 = tint_color(base, 1.03); - } - - _DrawFrame(view, rect, - bevelColor2, bevelColor1, - bevelColor3, bevelColor3, - cornerColor, cornerColor, - borders); - - // the actual surface top - - float topTint = 0.49; - float middleTint1 = 0.62; - float middleTint2 = 0.76; - float bottomTint = 0.90; - - if (flags & B_DISABLED) { - topTint = (topTint + B_NO_TINT) / 2; - middleTint1 = (middleTint1 + B_NO_TINT) / 2; - middleTint2 = (middleTint2 + B_NO_TINT) / 2; - bottomTint = (bottomTint + B_NO_TINT) / 2; - } else if (flags & B_HOVER) { - static const float kHoverTintFactor = 0.85; - topTint *= kHoverTintFactor; - middleTint1 *= kHoverTintFactor; - middleTint2 *= kHoverTintFactor; - bottomTint *= kHoverTintFactor; - } - - _FillGlossyGradient(view, rect, base, topTint, middleTint1, - middleTint2, bottomTint); -} - -void -BControlLook::DrawMenuBackground(BView* view, BRect& rect, - const BRect& updateRect, const rgb_color& base, uint32 flags, - uint32 borders) -{ - if (!rect.IsValid() || !updateRect.Intersects(rect)) - return; - - // the surface edges - - rgb_color bevelLightColor; - rgb_color bevelShadowColor; - rgb_color background = tint_color(base, 0.75); - - if (flags & B_DISABLED) { - bevelLightColor = tint_color(background, 0.80); - bevelShadowColor = tint_color(background, 1.07); - } else { - bevelLightColor = tint_color(background, 0.6); - bevelShadowColor = tint_color(background, 1.12); - } - - _DrawFrame(view, rect, - bevelLightColor, bevelLightColor, - bevelShadowColor, bevelShadowColor, - borders); - - // the actual surface top - - view->SetHighColor(background); - view->FillRect(rect); -} - - -void -BControlLook::DrawMenuItemBackground(BView* view, BRect& rect, - const BRect& updateRect, const rgb_color& base, uint32 flags, - uint32 borders) -{ - if (!rect.IsValid() || !updateRect.Intersects(rect)) - return; - - // the surface edges - - float topTint; - float bottomTint; - rgb_color selectedColor = base; - - if (flags & B_ACTIVATED) { - topTint = 0.9; - bottomTint = 1.05; - selectedColor = tint_color(base, 1.26); - } else if (flags & B_DISABLED) { - topTint = 0.80; - bottomTint = 1.07; - } else { - topTint = 0.6; - bottomTint = 1.12; - } - - rgb_color bevelLightColor = tint_color(selectedColor, topTint); - rgb_color bevelShadowColor = tint_color(selectedColor, bottomTint); - - _DrawFrame(view, rect, - bevelLightColor, bevelLightColor, - bevelShadowColor, bevelShadowColor, - borders); - - // the actual surface top - - view->SetLowColor(selectedColor); -// _FillGradient(view, rect, selectedColor, topTint, bottomTint); - _FillGradient(view, rect, selectedColor, bottomTint, topTint); -} - - -void -BControlLook::DrawStatusBar(BView* view, BRect& rect, const BRect& updateRect, - const rgb_color& base, const rgb_color& barColor, float progressPosition) -{ - if (!rect.Intersects(updateRect)) - return; - - _DrawOuterResessedFrame(view, rect, base, 0.6); - - // colors - rgb_color dark1BorderColor = tint_color(base, 1.3); - rgb_color dark2BorderColor = tint_color(base, 1.2); - rgb_color dark1FilledBorderColor = tint_color(barColor, 1.20); - rgb_color dark2FilledBorderColor = tint_color(barColor, 1.45); - - BRect filledRect(rect); - filledRect.right = progressPosition - 1; - - BRect nonfilledRect(rect); - nonfilledRect.left = progressPosition; - - bool filledSurface = filledRect.Width() > 0; - bool nonfilledSurface = nonfilledRect.Width() > 0; - - if (filledSurface) { - _DrawFrame(view, filledRect, - dark1FilledBorderColor, dark1FilledBorderColor, - dark2FilledBorderColor, dark2FilledBorderColor); - - _FillGlossyGradient(view, filledRect, barColor, 0.55, 0.68, 0.76, 0.90); - } - - if (nonfilledSurface) { - _DrawFrame(view, nonfilledRect, dark1BorderColor, dark1BorderColor, - dark2BorderColor, dark2BorderColor, - B_TOP_BORDER | B_BOTTOM_BORDER | B_RIGHT_BORDER); - - if (nonfilledRect.left < nonfilledRect.right) { - // shadow from fill bar, or left border - rgb_color leftBorder = dark1BorderColor; - if (filledSurface) - leftBorder = tint_color(base, 0.50); - view->SetHighColor(leftBorder); - view->StrokeLine(nonfilledRect.LeftTop(), - nonfilledRect.LeftBottom()); - nonfilledRect.left++; - } - - _FillGradient(view, nonfilledRect, base, 0.25, 0.06); - } -} - - -void -BControlLook::DrawCheckBox(BView* view, BRect& rect, const BRect& updateRect, - const rgb_color& base, uint32 flags) -{ - if (!rect.Intersects(updateRect)) - return; - - rgb_color dark1BorderColor; - rgb_color dark2BorderColor; - rgb_color navigationColor = ui_color(B_KEYBOARD_NAVIGATION_COLOR); - - if (flags & B_DISABLED) { - _DrawOuterResessedFrame(view, rect, base, 0.0, 1.0, flags); - - dark1BorderColor = tint_color(base, 1.15); - dark2BorderColor = tint_color(base, 1.15); - } else if (flags & B_CLICKED) { - dark1BorderColor = tint_color(base, 1.50); - dark2BorderColor = tint_color(base, 1.48); - - _DrawFrame(view, rect, - dark1BorderColor, dark1BorderColor, - dark2BorderColor, dark2BorderColor); - - dark2BorderColor = dark1BorderColor; - } else { - _DrawOuterResessedFrame(view, rect, base, 0.6, 1.0, flags); - - dark1BorderColor = tint_color(base, 1.40); - dark2BorderColor = tint_color(base, 1.38); - } - - if (flags & B_FOCUSED) { - dark1BorderColor = navigationColor; - dark2BorderColor = navigationColor; - } - - _DrawFrame(view, rect, - dark1BorderColor, dark1BorderColor, - dark2BorderColor, dark2BorderColor); - - if (flags & B_DISABLED) { - _FillGradient(view, rect, base, 0.4, 0.2); - } else { - _FillGradient(view, rect, base, 0.15, 0.0); - } - - rgb_color markColor; - if (_RadioButtonAndCheckBoxMarkColor(base, markColor, flags)) { - view->SetHighColor(markColor); - - rect.InsetBy(2, 2); - view->SetPenSize(max_c(1.0, ceilf(rect.Width() / 3.5))); - view->SetDrawingMode(B_OP_OVER); - - view->StrokeLine(rect.LeftTop(), rect.RightBottom()); - view->StrokeLine(rect.LeftBottom(), rect.RightTop()); - } -} - - -void -BControlLook::DrawRadioButton(BView* view, BRect& rect, const BRect& updateRect, - const rgb_color& base, uint32 flags) -{ - if (!rect.Intersects(updateRect)) - return; - - rgb_color borderColor; - rgb_color bevelLight; - rgb_color bevelShadow; - rgb_color navigationColor = ui_color(B_KEYBOARD_NAVIGATION_COLOR); - - if (flags & B_DISABLED) { - borderColor = tint_color(base, 1.15); - bevelLight = base; - bevelShadow = base; - } else if (flags & B_CLICKED) { - borderColor = tint_color(base, 1.50); - bevelLight = borderColor; - bevelShadow = borderColor; - } else { - borderColor = tint_color(base, 1.45); - bevelLight = tint_color(base, 0.55); - bevelShadow = tint_color(base, 1.11); - } - - if (flags & B_FOCUSED) { - borderColor = navigationColor; - } - - BGradientLinear bevelGradient; - bevelGradient.AddColor(bevelShadow, 0); - bevelGradient.AddColor(bevelLight, 255); - bevelGradient.SetStart(rect.LeftTop()); - bevelGradient.SetEnd(rect.RightBottom()); - - view->FillEllipse(rect, bevelGradient); - rect.InsetBy(1, 1); - - bevelGradient.MakeEmpty(); - bevelGradient.AddColor(borderColor, 0); - bevelGradient.AddColor(tint_color(borderColor, 0.8), 255); - view->FillEllipse(rect, bevelGradient); - rect.InsetBy(1, 1); - - float topTint; - float bottomTint; - if (flags & B_DISABLED) { - topTint = 0.4; - bottomTint = 0.2; - } else { - topTint = 0.15; - bottomTint = 0.0; - } - - BGradientLinear gradient; - _MakeGradient(gradient, rect, base, topTint, bottomTint); - view->FillEllipse(rect, gradient); - - rgb_color markColor; - if (_RadioButtonAndCheckBoxMarkColor(base, markColor, flags)) { - view->SetHighColor(markColor); - rect.InsetBy(3, 3); - view->FillEllipse(rect); - } -} - - -void -BControlLook::DrawScrollBarBackground(BView* view, BRect& rect1, BRect& rect2, - const BRect& updateRect, const rgb_color& base, uint32 flags, - enum orientation orientation) -{ - DrawScrollBarBackground(view, rect1, updateRect, base, flags, orientation); - DrawScrollBarBackground(view, rect2, updateRect, base, flags, orientation); -} - -void -BControlLook::DrawScrollBarBackground(BView* view, BRect& rect, - const BRect& updateRect, const rgb_color& base, uint32 flags, - enum orientation orientation) -{ - if (!rect.IsValid() || !rect.Intersects(updateRect)) - return; - - float gradient1Tint; - float gradient2Tint; - float darkEdge1Tint; - float darkEdge2Tint; - float shadowTint; - - if (flags & B_DISABLED) { - gradient1Tint = 0.9; - gradient2Tint = 0.8; - darkEdge1Tint = B_DARKEN_2_TINT; - darkEdge2Tint = B_DARKEN_2_TINT; - shadowTint = gradient1Tint; - } else { - gradient1Tint = 1.10; - gradient2Tint = 1.05; - darkEdge1Tint = B_DARKEN_3_TINT; - darkEdge2Tint = B_DARKEN_2_TINT; - shadowTint = gradient1Tint; - } - - rgb_color darkEdge1 = tint_color(base, darkEdge1Tint); - rgb_color darkEdge2 = tint_color(base, darkEdge2Tint); - rgb_color shadow = tint_color(base, shadowTint); - - if (orientation == B_HORIZONTAL) { - // dark vertical line on left edge - if (rect.Width() > 0) { - view->SetHighColor(darkEdge1); - view->StrokeLine(rect.LeftTop(), rect.LeftBottom()); - rect.left++; - } - // dark vertical line on right edge - if (rect.Width() >= 0) { - view->SetHighColor(darkEdge2); - view->StrokeLine(rect.RightTop(), rect.RightBottom()); - rect.right--; - } - // vertical shadow line after left edge - if (rect.Width() >= 0) { - view->SetHighColor(shadow); - view->StrokeLine(rect.LeftTop(), rect.LeftBottom()); - rect.left++; - } - // fill - if (rect.Width() >= 0) { - _FillGradient(view, rect, base, gradient1Tint, gradient2Tint, - orientation); - } - } else { - // dark vertical line on top edge - if (rect.Height() > 0) { - view->SetHighColor(darkEdge1); - view->StrokeLine(rect.LeftTop(), rect.RightTop()); - rect.top++; - } - // dark vertical line on bottom edge - if (rect.Height() >= 0) { - view->SetHighColor(darkEdge2); - view->StrokeLine(rect.LeftBottom(), rect.RightBottom()); - rect.bottom--; - } - // horizontal shadow line after top edge - if (rect.Height() >= 0) { - view->SetHighColor(shadow); - view->StrokeLine(rect.LeftTop(), rect.RightTop()); - rect.top++; - } - // fill - if (rect.Height() >= 0) { - _FillGradient(view, rect, base, gradient1Tint, gradient2Tint, - orientation); - } - } -} - - -void -BControlLook::DrawScrollViewFrame(BView* view, BRect& rect, - const BRect& updateRect, BRect verticalScrollBarFrame, - BRect horizontalScrollBarFrame, const rgb_color& base, - border_style border, uint32 flags, uint32 _borders) -{ - // calculate scroll corner rect before messing with the "rect" - BRect scrollCornerFillRect(rect.right, rect.bottom, - rect.right, rect.bottom); - if (horizontalScrollBarFrame.IsValid()) - scrollCornerFillRect.left = horizontalScrollBarFrame.right + 1; - if (verticalScrollBarFrame.IsValid()) - scrollCornerFillRect.top = verticalScrollBarFrame.bottom + 1; - - if (border == B_NO_BORDER) { - if (scrollCornerFillRect.IsValid()) { - view->SetHighColor(base); - view->FillRect(scrollCornerFillRect); - } - return; - } - - bool excludeScrollCorner = border == B_FANCY_BORDER - && horizontalScrollBarFrame.IsValid() - && verticalScrollBarFrame.IsValid(); - - uint32 borders = _borders; - if (excludeScrollCorner) { - rect.bottom = horizontalScrollBarFrame.top; - rect.right = verticalScrollBarFrame.left; - borders &= ~(B_RIGHT_BORDER | B_BOTTOM_BORDER); - } - - rgb_color scrollbarFrameColor = tint_color(base, B_DARKEN_2_TINT); - - if (border == B_FANCY_BORDER) - _DrawOuterResessedFrame(view, rect, base, 1.0, 1.0, flags, borders); - - if (flags & B_FOCUSED) { - rgb_color focusColor = ui_color(B_KEYBOARD_NAVIGATION_COLOR); - _DrawFrame(view, rect, focusColor, focusColor, focusColor, focusColor, - borders); - } else { - _DrawFrame(view, rect, scrollbarFrameColor, scrollbarFrameColor, - scrollbarFrameColor, scrollbarFrameColor, borders); - } - - if (excludeScrollCorner) { - horizontalScrollBarFrame.InsetBy(-1, -1); - // do not overdraw the top edge - horizontalScrollBarFrame.top += 2; - borders = _borders; - borders &= ~B_TOP_BORDER; - _DrawOuterResessedFrame(view, horizontalScrollBarFrame, base, - 1.0, 1.0, flags, borders); - _DrawFrame(view, horizontalScrollBarFrame, scrollbarFrameColor, - scrollbarFrameColor, scrollbarFrameColor, scrollbarFrameColor, - borders); - - - verticalScrollBarFrame.InsetBy(-1, -1); - // do not overdraw the left edge - verticalScrollBarFrame.left += 2; - borders = _borders; - borders &= ~B_LEFT_BORDER; - _DrawOuterResessedFrame(view, verticalScrollBarFrame, base, - 1.0, 1.0, flags, borders); - _DrawFrame(view, verticalScrollBarFrame, scrollbarFrameColor, - scrollbarFrameColor, scrollbarFrameColor, scrollbarFrameColor, - borders); - - // exclude recessed frame - scrollCornerFillRect.top++; - scrollCornerFillRect.left++; - } - - if (scrollCornerFillRect.IsValid()) { - view->SetHighColor(base); - view->FillRect(scrollCornerFillRect); - } -} - - -void -BControlLook::DrawArrowShape(BView* view, BRect& rect, const BRect& updateRect, - const rgb_color& base, uint32 direction, uint32 flags, float tint) -{ - BPoint tri1, tri2, tri3; - float hInset = rect.Width() / 3; - float vInset = rect.Height() / 3; - rect.InsetBy(hInset, vInset); - - switch (direction) { - case B_LEFT_ARROW: - tri1.Set(rect.right, rect.top); - tri2.Set(rect.right - rect.Width() / 1.33, - (rect.top + rect.bottom + 1) /2 ); - tri3.Set(rect.right, rect.bottom + 1); - break; - case B_RIGHT_ARROW: - tri1.Set(rect.left, rect.bottom + 1); - tri2.Set(rect.left + rect.Width() / 1.33, - (rect.top + rect.bottom + 1) / 2); - tri3.Set(rect.left, rect.top); - break; - case B_UP_ARROW: - tri1.Set(rect.left, rect.bottom); - tri2.Set((rect.left + rect.right + 1) / 2, - rect.bottom - rect.Height() / 1.33); - tri3.Set(rect.right + 1, rect.bottom); - break; - case B_DOWN_ARROW: - default: - tri1.Set(rect.left, rect.top); - tri2.Set((rect.left + rect.right + 1) / 2, - rect.top + rect.Height() / 1.33); - tri3.Set(rect.right + 1, rect.top); - break; - } - // offset triangle if down - if (flags & B_ACTIVATED) - view->MovePenTo(BPoint(1, 1)); - else - view->MovePenTo(BPoint(0, 0)); - - BShape arrowShape; - arrowShape.MoveTo(tri1); - arrowShape.LineTo(tri2); - arrowShape.LineTo(tri3); - - if (flags & B_DISABLED) - tint = (tint + B_NO_TINT + B_NO_TINT) / 3; - - view->SetHighColor(tint_color(base, tint)); - - float penSize = view->PenSize(); - drawing_mode mode = view->DrawingMode(); - - view->SetPenSize(ceilf(hInset / 2.0)); - view->SetDrawingMode(B_OP_OVER); - view->StrokeShape(&arrowShape); - - view->SetPenSize(penSize); - view->SetDrawingMode(mode); -} - - -rgb_color -BControlLook::SliderBarColor(const rgb_color& base) -{ - return tint_color(ui_color(B_PANEL_BACKGROUND_COLOR), B_DARKEN_1_TINT); -} - - -void -BControlLook::DrawSliderBar(BView* view, BRect rect, const BRect& updateRect, - const rgb_color& base, rgb_color leftFillColor, rgb_color rightFillColor, - float sliderScale, uint32 flags, enum orientation orientation) -{ - if (!rect.IsValid() || !rect.Intersects(updateRect)) - return; - - // separate the bar in two sides - float sliderPosition; - BRect leftBarSide = rect; - BRect rightBarSide = rect; - - if (orientation == B_HORIZONTAL) { - sliderPosition = floorf(rect.left + 2 + (rect.Width() - 2) - * sliderScale); - leftBarSide.right = sliderPosition - 1; - rightBarSide.left = sliderPosition; - } else { - sliderPosition = floorf(rect.top + 2 + (rect.Height() - 2) - * sliderScale); - leftBarSide.bottom = sliderPosition - 1; - rightBarSide.top = sliderPosition; - } - - // fill the background for the corners, exclude the middle bar for now - BRegion region(rect); - region.Exclude(rightBarSide); - view->ConstrainClippingRegion(®ion); - - view->PushState(); - - DrawSliderBar(view, rect, updateRect, base, leftFillColor, flags, - orientation); - - view->PopState(); - - region.Set(rect); - region.Exclude(leftBarSide); - view->ConstrainClippingRegion(®ion); - - view->PushState(); - - DrawSliderBar(view, rect, updateRect, base, rightFillColor, flags, - orientation); - - view->PopState(); - - view->ConstrainClippingRegion(NULL); -} - - -void -BControlLook::DrawSliderBar(BView* view, BRect rect, const BRect& updateRect, - const rgb_color& base, rgb_color fillColor, uint32 flags, - enum orientation orientation) -{ - if (!rect.IsValid() || !rect.Intersects(updateRect)) - return; - - // separate the rect into corners - BRect leftCorner(rect); - BRect rightCorner(rect); - BRect barRect(rect); - - if (orientation == B_HORIZONTAL) { - leftCorner.right = leftCorner.left + leftCorner.Height(); - rightCorner.left = rightCorner.right - rightCorner.Height(); - barRect.left += ceilf(barRect.Height() / 2); - barRect.right -= ceilf(barRect.Height() / 2); - } else { - leftCorner.bottom = leftCorner.top + leftCorner.Width(); - rightCorner.top = rightCorner.bottom - rightCorner.Width(); - barRect.top += ceilf(barRect.Width() / 2); - barRect.bottom -= ceilf(barRect.Width() / 2); - } - - // fill the background for the corners, exclude the middle bar for now - BRegion region(rect); - region.Exclude(barRect); - view->ConstrainClippingRegion(®ion); - - view->SetHighColor(base); - view->FillRect(rect); - - // figure out the tints to be used - float edgeLightTint; - float edgeShadowTint; - float frameLightTint; - float frameShadowTint; - float fillLightTint; - float fillShadowTint; - - if (flags & B_DISABLED) { - edgeLightTint = 1.0; - edgeShadowTint = 1.0; - frameLightTint = 1.20; - frameShadowTint = 1.25; - fillLightTint = 0.9; - fillShadowTint = 1.05; - - fillColor.red = uint8(fillColor.red * 0.4 + base.red * 0.6); - fillColor.green = uint8(fillColor.green * 0.4 + base.green * 0.6); - fillColor.blue = uint8(fillColor.blue * 0.4 + base.blue * 0.6); - } else { - edgeLightTint = 0.65; - edgeShadowTint = 1.07; - frameLightTint = 1.40; - frameShadowTint = 1.50; - fillLightTint = 0.8; - fillShadowTint = 1.1; - } - - rgb_color edgeLightColor = tint_color(base, edgeLightTint); - rgb_color edgeShadowColor = tint_color(base, edgeShadowTint); - rgb_color frameLightColor = tint_color(fillColor, frameLightTint); - rgb_color frameShadowColor = tint_color(fillColor, frameShadowTint); - rgb_color fillLightColor = tint_color(fillColor, fillLightTint); - rgb_color fillShadowColor = tint_color(fillColor, fillShadowTint); - - if (orientation == B_HORIZONTAL) { - _DrawRoundBarCorner(view, leftCorner, updateRect, edgeLightColor, - edgeShadowColor, frameLightColor, frameShadowColor, fillLightColor, - fillShadowColor, 1.0, 1.0, 0.0, -1.0, orientation); - - _DrawRoundBarCorner(view, rightCorner, updateRect, edgeLightColor, - edgeShadowColor, frameLightColor, frameShadowColor, fillLightColor, - fillShadowColor, 0.0, 1.0, -1.0, -1.0, orientation); - } else { - _DrawRoundBarCorner(view, leftCorner, updateRect, edgeLightColor, - edgeShadowColor, frameLightColor, frameShadowColor, fillLightColor, - fillShadowColor, 1.0, 1.0, -1.0, 0.0, orientation); - - _DrawRoundBarCorner(view, rightCorner, updateRect, edgeLightColor, - edgeShadowColor, frameLightColor, frameShadowColor, fillLightColor, - fillShadowColor, 1.0, 0.0, -1.0, -1.0, orientation); - } - - view->ConstrainClippingRegion(NULL); - - view->BeginLineArray(4); - if (orientation == B_HORIZONTAL) { - view->AddLine(barRect.LeftTop(), barRect.RightTop(), edgeShadowColor); - view->AddLine(barRect.LeftBottom(), barRect.RightBottom(), - edgeLightColor); - barRect.InsetBy(0, 1); - view->AddLine(barRect.LeftTop(), barRect.RightTop(), frameShadowColor); - view->AddLine(barRect.LeftBottom(), barRect.RightBottom(), - frameLightColor); - barRect.InsetBy(0, 1); - } else { - view->AddLine(barRect.LeftTop(), barRect.LeftBottom(), edgeShadowColor); - view->AddLine(barRect.RightTop(), barRect.RightBottom(), - edgeLightColor); - barRect.InsetBy(1, 0); - view->AddLine(barRect.LeftTop(), barRect.LeftBottom(), frameShadowColor); - view->AddLine(barRect.RightTop(), barRect.RightBottom(), - frameLightColor); - barRect.InsetBy(1, 0); - } - view->EndLineArray(); - - _FillGradient(view, barRect, fillColor, fillShadowTint, fillLightTint, - orientation); -} - - -void -BControlLook::DrawSliderThumb(BView* view, BRect& rect, const BRect& updateRect, - const rgb_color& base, uint32 flags, enum orientation orientation) -{ - if (!rect.IsValid() || !rect.Intersects(updateRect)) - return; - - // figure out frame color - rgb_color frameLightColor; - rgb_color frameShadowColor; - rgb_color shadowColor = (rgb_color){ 0, 0, 0, 60 }; - - if (flags & B_FOCUSED) { - // focused - frameLightColor = ui_color(B_KEYBOARD_NAVIGATION_COLOR); - frameShadowColor = frameLightColor; - } else { - // figure out the tints to be used - float frameLightTint; - float frameShadowTint; - - if (flags & B_DISABLED) { - frameLightTint = 1.30; - frameShadowTint = 1.35; - shadowColor.alpha = 30; - } else { - frameLightTint = 1.6; - frameShadowTint = 1.65; - } - - frameLightColor = tint_color(base, frameLightTint); - frameShadowColor = tint_color(base, frameShadowTint); - } - - BRect originalRect(rect); - rect.right--; - rect.bottom--; - - _DrawFrame(view, rect, frameLightColor, frameLightColor, - frameShadowColor, frameShadowColor); - - flags &= ~B_ACTIVATED; - DrawButtonBackground(view, rect, updateRect, base, flags); - - // thumb shadow - view->SetDrawingMode(B_OP_ALPHA); - view->SetHighColor(shadowColor); - originalRect.left++; - originalRect.top++; - view->StrokeLine(originalRect.LeftBottom(), originalRect.RightBottom()); - originalRect.bottom--; - view->StrokeLine(originalRect.RightTop(), originalRect.RightBottom()); - - // thumb edge - if (orientation == B_HORIZONTAL) { - rect.InsetBy(0, floorf(rect.Height() / 4)); - rect.left = floorf((rect.left + rect.right) / 2); - rect.right = rect.left + 1; - shadowColor = tint_color(base, B_DARKEN_2_TINT); - shadowColor.alpha = 128; - view->SetHighColor(shadowColor); - view->StrokeLine(rect.LeftTop(), rect.LeftBottom()); - rgb_color lightColor = tint_color(base, B_LIGHTEN_2_TINT); - lightColor.alpha = 128; - view->SetHighColor(lightColor); - view->StrokeLine(rect.RightTop(), rect.RightBottom()); - } else { - rect.InsetBy(floorf(rect.Width() / 4), 0); - rect.top = floorf((rect.top + rect.bottom) / 2); - rect.bottom = rect.top + 1; - shadowColor = tint_color(base, B_DARKEN_2_TINT); - shadowColor.alpha = 128; - view->SetHighColor(shadowColor); - view->StrokeLine(rect.LeftTop(), rect.RightTop()); - rgb_color lightColor = tint_color(base, B_LIGHTEN_2_TINT); - lightColor.alpha = 128; - view->SetHighColor(lightColor); - view->StrokeLine(rect.LeftBottom(), rect.RightBottom()); - } - - view->SetDrawingMode(B_OP_COPY); -} - - -void -BControlLook::DrawSliderTriangle(BView* view, BRect& rect, - const BRect& updateRect, const rgb_color& base, uint32 flags, - enum orientation orientation) -{ - DrawSliderTriangle(view, rect, updateRect, base, base, flags, orientation); -} - - -void -BControlLook::DrawSliderTriangle(BView* view, BRect& rect, - const BRect& updateRect, const rgb_color& base, const rgb_color& fill, - uint32 flags, enum orientation orientation) -{ - if (!rect.IsValid() || !rect.Intersects(updateRect)) - return; - - // figure out frame color - rgb_color frameLightColor; - rgb_color frameShadowColor; - rgb_color shadowColor = (rgb_color){ 0, 0, 0, 60 }; - - float topTint = 0.49; - float middleTint1 = 0.62; - float middleTint2 = 0.76; - float bottomTint = 0.90; - - if (flags & B_DISABLED) { - topTint = (topTint + B_NO_TINT) / 2; - middleTint1 = (middleTint1 + B_NO_TINT) / 2; - middleTint2 = (middleTint2 + B_NO_TINT) / 2; - bottomTint = (bottomTint + B_NO_TINT) / 2; - } else if (flags & B_HOVER) { - static const float kHoverTintFactor = 0.85; - topTint *= kHoverTintFactor; - middleTint1 *= kHoverTintFactor; - middleTint2 *= kHoverTintFactor; - bottomTint *= kHoverTintFactor; - } - - if (flags & B_FOCUSED) { - // focused - frameLightColor = ui_color(B_KEYBOARD_NAVIGATION_COLOR); - frameShadowColor = frameLightColor; - } else { - // figure out the tints to be used - float frameLightTint; - float frameShadowTint; - - if (flags & B_DISABLED) { - frameLightTint = 1.30; - frameShadowTint = 1.35; - shadowColor.alpha = 30; - } else { - frameLightTint = 1.6; - frameShadowTint = 1.65; - } - - frameLightColor = tint_color(base, frameLightTint); - frameShadowColor = tint_color(base, frameShadowTint); - } - - // make room for the shadow - rect.right--; - rect.bottom--; - - uint32 viewFlags = view->Flags(); - view->SetFlags(viewFlags | B_SUBPIXEL_PRECISE); - view->SetLineMode(B_ROUND_CAP, B_ROUND_JOIN); - - float center = (rect.left + rect.right) / 2; - - BShape shape; - shape.MoveTo(BPoint(rect.left + 0.5, rect.bottom + 0.5)); - shape.LineTo(BPoint(rect.right + 0.5, rect.bottom + 0.5)); - shape.LineTo(BPoint(rect.right + 0.5, rect.bottom - 1 + 0.5)); - shape.LineTo(BPoint(center + 0.5, rect.top + 0.5)); - shape.LineTo(BPoint(rect.left + 0.5, rect.bottom - 1 + 0.5)); - shape.Close(); - - view->MovePenTo(BPoint(1, 1)); - - view->SetDrawingMode(B_OP_ALPHA); - view->SetHighColor(shadowColor); - view->StrokeShape(&shape); - - view->MovePenTo(B_ORIGIN); - - view->SetDrawingMode(B_OP_COPY); - view->SetHighColor(frameLightColor); - view->StrokeShape(&shape); - - rect.InsetBy(1, 1); - shape.Clear(); - shape.MoveTo(BPoint(rect.left, rect.bottom + 1)); - shape.LineTo(BPoint(rect.right + 1, rect.bottom + 1)); - shape.LineTo(BPoint(center + 0.5, rect.top)); - shape.Close(); - - BGradientLinear gradient; - if (flags & B_DISABLED) { - _MakeGradient(gradient, rect, fill, topTint, bottomTint); - } else { - _MakeGlossyGradient(gradient, rect, fill, topTint, middleTint1, - middleTint2, bottomTint); - } - - view->FillShape(&shape, gradient); - - view->SetFlags(viewFlags); -} - - -void -BControlLook::DrawSliderHashMarks(BView* view, BRect& rect, - const BRect& updateRect, const rgb_color& base, int32 count, - hash_mark_location location, uint32 flags, enum orientation orientation) -{ - if (!rect.IsValid() || !rect.Intersects(updateRect)) - return; - - rgb_color lightColor; - rgb_color darkColor; - - if (flags & B_DISABLED) { - lightColor = tint_color(base, 0.9); - darkColor = tint_color(base, 1.07); - } else { - lightColor = tint_color(base, 0.8); - darkColor = tint_color(base, 1.14); - } - - int32 hashMarkCount = max_c(count, 2); - // draw at least two hashmarks at min/max if - // fHashMarks != B_HASH_MARKS_NONE - float factor; - float startPos; - if (orientation == B_HORIZONTAL) { - factor = (rect.Width() - 2) / (hashMarkCount - 1); - startPos = rect.left + 1; - } else { - factor = (rect.Height() - 2) / (hashMarkCount - 1); - startPos = rect.top + 1; - } - - if (location & B_HASH_MARKS_TOP) { - view->BeginLineArray(hashMarkCount * 2); - - if (orientation == B_HORIZONTAL) { - float pos = startPos; - for (int32 i = 0; i < hashMarkCount; i++) { - view->AddLine(BPoint(pos, rect.top), - BPoint(pos, rect.top + 4), darkColor); - view->AddLine(BPoint(pos + 1, rect.top), - BPoint(pos + 1, rect.top + 4), lightColor); - - pos += factor; - } - } else { - float pos = startPos; - for (int32 i = 0; i < hashMarkCount; i++) { - view->AddLine(BPoint(rect.left, pos), - BPoint(rect.left + 4, pos), darkColor); - view->AddLine(BPoint(rect.left, pos + 1), - BPoint(rect.left + 4, pos + 1), lightColor); - - pos += factor; - } - } - - view->EndLineArray(); - } - - if (location & B_HASH_MARKS_BOTTOM) { - - view->BeginLineArray(hashMarkCount * 2); - - if (orientation == B_HORIZONTAL) { - float pos = startPos; - for (int32 i = 0; i < hashMarkCount; i++) { - view->AddLine(BPoint(pos, rect.bottom - 4), - BPoint(pos, rect.bottom), darkColor); - view->AddLine(BPoint(pos + 1, rect.bottom - 4), - BPoint(pos + 1, rect.bottom), lightColor); - - pos += factor; - } - } else { - float pos = startPos; - for (int32 i = 0; i < hashMarkCount; i++) { - view->AddLine(BPoint(rect.right - 4, pos), - BPoint(rect.right, pos), darkColor); - view->AddLine(BPoint(rect.right - 4, pos + 1), - BPoint(rect.right, pos + 1), lightColor); - - pos += factor; - } - } - - view->EndLineArray(); - } -} - - -void -BControlLook::DrawActiveTab(BView* view, BRect& rect, const BRect& updateRect, - const rgb_color& base, uint32 flags, uint32 borders) -{ - if (!rect.IsValid() || !rect.Intersects(updateRect)) - return; - - rgb_color edgeShadowColor; - rgb_color edgeLightColor; - rgb_color frameShadowColor; - rgb_color frameLightColor; - rgb_color bevelShadowColor; - rgb_color bevelLightColor; - BGradientLinear fillGradient; - fillGradient.SetStart(rect.LeftTop() + BPoint(3, 3)); - fillGradient.SetEnd(rect.LeftBottom() + BPoint(3, -3)); - - if (flags & B_DISABLED) { - edgeShadowColor = base; - edgeLightColor = base; - frameShadowColor = tint_color(base, 1.30); - frameLightColor = tint_color(base, 1.25); - bevelShadowColor = tint_color(base, 1.07); - bevelLightColor = tint_color(base, 0.8); - fillGradient.AddColor(tint_color(base, 0.85), 0); - fillGradient.AddColor(base, 255); - } else { - edgeShadowColor = tint_color(base, 1.03); - edgeLightColor = tint_color(base, 0.80); - frameShadowColor = tint_color(base, 1.30); - frameLightColor = tint_color(base, 1.30); - bevelShadowColor = tint_color(base, 1.07); - bevelLightColor = tint_color(base, 0.6); - fillGradient.AddColor(tint_color(base, 0.75), 0); - fillGradient.AddColor(tint_color(base, 1.03), 255); - } - - static const float kRoundCornerRadius = 4; - - // left/top corner - BRect cornerRect(rect); - cornerRect.right = cornerRect.left + kRoundCornerRadius; - cornerRect.bottom = cornerRect.top + kRoundCornerRadius; - - BRegion clipping(rect); - clipping.Exclude(cornerRect); - - _DrawRoundCornerLeftTop(view, cornerRect, updateRect, base, edgeShadowColor, - frameLightColor, bevelLightColor, fillGradient); - - // left/top corner - cornerRect.right = rect.right; - cornerRect.left = cornerRect.right - kRoundCornerRadius; - - clipping.Exclude(cornerRect); - - _DrawRoundCornerRightTop(view, cornerRect, updateRect, base, edgeShadowColor, - edgeLightColor, frameLightColor, frameShadowColor, bevelLightColor, - bevelShadowColor, fillGradient); - - // rest of frame and fill - view->ConstrainClippingRegion(&clipping); - - _DrawFrame(view, rect, edgeShadowColor, edgeShadowColor, edgeLightColor, - edgeLightColor, - borders & (B_LEFT_BORDER | B_TOP_BORDER | B_RIGHT_BORDER)); - if ((borders & B_LEFT_BORDER) == 0) - rect.left++; - if ((borders & B_RIGHT_BORDER) == 0) - rect.right--; - - _DrawFrame(view, rect, frameLightColor, frameLightColor, frameShadowColor, - frameShadowColor, B_LEFT_BORDER | B_TOP_BORDER | B_RIGHT_BORDER); - - _DrawFrame(view, rect, bevelLightColor, bevelLightColor, bevelShadowColor, - bevelShadowColor); - - view->FillRect(rect, fillGradient); - - view->ConstrainClippingRegion(NULL); -} - - -void -BControlLook::DrawInactiveTab(BView* view, BRect& rect, const BRect& updateRect, - const rgb_color& base, uint32 flags, uint32 borders) -{ - if (!rect.IsValid() || !rect.Intersects(updateRect)) - return; - - rgb_color edgeShadowColor; - rgb_color edgeLightColor; - rgb_color frameShadowColor; - rgb_color frameLightColor; - rgb_color bevelShadowColor; - rgb_color bevelLightColor; - BGradientLinear fillGradient; - fillGradient.SetStart(rect.LeftTop() + BPoint(3, 3)); - fillGradient.SetEnd(rect.LeftBottom() + BPoint(3, -3)); - - if (flags & B_DISABLED) { - edgeShadowColor = base; - edgeLightColor = base; - frameShadowColor = tint_color(base, 1.30); - frameLightColor = tint_color(base, 1.25); - bevelShadowColor = tint_color(base, 1.07); - bevelLightColor = tint_color(base, 0.8); - fillGradient.AddColor(tint_color(base, 0.85), 0); - fillGradient.AddColor(base, 255); - } else { - edgeShadowColor = tint_color(base, 1.03); - edgeLightColor = tint_color(base, 0.80); - frameShadowColor = tint_color(base, 1.30); - frameLightColor = tint_color(base, 1.30); - bevelShadowColor = tint_color(base, 1.17); - bevelLightColor = tint_color(base, 1.10); - fillGradient.AddColor(tint_color(base, 1.12), 0); - fillGradient.AddColor(tint_color(base, 1.08), 255); - } - - // active tabs stand out at the top, but this is an inactive tab - view->SetHighColor(base); - view->FillRect(BRect(rect.left, rect.top, rect.right, rect.top + 4)); - rect.top += 4; - - // frame and fill - _DrawFrame(view, rect, edgeShadowColor, edgeShadowColor, edgeLightColor, - edgeLightColor, - borders & (B_LEFT_BORDER | B_TOP_BORDER | B_RIGHT_BORDER)); - - _DrawFrame(view, rect, frameLightColor, frameLightColor, frameShadowColor, - frameShadowColor, - borders & (B_LEFT_BORDER | B_TOP_BORDER | B_RIGHT_BORDER)); - - if (rect.IsValid()) { - _DrawFrame(view, rect, bevelShadowColor, bevelShadowColor, - bevelLightColor, bevelLightColor, B_LEFT_BORDER & ~borders); - } else { - if ((B_LEFT_BORDER & ~borders) != 0) - rect.left++; - } - - view->FillRect(rect, fillGradient); -} - - -void -BControlLook::DrawSplitter(BView* view, BRect& rect, const BRect& updateRect, - const rgb_color& base, enum orientation orientation, uint32 flags, - uint32 borders) -{ - rgb_color background; - if ((flags & (B_CLICKED | B_ACTIVATED)) != 0) - background = tint_color(base, B_DARKEN_1_TINT); - else - background = base; - - rgb_color light = tint_color(background, 0.6); - rgb_color shadow = tint_color(background, 1.21); - - // frame - if (borders != 0 && rect.Width() > 3 && rect.Height() > 3) - DrawRaisedBorder(view, rect, updateRect, background, flags, borders); - - // dots and rest of background - if (orientation == B_HORIZONTAL) { - if (rect.Width() > 2) { - // background on left/right - BRegion region(rect); - rect.left = floorf((rect.left + rect.right) / 2.0 - 0.5); - rect.right = rect.left + 1; - region.Exclude(rect); - view->SetHighColor(background); - view->FillRegion(®ion); - } - - BPoint dot = rect.LeftTop(); - BPoint stop = rect.LeftBottom(); - int32 num = 1; - while (dot.y <= stop.y) { - rgb_color col1; - rgb_color col2; - switch (num) { - case 1: - col1 = background; - col2 = background; - break; - case 2: - col1 = shadow; - col2 = background; - break; - case 3: - default: - col1 = background; - col2 = light; - num = 0; - break; - } - view->SetHighColor(col1); - view->StrokeLine(dot, dot, B_SOLID_HIGH); - view->SetHighColor(col2); - dot.x++; - view->StrokeLine(dot, dot, B_SOLID_HIGH); - dot.x -= 1.0; - // next pixel - num++; - dot.y++; - } - } else { - if (rect.Height() > 2) { - // background on left/right - BRegion region(rect); - rect.top = floorf((rect.top + rect.bottom) / 2.0 - 0.5); - rect.bottom = rect.top + 1; - region.Exclude(rect); - view->SetHighColor(background); - view->FillRegion(®ion); - } - - BPoint dot = rect.LeftTop(); - BPoint stop = rect.RightTop(); - int32 num = 1; - while (dot.x <= stop.x) { - rgb_color col1; - rgb_color col2; - switch (num) { - case 1: - col1 = background; - col2 = background; - break; - case 2: - col1 = shadow; - col2 = background; - break; - case 3: - default: - col1 = background; - col2 = light; - num = 0; - break; - } - view->SetHighColor(col1); - view->StrokeLine(dot, dot, B_SOLID_HIGH); - view->SetHighColor(col2); - dot.y++; - view->StrokeLine(dot, dot, B_SOLID_HIGH); - dot.y -= 1.0; - // next pixel - num++; - dot.x++; - } - } -} - - -// #pragma mark - - - -void -BControlLook::DrawBorder(BView* view, BRect& rect, const BRect& updateRect, - const rgb_color& base, border_style border, uint32 flags, uint32 borders) -{ - if (border == B_NO_BORDER) - return; - - rgb_color scrollbarFrameColor = tint_color(base, B_DARKEN_2_TINT); - if (flags & B_FOCUSED) - scrollbarFrameColor = ui_color(B_KEYBOARD_NAVIGATION_COLOR); - - if (border == B_FANCY_BORDER) - _DrawOuterResessedFrame(view, rect, base, 1.0, 1.0, flags, borders); - - _DrawFrame(view, rect, scrollbarFrameColor, scrollbarFrameColor, - scrollbarFrameColor, scrollbarFrameColor, borders); -} - - -void -BControlLook::DrawRaisedBorder(BView* view, BRect& rect, - const BRect& updateRect, const rgb_color& base, uint32 flags, - uint32 borders) -{ - rgb_color lightColor; - rgb_color shadowColor; - - if (flags & B_DISABLED) { - lightColor = base; - shadowColor = base; - } else { - lightColor = tint_color(base, 0.85); - shadowColor = tint_color(base, 1.07); - } - - _DrawFrame(view, rect, lightColor, lightColor, shadowColor, shadowColor, - borders); -} - - -void -BControlLook::DrawTextControlBorder(BView* view, BRect& rect, - const BRect& updateRect, const rgb_color& base, uint32 flags, - uint32 borders) -{ - if (!rect.Intersects(updateRect)) - return; - - rgb_color dark1BorderColor; - rgb_color dark2BorderColor; - rgb_color navigationColor = ui_color(B_KEYBOARD_NAVIGATION_COLOR); - - if (flags & B_DISABLED) { - _DrawOuterResessedFrame(view, rect, base, 0.0, 1.0, flags, borders); - - if (flags & B_BLEND_FRAME) - dark1BorderColor = (rgb_color){ 0, 0, 0, 40 }; - else - dark1BorderColor = tint_color(base, 1.15); - dark2BorderColor = dark1BorderColor; - } else if (flags & B_CLICKED) { - dark1BorderColor = tint_color(base, 1.50); - dark2BorderColor = tint_color(base, 1.49); - - // BCheckBox uses this to indicate the clicked state... - _DrawFrame(view, rect, - dark1BorderColor, dark1BorderColor, - dark2BorderColor, dark2BorderColor); - - dark2BorderColor = dark1BorderColor; - } else { - _DrawOuterResessedFrame(view, rect, base, 0.6, 1.0, flags, borders); - - if (flags & B_BLEND_FRAME) { - dark1BorderColor = (rgb_color){ 0, 0, 0, 102 }; - dark2BorderColor = (rgb_color){ 0, 0, 0, 97 }; - } else { - dark1BorderColor = tint_color(base, 1.40); - dark2BorderColor = tint_color(base, 1.38); - } - } - - if ((flags & B_DISABLED) == 0 && (flags & B_FOCUSED)) { - dark1BorderColor = navigationColor; - dark2BorderColor = navigationColor; - } - - if (flags & B_BLEND_FRAME) { - drawing_mode oldMode = view->DrawingMode(); - view->SetDrawingMode(B_OP_ALPHA); - - _DrawFrame(view, rect, - dark1BorderColor, dark1BorderColor, - dark2BorderColor, dark2BorderColor, borders); - - view->SetDrawingMode(oldMode); - } else { - _DrawFrame(view, rect, - dark1BorderColor, dark1BorderColor, - dark2BorderColor, dark2BorderColor, borders); - } -} - - -void -BControlLook::DrawGroupFrame(BView* view, BRect& rect, const BRect& updateRect, - const rgb_color& base, uint32 borders) -{ - rgb_color frameColor = tint_color(base, 1.30); - rgb_color bevelLight = tint_color(base, 0.8); - rgb_color bevelShadow = tint_color(base, 1.03); - - _DrawFrame(view, rect, bevelShadow, bevelShadow, bevelLight, bevelLight, - borders); - - _DrawFrame(view, rect, frameColor, frameColor, frameColor, frameColor, - borders); - - _DrawFrame(view, rect, bevelLight, bevelLight, bevelShadow, bevelShadow, - borders); -} - - -void -BControlLook::DrawLabel(BView* view, const char* label, BRect rect, - const BRect& updateRect, const rgb_color& base, uint32 flags) -{ - DrawLabel(view, label, rect, updateRect, base, flags, - DefaultLabelAlignment()); -} - - -void -BControlLook::DrawLabel(BView* view, const char* label, BRect rect, - const BRect& updateRect, const rgb_color& base, uint32 flags, - const BAlignment& alignment) -{ - if (!rect.Intersects(updateRect)) - return; - - // setup the text color - rgb_color color; - if (base.red + base.green + base.blue > 128 * 3) - color = tint_color(base, B_DARKEN_MAX_TINT); - else - color = tint_color(base, B_LIGHTEN_MAX_TINT); - - if (flags & B_DISABLED) { - color.red = (uint8)(((int32)base.red + color.red + 1) / 2); - color.green = (uint8)(((int32)base.green + color.green + 1) / 2); - color.blue = (uint8)(((int32)base.blue + color.blue + 1) / 2); - } - - view->SetHighColor(color); - view->SetDrawingMode(B_OP_OVER); - - // truncate the label if necessary and get the width and height - BString truncatedLabel(label); - - BFont font; - view->GetFont(&font); - - float width = rect.Width(); - font.TruncateString(&truncatedLabel, B_TRUNCATE_END, width); - width = font.StringWidth(truncatedLabel.String()); - - font_height fontHeight; - font.GetHeight(&fontHeight); - float height = ceilf(fontHeight.ascent) + ceilf(fontHeight.descent); - - // handle alignment - BPoint location; - - switch (alignment.horizontal) { - default: - case B_ALIGN_LEFT: - location.x = rect.left; - break; - case B_ALIGN_RIGHT: - location.x = rect.right - width; - break; - case B_ALIGN_CENTER: - location.x = (rect.left + rect.right - width) / 2.0f; - break; - } - - switch (alignment.vertical) { - case B_ALIGN_TOP: - location.y = rect.top + ceilf(fontHeight.ascent); - break; - default: - case B_ALIGN_MIDDLE: - location.y = floorf((rect.top + rect.bottom - height) / 2.0f + 0.5f) - + ceilf(fontHeight.ascent); - break; - case B_ALIGN_BOTTOM: - location.y = rect.bottom - ceilf(fontHeight.descent); - break; - } - - view->DrawString(truncatedLabel.String(), location); -} - - -// #pragma mark - - - -void -BControlLook::_DrawButtonFrame(BView* view, BRect& rect, - const BRect& updateRect, const rgb_color& base, const rgb_color& background, - float contrast, float brightness, uint32 flags, uint32 borders) -{ - // colors - rgb_color dark1BorderColor; - rgb_color dark2BorderColor; - - if ((flags & B_DISABLED) == 0) { - if (flags & B_BLEND_FRAME) { - dark1BorderColor = (rgb_color){ 0, 0, 0, 75 }; - dark2BorderColor = (rgb_color){ 0, 0, 0, 95 }; - } else { - dark1BorderColor = tint_color(base, 1.33); - dark2BorderColor = tint_color(base, 1.45); - } - - if (flags & B_DEFAULT_BUTTON) { - // TODO: B_BLEND_FRAME - dark2BorderColor = tint_color(dark1BorderColor, 1.5); - dark1BorderColor = tint_color(dark1BorderColor, 1.35); - } - } else { - // TODO: B_BLEND_FRAME - dark1BorderColor = tint_color(base, 1.147); - dark2BorderColor = tint_color(base, 1.24); - - if (flags & B_DEFAULT_BUTTON) { - dark1BorderColor = tint_color(dark1BorderColor, 1.14); - dark2BorderColor = tint_color(dark1BorderColor, 1.12); - } - } - - if (flags & B_ACTIVATED) { - rgb_color temp = dark2BorderColor; - dark2BorderColor = dark1BorderColor; - dark1BorderColor = temp; - } - - // indicate focus by changing main button border - if (flags & B_FOCUSED) { - dark1BorderColor = ui_color(B_KEYBOARD_NAVIGATION_COLOR); - dark2BorderColor = dark1BorderColor; - } - - if (flags & B_DEFAULT_BUTTON) { - // TODO: B_BLEND_FRAME - float focusTint = 1.2; - if (flags & B_DISABLED) - focusTint = (B_NO_TINT + focusTint) / 2; - - rgb_color focusColor = tint_color(base, focusTint); - view->SetHighColor(base); - - view->StrokeRect(rect); - rect.InsetBy(1.0, 1.0); - - view->SetHighColor(focusColor); - view->StrokeRect(rect); - rect.InsetBy(1.0, 1.0); - view->StrokeRect(rect); - rect.InsetBy(1.0, 1.0); - - // bevel around external border - _DrawOuterResessedFrame(view, rect, focusColor, - contrast * (((flags & B_DISABLED) ? 0.3 : 0.8)), - brightness * (((flags & B_DISABLED) ? 1.0 : 0.9)), - flags, borders); - } else { - // bevel around external border - _DrawOuterResessedFrame(view, rect, background, - contrast * ((flags & B_DISABLED) ? 0.0 : 1.0), brightness * 1.0, - flags, borders); - } - - if (flags & B_BLEND_FRAME) { - drawing_mode oldDrawingMode = view->DrawingMode(); - view->SetDrawingMode(B_OP_ALPHA); - - _DrawFrame(view, rect, dark1BorderColor, dark1BorderColor, - dark2BorderColor, dark2BorderColor, borders); - - view->SetDrawingMode(oldDrawingMode); - } else { - _DrawFrame(view, rect, dark1BorderColor, dark1BorderColor, - dark2BorderColor, dark2BorderColor, borders); - } -} - - -void -BControlLook::_DrawOuterResessedFrame(BView* view, BRect& rect, - const rgb_color& base, float contrast, float brightness, uint32 flags, - uint32 borders) -{ - if (flags & B_BLEND_FRAME) { - // assumes the background has already been painted - drawing_mode oldDrawingMode = view->DrawingMode(); - view->SetDrawingMode(B_OP_ALPHA); - - uint8 alpha = uint8(20 * contrast); - uint32 white = uint8(255 * brightness); - - rgb_color borderBevelShadow = (rgb_color){ 0, 0, 0, alpha }; - rgb_color borderBevelLight = (rgb_color){ white, white, white, alpha }; - - _DrawFrame(view, rect, borderBevelShadow, borderBevelShadow, - borderBevelLight, borderBevelLight, borders); - - view->SetDrawingMode(oldDrawingMode); - } else { - // colors - float tintLight = kEdgeBevelLightTint; - float tintShadow = kEdgeBevelShadowTint; - - if (contrast == 0.0) { - tintLight = B_NO_TINT; - tintShadow = B_NO_TINT; - } else if (contrast != 1.0) { - tintLight = B_NO_TINT + (tintLight - B_NO_TINT) * contrast; - tintShadow = B_NO_TINT + (tintShadow - B_NO_TINT) * contrast; - } - - rgb_color borderBevelShadow = tint_color(base, tintShadow); - rgb_color borderBevelLight = tint_color(base, tintLight); - - if (brightness < 1.0) { - borderBevelShadow.red = uint8(borderBevelShadow.red * brightness); - borderBevelShadow.green = uint8(borderBevelShadow.green * brightness); - borderBevelShadow.blue = uint8(borderBevelShadow.blue * brightness); - borderBevelLight.red = uint8(borderBevelLight.red * brightness); - borderBevelLight.green = uint8(borderBevelLight.green * brightness); - borderBevelLight.blue = uint8(borderBevelLight.blue * brightness); - } - - _DrawFrame(view, rect, borderBevelShadow, borderBevelShadow, - borderBevelLight, borderBevelLight, borders); - } -} - - -void -BControlLook::_DrawFrame(BView* view, BRect& rect, const rgb_color& left, - const rgb_color& top, const rgb_color& right, const rgb_color& bottom, - uint32 borders) -{ - view->BeginLineArray(4); - - if (borders & B_LEFT_BORDER) { - view->AddLine( - BPoint(rect.left, rect.bottom), - BPoint(rect.left, rect.top), left); - rect.left++; - } - if (borders & B_TOP_BORDER) { - view->AddLine( - BPoint(rect.left, rect.top), - BPoint(rect.right, rect.top), top); - rect.top++; - } - if (borders & B_RIGHT_BORDER) { - view->AddLine( - BPoint(rect.right, rect.top), - BPoint(rect.right, rect.bottom), right); - rect.right--; - } - if (borders & B_BOTTOM_BORDER) { - view->AddLine( - BPoint(rect.left, rect.bottom), - BPoint(rect.right, rect.bottom), bottom); - rect.bottom--; - } - - view->EndLineArray(); -} - - -void -BControlLook::_DrawFrame(BView* view, BRect& rect, const rgb_color& left, - const rgb_color& top, const rgb_color& right, const rgb_color& bottom, - const rgb_color& rightTop, const rgb_color& leftBottom, uint32 borders) -{ - view->BeginLineArray(6); - - if (borders & B_TOP_BORDER) { - if (borders & B_RIGHT_BORDER) { - view->AddLine( - BPoint(rect.left, rect.top), - BPoint(rect.right - 1, rect.top), top); - view->AddLine( - BPoint(rect.right, rect.top), - BPoint(rect.right, rect.top), rightTop); - } else { - view->AddLine( - BPoint(rect.left, rect.top), - BPoint(rect.right, rect.top), top); - } - rect.top++; - } - - if (borders & B_LEFT_BORDER) { - view->AddLine( - BPoint(rect.left, rect.top), - BPoint(rect.left, rect.bottom - 1), left); - view->AddLine( - BPoint(rect.left, rect.bottom), - BPoint(rect.left, rect.bottom), leftBottom); - rect.left++; - } - - if (borders & B_BOTTOM_BORDER) { - view->AddLine( - BPoint(rect.left, rect.bottom), - BPoint(rect.right, rect.bottom), bottom); - rect.bottom--; - } - - if (borders & B_RIGHT_BORDER) { - view->AddLine( - BPoint(rect.right, rect.bottom), - BPoint(rect.right, rect.top), right); - rect.right--; - } - - view->EndLineArray(); -} - - -//void -//BControlLook::_DrawShadowFrame(BView* view, BRect& rect, const rgb_color& base, -// uint32 borders) -//{ -// view->BeginLineArray(4); -// -// bevelColor1 = tint_color(base, 1.2); -// bevelColor2 = tint_color(base, 1.1); -// -// // shadow along left/top borders -// if (rect.Height() > 0 && borders & B_LEFT_BORDER) { -// view->AddLine(BPoint(rect.left, rect.top), -// BPoint(rect.left, rect.bottom), bevelColor1); -// rect.left++; -// } -// if (rect.Width() > 0 && borders & B_TOP_BORDER) { -// view->AddLine(BPoint(rect.left, rect.top), -// BPoint(rect.right, rect.top), bevelColor1); -// rect.top++; -// } -// -// // softer shadow along left/top borders -// if (rect.Height() > 0 && borders & B_LEFT_BORDER) { -// view->AddLine(BPoint(rect.left, rect.top), -// BPoint(rect.left, rect.bottom), bevelColor2); -// rect.left++; -// } -// if (rect.Width() > 0 && borders & B_TOP_BORDER) { -// view->AddLine(BPoint(rect.left, rect.top), -// BPoint(rect.right, rect.top), bevelColor2); -// rect.top++; -// } -// -// view->EndLineArray(); -//} - - -void -BControlLook::_FillGradient(BView* view, const BRect& rect, - const rgb_color& base, float topTint, float bottomTint, - enum orientation orientation) -{ - BGradientLinear gradient; - _MakeGradient(gradient, rect, base, topTint, bottomTint, orientation); - view->FillRect(rect, gradient); -} - - -void -BControlLook::_FillGlossyGradient(BView* view, const BRect& rect, - const rgb_color& base, float topTint, float middle1Tint, - float middle2Tint, float bottomTint, enum orientation orientation) -{ - BGradientLinear gradient; - _MakeGlossyGradient(gradient, rect, base, topTint, middle1Tint, - middle2Tint, bottomTint, orientation); - view->FillRect(rect, gradient); -} - - -void -BControlLook::_MakeGradient(BGradientLinear& gradient, const BRect& rect, - const rgb_color& base, float topTint, float bottomTint, - enum orientation orientation) const -{ - gradient.AddColor(tint_color(base, topTint), 0); - gradient.AddColor(tint_color(base, bottomTint), 255); - gradient.SetStart(rect.LeftTop()); - if (orientation == B_HORIZONTAL) - gradient.SetEnd(rect.LeftBottom()); - else - gradient.SetEnd(rect.RightTop()); -} - - -void -BControlLook::_MakeGlossyGradient(BGradientLinear& gradient, const BRect& rect, - const rgb_color& base, float topTint, float middle1Tint, - float middle2Tint, float bottomTint, - enum orientation orientation) const -{ - gradient.AddColor(tint_color(base, topTint), 0); - gradient.AddColor(tint_color(base, middle1Tint), 132); - gradient.AddColor(tint_color(base, middle2Tint), 136); - gradient.AddColor(tint_color(base, bottomTint), 255); - gradient.SetStart(rect.LeftTop()); - if (orientation == B_HORIZONTAL) - gradient.SetEnd(rect.LeftBottom()); - else - gradient.SetEnd(rect.RightTop()); -} - - -bool -BControlLook::_RadioButtonAndCheckBoxMarkColor(const rgb_color& base, - rgb_color& color, uint32 flags) const -{ - if ((flags & (B_ACTIVATED | B_CLICKED)) == 0) { - // no mark to be drawn at all - return false; - } - - // TODO: Get from UI settings - color.red = 27; - color.green = 82; - color.blue = 140; - - float mix = 1.0; - - if (flags & B_DISABLED) { - // activated, but disabled - mix = 0.4; - } else if (flags & B_CLICKED) { - if (flags & B_ACTIVATED) { - // loosing activation - mix = 0.7; - } else { - // becoming activated - mix = 0.3; - } - } else { - // simply activated - } - - color.red = uint8(color.red * mix + base.red * (1.0 - mix)); - color.green = uint8(color.green * mix + base.green * (1.0 - mix)); - color.blue = uint8(color.blue * mix + base.blue * (1.0 - mix)); - - return true; -} - - -void -BControlLook::_DrawRoundBarCorner(BView* view, BRect& rect, - const BRect& updateRect, - const rgb_color& edgeLightColor, const rgb_color& edgeShadowColor, - const rgb_color& frameLightColor, const rgb_color& frameShadowColor, - const rgb_color& fillLightColor, const rgb_color& fillShadowColor, - float leftInset, float topInset, float rightInset, float bottomInset, - enum orientation orientation) -{ - if (!rect.IsValid() || !rect.Intersects(updateRect)) - return; - - BGradientLinear gradient; - gradient.AddColor(edgeShadowColor, 0); - gradient.AddColor(edgeLightColor, 255); - gradient.SetStart(rect.LeftTop()); - if (orientation == B_HORIZONTAL) - gradient.SetEnd(rect.LeftBottom()); - else - gradient.SetEnd(rect.RightTop()); - - view->FillEllipse(rect, gradient); - - rect.left += leftInset; - rect.top += topInset; - rect.right += rightInset; - rect.bottom += bottomInset; - - gradient.MakeEmpty(); - gradient.AddColor(frameShadowColor, 0); - gradient.AddColor(frameLightColor, 255); - gradient.SetStart(rect.LeftTop()); - if (orientation == B_HORIZONTAL) - gradient.SetEnd(rect.LeftBottom()); - else - gradient.SetEnd(rect.RightTop()); - - view->FillEllipse(rect, gradient); - - rect.left += leftInset; - rect.top += topInset; - rect.right += rightInset; - rect.bottom += bottomInset; - - gradient.MakeEmpty(); - gradient.AddColor(fillShadowColor, 0); - gradient.AddColor(fillLightColor, 255); - gradient.SetStart(rect.LeftTop()); - if (orientation == B_HORIZONTAL) - gradient.SetEnd(rect.LeftBottom()); - else - gradient.SetEnd(rect.RightTop()); - - view->FillEllipse(rect, gradient); -} - - -void -BControlLook::_DrawRoundCornerLeftTop(BView* view, BRect& rect, - const BRect& updateRect, const rgb_color& base, const rgb_color& edgeColor, - const rgb_color& frameColor, const rgb_color& bevelColor, - const BGradientLinear& fillGradient) -{ - if (!rect.IsValid() || !rect.Intersects(updateRect)) - return; - - BRegion clipping(rect); - view->ConstrainClippingRegion(&clipping); - - // background - view->SetHighColor(base); - view->FillRect(rect); - - // outer edge - BRect ellipseRect(rect); - ellipseRect.right = ellipseRect.left + ellipseRect.Width() * 2; - ellipseRect.bottom = ellipseRect.top + ellipseRect.Height() * 2; - - view->SetHighColor(edgeColor); - view->FillEllipse(ellipseRect); - - // frame - ellipseRect.InsetBy(1, 1); - view->SetHighColor(frameColor); - view->FillEllipse(ellipseRect); - - // bevel - ellipseRect.InsetBy(1, 1); - view->SetHighColor(bevelColor); - view->FillEllipse(ellipseRect); - - // fill - ellipseRect.InsetBy(1, 1); - view->FillEllipse(ellipseRect, fillGradient); - - view->ConstrainClippingRegion(NULL); -} - -void -BControlLook::_DrawRoundCornerRightTop(BView* view, BRect& rect, - const BRect& updateRect, const rgb_color& base, - const rgb_color& edgeTopColor, const rgb_color& edgeRightColor, - const rgb_color& frameTopColor, const rgb_color& frameRightColor, - const rgb_color& bevelTopColor, const rgb_color& bevelRightColor, - const BGradientLinear& fillGradient) -{ - if (!rect.IsValid() || !rect.Intersects(updateRect)) - return; - - BRegion clipping(rect); - view->ConstrainClippingRegion(&clipping); - - // background - view->SetHighColor(base); - view->FillRect(rect); - - // outer edge - BRect ellipseRect(rect); - ellipseRect.left = ellipseRect.right - ellipseRect.Width() * 2; - ellipseRect.bottom = ellipseRect.top + ellipseRect.Height() * 2; - - BGradientLinear gradient; - gradient.AddColor(edgeTopColor, 0); - gradient.AddColor(edgeRightColor, 255); - gradient.SetStart(rect.LeftTop()); - gradient.SetEnd(rect.RightBottom()); - view->FillEllipse(ellipseRect, gradient); - - // frame - ellipseRect.InsetBy(1, 1); - rect.right--; - rect.top++; - if (frameTopColor == frameRightColor) { - view->SetHighColor(frameTopColor); - view->FillEllipse(ellipseRect); - } else { - gradient.SetColor(0, frameTopColor); - gradient.SetColor(1, frameRightColor); - gradient.SetStart(rect.LeftTop()); - gradient.SetEnd(rect.RightBottom()); - view->FillEllipse(ellipseRect, gradient); - } - - // bevel - ellipseRect.InsetBy(1, 1); - rect.right--; - rect.top++; - gradient.SetColor(0, bevelTopColor); - gradient.SetColor(1, bevelRightColor); - gradient.SetStart(rect.LeftTop()); - gradient.SetEnd(rect.RightBottom()); - view->FillEllipse(ellipseRect, gradient); - - // fill - ellipseRect.InsetBy(1, 1); - view->FillEllipse(ellipseRect, fillGradient); - - view->ConstrainClippingRegion(NULL); -} - - -// NOTE: May come from a add-on in the future. Initialized in -// InterfaceDefs.cpp -BControlLook* be_control_look = NULL; - -} // namespace BPrivate diff --git a/src/DateTextView.cpp b/src/DateTextView.cpp deleted file mode 100644 index 510aa50..0000000 --- a/src/DateTextView.cpp +++ /dev/null @@ -1,620 +0,0 @@ -// Calendar Control version 2.5 -// by Al.V. Sarikov. -// Kherson, Ukraine, 2006. -// E-mail: avix@ukrpost.net. -// Home page: http://avix.pp.ru. - -// Control which allows to work with dates: -// enter date to text field and choose it from calendar. - -// Distributed under BSD license (see LICENSE file). - -#include -#include -#include -#include -#include -#include -#include - - -#define LAST_FORMAT 1 // quantity of formats - 1 -#define LAST_DIVIDER 2 // quantity of dividers - 1 - - -class DateTextView: public BTextView -{ - public: - DateTextView(int day, int month, int year, uint32 flags, uint32 look); - virtual void Cut(BClipboard *clip); - virtual void KeyDown(const char *bytes, int32 numBytes); - virtual void MakeFocus(bool focused); - virtual void Paste(BClipboard *clip); - virtual void SetEnabled(bool enabled); - - void GetDate(int *day, int *month, int *year); - void SetDate(int day, int month, int year); - void SetDate(const char *tdate); - void GetYearRange(int *first_year, int *last_year); - uint32 GetDivider(); - void SetDivider(uint32 dvder); - uint32 GetDateFlags(); - void SetDateFlags(uint32 flags); - - protected: - virtual void DeleteText(int32 start, int32 finish); - private: - virtual bool AcceptsDrop(const BMessage *message); - virtual bool AcceptsPaste(BClipboard *clip); - - void DrawDate(int day, int month, int year); - bool VerifyDate(int *day, int *month, int *year); - - bool is_ins; // is it necessar to insert symbol - uint32 flags; - char *div[LAST_DIVIDER+1]; // сstrings of dividers - uint32 divider; - - bool enabled; - - int first_year; - int last_year; // first and last year which control accepts - - int textlen; // length of text string (10 or 8 symbols) - - uint32 interface; // the same as control variable -}; - - -////////////////////////////////////////////////////////////////////////// -DateTextView::DateTextView(int day, int month, int year, - uint32 flags, uint32 look) - :BTextView(BRect(0,0,110,15),"DateTextViewAViX", - BRect(0,0,110,15),B_FOLLOW_LEFT | B_FOLLOW_TOP, - B_WILL_DRAW | B_NAVIGABLE) -{ - enabled=true; - - is_ins=false; - - interface=look; - - div[0]=(char*)"."; - div[1]=(char*)"/"; - div[2]=(char*)"-"; - - divider=look & CC_ALL_DIVIDERS; - if(divider>LAST_DIVIDER || divider<0) divider=0; // index of divider - - this->flags=(flags & (LAST_FORMAT | CC_SHORT_YEAR | CC_HALF_CENTURY)); - if((this->flags & (CC_SHORT_YEAR | CC_HALF_CENTURY))==CC_HALF_CENTURY) - this->flags=this->flags^CC_HALF_CENTURY; // XOR; CC_FULL_YEAR and CC_HALF_CENTURY - // at the same time may not be used - - first_year=1; - last_year=9999; - - if((this->flags & CC_SHORT_YEAR)==CC_SHORT_YEAR) - { - textlen=8; - - // Changing first and last acceptable years - // Working in range of century defined by year variable - - if(yearlast_year) - { - // Range is set relative to today's year - struct tm *dat; - time_t tmp; - time(&tmp); - dat=localtime(&tmp); - - year=dat->tm_year+1900; // today's year - } - - first_year=(year/100)*100+1; // dividing with loosing rest - last_year=first_year+99; - if(last_year==10000) last_year--; // full century - - if((this->flags & CC_HALF_CENTURY)==CC_HALF_CENTURY) - { - if(year<51 || year>9950) - this->flags=this->flags^CC_HALF_CENTURY; // HALF_CENTURY may nor be set - else - { - if((year%100)>50) - { - first_year+=50; - last_year+=50; - } - else - { - first_year-=50; - last_year-=50; - } - } - } - } - else textlen=10; // length of text string - - SetDate(day,month,year); - - float width=0; - BString s(""); - for(char i='0'; i<='9'; i++) - { - s<width) width=StringWidth(s.String()); - s.SetTo(""); - } - - ResizeTo(width*(textlen-2)+StringWidth("/")*2.5, LineHeight()-1); - - SetWordWrap(false); - SetMaxBytes(textlen); - SetTextRect(Bounds()); - SetDoesUndo(false); - for(int32 i=0;i<256;i++) DisallowChar(i); - for(int32 i='0';i<='9';i++) AllowChar(i); -} - - -/////////////////////////////////////////////////////// -bool DateTextView::AcceptsDrop(const BMessage *message) -{ - return false; -} - - -///////////////////////////////////////////////// -bool DateTextView::AcceptsPaste(BClipboard *clip) -{ - return false; -} - - -//////////////////////////////////////// -void DateTextView::Cut(BClipboard *clip) -{ - Copy(clip); -} - - -//////////////////////////////////////////////////////// -void DateTextView::DeleteText(int32 start, int32 finish) -{ - BTextView::DeleteText(start,finish); - if(is_ins) - { - if(start==2 || start==5) InsertText(div[divider],1,start,NULL); - else InsertText("0",1,start,NULL); - } -} - - -///////////////////////////////////////////////////////////// -void DateTextView::KeyDown(const char *bytes, int32 numBytes) -{ - if(!enabled) if(bytes[0]!=B_TAB) return; - - int32 i1,i2; - GetSelection(&i1,&i2); - - if(bytes[0]>='0' && bytes[0]<='9') - { - if(i1>(textlen-1)) return; // not to insert after end of string - Select(i1,i1); - if(i1==2 || i1==5) - { - i1++; - Select(i1,i1); - } - DeleteText(i1,i1+1); - BTextView::KeyDown(bytes, numBytes); - } - else if(bytes[0]==B_DELETE) - { - if(i1>(textlen-1)) return; // not to insert after end of string - Select(i1,i1); - is_ins=true; // symbol "0" or divider will be inserted - BTextView::KeyDown(bytes, numBytes); - is_ins=false; - } - else if(bytes[0]==B_BACKSPACE) - { - Select(i1,i1); - is_ins=true; - BTextView::KeyDown(bytes, numBytes); - is_ins=false; - } - else if(bytes[0]==B_TAB) - { - Parent()->KeyDown(bytes, numBytes); - } - else if(bytes[0]==B_DOWN_ARROW) - { - // Is Ctrl+DownArrow pressed? - if(modifiers() & B_CONTROL_KEY) - { - // yes - BMessage msg(myButtonMessage); - Parent()->MessageReceived(&msg); - } - else - BTextView::KeyDown(bytes, numBytes); - } - else - BTextView::KeyDown(bytes, numBytes); -} - - -/////////////////////////////////////////////// -void DateTextView::MakeFocus(bool focused=true) -{ - BTextView::MakeFocus(focused); - - int day, month, year; - GetDate(&day, &month, &year); - Parent()->Draw(Parent()->Bounds()); -} - - -////////////////////////////////////////// -void DateTextView::Paste(BClipboard *clip) -{ - return; -} - - -/////////////////////////////////////////// -void DateTextView::SetEnabled(bool enabled) -{ - this->enabled=enabled; - SetFlags(Flags()^B_NAVIGABLE); - MakeEditable(enabled); - - BFont font; - rgb_color color; - GetFontAndColor((int32) 0, &font, &color); - color.alpha=0; - if(enabled) - { - SetViewColor(255,255,255,255); - color.red=color.green=color.blue=0; - } - else - { - SetViewColor(239,239,239,255); - color.red=color.green=color.blue=128; - } - - SetFontAndColor(&font,B_FONT_ALL,&color); - Invalidate(); -} - - -///////////////////////////////////////////////////////// -void DateTextView::DrawDate(int day, int month, int year) -{ - // It is assumed that date is correct - BString s; - s.SetTo(""); - - if(!((flags & CC_MM_DD_YYYY_FORMAT)==CC_MM_DD_YYYY_FORMAT)) - { - if(day<10) s.Append("0"); - s<last_year) - { - int year1=*year%100; - if((flags & CC_HALF_CENTURY)==CC_HALF_CENTURY) - { - if(year1<51) year1+=50; else year1-=50; - } - else if(year1==0) year1=100; - - *year=year1+first_year-1; - flag=false; - } - } - else // FULL_YEAR - { - if(*year<1 || *year>9999) - { - *year=dat->tm_year+1900; - flag=false; - } - } - - if(*month<1 || *month>12) - { - *month=dat->tm_mon+1; - flag=false; - } - - if(*day<1 || *day>31) - { - *day=dat->tm_mday; - flag=false; - } - - if((*month==4 || *month==6 || *month==9 || *month==11) && *day>30) - { - if((*day=dat->tm_mday)>30) *day=30; - flag=false; - } - else if (*month==2) - { - int tmpday; - - if((*year)%4==0) // leap year? - { - if((*year)%100==0 && (*year)%400!=0) tmpday=28; // no - else tmpday=29; // yes - } - else tmpday=28; - - if(*day>tmpday) - { - if((*day=dat->tm_mday)>tmpday) *day=tmpday; - flag=false; - } - } - - return flag; -} - - -//////////////////////////////////////////////////////////////// -void DateTextView::GetYearRange(int *first_year, int *last_year) -{ - *first_year=this->first_year; - *last_year=this->last_year; -} - - -///////////////////////////////// -uint32 DateTextView::GetDivider() -{ - return divider; -} - - -/////////////////////////////////////////// -void DateTextView::SetDivider(uint32 dvder) -{ - if(dvder<0 || dvder>LAST_DIVIDER) dvder=0; - - BString s(Text()); - SetText((s.ReplaceAll(div[divider],div[dvder])).String()); - this->divider=dvder; -} - - -/////////////////////////////////// -uint32 DateTextView::GetDateFlags() -{ - return flags; -} - - -/////////////////////////////////////////// -void DateTextView::SetDateFlags(uint32 fmt) -{ - int mday, mmonth, myear; - GetDate(&mday, &mmonth, &myear); - - // Blocking changing of parameters of year - // (full/short year, full/half century) - fmt=fmt & 0xFFE7; - - if(fmt<0 || fmt>LAST_FORMAT) fmt=0; - - flags=fmt | (flags & 0xFFFE); // LAST_FORMAT==1, 1 bit - - SetDate(mday, mmonth, myear); -} diff --git a/src/Makefile b/src/Makefile deleted file mode 100644 index 3df82e9..0000000 --- a/src/Makefile +++ /dev/null @@ -1,181 +0,0 @@ -## -## yab Haiku Makefile -## -## (c) Jan Bungeroth 2009 - 2012 -## Artistic License. -## -## Use -## make -## to compile yab for Haiku. -## -## Needs a valid installation of at least: gcc, flex, bison, perl, ncurses -## - -## -## Haiku stuff -## -HAIKUOPT = -DHAIKU -DLIBRARY_PATH=\"`finddir B_USER_SETTINGS_DIRECTORY`/yab\" -# - -## -## Find haiku systenm archetecture from the package file name -## -SYSTEMARCH:= $(shell catattr SYS:PACKAGE_FILE /boot/system/kernel_x86*|cut --fields=4 -d-|cut -d. --fields 1) -# - -## -## Find used archetecture using the getarch command -## -USEDARCH := $(shell getarch) -ifeq ($(SYSTEMARCH),$(USEDARCH)) - ARCHADD:= -else - ARCHADD := /$(USEDARCH) -endif -# - -## -## Use our own column list view -## -COLUMN = column/ColumnListView.o - -## -## enable debug -## -# DBG = -g -# - -## -## enable optimization -## -OPT = -O -# -## -## set libtrary name -## -YABLIBRARY := libyab1.so -## -# - - - -## GCC Options -## -GCC = gcc -GCC_OPT = $(DBG) $(OPT) -I. -I/boot/home/config/include/ -I/boot/home/config/include/ncurses/ -DHAVE_CONFIG -DUNIX $(HAIKUOPT) -GPP = g++ -GPP_OPT = $(DBG) $(OPT) -I. -DHAVE_CONFIG -DUNIX $(HAIKUOPT) -## -## find out if we need to change the library to libyab_x86.so and use gcc instead of ld -ifeq ($(USEDARCH), x86) - LD = gcc - YABLIBRARY:=libyab1_x86.so -else - LD = ld -endif -ifeq ($(SYSTEMARCH),x86_64) - LD=gcc -endif -# - -LD_OPT = -shared - -## -## Libraries -## -##LIBPATH = -L/boot/home/config/lib -LIBPATHS = $(shell findpaths -a `getarch` B_FIND_PATH_LIB_DIRECTORY;findpaths -a `getarch` B_FIND_PATH_DEVELOP_LIB_DIRECTORY) . -LIBPATH=$(addprefix -L,$(LIBPATHS)) -##LIBPATH = -L`finddir B_SYSTEM_LIB_DIRECTORY` ##/boot/system/lib -LIB = -lbe -lroot -ltranslation -ltracker -lmedia -llocalestub -lgame - -## flags for flex (-d for debugging) -FLEXFLAGS = -i -I -L -s - -## flags for bison (-t -v for debugging) -BISONFLAGS = -d -l -t -v - -YAB_OBJECTS = YabInterface.o YabWindow.o YabView.o YabBitmapView.o YabText.o YabFilePanel.o YabFilePanelLooper.o YabList.o \ - function.o io.o graphic.o symbol.o bison.o \ - $(COLUMN) column/YabColumnType.o column/ColorTools.o \ - YabStackView.o SplitPane.o URLView.o YabTabView.o Spinner.o $(TABLIB) CalendarControl.o - -## -## Compile and link -## -yab: $(YABLIBRARY) YabMain.o main.o bison.o flex.o RdefApply YAB.rdef - $(GPP) $(GPP_OPT) -o $@ YabMain.o main.o bison.o flex.o $(LIBPATH) $(YABLIBRARY) $(LIB) - LIBRARY_PATH=$$LIBRARY_PATH:. $@ RdefApply YAB.rdef $@ - addattr -t mime BEOS:TYPE application/x-vnd.be-elfexecutable $@ - -$(YABLIBRARY): $(YAB_OBJECTS) - $(LD) $(LD_OPT) -o $@ $+ $(LIBPATH) $(LIB) - -YabMain.o: YabMain.cpp - $(GPP) $(GPP_OPT) -c YabMain.cpp -o YabMain.o -YabInterface.o: YabInterface.cpp YabInterface.h YabMenu.h - $(GPP) $(GPP_OPT) -c YabInterface.cpp -o YabInterface.o -YabWindow.o: YabWindow.cpp YabWindow.h - $(GPP) $(GPP_OPT) -c YabWindow.cpp -o YabWindow.o -YabView.o: YabView.cpp YabView.h - $(GPP) $(GPP_OPT) -c YabView.cpp -o YabView.o -YabBitmapView.o: YabBitmapView.cpp YabBitmapView.h - $(GPP) $(GPP_OPT) -c YabBitmapView.cpp -o YabBitmapView.o -YabFilePanel.o: YabFilePanel.cpp YabFilePanel.h - $(GPP) $(GPP_OPT) -c YabFilePanel.cpp -o YabFilePanel.o -YabFilePanelLooper.o: YabFilePanelLooper.cpp YabFilePanelLooper.h - $(GPP) $(GPP_OPT) -c YabFilePanelLooper.cpp -o YabFilePanelLooper.o -YabList.o: YabList.cpp YabList.h - $(GPP) $(GPP_OPT) -c YabList.cpp -o YabList.o -YabText.o: YabText.cpp YabText.h - $(GPP) $(GPP_OPT) -c YabText.cpp -o YabText.o -bison.o: bison.c yabasic.h config.h - $(GCC) $(GCC_OPT) -c bison.c -o bison.o -flex.o: flex.c bison.c yabasic.h config.h - $(GCC) $(GCC_OPT) -c flex.c -o flex.o -function.o: function.c yabasic.h config.h - $(GCC) $(GCC_OPT) -c function.c -o function.o -io.o: io.c yabasic.h config.h - $(GCC) $(GCC_OPT) -c io.c -o io.o -graphic.o: graphic.c yabasic.h config.h - $(GCC) $(GCC_OPT) -c graphic.c -o graphic.o -symbol.o: symbol.c yabasic.h config.h - $(GCC) $(GCC_OPT) -c symbol.c -o symbol.o -main.o: main.c yabasic.h config.h - $(GCC) $(GCC_OPT) -c main.c -o main.o -flex.c: yabasic.flex - flex $(FLEXFLAGS) -t yabasic.flex >flex.c -bison.c: yabasic.bison - bison $(BISONFLAGS) --output-file bison.c yabasic.bison -YabStackView.o: YabStackView.cpp YabStackView.h - $(GPP) $(GPP_OPT) -c YabStackView.cpp -o YabStackView.o -SplitPane.o: SplitPane.cpp SplitPane.h - $(GPP) $(GPP_OPT) -c SplitPane.cpp -o SplitPane.o -URLView.o: URLView.cpp URLView.h - $(GPP) $(GPP_OPT) -c URLView.cpp -o URLView.o -Spinner.o: Spinner.cpp Spinner.h - $(GPP) $(GPP_OPT) -c Spinner.cpp -o Spinner.o -column/ColumnListView.o: column/ColumnListView.cpp column/ColumnListView.h column/ObjectList.h - $(GPP) $(GPP_OPT) -c column/ColumnListView.cpp -o column/ColumnListView.o -column/ColorTools.o: column/ColorTools.cpp column/ColorTools.h - $(GPP) $(GPP_OPT) -c column/ColorTools.cpp -o column/ColorTools.o -column/YabColumnType.o: column/YabColumnType.cpp column/YabColumnType.h - $(GPP) $(GPP_OPT) -c column/YabColumnType.cpp -o column/YabColumnType.o -YabTabView.o: YabTabView.cpp YabTabView.h - $(GPP) $(GPP_OPT) -c YabTabView.cpp -o YabTabView.o -CalendarControl.o: CalendarControl.cpp CalendarControl.h DateTextView.cpp MonthWindow.cpp MonthView.cpp MouseSenseStringView.cpp - $(GPP) $(GPP_OPT) -c CalendarControl.cpp -o CalendarControl.o - -clean: - rm -f core *.o column/*.o flex.* bison.* yab yabasic.output $(YABLIBRARY) - -install: yab $(YABLIBRARY) - - - mkdir -p /boot/system/non-packaged/bin$(ARCHADD) - mkdir -p /boot/system/non-packaged/lib$(ARCHADD) - mkdir -p /boot/system/non-packaged/develop/lib$(ARCHADD) - cp -f yab /boot/system/non-packaged/bin$(ARCHADD)/ - cp -f $(YABLIBRARY) /boot/system/non-packaged/lib$(ARCHADD)/ - cp -f $(YABLIBRARY) /boot/system/non-packaged/develop/lib$(ARCHADD)/ - diff --git a/src/MediaPlay.h b/src/MediaPlay.h deleted file mode 100644 index 7ed0c46..0000000 --- a/src/MediaPlay.h +++ /dev/null @@ -1,11 +0,0 @@ -/* - * Copyright 2017, Dario Casalinuovo. All rights reserved. - * Distributed under the terms of the MIT License. - */ - -#ifndef _MEDIA_CLIENT_PLAY -#define _MEDIA_CLIENT_PLAY - -int media_play(const char* uri); - -#endif diff --git a/src/MonthView.cpp b/src/MonthView.cpp deleted file mode 100644 index 5d6847d..0000000 --- a/src/MonthView.cpp +++ /dev/null @@ -1,960 +0,0 @@ -// Calendar Control version 2.5 -// by Al.V. Sarikov. -// Kherson, Ukraine, 2006. -// E-mail: avix@ukrpost.net. -// Home page: http://avix.pp.ru. - -// Control which allows to work with dates: -// enter date to text field and choose it from calendar. - -// Distributed under BSD license (see LICENSE file). - -#include -#include -#include -#include -#include "MouseSenseStringView.cpp" - - -class MonthView : public BView -{ - public: - MonthView(int day, int month, int year, int first_year, int last_year); - ~MonthView(); - virtual void AttachedToWindow(void); - virtual void Draw(BRect r); - virtual void KeyDown(const char *bytes, int32 numBytes); - virtual void MessageReceived(BMessage *msg); - virtual void MouseDown(BPoint p); - virtual void MouseUp(BPoint p); - void MouseMoved(BPoint pt, uint32 transit, const BMessage *msg); - - private: - void DrawMonth(); - - BMessenger *msng; - MouseSenseStringView *yearMStringView[2]; - MouseSenseStringView *monthMStringView[2]; - - MouseSenseStringView *todayStringView; - BStringView *monthStringView; - BStringView *yearStringView; - char *weekdayNames[7]; - char *monthNames[12]; - int monthDays[12]; - - BBitmap *Bmp; - BView *BmpView; - - int cday, cmonth, cyear; // current date in window - int cwday1; // day of week of 1st of month in window - int cwday; // day of week of current day of month in window - - int first_year, last_year; - - int tday, tmonth, tyear; // today - int twday; // is needed to calculate days of week - - float h_cell, w_cell; // height and width of cell for one number of day of nonth - - BRect cursor; // rectangle arounding chosen date - - BRect cursorPressed; // rectangle arounding date where mouse was pressed - bool MousePressed; // is mouse pressed on date - int dayPressed; // date where mouse is pressed - - bool NewMonth; // if true field must be cleared - - int which_focused; // 0 - if month, 1 - if year, - // 2 - if days of month, 3 - if today -}; - - -MonthView::MonthView(int day, int month, int year, int first_year, int last_year) - :BView(BRect(0,0,100,100), "MonthViewAViX", B_FOLLOW_LEFT, B_WILL_DRAW) -{ - this->cday=day; - this->cmonth=month; - this->cyear=year; - - this->first_year=first_year; - this->last_year=last_year; - - struct tm *dat; - time_t tmp; - time(&tmp); - dat=localtime(&tmp); - - tday=dat->tm_mday; - tmonth=dat->tm_mon+1; - tyear=dat->tm_year+1900; // new day coming when window is opened is not handled - // because it is very rear case - twday=dat->tm_wday; - - weekdayNames[0]=(char*)"Mo"; - weekdayNames[1]=(char*)"Tu"; - weekdayNames[2]=(char*)"We"; - weekdayNames[3]=(char*)"Th"; - weekdayNames[4]=(char*)"Fr"; - weekdayNames[5]=(char*)"Sa"; - weekdayNames[6]=(char*)"Su"; - - monthNames[0]=(char*)"January"; - monthNames[1]=(char*)"February"; - monthNames[2]=(char*)"March"; - monthNames[3]=(char*)"April"; - monthNames[4]=(char*)"May"; - monthNames[5]=(char*)"June"; - monthNames[6]=(char*)"July"; - monthNames[7]=(char*)"August"; - monthNames[8]=(char*)"September"; - monthNames[9]=(char*)"October"; - monthNames[10]=(char*)"November"; - monthNames[11]=(char*)"December"; - - monthDays[0]=31; - monthDays[1]=28; - monthDays[2]=31; - monthDays[3]=30; - monthDays[4]=31; - monthDays[5]=30; - monthDays[6]=31; - monthDays[7]=31; - monthDays[8]=30; - monthDays[9]=31; - monthDays[10]=30; - monthDays[11]=31; - - NewMonth=false; // first field is cleared and clearing is not needed - - MousePressed=false; -} - - -MonthView::~MonthView() -{ - delete todayStringView; - delete monthStringView; - delete monthMStringView[0]; - delete monthMStringView[1]; - delete yearStringView; - delete yearMStringView[0]; - delete yearMStringView[1]; - delete msng; - Bmp->RemoveChild(BmpView); - delete BmpView; - delete Bmp; -} - - -void MonthView::AttachedToWindow(void) -{ - SetFont(be_plain_font); - SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); - - // Calculate size of cell needed for number of day of month - font_height h; - be_plain_font->GetHeight(&h); - h_cell = (int)(h.ascent+h.descent+h.leading+6); - w_cell = StringWidth("4")*4; - - // add today's date - BString s(""); - s << tday << " " << monthNames[tmonth-1] << " " << tyear; - - msng=new BMessenger(this); - todayStringView=new MouseSenseStringView(new BMessage('TODA'), msng, - BRect(10,10,100,100),"todayMStringViewAViX", s.String()); - todayStringView->ResizeToPreferred(); - todayStringView->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); - AddChild(todayStringView); - - // add month selection - monthStringView=new BStringView(BRect(10,10,100,100),"monthStringViewAViX", monthNames[8]); - monthStringView->SetAlignment(B_ALIGN_CENTER); - monthStringView->ResizeToPreferred(); - monthStringView->SetText(monthNames[cmonth-1]); - monthStringView->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); - AddChild(monthStringView); - - // add year selection - s.SetTo(""); - if(cyear<10) s.Append("000"); - else if(cyear<100) s.Append("00"); - else if(cyear<1000) s.Append("0"); - s << cyear; - yearStringView=new BStringView(BRect(10,10,100,100),"yearStringViewAViX", - "0000"); - yearStringView->ResizeToPreferred(); - yearStringView->SetText(s.String()); - yearStringView->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); - AddChild(yearStringView); - - ResizeTo(w_cell*7+1,h_cell*7+3+16+yearStringView->Bounds().bottom+todayStringView->Bounds().bottom); - Window()->ResizeTo(Bounds().right, Bounds().bottom); - - // year to the left button - yearMStringView[0]=new MouseSenseStringView(new BMessage('YEA0'),msng, - BRect(10,10,100,100), - "yearMStringViewAViX0", - "<<"); - AddChild(yearMStringView[0]); - yearMStringView[0]->ResizeToPreferred(); - yearMStringView[0]->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); - - // year to the right button - yearMStringView[1]=new MouseSenseStringView(new BMessage('YEA1'),msng, - BRect(10,10,100,100), - "yearMStringViewAViX1", - ">>"); - AddChild(yearMStringView[1]); - yearMStringView[1]->ResizeToPreferred(); - yearMStringView[1]->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); - - // month to the left button - monthMStringView[0]=new MouseSenseStringView(new BMessage('MON0'),msng, - BRect(10,10,100,100), - "monthMStringViewAViX0", - "<<"); - AddChild(monthMStringView[0]); - monthMStringView[0]->ResizeToPreferred(); - monthMStringView[0]->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); - - // month to the right button - monthMStringView[1]=new MouseSenseStringView(new BMessage('MON1'),msng, - BRect(10,10,100,100), - "monthMStringViewAViX1", - ">>"); - AddChild(monthMStringView[1]); - monthMStringView[1]->ResizeToPreferred(); - monthMStringView[1]->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); - - // move all in correct position - todayStringView->MoveTo((Bounds().right-todayStringView->Bounds().right)/2, - Bounds().bottom-todayStringView->Bounds().bottom-2); - - if(tyearlast_year) todayStringView->SetHighColor(tint_color(ui_color(B_PANEL_BACKGROUND_COLOR), B_DARKEN_3_TINT)); - - yearMStringView[1]->MoveTo(Bounds().right-yearMStringView[1]->Bounds().right,5); - yearStringView->MoveTo(yearMStringView[1]->Frame().left-yearStringView->Bounds().right,5); - yearMStringView[0]->MoveTo(yearStringView->Frame().left-yearMStringView[0]->Bounds().right,5); - - monthStringView->MoveTo((yearMStringView[0]->Frame().left-monthStringView->Bounds().right)/2,5); - monthMStringView[0]->MoveTo(monthStringView->Frame().left-monthMStringView[0]->Bounds().right,5); - monthMStringView[1]->MoveTo(monthStringView->Frame().right,5); - - which_focused=2; // days of month - - // Bitmap for the dates - Bmp=new BBitmap(Bounds(),B_RGB32,true); - BmpView=new BView(Bmp->Bounds(),"BV",0,B_WILL_DRAW); - Bmp->AddChild(BmpView); - - Bmp->Lock(); - BmpView->SetHighColor(ui_color(B_PANEL_BACKGROUND_COLOR)); - BmpView->FillRect(BmpView->Frame()); - BmpView->SetHighColor(255,255,255); - BRect bmpRect(Bounds()); - bmpRect.top = yearStringView->Frame().bottom + 2; - bmpRect.bottom = todayStringView->Frame().top - 5; - BmpView->FillRect(bmpRect); - - BmpView->SetHighColor(tint_color(ui_color(B_PANEL_BACKGROUND_COLOR), B_DARKEN_1_TINT)); - BmpView->StrokeLine(BPoint(0,bmpRect.top), BPoint(BmpView->Bounds().right,bmpRect.top)); - BmpView->StrokeLine(BPoint(0,bmpRect.bottom), BPoint(BmpView->Bounds().right,bmpRect.bottom)); - BmpView->SetHighColor(ui_color(B_PANEL_TEXT_COLOR)); - - float y=yearStringView->Frame().bottom+h_cell; - float x=0; - for(int i=0;i<7;i++) - { - BmpView->DrawString(weekdayNames[i],BPoint(x+(w_cell-StringWidth(weekdayNames[i]))/2,y)); - x+=w_cell; - } - - BmpView->Sync(); - Bmp->Unlock(); - - DrawMonth(); -} - - -void MonthView::Draw(BRect r) -{ - Window()->Lock(); - DrawBitmap(Bmp, BPoint(0,0)); - Window()->Unlock(); -} - - -void MonthView::DrawMonth() -{ - Bmp->Lock(); - - float y=yearStringView->Frame().bottom+h_cell; - float x=0; - - if(NewMonth) - { - BmpView->SetHighColor(255,255,255); - BmpView->FillRect(BRect(0,y+1, BmpView->Bounds().right,todayStringView->Frame().top - 6)); - BmpView->SetHighColor(ui_color(B_PANEL_TEXT_COLOR)); - BmpView->SetLowColor(255,255,255); - NewMonth=false; - } - - int byear=cyear; // base year - if(tyearSetHighColor(236,0,0,0); - BmpView->DrawString(s.String(),BPoint(x+(w_cell-StringWidth(s.String()))/2,y)); - if(cyear==tyear) if(cmonth==tmonth) if(t==tday) BmpView->SetHighColor(0,0,0,0); - - if(t==cday) - { - cwday=k; - if(which_focused==2) BmpView->SetHighColor(ui_color(B_NAVIGATION_BASE_COLOR)); - else - // BmpView->SetHighColor(tint_color(ui_color(B_PANEL_BACKGROUND_COLOR), B_DARKEN_3_TINT)); - BmpView->SetHighColor(255,255,255); - cursor.Set(x,y-h_cell+5,x+w_cell-1,y+4); - BmpView->StrokeRect(cursor); - BmpView->SetHighColor(0,0,0,0); - } - - x+=w_cell; - k++; - s.SetTo(""); - - if(k==7) - { - k=0; - y+=h_cell; - x=1; - } - } - - BmpView->Sync(); - Bmp->Unlock(); - Draw(Bounds()); -} - - -//////////////////////////////////////////////////////////////// -void MonthView::KeyDown(const char *bytes, int32 numBytes) -{ - switch(bytes[0]) - { - case B_TAB: - { - Bmp->Lock(); - switch(which_focused) - { - case 0: // months - { - BmpView->SetHighColor(ui_color(B_PANEL_BACKGROUND_COLOR)); - BmpView->StrokeLine(BPoint(monthMStringView[0]->Frame().left, - monthMStringView[0]->Frame().bottom+1), - BPoint(monthMStringView[1]->Frame().right, - monthMStringView[1]->Frame().bottom+1)); - BmpView->SetHighColor(0,0,0); - break; - } - case 1: // years - { - BmpView->SetHighColor(ui_color(B_PANEL_BACKGROUND_COLOR)); - BmpView->StrokeLine(BPoint(yearMStringView[0]->Frame().left, - yearMStringView[0]->Frame().bottom+1), - BPoint(yearMStringView[1]->Frame().right, - yearMStringView[1]->Frame().bottom+1)); - BmpView->SetHighColor(0,0,0); - break; - } - case 2: // days of month - { - BmpView->SetHighColor(tint_color(ui_color(B_PANEL_BACKGROUND_COLOR), B_DARKEN_3_TINT)); - BmpView->StrokeRect(cursor); - BmpView->SetHighColor(0,0,0); - break; - } - case 3: // today - { - BmpView->SetHighColor(ui_color(B_PANEL_BACKGROUND_COLOR)); - BmpView->StrokeLine(BPoint(todayStringView->Frame().left, - todayStringView->Frame().bottom+1), - BPoint(todayStringView->Frame().right, - todayStringView->Frame().bottom+1)); - BmpView->SetHighColor(0,0,0); - break; - } - } - - // changing which_focused - if(modifiers() & B_SHIFT_KEY) - { - if(which_focused==0) - which_focused=3; - else which_focused--; - } - else // simply Tab - { - if(which_focused==3) - which_focused=0; - else which_focused++; - } - - // drawing with new which_focused - switch(which_focused) - { - case 0: // months - { - BmpView->SetHighColor(ui_color(B_NAVIGATION_BASE_COLOR)); - BmpView->StrokeLine(BPoint(monthMStringView[0]->Frame().left, - monthMStringView[0]->Frame().bottom+1), - BPoint(monthMStringView[1]->Frame().right, - monthMStringView[1]->Frame().bottom+1)); - BmpView->SetHighColor(0,0,0); - break; - } - case 1: // years - { - BmpView->SetHighColor(ui_color(B_NAVIGATION_BASE_COLOR)); - BmpView->StrokeLine(BPoint(yearMStringView[0]->Frame().left, - yearMStringView[0]->Frame().bottom+1), - BPoint(yearMStringView[1]->Frame().right, - yearMStringView[1]->Frame().bottom+1)); - BmpView->SetHighColor(0,0,0); - break; - } - case 2: // days of month - { - BmpView->SetHighColor(ui_color(B_NAVIGATION_BASE_COLOR)); - BmpView->StrokeRect(cursor); - BmpView->SetHighColor(0,0,0); - break; - } - case 3: // today - { - BmpView->SetHighColor(ui_color(B_NAVIGATION_BASE_COLOR)); - BmpView->StrokeLine(BPoint(todayStringView->Frame().left, - todayStringView->Frame().bottom+1), - BPoint(todayStringView->Frame().right, - todayStringView->Frame().bottom+1)); - BmpView->SetHighColor(0,0,0); - break; - } - } - BmpView->Sync(); - Bmp->Unlock(); - Draw(Bounds()); - break; - } // B_TAB - - case B_DOWN_ARROW: - { - if(which_focused==0) // month - { - BMessage msg('MON0'); - MessageReceived(&msg); - } - else if(which_focused==1) // year - { - BMessage msg('YEA0'); - MessageReceived(&msg); - } - else if(which_focused==2) // days of month - { - int qu_days=monthDays[cmonth-1]; - if(cmonth==2) if(cyear%4==0) if((cyear%100!=0) || (cyear%400==0)) qu_days=29; - if((cday+7)<=qu_days) - { - Bmp->Lock(); - BmpView->SetHighColor(255,255,255); - BmpView->StrokeRect(cursor); - cursor.OffsetBySelf(0, h_cell); - cday+=7; - BmpView->SetHighColor(ui_color(B_NAVIGATION_BASE_COLOR)); - BmpView->StrokeRect(cursor); - BmpView->SetHighColor(0,0,0); - BmpView->Sync(); - Bmp->Unlock(); - Draw(Bounds()); - } - } - break; - } - - case B_UP_ARROW: - { - // Test whether Ctrl+UpArrow is pressed - if(modifiers() & B_CONTROL_KEY) - Window()->PostMessage(B_QUIT_REQUESTED); - else - { - if(which_focused==0) // month - { - BMessage msg('MON1'); - MessageReceived(&msg); - } - else if(which_focused==1) // year - { - BMessage msg('YEA1'); - MessageReceived(&msg); - } - else if(which_focused==2) // days of month - { - if((cday-7)>=1) - { - Bmp->Lock(); - BmpView->SetHighColor(255,255,255); - BmpView->StrokeRect(cursor); - cursor.OffsetBySelf(0, -h_cell); - cday-=7; - BmpView->SetHighColor(ui_color(B_NAVIGATION_BASE_COLOR)); - BmpView->StrokeRect(cursor); - BmpView->SetHighColor(0,0,0); - BmpView->Sync(); - Bmp->Unlock(); - Draw(Bounds()); - } - } - } - break; - } - - case B_LEFT_ARROW: - { - if(which_focused==0) // month - { - BMessage msg('MON0'); - MessageReceived(&msg); - } - else if(which_focused==1) // year - { - BMessage msg('YEA0'); - MessageReceived(&msg); - } - else if(which_focused==2) // days of month - { - if(cday>1) - { - Bmp->Lock(); - BmpView->SetHighColor(255,255,255); - BmpView->StrokeRect(cursor); - if(cwday>0) // by dates no matter of day of week - { - cursor.OffsetBySelf(-w_cell,0); - cwday--; - } - else // cwday==0 - { - cursor.OffsetBySelf(w_cell*6,-h_cell); - cwday=6; - } - cday--; - BmpView->SetHighColor(ui_color(B_NAVIGATION_BASE_COLOR)); - BmpView->StrokeRect(cursor); - BmpView->SetHighColor(0,0,0); - BmpView->Sync(); - Bmp->Unlock(); - Draw(Bounds()); - } - else // 1st of month, go month before - { - if(cyear>first_year || cmonth>1) // one can go - { - int cm=(cmonth==1) ? 12 : cmonth-1; - int qu_days=monthDays[cm-1]; - if(cm==2) if(cyear%4==0) - if((cyear%100!=0) || (cyear%400==0)) qu_days=29; - // it is correct not to pay attention to year changing - // because if we moved to february then year was not changed - // but if month is other then february - // then it has the same number of days every year. - cday=qu_days; - - BMessage msg('MON0'); - MessageReceived(&msg); // here month, cwday and year (if needed) will be changed - } - } - } - break; - } - - case B_RIGHT_ARROW: - { - if(which_focused==0) // month - { - BMessage msg('MON1'); - MessageReceived(&msg); - } - else if(which_focused==1) // year - { - BMessage msg('YEA1'); - MessageReceived(&msg); - } - else if(which_focused==2) // days of month - { - int qu_days=monthDays[cmonth-1]; - if(cmonth==2) if(cyear%4==0) if((cyear%100!=0) || (cyear%400==0)) qu_days=29; - if(cdayLock(); - BmpView->SetHighColor(255,255,255); - BmpView->StrokeRect(cursor); - if(cwday<6) // by dates no matter of day of week - { - cursor.OffsetBySelf(w_cell,0); - cwday++; - } - else // cwday==6 - { - cursor.OffsetBySelf(-w_cell*6,h_cell); - cwday=0; - } - cday++; - BmpView->SetHighColor(ui_color(B_NAVIGATION_BASE_COLOR)); - BmpView->StrokeRect(cursor); - BmpView->SetHighColor(0,0,0); - BmpView->Sync(); - Bmp->Unlock(); - Draw(Bounds()); - } - else // last of month, go next month - { - if(cyearPostMessage(B_QUIT_REQUESTED); - break; - } - - case B_ENTER: - case B_SPACE: - { - if(which_focused==2) - { - // here it is needed to send dayPressed (==cwday), cyear, cmonth - // to window and leave - BMessage *msg=new BMessage('MVME'); - msg->AddInt32("day",cday); - msg->AddInt32("month",cmonth); - msg->AddInt32("year",cyear); - Window()->PostMessage(msg); - } - else if(which_focused==3) - { - BMessage msg('TODA'); - MessageReceived(&msg); - } - break; - } - - default: - BView::KeyDown(bytes, numBytes); - } -} - - -//////////////////////////////////////////////////// -void MonthView::MessageReceived(BMessage *msg) -{ - switch(msg->what) - { - case 'YEA0': // year before - { - if(cyear<=first_year) break; - cyear--; - NewMonth=true; - BString s(""); - if(cyear<10) s.Append("000"); - else if(cyear<100) s.Append("00"); - else if(cyear<1000) s.Append("0"); - s<SetText(s.String()); - - if(cmonth==2) if(cday==29) // one can do simplier: if cday==29, then make - // cday=28, because two leap years one after other can't be - { - if(cyear%4!=0) cday=28; - else if(cyear%100==0 && cyear%400!=0) cday=28; - } - - DrawMonth(); - break; - } - case 'YEA1': // year after - { - if(cyear>=last_year) break; - cyear++; - NewMonth=true; - BString s(""); - if(cyear<10) s.Append("000"); - else if(cyear<100) s.Append("00"); - else if(cyear<1000) s.Append("0"); - s<SetText(s.String()); - - if(cmonth==2) if(cday==29) - { - if(cyear%4!=0) cday=28; - else if(cyear%100==0 && cyear%400!=0) cday=28; - } - - DrawMonth(); - break; - } - case 'MON0': // month before - { - if(cmonth>1) cmonth--; - else if(cyear>first_year) - { - cmonth=12; - cyear--; - - BString s(""); - if(cyear<10) s.Append("000"); - else if(cyear<100) s.Append("00"); - else if(cyear<1000) s.Append("0"); - s<SetText(s.String()); - } - else break; // nothing is changed - - NewMonth=true; - monthStringView->SetText(monthNames[cmonth-1]); - - if(cmonth==2) - { - int tmpday=28; - if(cyear%4==0) if((cyear%100!=0) || (cyear%400==0)) tmpday=29; - if(cday>tmpday) cday=tmpday; - } - else if(cday>monthDays[cmonth-1]) cday=monthDays[cmonth-1]; - - DrawMonth(); - break; - } - case 'MON1': // month after - { - if(cmonth<12) cmonth++; - else if(cyearSetText(s.String()); - } - else break; // nothing is changed - - NewMonth=true; - monthStringView->SetText(monthNames[cmonth-1]); - - if(cmonth==2) - { - int tmpday=28; - if(cyear%4==0) if((cyear%100!=0) || (cyear%400==0)) tmpday=29; - if(cday>tmpday) cday=tmpday; - } - else if(cday>monthDays[cmonth-1]) cday=monthDays[cmonth-1]; - - DrawMonth(); - break; - } - case 'TODA': // to place to today's date - { - if(tyearlast_year) break; - - NewMonth=true; - - cyear=tyear; - cmonth=tmonth; - cday=tday; - - BString s(""); - if(cyear<10) s.Append("000"); - else if(cyear<100) s.Append("00"); - else if(cyear<1000) s.Append("0"); - s<SetText(s.String()); - monthStringView->SetText(monthNames[cmonth-1]); - - DrawMonth(); - break; - } - default: - BView::MessageReceived(msg); - } -} - - -///////////////////////////////////////// -void MonthView::MouseDown(BPoint p) -{ - // It's necessary to define whether mouse cursor is on one of dates - BRect r; - - int k=cwday1; - float x=w_cell*k+1; - float y=yearStringView->Frame().bottom+h_cell+h_cell; - - int qu_days=monthDays[cmonth-1]; // quantity of days in month - - if(cmonth==2) if(cyear%4==0) if((cyear%100!=0) || (cyear%400==0)) qu_days=29; - - bool flag=false; // whether mouse is pressed just on date - int t=0; - while(tLock(); - BmpView->SetHighColor(ui_color(B_PANEL_BACKGROUND_COLOR)); - BmpView->StrokeRect(cursor); - BmpView->SetHighColor(ui_color(B_NAVIGATION_BASE_COLOR)); - BmpView->StrokeRect(cursorPressed); - Bmp->Unlock(); - Invalidate(); - break; // exit while - } - - x+=w_cell; - k++; - - if(k==7) - { - k=0; - y+=h_cell; - x=1; - } - } -} - - -void MonthView::MouseUp(BPoint p) -{ - if(!MousePressed) return; - - if(cursorPressed.Contains(p)) - { - // here it is needed to send dayPressed, cyear, cmonth - // to window and leave - BMessage *msg=new BMessage('MVME'); - msg->AddInt32("day",dayPressed); - msg->AddInt32("month",cmonth); - msg->AddInt32("year",cyear); - Window()->PostMessage(msg); - } - else - { - Bmp->Lock(); - BmpView->SetHighColor(255,255,255); - BmpView->StrokeRect(cursorPressed); - BmpView->SetHighColor(ui_color(B_NAVIGATION_BASE_COLOR)); - BmpView->StrokeRect(cursor); - Bmp->Unlock(); - Invalidate(); - MousePressed=false; - } -} - - -void MonthView::MouseMoved(BPoint pt, uint32 transit, const BMessage *msg) -{ - BPoint point; - uint32 buttons; - GetMouse(&point,&buttons); - - if(transit==B_ENTERED_VIEW) - { - if( (buttons & B_PRIMARY_MOUSE_BUTTON)==0 && - (buttons & B_SECONDARY_MOUSE_BUTTON)==0 && - (buttons & B_PRIMARY_MOUSE_BUTTON)==0 ) - MousePressed = false; - else - MousePressed = true; - } - - if(transit==B_EXITED_VIEW || transit==B_OUTSIDE_VIEW) - MouseUp(Bounds().LeftTop()); -} diff --git a/src/MonthWindow.cpp b/src/MonthWindow.cpp deleted file mode 100644 index 9517460..0000000 --- a/src/MonthWindow.cpp +++ /dev/null @@ -1,112 +0,0 @@ -// Calendar Control version 2.5 -// by Al.V. Sarikov. -// Kherson, Ukraine, 2006. -// E-mail: avix@ukrpost.net. -// Home page: http://avix.pp.ru. - -// Control which allows to work with dates: -// enter date to text field and choose it from calendar. - -// Distributed under BSD license (see LICENSE file). - -#include -#include -#include -#include -#include - -#include "MonthView.cpp" - -class MonthWindow: public BWindow -{ - public: - MonthWindow(BPoint LT, BMessenger *msng, int day, int month, int year, - int first_year, int last_year); - virtual void MessageReceived(BMessage *msg); - virtual bool QuitRequested(void); - virtual void WindowActivated(bool active); - private: - MonthView *myMonthView; - BMessenger *messenger; - - int first_year; - int last_year; -}; - - -MonthWindow::MonthWindow(BPoint LT, BMessenger *msng, int day, int month, int year, int first_year, int last_year) - :BWindow(BRect(LT,BPoint(LT.x+200,LT.y+200)),"MonthWindowAViX", - B_BORDERED_WINDOW_LOOK, B_MODAL_APP_WINDOW_FEEL, B_NOT_MOVABLE|B_AVOID_FOCUS) -{ - this->first_year=first_year; - this->last_year=last_year; - - myMonthView = new MonthView(day, month, year, first_year, last_year); - - AddChild(myMonthView); - myMonthView->MakeFocus(true); - - messenger = msng; - - BRect screenFrame = BScreen(this).Frame(); - if(LT.x < 0) - LT.x = 0; - if(LT.x > screenFrame.right - Bounds().Width()) - LT.x = screenFrame.right - Bounds().Width(); - if(LT.y > screenFrame.bottom - Bounds().Height()) - LT.y = screenFrame.bottom - Bounds().Height(); - MoveTo(LT); - - Show(); -} - - -void MonthWindow::MessageReceived(BMessage *msg) -{ - if(msg->what=='MVME') - { - // Is date correct? - int32 day, month, year; - if(msg->FindInt32("day",&day)!=B_OK) return; - if(msg->FindInt32("month",&month)!=B_OK) return; - if(msg->FindInt32("year",&year)!=B_OK) return; - - if(yearlast_year) return; - if(month<1 || month>12) return; - int32 tmp; - - tmp=31; - if(month==4 || month==6 || month==9 || month==11) - tmp=30; - else if(month==2) - { - if(year%4==0) - { - if(year%100==0 && year%400!=0) - tmp=28; - else - tmp=29; - } - else - tmp=28; - } - if(day<1 || day>tmp) return; - messenger->SendMessage(msg); - Quit(); - } - else - BWindow::MessageReceived(msg); -} - - -bool MonthWindow::QuitRequested(void) -{ - return true; -} - - -void MonthWindow::WindowActivated(bool active) -{ - // exit if unfocused - if(!active) Quit(); -} diff --git a/src/MouseSenseStringView.cpp b/src/MouseSenseStringView.cpp deleted file mode 100644 index abc9e35..0000000 --- a/src/MouseSenseStringView.cpp +++ /dev/null @@ -1,95 +0,0 @@ -// Calendar Control version 2.5 -// by Al.V. Sarikov. -// Kherson, Ukraine, 2006. -// E-mail: avix@ukrpost.net. -// Home page: http://avix.pp.ru. - -// Control which allows to work with dates: -// enter date to text field and choose it from calendar. - -// Distributed under BSD license (see LICENSE file). - -#include -#include -#include -#include -#include -#include - -class MouseSenseStringView:public BStringView -{ - public: - MouseSenseStringView(BMessage *msg, - BMessenger *msng, - BRect frame, - const char *name, - const char *text, - uint32 resizingMode=B_FOLLOW_LEFT|B_FOLLOW_TOP, - uint32 flags=B_WILL_DRAW); - virtual void MouseDown(BPoint p); - virtual void MouseUp(BPoint p); - void Draw(BRect(update)); - - private: - BMessage *msg; - BMessenger *msng; - bool isMouseDown; -}; - -MouseSenseStringView::MouseSenseStringView(BMessage *msg, - BMessenger *msng, - BRect frame, - const char *name, - const char *text, - uint32 resizingMode, - uint32 flags) - :BStringView(frame,name,text,resizingMode,flags) -{ - this->msg=msg; - this->msng=msng; - isMouseDown = false; -} - - -void MouseSenseStringView::MouseDown(BPoint p) -{ - isMouseDown = true; - // if(msg!=NULL) if(msng!=NULL) - // msng->SendMessage(msg); -} - -void MouseSenseStringView::MouseUp(BPoint p) -{ - BPoint mouse; - uint32 buttons; - GetMouse(&mouse, &buttons); - if(Bounds().Contains(mouse)) - if(msg!=NULL) if(msng!=NULL) - msng->SendMessage(msg); - isMouseDown = false; -} - -void MouseSenseStringView::Draw(BRect update) -{ - BString t(Text()); - BRect r1(Bounds()); - r1.right = r1.right/2; - BRect r2(Bounds()); - r2.left= r2.right/4; - r2.right= r2.right*3/4; - rgb_color base = ui_color(B_PANEL_BACKGROUND_COLOR); - uint32 flags = 0; - - if(t == "<<") - { - be_control_look->DrawArrowShape(this, r1, update, base, 0); - be_control_look->DrawArrowShape(this, r2, update, base, 0); - } - else if(t == ">>") - { - be_control_look->DrawArrowShape(this, r1, update, base, 1); - be_control_look->DrawArrowShape(this, r2, update, base, 1); - } - else - BStringView::Draw(update); -} diff --git a/src/RdefApply b/src/RdefApply deleted file mode 100755 index fe19566..0000000 --- a/src/RdefApply +++ /dev/null @@ -1,34 +0,0 @@ -#!yab - -doc RdefApply -doc adds icon, application signature and version info attributes from an rdef file. -doc -doc Copyright © 2015 Jim Saxton, Fat Elk Software - -if (peek("argument") >= 2) then - filename$=peek$("argument") - Outfilename$=peek$("argument") - make$=peek$("argument") - make=0 - if (make$="M") make=1 - readicon() -else - print"RdefApply" - print "Adds icon, application signature and version info attributes from an rdef file. - " - print "usage:" - print "RdefApply " - print "if M is used, OutoutFilename is created if it does not exist -or the creation date is set if it does exist." -endif - -sub readicon() - - if (not open(1,filename$)) print "Could not open file'"+filename$+"' for reading":exit - -if (make=1) system("touch "+Outfilename$) -close #1 -system("rc -o "+filename$+".rsrc "+filename$) -system("resattr -O -o "+Outfilename$+" "+filename$+".rsrc") -end sub - diff --git a/src/Spinner.cpp b/src/Spinner.cpp deleted file mode 100644 index 6b6429c..0000000 --- a/src/Spinner.cpp +++ /dev/null @@ -1,654 +0,0 @@ -/* - Spinner.cpp: A number spinner control. - Written by DarkWyrm , Copyright 2004 - Released under the MIT license. - - Original BScrollBarButton class courtesy Haiku project -*/ -#include "Spinner.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include "global.h" -#include -enum -{ - M_UP='mmup', - M_DOWN, - M_TEXT_CHANGED='mtch' -}; - -typedef enum -{ - ARROW_LEFT=0, - ARROW_RIGHT, - ARROW_UP, - ARROW_DOWN, - ARROW_NONE -} arrow_direction; - -class SpinnerMsgFilter : public BMessageFilter -{ -public: - SpinnerMsgFilter(void); - ~SpinnerMsgFilter(void); - virtual filter_result Filter(BMessage *msg, BHandler **target); -}; - -class SpinnerArrowButton : public BView -{ -public: - SpinnerArrowButton(BPoint location, const char *name, - arrow_direction dir); - ~SpinnerArrowButton(void); - void AttachedToWindow(void); - void DetachedToWindow(void); - void MouseDown(BPoint pt); - void MouseUp(BPoint pt); - void MouseMoved(BPoint pt, uint32 code, const BMessage *msg); - void Draw(BRect update); - void SetEnabled(bool value); - bool IsEnabled(void) const { return enabled; } - void SetViewColor(rgb_color color); - -private: - arrow_direction fDirection; - BPoint tri1,tri2,tri3; - Spinner *parent; - bool mousedown; - bool enabled; - rgb_color myColor; -}; - -class SpinnerPrivateData -{ -public: - SpinnerPrivateData(void) - { - thumbframe.Set(0,0,0,0); - enabled=true; - tracking=false; - mousept.Set(0,0); - thumbinc=1.0; - repeaterid=-1; - exit_repeater=false; - arrowdown=ARROW_NONE; - - #ifdef TEST_MODE - sbinfo.proportional=true; - sbinfo.double_arrows=false; - sbinfo.knob=0; - sbinfo.min_knob_size=14; - #else - get_scroll_bar_info(&sbinfo); - #endif - } - - ~SpinnerPrivateData(void) - { - if(repeaterid!=-1) - { - exit_repeater=false; - kill_thread(repeaterid); - } - } - thread_id repeaterid; - scroll_bar_info sbinfo; - BRect thumbframe; - bool enabled; - bool tracking; - BPoint mousept; - float thumbinc; - bool exit_repeater; - arrow_direction arrowdown; -}; - -Spinner::Spinner(BRect frame, const char *name, const char *label, int32 min, int32 max, int32 step, BMessage *msg, - uint32 resize,uint32 flags) - : BControl(frame, name,NULL,msg,resize,flags) -{ - - BRect r(Bounds()); - if(r.Height()<14*2) - r.bottom=r.top+14*2; - ResizeTo(r.Width(),r.Height()); - - r.right-=14; - - font_height fh; - BFont font; - font.GetHeight(&fh); - float textheight=fh.ascent+fh.descent+fh.leading; - - BString t(""); - t << max; - BFont f(be_plain_font); - float width1 = f.StringWidth(t.String())+2; - float width2 = f.StringWidth(label); - ResizeTo(width1+width2+30, textheight+6); //14*2-2); //+18+14 length of textcontrol - - - r = Bounds(); - r.right -= 14+3; //Distance between textcontrol and spinnerbutton - - r.bottom=r.top+textheight+8; //+10; //Changed from 8 to 10, because the spinnerbutton look nicer - r.OffsetTo(0, ( (Bounds().Height()-r.Height())/2) ); - - fTextControl=new BTextControl(r,"textcontrol",label,"0",new BMessage(M_TEXT_CHANGED), - B_FOLLOW_ALL,B_WILL_DRAW|B_NAVIGABLE); - - AddChild(fTextControl); - - BTextView *tview=fTextControl->TextView(); - - tview->SetAlignment(B_ALIGN_RIGHT); //change from left to right not completed - tview->SetWordWrap(false); - - if (strcmp(label, "") == 0) //check if Label was set - { - fTextControl->SetDivider(width2); - } - else if (strcmp(label,"") != 0) - { - fTextControl->SetDivider(width2+4); - } - //fTextControl->SetDivider(width2+5); - //fTextControl->SetAlignment(B_ALIGN_RIGHT,B_ALIGN_RIGHT); - BString string("QWERTYUIOP[]\\ASDFGHJKL;'ZXCVBNM,/qwertyuiop{}| " - "asdfghjkl:\"zxcvbnm<>?!@#$%^&*()-_=+`~\r"); - - for(int32 i=0; iDisallowChar(c); - } - r=Bounds(); - r.left=r.right-15; - //r.bottom/=2+4; - //r.top - - fUpButton=new SpinnerArrowButton(BPoint(r.left, r.top-1),"up",ARROW_UP); //to make one line with the textcontrol - AddChild(fUpButton); - - r=Bounds(); - r.left=r.right-15; - r.top=r.bottom/2; //remove +1 to make one line with the textcontrol - - fDownButton=new SpinnerArrowButton(BPoint(r.left, r.top),"down",ARROW_DOWN); - AddChild(fDownButton); - - fStep=step; - fMin=min; - fMax=max; - SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); - - privatedata=new SpinnerPrivateData; - fFilter=new SpinnerMsgFilter; - - SetValue(min); -} - -Spinner::~Spinner(void) -{ - delete privatedata; - delete fFilter; -} - -void Spinner::AttachedToWindow(void) -{ - Window()->AddCommonFilter(fFilter); - fTextControl->SetTarget(this); -} - -void Spinner::DetachedFromWindow(void) -{ - Window()->RemoveCommonFilter(fFilter); -} - -void Spinner::SetValue(int32 value) -{ - if(value>GetMax() || valueSetText(string); - -} - -void Spinner::SetViewColor(rgb_color color) -{ - BControl::SetViewColor(color); - fTextControl->SetViewColor(color); - fTextControl->SetLowColor(color); - fUpButton->SetViewColor(color); - fDownButton->SetViewColor(color); -} - -void Spinner::SetLabel(const char *text) -{ - fTextControl->SetLabel(text); -} - -void Spinner::ValueChanged(int32 value) -{ - -} - -void Spinner::MessageReceived(BMessage *msg) -{ - - if(msg->what==M_TEXT_CHANGED) - { - BString string(fTextControl->Text()); - int32 newvalue=0; - - sscanf(string.String(),"%ld",&newvalue); - if(newvalue>=GetMin() && newvalue<=GetMax()) - { - // new value is in range, so set it and go - SetValue(newvalue); - Invoke(); - Draw(Bounds()); - ValueChanged(Value()); - - } - else - { - // new value is out of bounds. Clip to range if current value is not - // at the end of its range - if(newvalueGetMax() && Value()!=GetMax()) - { - SetValue(GetMax()); - Invoke(); - Draw(Bounds()); - ValueChanged(Value()); - - - } - else - { - char string[100]; - sprintf(string,"%ld",Value()); - fTextControl->SetText(string); - - } - } - - } - - else - BControl::MessageReceived(msg); - -} - -void Spinner::SetSteps(int32 stepsize) -{ - fStep=stepsize; -} - -void Spinner::SetRange(int32 min, int32 max) -{ - SetMin(min); - SetMax(max); -} - -void Spinner::GetRange(int32 *min, int32 *max) -{ - *min=fMin; - *max=fMax; -} - -void Spinner::SetMax(int32 max) -{ - fMax=max; - if(Value()>fMax) - SetValue(fMax); -} - -void Spinner::SetMin(int32 min) -{ - fMin=min; - if(Value()SetEnabled(value); - fTextControl->TextView()->MakeSelectable(value); - fUpButton->SetEnabled(value); - fDownButton->SetEnabled(value); -} - -void Spinner::MakeFocus(bool value) -{ - fTextControl->MakeFocus(value); -} - - -SpinnerArrowButton::SpinnerArrowButton(BPoint location, - const char *name, arrow_direction dir) - :BView(BRect(0,0,16,12).OffsetToCopy(location), - name, B_FOLLOW_ALL, B_WILL_DRAW) -{ - fDirection=dir; - enabled=true; - myColor = ui_color(B_PANEL_BACKGROUND_COLOR); - mousedown=false; -} - -SpinnerArrowButton::~SpinnerArrowButton(void) -{ -} - -void SpinnerArrowButton::MouseDown(BPoint pt) -{ - if(enabled==false) - return; - - if (!IsEnabled()) - return; - - mousedown=true; - int redcost = 1000; - Draw(Bounds()); - - BRect bounds = Bounds(); - uint32 buttons; - BPoint point; - - int32 step=parent->GetSteps(); - int32 newvalue=parent->Value(); - int32 waitvalue=150000; - - do - { - if(fDirection==ARROW_UP) - { - parent->privatedata->arrowdown=ARROW_UP; - newvalue+=step; - } - else - { - parent->privatedata->arrowdown=ARROW_DOWN; - newvalue-=step; - } - - if( newvalue>=parent->GetMin() && newvalue<=parent->GetMax()) - { - // new value is in range, so set it and go - parent->SetValue(newvalue); - parent->Invoke(); -// parent->Draw(parent->Bounds()); - parent->ValueChanged(parent->Value()); - } - else - { - // new value is out of bounds. Clip to range if current value is not - // at the end of its range - if(newvalueGetMin() && parent->Value()!=parent->GetMin()) - { - parent->SetValue(parent->GetMin()); - parent->Invoke(); -// parent->Draw(parent->Bounds()); - parent->ValueChanged(parent->Value()); - } - else - if(newvalue>parent->GetMax() && parent->Value()!=parent->GetMax()) - { - parent->SetValue(parent->GetMax()); - parent->Invoke(); -// parent->Draw(parent->Bounds()); - parent->ValueChanged(parent->Value()); - } - else - { - // cases which go here are if new value is maximum and value already at maximum - return; - } - } - - Window()->UpdateIfNeeded(); - - snooze(waitvalue); - - GetMouse(&point, &buttons, false); - - bool inside = bounds.Contains(point); - - // if ((parent->Value() == B_CONTROL_ON) != inside) - // parent->SetValue(inside ? B_CONTROL_ON : B_CONTROL_OFF); - - if(waitvalue<=50000) - waitvalue=50000; - else - { - waitvalue -= redcost; - redcost = redcost*10; - } - - } while (buttons != 0); - -} - -void SpinnerArrowButton::MouseUp(BPoint pt) -{ - if(enabled) - { - mousedown=false; - - if(parent) - { - parent->privatedata->arrowdown=ARROW_NONE; - parent->privatedata->exit_repeater=true; - } - Draw(Bounds()); - } -} - -void SpinnerArrowButton::MouseMoved(BPoint pt, uint32 transit, const BMessage *msg) -{ - if(enabled==false) - return; - - if(transit==B_ENTERED_VIEW) - { - BPoint point; - uint32 buttons; - GetMouse(&point,&buttons); - if( (buttons & B_PRIMARY_MOUSE_BUTTON)==0 && - (buttons & B_SECONDARY_MOUSE_BUTTON)==0 && - (buttons & B_PRIMARY_MOUSE_BUTTON)==0 ) - mousedown=false; - else - mousedown=true; - Draw(Bounds()); - } - - if(transit==B_EXITED_VIEW || transit==B_OUTSIDE_VIEW) - MouseUp(Bounds().LeftTop()); -} - -void SpinnerArrowButton::Draw(BRect update) -{ - BRect rect(Bounds()); - rgb_color background = B_TRANSPARENT_COLOR; - if (Parent()) - background = Parent()->ViewColor(); - if (background == B_TRANSPARENT_COLOR) - background = ui_color(B_PANEL_BACKGROUND_COLOR); - rgb_color base = ui_color(B_PANEL_BACKGROUND_COLOR); - - uint32 flags = 0; - if(!parent->IsEnabled()) - flags |= BControlLook::B_DISABLED; - if(mousedown) - flags = 1 << 2; - BRect r(Bounds()); - if(fDirection == ARROW_UP) - r.bottom = r.bottom*2; - else - r.top = - r.bottom; - be_control_look->DrawButtonFrame(this, r, update, base, background, flags); - be_control_look->DrawButtonBackground(this, r, update, base, flags); - - rect.InsetBy(2.0,2.0); - base = ui_color(B_PANEL_TEXT_COLOR); - float tint = B_NO_TINT; - if(!parent->IsEnabled()) - tint = B_LIGHTEN_MAX_TINT; - be_control_look->DrawArrowShape(this, rect, update, base, fDirection, flags, tint); -} - -void SpinnerArrowButton::AttachedToWindow(void) -{ - parent=(Spinner*)Parent(); -} - -void SpinnerArrowButton::DetachedToWindow(void) -{ - parent=NULL; -} - -void SpinnerArrowButton::SetEnabled(bool value) -{ - enabled=value; - Invalidate(); -} - -void SpinnerArrowButton::SetViewColor(rgb_color color) -{ - myColor = color; - Invalidate(); -} - -SpinnerMsgFilter::SpinnerMsgFilter(void) - : BMessageFilter(B_PROGRAMMED_DELIVERY, B_ANY_SOURCE,B_KEY_DOWN) -{ -} - -SpinnerMsgFilter::~SpinnerMsgFilter(void) -{ -} - -filter_result SpinnerMsgFilter::Filter(BMessage *msg, BHandler **target) -{ - int32 c; - msg->FindInt32("raw_char",&c); - switch(c) - { - case B_ENTER: - { - BTextView *text=dynamic_cast(*target); - if(text && text->IsFocus()) - { - BView *view=text->Parent(); - while(view) - { - Spinner *spin=dynamic_cast(view); - if(spin) - { - BString string(text->Text()); - int32 newvalue=0; - - sscanf(string.String(),"%ld",&newvalue); - if(newvalue!=spin->Value()) - { - spin->SetValue(newvalue); - spin->Invoke(); - } - return B_SKIP_MESSAGE; - } - view=view->Parent(); - } - } - return B_DISPATCH_MESSAGE; - } - case B_TAB: - { - return B_DISPATCH_MESSAGE; - } - /* - case B_TAB: - { - // Cause Tab characters to perform keybaord navigation - BHandler *h=*target; - BView *v=NULL; - - h=h->NextHandler(); - while(h) - { - v=dynamic_cast(h); - if(v) - { - *target=v->Window(); - return B_DISPATCH_MESSAGE; - } - h=h->NextHandler(); - } - return B_SKIP_MESSAGE; - // return B_DISPATCH_MESSAGE; - }*/ - case B_UP_ARROW: - case B_DOWN_ARROW: - { - BTextView *text=dynamic_cast(*target); - if(text && text->IsFocus()) - { - // We have a text view. See if it currently has the focus and belongs - // to a Spinner control. If so, change the value of the spinner - - // TextViews are complicated beasts which are actually multiple views. - // Travel up the hierarchy to see if any of the target's ancestors are - // a Spinner. - - BView *view=text->Parent(); - while(view) - { - Spinner *spin=dynamic_cast(view); - if(spin) - { - int32 step=spin->GetSteps(); - if(c==B_DOWN_ARROW) - step=0-step; - - spin->SetValue(spin->Value()+step); - spin->Invoke(); - return B_SKIP_MESSAGE; - } - view=view->Parent(); - } - } - - return B_DISPATCH_MESSAGE; - } - default: - return B_DISPATCH_MESSAGE; - } - - // shut the stupid compiler up - return B_SKIP_MESSAGE; -} diff --git a/src/Spinner.h b/src/Spinner.h deleted file mode 100644 index 4cdffcd..0000000 --- a/src/Spinner.h +++ /dev/null @@ -1,59 +0,0 @@ -#ifndef SPINNER_H_ -#define SPINNER_H_ - -#include -#include -#include -#include -#include - -class SpinnerPrivateData; -class SpinnerArrowButton; -class SpinnerMsgFilter; - -class Spinner : public BControl -{ -public: - Spinner(BRect frame, const char *name, const char *label, int32 min, int32 max, int32 step, BMessage *msg, - uint32 resize=B_FOLLOW_LEFT|B_FOLLOW_TOP,uint32 flags=B_WILL_DRAW|B_NAVIGABLE); - virtual ~Spinner(void); - virtual void AttachedToWindow(void); - virtual void DetachedFromWindow(void); - virtual void ValueChanged(int32 value); - virtual void MessageReceived(BMessage *msg); - virtual void SetViewColor(rgb_color color); - - virtual void SetSteps(int32 stepsize); - int32 GetSteps(void) const { return fStep; } - - virtual void SetRange(int32 min, int32 max); - void GetRange(int32 *min, int32 *max); - - virtual void SetMax(int32 max); - int32 GetMax(void) const { return fMax; } - virtual void SetMin(int32 min); - int32 GetMin(void) const { return fMin; } - - virtual void MakeFocus(bool value=true); - - virtual void SetValue(int32 value); - // int32 Value(); - virtual void SetLabel(const char *text); - BTextControl *TextControl(void) const { return fTextControl; } - - virtual void SetEnabled(bool value); - -private: - friend class SpinnerArrowButton; - friend class SpinnerPrivateData; - - BTextControl *fTextControl; - SpinnerArrowButton *fUpButton, *fDownButton; - SpinnerPrivateData *privatedata; - - int32 fStep; - int32 fMin, fMax; - SpinnerMsgFilter *fFilter; -}; - -#endif diff --git a/src/SplitPane.cpp b/src/SplitPane.cpp deleted file mode 100644 index 68e85f4..0000000 --- a/src/SplitPane.cpp +++ /dev/null @@ -1,726 +0,0 @@ -/******************************************************* -* SplitPane© -* -* SplitPane is a usefull UI component. It alows the -* use to ajust two view Horizontaly or Vertacly so -* that they are a desired size. This type of Pane -* shows up most comonly in Mail/News Readers. -* -* @author YNOP (ynop@acm.org) -* @version beta -* @date Dec. 10 1999 -*******************************************************/ -#include -#include -#include -#include -#include -#include -#include - -//#include - -#include "SplitPane.h" -//#include "SplitPaneConfig.h" - -/******************************************************* -* Setup the main view. Add in all the niffty components -* we have made and get things rolling -*******************************************************/ -SplitPane::SplitPane(BRect frame, const char* name, BView *one, BView *two,uint32 Mode):BView(frame, name, Mode,B_WILL_DRAW|B_FRAME_EVENTS){ - SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); // This is default get from parent if exist - //SetViewColor(B_TRANSPARENT_32_BIT); // go tran so we have control over drawing - BRect b; - b = Bounds(); - SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); - PaneOne = one; - PaneTwo = two; - - align = B_VERTICAL; // Most people use it this way - pos = (int)b.Width()/2; // Center is a good start place - thickness = 10; - jump = 1; // 1 makes a smother slide - VOneDetachable = false; - VTwoDetachable = false; - pad = 1; - MinSizeOne = 0; // full left - MinSizeTwo = 0; // full right - poslocked = false; // free movement - alignlocked = false; // free alignment - Draggin = false; - attached = false; - - WinOne = NULL; - WinTwo = NULL; - ConfigWindow = NULL; - - AddChild(one); - AddChild(two); -} - -/******************************************************* -* When ready grap the parents color and refreash. -*******************************************************/ -void SplitPane::AttachedToWindow(){ - //SetViewColor(Parent()->ViewColor()); - attached = true; - Update(); -} - -/******************************************************* -* If we are being resized. Fix the stuff we need to fix -*******************************************************/ -void SplitPane::FrameResized(float,float){ -// if bar is on the left side follow left -// else if it is on the right side follow the right -// Need to implements smart follow still - Update(); - Invalidate(); -} - -/******************************************************* -* The main draw stuff here. basicly just the slider -*******************************************************/ -void SplitPane::Draw(BRect f){ - SetHighColor(160,160,160); - - if(align == B_VERTICAL){ - SetHighColor(185,185,185); - // SetHighColor(145,145,145); - //FillRect(BRect(pos,Bounds().top+pad+1,pos,Bounds().bottom-pad-1)); // 145 - FillRect(BRect(pos,Bounds().top+pad+1,pos,Bounds().bottom-pad-1)); // 145 - - SetHighColor(255,255,255); - FillRect(BRect(pos+1,Bounds().top+pad+1,pos+2,Bounds().bottom-pad-1)); // 255 - - //SetHighColor(216,216,216); - SetHighColor(Parent()->ViewColor()); - FillRect(BRect(pos+2,Bounds().top+pad+1,pos+thickness-2,Bounds().bottom-pad-1));// 216 - - if(thickness>9) - { - float y = (Bounds().bottom - Bounds().top)/2; - float x = pos + (thickness/2); - SetPenSize(2); - SetHighColor(255,255,255); - StrokeLine(BPoint(x-3,y-11),BPoint(x+3,y-5)); - StrokeLine(BPoint(x-3,y-7),BPoint(x+3,y-1)); - StrokeLine(BPoint(x-3,y-3),BPoint(x+3,y+3)); - StrokeLine(BPoint(x-3,y+1),BPoint(x+3,y+7)); - StrokeLine(BPoint(x-3,y+5),BPoint(x+3,y+11)); - SetPenSize(1); - SetHighColor(145,145,145); - StrokeLine(BPoint(x-3,y-10),BPoint(x+3,y-4)); - StrokeLine(BPoint(x-3,y-6),BPoint(x+3,y+0)); - StrokeLine(BPoint(x-3,y-2),BPoint(x+3,y+4)); - StrokeLine(BPoint(x-3,y+2),BPoint(x+3,y+8)); - StrokeLine(BPoint(x-3,y+6),BPoint(x+3,y+12)); - } - - SetHighColor(185,185,185); - // SetHighColor(145,145,145); - FillRect(BRect(pos+thickness-2,Bounds().top+pad+1,pos+thickness-2,Bounds().bottom-pad-1)) ;// 145 - - SetHighColor(145,145,145); - FillRect(BRect(pos+thickness-1,Bounds().top+pad+1,pos+thickness-1,Bounds().bottom-pad-1)); // 96 - //FillRect(BRect(pos+thickness,Bounds().top+pad+1,pos+thickness,Bounds().bottom-pad-1)); - }else{ - SetHighColor(185,185,185); - // SetHighColor(145,145,145); - //FillRect(BRect(Bounds().left+pad+1,pos,Bounds().right-pad-1,pos)); // 145 - FillRect(BRect(Bounds().left+pad+1,pos,Bounds().right-pad-1,pos)); // 145 - - SetHighColor(255,255,255); - FillRect(BRect(Bounds().left+pad+1,pos+1,Bounds().right-pad-1,pos+2)); // 255 - - //SetHighColor(216,216,216); - SetHighColor(Parent()->ViewColor()); - FillRect(BRect(Bounds().left+pad+1,pos+2,Bounds().right-pad-1,pos+thickness-2));// 216 - - if(thickness>9) - { - SetHighColor(255,255,255); - float x = (Bounds().right - Bounds().left)/2; - float y = pos + (thickness/2); - SetPenSize(2); - StrokeLine(BPoint(x-11,y-3),BPoint(x-5,y+3)); - StrokeLine(BPoint(x-7,y-3),BPoint(x-1,y+3)); - StrokeLine(BPoint(x-3,y-3),BPoint(x+3,y+3)); - StrokeLine(BPoint(x+1,y-3),BPoint(x+7,y+3)); - StrokeLine(BPoint(x+5,y-3),BPoint(x+11,y+3)); - SetPenSize(1); - SetHighColor(145,145,145); - StrokeLine(BPoint(x-10,y-3),BPoint(x-4,y+3)); - StrokeLine(BPoint(x-6,y-3),BPoint(x+0,y+3)); - StrokeLine(BPoint(x-2,y-3),BPoint(x+4,y+3)); - StrokeLine(BPoint(x+2,y-3),BPoint(x+8,y+3)); - StrokeLine(BPoint(x+6,y-3),BPoint(x+12,y+3)); - } - - SetHighColor(185,185,185); - // SetHighColor(145,145,145); - FillRect(BRect(Bounds().left+pad+1,pos+thickness-2,Bounds().right-pad-1,pos+thickness-2)) ;// 145 - - SetHighColor(145,145,145); - // SetHighColor(96,96,96); - FillRect(BRect(Bounds().left+pad+1,pos+thickness-1,Bounds().right-pad-1,pos+thickness-1)); // 96 - //FillRect(BRect(Bounds().left+pad+1,pos+thickness,Bounds().right-pad-1,pos+thickness)); - } -} - -/******************************************************* -* Keeps Modes for both panles uptodate and acctually -* is the func that sets the location of the slider -*******************************************************/ -void SplitPane::Update(){ - Window()->Lock(); - if(align == B_VERTICAL){ - PaneOne->SetResizingMode(B_FOLLOW_LEFT|B_FOLLOW_TOP_BOTTOM); - PaneTwo->SetResizingMode(B_FOLLOW_LEFT_RIGHT|B_FOLLOW_TOP_BOTTOM); - if(pos > (Bounds().Width()-thickness-MinSizeTwo)){ - if(!poslocked){ - pos = (int)Bounds().Width()-thickness-MinSizeTwo; - } - } - if(pos < MinSizeOne){ - if(!poslocked){ - pos = MinSizeOne; - } - } - }else{ - PaneOne->SetResizingMode(B_FOLLOW_LEFT_RIGHT|B_FOLLOW_TOP); - PaneTwo->SetResizingMode(B_FOLLOW_LEFT_RIGHT|B_FOLLOW_TOP_BOTTOM); - if(pos > (Bounds().Height()-thickness-MinSizeTwo)){ - if(!poslocked){ - pos = (int)Bounds().Height()-thickness-MinSizeTwo; - } - } - if(pos < MinSizeOne){ - if(!poslocked){ - pos = MinSizeOne; - } - } - } - - // this block should go in FrameResized .. think about it - if(align == B_VERTICAL){ - if(pos >= (Bounds().IntegerWidth()/2)){ - //pos should follow the right side - // staying the same distans from it that - // it is right now - } - }else{ - if(pos >= (Bounds().IntegerHeight()/2)){ - //should follow bottom and stay the - // same distance that we are way from - // it now - } - } - - - if(PaneOne){ - if(!WinOne){ - if(align == B_VERTICAL){ - PaneOne->MoveTo(pad,Bounds().top+pad); - PaneOne->ResizeTo(pos-pad, Bounds().Height()-pad-pad); // widht x height - }else{ - PaneOne->MoveTo(pad,Bounds().top+pad); - PaneOne->ResizeTo(Bounds().Width()-pad-pad, pos-pad-pad); // widht x height - } - } - } - if(PaneTwo){ - if(!WinTwo){ - if(align == B_VERTICAL){ - PaneTwo->MoveTo(pos+thickness,Bounds().top+pad); - PaneTwo->ResizeTo(Bounds().Width()-(pos+thickness)-pad, Bounds().Height()-pad-pad); - }else{ - PaneTwo->MoveTo(Bounds().left+pad,pos+thickness); - PaneTwo->ResizeTo(Bounds().Width()-pad-pad, Bounds().Height()-pos-pad-thickness); - } - } - } - - Window()->Unlock(); -} - -/******************************************************* -* Hook for when we click. This takes care of all the -* little stuff - Like where is the mouse and what is -* going on. -*******************************************************/ -void SplitPane::MouseDown(BPoint where){ - Window()->Lock(); - BMessage *currentMsg = Window()->CurrentMessage(); - if (currentMsg->what == B_MOUSE_DOWN) { - uint32 buttons = 0; - currentMsg->FindInt32("buttons", (int32 *)&buttons); - uint32 modifiers = 0; - currentMsg->FindInt32("modifiers", (int32 *)&modifiers); - uint32 clicks = 0; - currentMsg->FindInt32("clicks",(int32*)&clicks); - - if (buttons & B_SECONDARY_MOUSE_BUTTON){ - if(!alignlocked){ - switch(align){ - case B_VERTICAL: - align = B_HORIZONTAL; - break; - case B_HORIZONTAL: - align = B_VERTICAL; - break; - } - Update(); - Invalidate(); - } - - /*if(VOneDetachable){ - WinOne = new BWindow(ConvertToScreen(PaneOne->Bounds()),"PanelOne",B_TITLED_WINDOW,B_ASYNCHRONOUS_CONTROLS); - RemoveChild(PaneOne); - WinOne->AddChild(PaneOne); - PaneOne->SetResizingMode(B_FOLLOW_ALL_SIDES); - // PaneOne->SetTarget(this); - WinOne->Show(); - }*/ - } - // if((buttons & B_PRIMARY_MOUSE_BUTTON) && (clicks >= 2)){ - //Config window for split pane - // (new BAlert(NULL,"This is - or will be - a configuration panel for SplitPane.","Ok"))->Go(); - //ConfigWindow = new SplitPaneConfig(this); - //ConfigWindow->Show(); - //}else - if((buttons & B_PRIMARY_MOUSE_BUTTON) && !Draggin){ - if(!poslocked){ - Draggin= true; // this is so we can drag - here = where; - } - SetMouseEventMask(B_POINTER_EVENTS,B_LOCK_WINDOW_FOCUS); - } - } - Window()->Unlock(); -} - -/******************************************************* -* If we unclick then stop dragging or whatever it is -* we are doing -*******************************************************/ -void SplitPane::MouseUp(BPoint where){ - Draggin = false; // stop following mouse -} - -/******************************************************* -* If the mouse moves while we dragg. Then follow it -* Also Invalidate so we update the views -*******************************************************/ -void SplitPane::MouseMoved(BPoint where,uint32 info,const BMessage *m){ - if(Draggin){ - switch(align){ - case B_HORIZONTAL: - pos = (int)(where.y)-(thickness/2);//- here.x - break; - case B_VERTICAL: - pos = (int)(where.x)-(thickness/2); - break; - } - - /* - // This code figures out which jump we are closest - // to and if needed we "snap" to that. - int c = Bounds().IntegerWidth() / pos - Jump * c ... hmmm this is not right at all - */ - - if(pos < MinSizeOne){ - pos = MinSizeOne; - } - - if(align == B_VERTICAL){ - if(pos > (Bounds().Width() - thickness - MinSizeTwo)){ - pos = (int)(Bounds().Width() - thickness - MinSizeTwo + 1); - } - }else{ - if(pos > (Bounds().Height() - thickness - MinSizeTwo)){ - pos = (int)(Bounds().Height() - thickness - MinSizeTwo + 1); - } - } - - Update(); - - Invalidate(); - } -} - -/******************************************************* -* If you already have a view One, but want to change -* if for some odd reason. This should work. -*******************************************************/ -void SplitPane::AddChildOne(BView *v){ - RemoveChild(PaneOne); - PaneOne = v; - AddChild(PaneOne); -} -/*void SplitPane::MakePaneTwoFocus() -{ - if(PaneTwo) - PaneTwo->MakeFocus(); - -} -*/ -/******************************************************* -* If you already have a view Two, and want to put -* another view there, this is what to use. -*******************************************************/ -void SplitPane::AddChildTwo(BView* v,bool IsAdded,bool ShowAfterHide) -{ - if(!v->IsHidden()) - v->Hide(); - - PaneTwo = v; - //WinTwo = NULL; - - - PaneTwo = v; - if(IsAdded) - { - Update(); - if(ShowAfterHide) - { - if(v->IsHidden()) - v->Show(); - } - - } - if(!IsAdded) - { - AddChild(PaneTwo); - } - PaneTwo = v; - -} - -/******************************************************* -* Sets is we are horizontal or Vertical. We use the -* standard B_HORIZONTAL and B_VERTICAL flags for this -*******************************************************/ -void SplitPane::SetAlignment(uint a){ - align = a; - if(attached){ - Update(); - } - Invalidate(); -} - -/******************************************************* -* Returns wheather the slider is horizontal or vertical -*******************************************************/ -uint SplitPane::GetAlignment(){ - return align; -} - -/******************************************************* -* Sets the location of the bar. (we do no bounds -* checking for you so if its off the window thats -* your problem) -*******************************************************/ -void SplitPane::SetBarPosition(int i){ - pos = i; - if(attached){ - Update(); - } - Invalidate(); -} - -/******************************************************* -* Returns about where the bar is ... -*******************************************************/ -int SplitPane::GetBarPosition(){ - return pos; -} - -/******************************************************* -* Sets how thick the bar should be. -*******************************************************/ -void SplitPane::SetBarThickness(int i){ - thickness = i; - if(attached){ - Update(); - } - Invalidate(); -} - -/******************************************************* -* Retuns to us the thickness of the slider bar -*******************************************************/ -int SplitPane::GetBarThickness(){ - return thickness; -} - -/******************************************************* -* Sets the amount of jump the bar has when it is -* moved. This can also be though of as snap. The bar -* will start at 0 and jump(snap) to everry J pixels. -*******************************************************/ -void SplitPane::SetJump(int i){ - jump = i; - if(attached){ - Update(); - } -} - -/******************************************************* -* Lets you know what the jump is .. see SetJump -*******************************************************/ -int SplitPane::GetJump(){ - return jump; -} - -/******************************************************* -* Do we have a View One or is it NULL -*******************************************************/ -bool SplitPane::HasViewOne(){ - if(PaneOne) return true; - return false; -} - -/******************************************************* -* Do we have a View Two .. or is it NULL too -*******************************************************/ -bool SplitPane::HasViewTwo(){ - if(PaneTwo) return true; - return false; -} - -/******************************************************* -* Sets wheather View one is detachable from the -* slider view and from the app. This will creat a -* window that is detached (floating) from the app. -*******************************************************/ -void SplitPane::SetViewOneDetachable(bool b){ - VOneDetachable = b; -} - -/******************************************************* -* Sets view tow detachable or not -*******************************************************/ -void SplitPane::SetViewTwoDetachable(bool b){ - VTwoDetachable = b; -} - -/******************************************************* -* Returns whether the view is detachable -*******************************************************/ -bool SplitPane::IsViewOneDetachable(){ - return VOneDetachable; -} - -/******************************************************* -* Returns if this view is detachable -*******************************************************/ -bool SplitPane::IsViewTwoDetachable(){ - return VTwoDetachable; -} - -/******************************************************* -* Tells the view if the user is alowed to open the -* configuration window for the slider. -*******************************************************/ -void SplitPane::SetEditable(bool b){ - //ADD CODE HERE YNOP -} - -/******************************************************* -* Tells use if the split pane is user editable -*******************************************************/ -bool SplitPane::IsEditable(){ - return true; //ADD SOME MORE CODE HERE -} - -/******************************************************* -* Sets the inset that the view has. -*******************************************************/ -void SplitPane::SetViewInsetBy(int i){ - pad = i; - if(attached){ - Update(); - } Invalidate(); -} - -/******************************************************* -* Returns to use the padding around the views -*******************************************************/ -int SplitPane::GetViewInsetBy(){ - return pad; -} - -/******************************************************* -* This sets the minimum size that View one can be. -* if the user trys to go past this .. we just stop -* By default the minimum size is set to 0 (zero) so -* the user can put the slider anywhere. -*******************************************************/ -void SplitPane::SetMinSizeOne(int i){ - MinSizeOne = i; -} - -/******************************************************* -* Gives us the minimum size that one can be. -*******************************************************/ -int SplitPane::GetMinSizeOne(){ - return MinSizeOne; -} - -/******************************************************* -* This sets the Minimum size that the second view -* can be. -*******************************************************/ -void SplitPane::SetMinSizeTwo(int i){ - MinSizeTwo = i; -} - -/******************************************************* -* Lets us know what that minimum size is. -*******************************************************/ -int SplitPane::GetMinSizeTwo(){ - return MinSizeTwo; -} - -/******************************************************* -* Locks the bar from being moved by the User. The -* system can still move the bar (via SetBarPosition) -*******************************************************/ -void SplitPane::SetBarLocked(bool b){ - poslocked = b; -} - -/******************************************************* -* Returns to use if the bar is in a locked state or -* not. -*******************************************************/ -bool SplitPane::IsBarLocked(){ - return poslocked; -} - -/******************************************************* -* Locks the alignment of the bar. The user can no -* longer toggle between Horizontal and Vertical -* Slider bar. Again you can still progomaticly set -* the position how ever you want. -*******************************************************/ -void SplitPane::SetBarAlignmentLocked(bool b){ - alignlocked = b; -} - -/******************************************************* -* Lets us know about the lock state of the bar -*******************************************************/ -bool SplitPane::IsBarAlignmentLocked(){ - return alignlocked; -} - -/******************************************************* -* Gets the Total state of the bar, alignment, size, -* position and many other things that are required -* to fully capture the state of the SplitPane. -* We pack all of this into a cute little BMessage -* so that it is esally expandable and can be saved -* off easyaly too. The SplitPane System does not -* however save the state for you. Your program must -* grab the state and save it in its config file. -*******************************************************/ -BMessage* SplitPane::GetState(){ - BMessage *state; - - state = new BMessage(SPLITPANE_STATE); - - state->AddBool("onedetachable",VOneDetachable); - state->AddBool("twodetachable",VTwoDetachable); - state->AddInt32("align",align); - state->AddInt32("pos",pos); - state->AddInt32("thick",thickness); - state->AddInt32("jump",jump); - state->AddInt32("pad",pad); - state->AddInt32("minsizeone",MinSizeOne); - state->AddInt32("minsizetwo",MinSizeTwo); - state->AddBool("poslock",poslocked); - state->AddBool("alignlock",alignlocked); - return state; - // delete state; -} - -/******************************************************* -* Sets the state of the SplitPane from a BMessage -* like the one recived from GetState(). -* This is one of three ways the user can rebuild the -* state of the SplitPane. The second is to simply -* send the SplitPane the state message, it is the -* same as calling SetState but it ashyncronouse. -* The third way is to use all the Get/Set methouds -* for each element of the SplitPane, this way is -* long and boarding. I suggest you just send the -* View a message :) -*******************************************************/ -void SplitPane::SetState(BMessage *state){ - int32 Npos,Nthickness,Njump,Npad,NMSO,NMST; - int32 Nalign;//uint - - if(state->FindBool("onedetachable",&VOneDetachable) != B_OK){ - VOneDetachable = false; - } - if(state->FindBool("towdetachable",&VTwoDetachable) != B_OK){ - VTwoDetachable = false; - } - if(state->FindInt32("align",&Nalign) == B_OK){ - align = Nalign; - } - if(state->FindInt32("pos",&Npos) == B_OK){ - pos = Npos; - } - if(state->FindInt32("thick",&Nthickness) == B_OK){ - thickness = Nthickness; - } - if(state->FindInt32("jump",&Njump) == B_OK){ - jump = Njump; - } - if(state->FindInt32("pad",&Npad) == B_OK){ - pad = Npad; - } - if(state->FindInt32("minsizeonw",&NMSO) == B_OK){ - MinSizeOne = NMSO; - } - if(state->FindInt32("minsizetwo",&NMST) == B_OK){ - MinSizeTwo = NMST; - } - if(state->FindBool("poslock",&poslocked) != B_OK){ - poslocked = false; - } - if(state->FindBool("alignlock",&alignlocked) != B_OK){ - alignlocked = false; - } - - Update(); - Invalidate(); -} - -/******************************************************* -* Ok, hmm what does this do. NOT MUCH. if we get a -* STATE message then lets set the state. This is here -* to provide a asyncronuse way of seting the state and -* also to make life easyer. -*******************************************************/ -void SplitPane::MessageReceived(BMessage *msg){ - switch(msg->what){ - case SPLITPANE_STATE: - SetState(msg); - break; - default: - BView::MessageReceived(msg); - break; - } -} - - - - - - - diff --git a/src/SplitPane.h b/src/SplitPane.h deleted file mode 100644 index 7098041..0000000 --- a/src/SplitPane.h +++ /dev/null @@ -1,93 +0,0 @@ -/******************************************************* -* SplitPane© -* -* SplitPane is a usefull UI component. It alows the -* use to ajust two view Horizontaly or Vertacly so -* that they are a desired size. This type of Pane -* shows up most comonly in Mail/News Readers. -* -* @author YNOP (ynop@acm.org) -* @version beta -* @date Dec. 10 1999 -*******************************************************/ -#ifndef _SPLIT_PANE_VIEW_H -#define _SPLIT_PANE_VIEW_H - -#include -#include -// #include -#include -#include -#define SPLITPANE_STATE 'spst' - -class SplitPane : public BView { - public: - SplitPane(BRect,const char*,BView*,BView*,uint32); - void AddChildOne(BView*); - void AddChildTwo(BView* v,bool IsAdded,bool ShowAfterHide); - void SetAlignment(uint); - uint GetAlignment(); - void SetBarPosition(int); - int GetBarPosition(); - void SetBarThickness(int); - int GetBarThickness(); - void SetJump(int); - int GetJump(); - bool HasViewOne(); - bool HasViewTwo(); - void SetViewOneDetachable(bool); - void SetViewTwoDetachable(bool); - bool IsViewOneDetachable(); - bool IsViewTwoDetachable(); - void SetEditable(bool); - bool IsEditable(); - void SetViewInsetBy(int); - int GetViewInsetBy(); - void SetMinSizeOne(int); - int GetMinSizeOne(); - void SetMinSizeTwo(int); - int GetMinSizeTwo(); - BMessage* GetState(); - void SetBarLocked(bool); - bool IsBarLocked(); - void SetBarAlignmentLocked(bool); - bool IsBarAlignmentLocked(); - void SetState(BMessage*); - virtual void Draw(BRect); - virtual void AttachedToWindow(); - virtual void FrameResized(float,float); - virtual void MouseDown(BPoint); - virtual void MouseUp(BPoint); - virtual void MouseMoved(BPoint,uint32,const BMessage*); - virtual void MessageReceived(BMessage*); - //void MakePaneTwoFocus(); - private: - void Update(); - BView *PaneOne; - BView *PaneTwo; - - //State info - bool VOneDetachable; - bool VTwoDetachable; - uint align; - int pos; - int thickness; - int jump; - int pad; - int MinSizeOne; - int MinSizeTwo; - bool poslocked; - bool alignlocked; - //end State info - - bool Draggin; - BPoint here; - bool attached; - - BWindow *WinOne; - BWindow *WinTwo; - - BWindow *ConfigWindow; -}; -#endif - diff --git a/src/URLView.cpp b/src/URLView.cpp deleted file mode 100644 index 73403ee..0000000 --- a/src/URLView.cpp +++ /dev/null @@ -1,1147 +0,0 @@ -/* URLView 2.11 - written by William Kakes of Tall Hill Software. - - This class provides an underlined and clickable BStringView - that will launch the web browser, e-mail program, or FTP client - when clicked on. Other features include hover-highlighting, - right-click menus, and drag-and-drop support. - - You are free to use URLView in your own programs (both open-source - and closed-source) free of charge, but a mention in your read me - file or your program's about box would be appreciated. See - http://www.tallhill.com for current contact information. - - URLView is provided as-is, with no warranties of any kind. If - you use it, you are on your own. -*/ - - - -#include "URLView.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -// #include -#include "global.h" - -#ifndef ZETA - #define _T(str) str -#else - #include -#endif - -URLView::URLView( BRect frame, const char *name, const char *label, - const char *url, uint32 resizingMode, uint32 flags ) - : BStringView( frame, name, label, resizingMode, flags ) { - - // Set the default values for the other definable instance variables. - this->color = blue; - this->clickColor = dark_green; - this->hoverColor = dark_blue; - this->disabledColor = gray; - this->hoverEnabled = true; - this->draggable = true; - this->iconSize = 16; - this->underlineThickness = 1; - - // The link should be enabled by default (unless the URL is invalid, which - // is handled by the SetURL() function). - enabled = true; - - // Set the instance variables. - this->url = 0; - SetURL( url ); - - // Create the cursor to use when over the link. - this->linkCursor = new BCursor( url_cursor ); - - // The link is not currently selected. - selected = false; - - // The URL is currently not hover-colored. - hovering = false; - - // The user has not dragged out of the view. - draggedOut = false; - - // The user has not yet opened the popup menu. - inPopup = false; - - // Initialize the attributes list (there are 14 standard - // Person attributes). - attributes = new BList( 14 ); - -} - - -URLView::~URLView() { - delete url; - delete linkCursor; - - // Delete all the attributes. - KeyPair *item; - for( int i = 0; (item = (KeyPair *) attributes->ItemAt(i)); i++ ) { - delete item->key; - delete item->value; - delete item; - } - delete attributes; -} - - - - - -void URLView::AttachedToWindow() { - // When the view is first attached, we want to draw the link - // in the normal color. Also, we want to set our background color - // to meet that of our parent. - if( IsEnabled() ) - SetHighColor( color ); - else - SetHighColor( disabledColor ); - - if( Parent() != NULL ) { - SetLowColor( Parent()->ViewColor() ); - SetViewColor( Parent()->ViewColor() ); - } -} - - - -void URLView::Draw( BRect updateRect ) { - - BRect rect = Frame(); - rect.OffsetTo( B_ORIGIN ); - - // We want 'g's, etc. to go below the underline. When the BeOS can - // do underlining of any font, this code can be removed. - font_height height; - GetFontHeight( &height ); - float descent = height.descent; - - // We want to be sensitive to the SetAlignment() function. - float left, right; - if( Alignment() == B_ALIGN_RIGHT ) { - left = rect.right - StringWidth( Text() ) + 1; - right = rect.right - 1; - } - else if( Alignment() == B_ALIGN_CENTER ) { - left = rect.left + (rect.Width() / 2) - (StringWidth( Text() ) / 2); - right = left + StringWidth( Text() ) - 2; - } - else { - left = rect.left; - right = left + StringWidth( Text() ) - 2; - } - - // Draw the underline in the requested thickness. - // Note: If the link is disabled, we don't want to draw the underline. - if( IsEnabled() ) { - FillRect( BRect( (float) left, - (float) (rect.bottom - descent), - (float) right, - (float) (rect.bottom - descent + (underlineThickness - 1)) ) ); - } - MovePenTo( BPoint( left, rect.bottom - descent - 1 ) ); - - // Note: DrawString() draws the text at one pixel above the pen's - // current y coordinate. - DrawString( Text() ); - -} - - - -void URLView::MessageReceived( BMessage *message ) -{ - entry_ref ref; - switch (message->what) - { - - case 'DDCP': - { - - // Is this a message from Tracker in response to our drag-and-drop? - //if( message->what == 'DDCP' ) { - // Tracker will send back the name and path of the created file. - // We need to read this information. - entry_ref ref; - message->FindRef( "directory", &ref ); - - BEntry entry( &ref ); - BPath path( &entry ); - BString *fullName = new BString( path.Path() ); - fullName->Append( "/" ); - fullName->Append( message->FindString( "name" ) ); - BString *title = new BString( Text() ); - - // Set the new file as a bookmark or as a person as appropriate. - if( IsEmailLink() ) { - CreatePerson( fullName, title ); - } - else CreateBookmark( fullName, title ); - - delete fullName; - delete title; - - } - break; - default: - - BView::MessageReceived(message); - break; - } - -} - -void URLView::MouseDown( BPoint point ) { - // If the link isn't enabled, don't do anything. - if( !IsEnabled() ) - return; - - // See which mouse buttons were clicked. - int32 buttons = Window()->CurrentMessage()->FindInt32( "buttons" ); - - // We want to highlight the text if the user clicks on - // the URL. We want to be sure to only register a click - // if the user clicks on the link text itself and not just - // anywhere in the view. - if( GetTextRect().Contains( point ) ) { - SetHighColor( clickColor ); - - // Set the link as selected and track the mouse. - selected = true; - SetMouseEventMask( B_POINTER_EVENTS ); - - // Remember where the user clicked so we can correctly - // offset the transparent URL if the user drags. - BRect frame = Frame(); - frame.OffsetTo( B_ORIGIN ); - dragOffset = point; - if( Alignment() == B_ALIGN_RIGHT ) { - dragOffset.x -= frame.Width() - StringWidth( Text() ); - } - else if( Alignment() == B_ALIGN_CENTER ) { - dragOffset.x -= (frame.Width() / 2) - (StringWidth( Text() ) / 2); - } - - // Pop up the context menu? - if( buttons == B_SECONDARY_MOUSE_BUTTON ) inPopup = true; - } - //Redraw(); -} - - - -void URLView::MouseMoved( BPoint point, uint32 transit, - const BMessage *message ) { - - // If the link isn't enabled, don't do anything. - if( !IsEnabled() ) - return; - - // Make sure the window is the active one. - if( !Window()->IsActive() ) return; - - // See which mouse buttons were clicked. - int32 buttons = Window()->CurrentMessage()->FindInt32( "buttons" ); - // Is the user currently dragging the link? (i.e. is a mouse button - // currently down?) - bool alreadyDragging = (buttons != 0); - - switch( transit ) { - case( B_ENTERED_VIEW ): - - // Should we set the cursor to the link cursor? - if( GetTextRect().Contains( point ) && !draggedOut ) { - if( !alreadyDragging ) be_app->SetCursor( linkCursor ); - - // Did the user leave and re-enter the view while - // holding down the mouse button? If so, highlight - // the link. - if( selected ) { - SetHighColor( clickColor ); - //Redraw(); - } - // Should we hover-highlight the link? - else if( hoverEnabled && !alreadyDragging ) { - if( buttons == 0 ) { - SetHighColor( hoverColor ); - //Redraw(); - hovering = true; - } - } - } - break; - - case( B_EXITED_VIEW ): - // We want to restore the link to it normal color and the - // mouse cursor to the normal hand. However, we should only - // set the color and re-draw if it is needed. - if( selected && !draggedOut ) { - be_app->SetCursor( B_HAND_CURSOR ); - SetHighColor( color ); - //Redraw(); - - // Is the user drag-and-dropping a bookmark or person? - if( draggable ) { - // = true; - if( IsEmailLink() ) DoPersonDrag(); - else DoBookmarkDrag(); - } - } - // Is the link currently hover-highlighted? If so, restore - // the normal color now. - else if( hovering && !alreadyDragging ) { - be_app->SetCursor( B_HAND_CURSOR ); - SetHighColor( color ); - //Redraw(); - hovering = false; - } - // Change the cursor back to the hand. - else { - be_app->SetCursor( B_HAND_CURSOR ); - } - - break; - - case( B_INSIDE_VIEW ): - // The user could either be moving out of the view or - // back into it here, so we must handle both cases. - // In the first case, the cursor is now over the link. - - if( GetTextRect().Contains( point ) && !draggedOut ) { - - // We only want to change the cursor if not dragging. - if( !alreadyDragging ) be_app->SetCursor( linkCursor ); - if( selected ) { - if( draggable ) { - // If the user moves the mouse more than ten - // pixels, begin the drag. - if( (point.x - dragOffset.x) > 10 || - (dragOffset.x - point.x) > 10 || - (point.y - dragOffset.y) > 10 || - (dragOffset.y - point.y) > 10 ) { - draggedOut = true; - // Draw the appropriate drag object, etc. - if( IsEmailLink() ) DoPersonDrag(); - else DoBookmarkDrag(); - SetHighColor( color ); - //Redraw(); - } - } - else { - // Since the link is not draggable, highlight it - // as long as the user holds the button down and - // has the mouse cursor over it (like a standard - // button). - SetHighColor( clickColor ); - //Redraw(); - } - } - // The link isn't currently selected? If hover-highlighting - // is enabled, highlight the link. - else if( hoverEnabled && !alreadyDragging ) { - SetHighColor( hoverColor ); - //Redraw(); - hovering = true; - } - } - // In this case, the mouse cursor is not over the link, so we - // need to restore the original link color, etc. - else if( !draggedOut ) { - be_app->SetCursor( B_HAND_CURSOR ); - if( selected ) { - SetHighColor( color ); - - - // Is the user dragging the link? - if( draggable ) { - draggedOut = true; - if( IsEmailLink() ) DoPersonDrag(); - else DoBookmarkDrag(); - } - } - // Is the mouse cursor hovering over the link? - else if( hovering ) { - SetHighColor( color ); - //Redraw(); - hovering = false; - } - - } - break; - } -} - - - -void URLView::MouseUp( BPoint point ) { - // If the link isn't enabled, don't do anything. - if( !IsEnabled() ) - return; - - // Do we want to show the right-click menu? - if( inPopup && GetTextRect().Contains( point ) ) { - BPopUpMenu *popup = CreatePopupMenu(); - // Work around a current bug in Be's popup menus. - point.y = point.y - 6; - - // Display the popup menu. - BMenuItem *selected = popup->Go( ConvertToScreen( point ) , false, true ); - - // Did the user select an item? - if( selected ) { - BString label( selected->Label() ); - // Did the user select the first item? If so, launch the URL. - if( label.FindFirst( "Open" ) != B_ERROR || - label.FindFirst( "Send" ) != B_ERROR || - label.FindFirst( "Connect" ) != B_ERROR ) { - LaunchURL(); - } - // Did the user select the second item? - else if( label.FindFirst( "Copy" ) != B_ERROR ) { - CopyToClipboard(); - } - } - // If not, restore the normal link color. - else { - SetHighColor( color ); - - } - } - - // If the link was clicked on (and not dragged), run the program - // that should handle the URL. - if( selected && GetTextRect().Contains( point ) && - !draggedOut && !inPopup ) { - LaunchURL(); - } - selected = false; - draggedOut = false; - inPopup = false; - - // Should we restore the hovering-highlighted color or the original - // link color? - if( GetTextRect().Contains( point ) && !draggedOut && - !inPopup && hoverEnabled ) { - SetHighColor( hoverColor ); - } - else if( !hovering ) - { - SetHighColor( color ); - } - -} - - - -void URLView::WindowActivated( bool active ) { - // Be sure that if the user clicks on a link prompting the opening of - // a new window (i.e. launching NetPositive) the URL is not left drawn - // with the hover color. - if( !active ) { - if( IsEnabled() ) { - SetHighColor( color ); - //Redraw(); - } - } -} - - - - - -void URLView::AddAttribute( const char *name, const char *value ) { - // Add an attribute (name and corresponding value) to the object - // that will be dragged out (i.e. to fill in Person fields, etc.) - KeyPair *newPair = new KeyPair; - newPair->key = new BString( name ); - newPair->value = new BString( value ); - attributes->AddItem( newPair ); -} - - - -bool URLView::IsEnabled() { - // Return whether or not this link is enabled (and therefore clickable). - return enabled; -} - - - - -void URLView::SetColor( rgb_color color ) { - // Set the normal link color. - this->color = color; - if( IsEnabled() ) { - Window()->Lock(); - SetHighColor( color ); - Redraw(); - Window()->Unlock(); - } -} - - -void URLView::SetColor( uchar red, uchar green, uchar blue, uchar alpha ) { - // Set the normal link color. - rgb_color color; - color.red = red; - color.green = green; - color.blue = blue; - color.alpha = alpha; - SetColor( color ); -} - - -void URLView::SetClickColor( rgb_color color ) { - // Set the link color used when the link is clicked. - clickColor = color; -} - - -void URLView::SetClickColor( uchar red, uchar green, uchar blue, uchar alpha ) { - // Set the link color used when the link is clicked. - rgb_color color; - color.red = red; - color.green = green; - color.blue = blue; - color.alpha = alpha; - SetClickColor( color ); -} - - -void URLView::SetDisabledColor( rgb_color color ) { - // Set the color to draw in when the link is disabled. - disabledColor = color; - Window()->Lock(); - Redraw(); - Window()->Unlock(); -} - - -void URLView::SetDisabledColor( uchar red, uchar green, uchar blue, uchar alpha ) { - // Set the color to draw in when the link is disabled. - rgb_color color; - color.red = red; - color.green = green; - color.blue = blue; - color.alpha = alpha; - SetDisabledColor( color ); -} - - -void URLView::SetDraggable( bool draggable ) { - // Set whether or not this link is draggable. - this->draggable = draggable; -} - - -void URLView::SetEnabled( bool enabled ) { - // Set whether or not the link is enabled (and therefore clickable). - bool redraw = this->enabled != enabled; - this->enabled = enabled; - - if( Window() ) { - Window()->Lock(); - if( !enabled ) - SetHighColor( disabledColor ); - else - SetHighColor( color ); - if( redraw ) - Invalidate(); - Window()->Unlock(); - } -} - - -void URLView::SetHoverColor( rgb_color color ) { - // Set the link color used when the mouse cursor is over it. - hoverColor = color; -} - - -void URLView::SetHoverColor( uchar red, uchar green, uchar blue, uchar alpha ) { - // Set the color to draw in when the link is disabled. - rgb_color color; - color.red = red; - color.green = green; - color.blue = blue; - color.alpha = alpha; - SetHoverColor( color ); -} - - -void URLView::SetHoverEnabled( bool hover ) { - // Set whether or not to hover-highlight the link. - hoverEnabled = hover; -} - - -void URLView::SetIconSize( icon_size iconSize ) { - // Set the size of the icon that will be shown when the link is dragged. - if( iconSize == B_MINI_ICON ) this->iconSize = 16; - else this->iconSize = 32; -} - - -void URLView::SetUnderlineThickness( int thickness ) { - // Set the thickness of the underline in pixels. - underlineThickness = thickness; -} - - -void URLView::SetURL( const char *url ) { - // Set the URL value. - delete this->url; - this->url = new BString( url ); - - // If it's an e-mail link, we want to insert "mailto:" to the front - // if the user did not enter it. - if( IsEmailLink() ) { - if( this->url->FindFirst( "mailto:" ) != 0 ) { - this->url->Prepend( "mailto:" ); - return; - } - } - - // We want to see if the URL is valid. If not, we will disable it. - if( !IsFTPLink() && !IsHTMLLink() ) - SetEnabled( false ); -} - - - - - -void URLView::CopyToClipboard() { - // Copy the URL to the clipboard. - BClipboard clipboard( "system" ); - BMessage *clip = (BMessage *) NULL; - // Get the important URL (i.e. trim off "mailto:", etc.). - BString newclip = GetImportantURL(); - - // Be sure to lock the clipboard first. - if( clipboard.Lock() ) { - clipboard.Clear(); - if( (clip = clipboard.Data()) ) { - clip->AddData( "text/plain", B_MIME_TYPE, newclip.String(), - newclip.Length() + 1 ); - clipboard.Commit(); - } - clipboard.Unlock(); - } -} - - - -void URLView::CreateBookmark( const BString *fullName, const BString *title ) { - // Read the file defined by the path and the title. - BFile *file = new BFile( fullName->String(), B_WRITE_ONLY ); - - // Set the file's MIME type to be a bookmark. - BNodeInfo *nodeInfo = new BNodeInfo( file ); - nodeInfo->SetType( "application/x-vnd.Be-bookmark" ); - delete nodeInfo; - delete file; - - // Add all the attributes, both those inherrent to bookmarks and any - // the developer may have defined using AddAttribute(). - DIR *d; - int fd; - d = fs_open_attr_dir( fullName->String() ); - if( d ) { - fd = open( fullName->String(), O_WRONLY ); - fs_write_attr( fd, "META:title", B_STRING_TYPE, 0, title->String(), title->Length() + 1 ); - fs_write_attr( fd, "META:url", B_STRING_TYPE, 0, url->String(), url->Length() + 1 ); - WriteAttributes( fd ); - close( fd ); - fs_close_attr_dir( d ); - } -} - - -void URLView::CreatePerson( const BString *fullName, const BString *title ) { - // Read the file defined by the path and the title. - BFile *file = new BFile( fullName->String(), B_WRITE_ONLY ); - - // Set the file's MIME type to be a person. - BNodeInfo *nodeInfo = new BNodeInfo( file ); - nodeInfo->SetType( "application/x-person" ); - delete nodeInfo; - delete file; - - // Add all the attributes, both those inherrent to person files and any - // the developer may have defined using AddAttribute(). - DIR *d; - int fd; - d = fs_open_attr_dir( fullName->String() ); - if( d ) { - fd = open( fullName->String(), O_WRONLY ); - fs_write_attr( fd, "META:name", B_STRING_TYPE, 0, title->String(), title->Length() + 1 ); - BString email = GetImportantURL(); - fs_write_attr( fd, "META:email", B_STRING_TYPE, 0, email.String(), email.Length() + 1 ); - WriteAttributes( fd ); - close( fd ); - fs_close_attr_dir( d ); - } -} - - - -BPopUpMenu * URLView::CreatePopupMenu() { - // Create the right-click popup menu. - BPopUpMenu *returnMe = new BPopUpMenu( "URLView Popup", false, false ); - returnMe->SetAsyncAutoDestruct( true ); - - entry_ref app; - - // Set the text of the first item according to the link type. - if( IsEmailLink() ) { - // Find the name of the default e-mail client. - if( be_roster->FindApp( "text/x-email", &app ) == B_OK ) { - BEntry entry( &app ); - BString openLabel( _T("Send e-mail to this address using ") ); - char name[B_FILE_NAME_LENGTH]; - entry.GetName( name ); - openLabel.Append( name ); - returnMe->AddItem( new BMenuItem( openLabel.String(), NULL ) ); - } - } - else if( IsFTPLink() ) { - // Find the name of the default FTP client. - if( be_roster->FindApp( "application/x-vnd.Be.URL.ftp", &app ) == B_OK ) { - BEntry entry( &app ); - BString openLabel( _T("Connect to this server using ") ); - char name[B_FILE_NAME_LENGTH]; - entry.GetName( name ); - openLabel.Append( name ); - returnMe->AddItem( new BMenuItem( openLabel.String(), NULL ) ); - } - } - else { - // Find the name of the default HTML handler (browser). - if( be_roster->FindApp( "text/html", &app ) == B_OK ) { - BEntry entry( &app ); - BString openLabel( _T("Open this link using ") ); - char name[B_FILE_NAME_LENGTH]; - entry.GetName( name ); - openLabel.Append( name ); - returnMe->AddItem( new BMenuItem( openLabel.String(), NULL ) ); - } - } - returnMe->AddItem( new BMenuItem( _T("Copy this link to the clipboard"), NULL ) ); - - return returnMe; -} - - - -void URLView::DoBookmarkDrag() { - // Handle all of the bookmark dragging. This includes setting up - // the drag message and drawing the dragged bitmap. - - // Set up the drag message to support both BTextView dragging (using - // the URL) and file dropping (to Tracker). - BMessage *dragMessage = new BMessage( B_MIME_DATA ); - dragMessage->AddInt32( "be:actions", B_COPY_TARGET ); - dragMessage->AddString( "be:types", "application/octet-stream" ); - dragMessage->AddString( "be:filetypes", "application/x-vnd.Be-bookmark" ); - dragMessage->AddString( "be:type_descriptions", "bookmark" ); - dragMessage->AddString( "be:clip_name", Text() ); - dragMessage->AddString( "be:url", url->String() ); - - // This allows the user to drag the URL into a standard BTextView. - BString link = GetImportantURL(); - dragMessage->AddData( "text/plain", B_MIME_DATA, link.String(), - link.Length() + 1 ); - - // Query for the system's icon for bookmarks. - BBitmap *bookmarkIcon = new BBitmap( BRect( 0, 0, iconSize - 1, - iconSize - 1 ), B_CMAP8 ); - BMimeType mime( "application/x-vnd.Be-bookmark" ); - if( iconSize == 16 ) mime.GetIcon( bookmarkIcon, B_MINI_ICON ); - else mime.GetIcon( bookmarkIcon, B_LARGE_ICON ); - - // Find the size of the bitmap to drag. If the text is bigger than the - // icon, use that size. Otherwise, use the icon's. Center the icon - // vertically in the bitmap. - BRect urlRect = GetURLRect(); - BRect rect = urlRect; - rect.right += iconSize + 4; - if( (rect.bottom - rect.top) < iconSize ) { - int adjustment = (int) ((iconSize - (rect.bottom - rect.top)) / 2) + 1; - rect.top -= adjustment; - rect.bottom += adjustment; - } - - // Make sure the rectangle starts at 0,0. - rect.bottom += 0 - rect.top; - rect.top = 0; - - // Create the bitmap to draw the dragged image in. - BBitmap *dragBitmap = new BBitmap( rect, B_RGBA32, true ); - BView *dragView = new BView( rect, "Drag View", 0, 0 ); - dragBitmap->Lock(); - dragBitmap->AddChild( dragView ); - - BRect frameRect = dragView->Frame(); - - // Make the background of the dragged image transparent. - dragView->SetHighColor( B_TRANSPARENT_COLOR ); - dragView->FillRect( frameRect ); - - // We want 'g's, etc. to go below the underline. When the BeOS can - // do underlining of any font, this code can be removed. - font_height height; - GetFontHeight( &height ); - float descent = height.descent; - - // Find the vertical center of the view so we can vertically - // center everything. - int centerPixel = (int) ((frameRect.bottom - frameRect.top) / 2); - int textCenter = (int) (descent + underlineThickness) + centerPixel; - - // We want to draw everything only half opaque. - dragView->SetDrawingMode( B_OP_ALPHA ); - dragView->SetHighColor( color.red, color.green, color.blue, 128.0 ); - dragView->SetBlendingMode( B_CONSTANT_ALPHA, B_ALPHA_COMPOSITE ); - - // Center the icon in the view. - dragView->MovePenTo( BPoint( frameRect.left, - centerPixel - (iconSize / 2) ) ); - dragView->DrawBitmap( bookmarkIcon ); - - // Draw the text in the same font (size, etc.) as the link view. - // Note: DrawString() draws the text at one pixel above the pen's - // current y coordinate. - BFont font; - GetFont( &font ); - dragView->SetFont( &font ); - dragView->MovePenTo( BPoint( frameRect.left + iconSize + 4, textCenter ) ); - dragView->DrawString( url->String() ); - - // Draw the underline in the requested thickness. - dragView->FillRect( BRect( (float) frameRect.left + iconSize + 4, - (float) (textCenter + 1), - (float) StringWidth( url->String() ) + iconSize + 4, - (float) textCenter + underlineThickness ) ); - - // Be sure to flush the view buffer so everything is drawn. - dragView->Flush(); - dragBitmap->Unlock(); - - // The URL's label is probably not the same size as the URL's - // address, which is what we're going to draw. So horizontally - // offset the bitmap proportionally to where the user clicked - // on the link. - float horiz = dragOffset.x / GetTextRect().Width(); - dragOffset.x = horiz * frameRect.right; - - DragMessage( dragMessage, dragBitmap, B_OP_ALPHA, - BPoint( dragOffset.x, (rect.Height() / 2) + 2 ), this ); - delete dragMessage; - - draggedOut = true; -} - - -void URLView::DoPersonDrag() { - // Handle all of the bookmark dragging. This includes setting up - // the drag message and drawing the dragged bitmap. - - // Set up the drag message to support both BTextView dragging (using - // the e-mail address) and file dropping (to Tracker). - BMessage *dragMessage = new BMessage( B_MIME_DATA ); - dragMessage->AddInt32( "be:actions", B_COPY_TARGET ); - dragMessage->AddString( "be:types", "application/octet-stream" ); - dragMessage->AddString( "be:filetypes", "application/x-person" ); - dragMessage->AddString( "be:type_descriptions", "person" ); - dragMessage->AddString( "be:clip_name", Text() ); - - // This allows the user to drag the e-mail address into a - // standard BTextView. - BString email = GetImportantURL(); - dragMessage->AddData( "text/plain", B_MIME_DATA, email.String(), - email.Length() + 1 ); - - // Query for the system's icon for bookmarks. - BBitmap *personIcon = new BBitmap( BRect( 0, 0, iconSize - 1, - iconSize - 1 ), B_CMAP8 ); - #ifdef ZETA - BMimeType mime( "application/x-vnd.Be-PEPL" ); - #else - BMimeType mime( "application/x-person" ); - #endif - if( iconSize == 16 ) mime.GetIcon( personIcon, B_MINI_ICON ); - else mime.GetIcon( personIcon, B_LARGE_ICON ); - - // Find the size of the bitmap to drag. If the text is bigger than the - // icon, use that size. Otherwise, use the icon's. Center the icon - // vertically in the bitmap. - BRect rect = GetTextRect(); - rect.right += iconSize + 4; - if( (rect.bottom - rect.top) < iconSize ) { - int adjustment = (int) ((iconSize - (rect.bottom - rect.top)) / 2) + 1; - rect.top -= adjustment; - rect.bottom += adjustment; - } - - // Make sure the rectangle starts at 0,0. - rect.bottom += 0 - rect.top; - rect.top = 0; - - // Create the bitmap to draw the dragged image in. - BBitmap *dragBitmap = new BBitmap( rect, B_RGBA32, true ); - BView *dragView = new BView( rect, "Drag View", 0, 0 ); - dragBitmap->Lock(); - dragBitmap->AddChild( dragView ); - - BRect frameRect = dragView->Frame(); - - // Make the background of the dragged image transparent. - dragView->SetHighColor( B_TRANSPARENT_COLOR ); - dragView->FillRect( frameRect ); - - // We want 'g's, etc. to go below the underline. When the BeOS can - // do underlining of any font, this code can be removed. - font_height height; - GetFontHeight( &height ); - float descent = height.descent; - - // Find the vertical center of the view so we can vertically - // center everything. - int centerPixel = (int) ((frameRect.bottom - frameRect.top) / 2); - int textCenter = (int) (descent + underlineThickness) + centerPixel; - - // We want to draw everything only half opaque. - dragView->SetDrawingMode( B_OP_ALPHA ); - dragView->SetHighColor( 0.0, 0.0, 0.0, 128.0 ); - dragView->SetBlendingMode( B_CONSTANT_ALPHA, B_ALPHA_COMPOSITE ); - - // Center the icon in the view. - dragView->MovePenTo( BPoint( frameRect.left, - centerPixel - (iconSize / 2) ) ); - dragView->DrawBitmap( personIcon ); - - // Draw the text in the same font (size, etc.) as the link view. - // Note: DrawString() draws the text at one pixel above the pen's - // current y coordinate. - BFont font; - GetFont( &font ); - dragView->SetFont( &font ); - dragView->MovePenTo( BPoint( frameRect.left + iconSize + 4, textCenter ) ); - dragView->DrawString( Text() ); - - // Be sure to flush the view buffer so everything is drawn. - dragView->Flush(); - dragBitmap->Unlock(); - - // The Person icon adds some width to the bitmap that we are - // going to draw. So horizontally offset the bitmap proportionally - // to where the user clicked on the link. - float horiz = dragOffset.x / GetTextRect().Width(); - dragOffset.x = horiz * frameRect.right; - - DragMessage( dragMessage, dragBitmap, B_OP_ALPHA, - BPoint( dragOffset.x, - (rect.Height() + underlineThickness) / 2 + 2), this ); - delete dragMessage; - - draggedOut = true; -} - - - -BString URLView::GetImportantURL() { - // Return the relevant portion of the URL (i.e. strip off "mailto:" from - // e-mail address URLs). - BString returnMe; - - if( IsEmailLink() ) url->CopyInto( returnMe, 7, url->CountChars() - 6 ); - else url->CopyInto( returnMe, 0, url->CountChars() ); - - return returnMe; -} - -BRect URLView::GetTextRect() { - - // This function will return a BRect that contains only the text - // and the underline, so the mouse can change and the link will - // be activated only when the mouse is over the text itself, not - // just within the view. - - // Note: We'll use bounding boxes, because they are the most - // accurate, and since the user is interacting with the - // view, off-by-one-pixel errors look bad. - const char *textArray[1]; - textArray[0] = Text(); - - escapement_delta delta; - delta.nonspace = 0; - delta.space = 0; - escapement_delta escapements[1]; - escapements[0] = delta; - - BRect returnMe; - BRect rectArray[1]; - rectArray[0] = returnMe; - - BFont font; - GetFont( &font ); - font.GetBoundingBoxesForStrings( textArray, 1, B_SCREEN_METRIC, escapements, rectArray ); - - BRect frame = Frame(); - frame.OffsetTo( B_ORIGIN ); - returnMe = rectArray[0]; - - // Get the height of the current font. - font_height height; - GetFontHeight( &height ); - float descent = height.descent; - - // Account for rounding of the floats when drawn to avoid - // one-pixel-off errors. - float lowerBound = 0; - if( (((int) descent) * 2) != ((int) (descent * 2)) ) - lowerBound = 1; - - // Adjust the bounding box to reflect where the text is in the view. - returnMe.bottom += 1; - returnMe.OffsetTo( B_ORIGIN ); - float rectHeight = returnMe.Height(); - returnMe.bottom = frame.bottom - descent; - returnMe.top = returnMe.bottom - rectHeight; - returnMe.bottom += 1 + underlineThickness; - returnMe.OffsetBy( 0.0, -(1 + lowerBound) ); - - return returnMe; -} - - -BRect URLView::GetURLRect() { - //Redraw(); - // This function will return a BRect that contains only the URL - // and the underline, so we can draw it when the user drags. - // We'll use GetFontHeight() instead of bounding boxes here - // because a possible pixel or two off doesn't matter, whereas it - // does when detecting if the user has the cursor over the link. - BRect frame = Frame(); - frame.OffsetTo( B_ORIGIN ); - - // Get the height of the current font. - font_height height; - GetFontHeight( &height ); - - float stringHeight = underlineThickness + height.ascent - 1; - - // Get the rectangle of just the string. - return BRect( frame.left, frame.bottom - stringHeight, - frame.left + StringWidth( url->String() ), - frame.bottom - 1 ); -} - - -bool URLView::IsEmailLink() { - // Is this link an e-mail link? - if( url->FindFirst( "mailto:" ) == 0 ) - return true; - - if( !IsHTMLLink() && !IsFTPLink() && - url->FindFirst( "@" ) != B_ERROR ) { - return true; - } - - return false; -} - - -bool URLView::IsFTPLink() { - // Is this link an FTP link? - return( url->FindFirst( "ftp://" ) == 0 ); -} - - -bool URLView::IsHTMLLink() { - // Is this link an HTML or file link? - return( (url->FindFirst( "http://" ) == 0 ) || - (url->FindFirst( "file://" ) == 0 ) || - (url->FindFirst( "https://" ) == 0 ) ); -} - -void URLView::LaunchURL() { - // Is the URL a mail link or HTTP? - if( IsEmailLink() ) { - // Lock the string buffer and pass it to the mail program. - char *link = url->LockBuffer( url->Length()+1 ); - status_t result = be_roster->Launch( "text/x-email", 1, &link ); - url->UnlockBuffer(); - // Make sure the user has an e-mail program. - if( result != B_NO_ERROR && result != B_ALREADY_RUNNING ) { - BAlert *alert = new BAlert( "E-mail Warning", - "There is no e-mail program on your machine that is configured as the default program to send e-mail.", - "Ok", NULL, NULL, B_WIDTH_AS_USUAL, - B_WARNING_ALERT ); - alert->Go(); - } - } - // Handle an HTTP link. - else if( IsHTMLLink() ) { - // Lock the string buffer and pass it to the web browser. - char *link = url->LockBuffer( url->Length()+1 ); - status_t result = be_roster->Launch( "text/html", 1, &link ); - url->UnlockBuffer(); - // Make sure the user has a web browser. - if( result != B_NO_ERROR && result != B_ALREADY_RUNNING ) { - BAlert *alert = new BAlert( "Web Browser Warning", - "There is no web browser on your machine that is configured as the default program to view web pages.", - "Ok", NULL, NULL, B_WIDTH_AS_USUAL, - B_WARNING_ALERT ); - alert->Go(); - } - } - // Handle an FTP link. - else if( IsFTPLink() ) { - // Lock the string buffer and pass it to the FTP client. - char *link = url->LockBuffer( url->Length()+1 ); - status_t result = be_roster->Launch( "application/x-vnd.Be.URL.ftp", - 1, &link ); - url->UnlockBuffer(); - // Make sure the user has an FTP client. - if( result != B_NO_ERROR && result != B_ALREADY_RUNNING ) { - BAlert *alert = new BAlert( "FTP Warning", - "There is no FTP client on your machine that is configured as the default program to connect to an FTP server.", - "Ok", NULL, NULL, B_WIDTH_AS_USUAL, - B_WARNING_ALERT ); - alert->Go(); - } - } - - // We don't know how to handle anything else. -} - -void URLView::Redraw() { - // Redraw the link without flicker. - BRect frame = Frame(); - frame.OffsetTo(0,0 ); - Draw( frame ); -} - -void URLView::WriteAttributes( int fd ) { - // Write the developer-defined attributes to the newly-created file. - KeyPair *item; - for( int i = 0; (item = (KeyPair *) attributes->ItemAt(i)); i++ ) { - fs_write_attr( fd, item->key->String(), B_STRING_TYPE, 0, item->value->String(), item->value->Length() + 1 ); - } -} diff --git a/src/URLView.h b/src/URLView.h deleted file mode 100644 index 9d39c6e..0000000 --- a/src/URLView.h +++ /dev/null @@ -1,152 +0,0 @@ -/* URLView 2.11 - written by William Kakes of Tall Hill Software. - - This class provides an underlined and clickable BStringView - that will launch the web browser, e-mail program, or FTP client - when clicked on. Other features include hover-highlighting, - right-click menus, and drag-and-drop support. - - You are free to use URLView in your own programs (both open-source - and closed-source) free of charge, but a mention in your read me - file or your program's about box would be appreciated. See - http://www.tallhill.com for current contact information. - - URLView is provided as-is, with no warranties of any kind. If - you use it, you are on your own. -*/ - - - -#ifndef TH_URL_VIEW_H -#define TH_URL_VIEW_H - - - -#include -#include -#include -#include -#include -#include - - - -// This is the link's mouse cursor (a replica of NetPositive's link cursor). -const uint8 url_cursor[] = { 16, 1, 1, 2, - // This is the cursor data. - 0x00, 0x00, 0x38, 0x00, 0x24, 0x00, 0x24, 0x00, - 0x13, 0xe0, 0x12, 0x5c, 0x09, 0x2a, 0x08, 0x01, - 0x3c, 0x21, 0x4c, 0x71, 0x42, 0x71, 0x30, 0xf9, - 0x0c, 0xf9, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, - - // This is the cursor mask. - 0x00, 0x00, 0x38, 0x00, 0x3c, 0x00, 0x3c, 0x00, - 0x1f, 0xe0, 0x1f, 0xfc, 0x0f, 0xfe, 0x0f, 0xff, - 0x3f, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x3f, 0xff, - 0x0f, 0xff, 0x03, 0xfe, 0x01, 0xf8, 0x00, 0x00, - }; - - - - -// The default link color, blue. -const rgb_color blue = { 0, 0, 255 }; -// The default clicked-link color, red. -const rgb_color dark_green = { 107, 142, 035 }; -// The default link hover color, dark blue. -const rgb_color dark_blue = { 0, 0, 120 }; -// The default disabled color, gray. -const rgb_color gray = { 100, 100, 100 }; - - - -class URLView : public BStringView { - public: - URLView( BRect frame, const char *name, const char *label, const char *url, - uint32 resizingMode = B_FOLLOW_LEFT | B_FOLLOW_TOP, - uint32 flags = B_WILL_DRAW ); - ~URLView(); - - - virtual void AttachedToWindow(); - virtual void Draw( BRect updateRect ); - virtual void MessageReceived( BMessage *message ); - virtual void MouseDown( BPoint point ); - virtual void MouseMoved( BPoint point, uint32 transit, const BMessage *message ); - virtual void MouseUp( BPoint point ); - virtual void WindowActivated( bool active ); - - virtual void AddAttribute( const char *name, const char *value ); - virtual bool IsEnabled(); - virtual void SetColor( rgb_color color ); - virtual void SetColor( uchar red, uchar green, uchar blue, uchar alpha = 255 ); - virtual void SetClickColor( rgb_color color ); - virtual void SetClickColor( uchar red, uchar green, uchar blue, uchar alpha = 255 ); - virtual void SetDisabledColor( rgb_color color ); - virtual void SetDisabledColor( uchar red, uchar green, uchar blue, uchar alpha = 255 ); - virtual void SetDraggable( bool draggable ); - virtual void SetEnabled( bool enabled ); - virtual void SetHoverColor( rgb_color color ); - virtual void SetHoverColor( uchar red, uchar green, uchar blue, uchar alpha = 255 ); - virtual void SetHoverEnabled( bool hover ); - virtual void SetIconSize( icon_size iconSize ); - virtual void SetUnderlineThickness( int thickness ); - virtual void SetURL( const char *url ); - //virtual void MouseMoved(BPoint point, uint32 transit, const BMessage *message); - // virtual void MouseUp(BPoint point); - // virtual void MouseDown(BPoint point); - int mouseStateInfo; - int mouseMovedInfo; - int mouseX; - int mouseY; - uint mouseLButton; - uint mouseMButton; - uint mouseRButton; - - private: - void CopyToClipboard(); - void CreateBookmark( const BString *fullName, const BString *title ); - void CreatePerson( const BString *fullName, const BString *title ); - BPopUpMenu *CreatePopupMenu(); - void DoBookmarkDrag(); - void DoPersonDrag(); - BString GetImportantURL(); - BRect GetTextRect(); - BRect GetURLRect(); - bool IsEmailLink(); - bool IsFTPLink(); - bool IsHTMLLink(); - void LaunchURL(); - void Redraw(); - void WriteAttributes( int fd ); - - BString *url; - rgb_color color; - rgb_color clickColor; - rgb_color hoverColor; - rgb_color disabledColor; - bool enabled; - bool hoverEnabled; - bool draggable; - int underlineThickness; - int iconSize; - - bool selected; - bool hovering; - bool draggedOut; - bool inPopup; - const BCursor *linkCursor; - BPoint dragOffset; - BList *attributes; - - - int prevMouseStateInfo; - typedef struct kp { - BString *key; - BString *value; - } KeyPair; -}; - - - -#endif // TH_URL_VIEW diff --git a/src/YAB.rdef b/src/YAB.rdef deleted file mode 100644 index b3cf6c4..0000000 --- a/src/YAB.rdef +++ /dev/null @@ -1,38 +0,0 @@ - -resource vector_icon { - $"6E6369660E0500020006023C43C6B9E5E23A85A83CEE414268F44A445900C6D7" - $"F5FF6B94DD03EC66660200060238C5F1BB105D3DFDC23B9CD045487847B50700" - $"FFFFFFFFC1CCFF020006023B3049396B0ABA90833C646E4A101543299500FFFF" - $"FFFFEBEFFF020006023C71E33A0C78BA15E43C7D2149055549455700E3EDFFFF" - $"9EC2FF03FFACAC0200060239D53438FFCBBBC1973C666F4ADC3246DC6C00C1CC" - $"FFFFFFFFFF03003CB0020006023C0AE63B3927BC611E3D03FF4C25624A1A9600" - $"A3043CFFFF90AF03C93B3B030D296402000602BD498B3E1159BF219BBE7D2F4C" - $"1B8F4A331300BD0F0FFFE98484040174100A08325E385E40564E5E545E605058" - $"4C3E510A062E2C2E3E3E454A3C4A2A3A250A042E2C2E3E3E453E320A042E2C3E" - $"324A2A3A250A043E323E454A3C4A2A0A0338423C4D3C440A0622422254325C3E" - $"513E402E3A0A0422422254325C32490A04224232493E402E3A0A043249325C3E" - $"513E400A063E423E544E5C5A505A3F4A390A04C222C20F4E495A3F523C0A043E" - $"42C222C20F523C4A390A054151C08BC8834E5C4E49C22AC2130A053E423E54C0" - $"8BC8834151C22AC2130A044E494E5C5A505A3F110A0D0100000A0001061815FF" - $"01178400040A00010618001501178600040A010107000A080109000A0B010520" - $"20210A050108000A00010A1001178400040A02010D000A0A010E000A0902040F" - $"000A06010B000A0C010C000A0001011001178400040A030102000A040103000A" - $"07010400" -}; - - -resource app_signature "application/x-vnd.yab-app"; - -resource app_version { - major = 1, - middle = 7, - minor = 5, - - variety = B_APPV_FINAL, - internal = 3, - - short_info = "Yab BASIC programming language", - long_info = "Yab allows fast prototyping with simple and clean code. yab contains a large number of BeAPI specific commands for GUI creation and much, much more." -}; - -resource app_flags 1; diff --git a/src/YAB.rdef.rsrc b/src/YAB.rdef.rsrc deleted file mode 100644 index fab91e578c885aa0042811bbb7d1434723001b69..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3037 zcmeHJO>7fa5T55)!-B9#k=@>?twf#86IP%rdS`XlI{kl;v{H@o5IhQ!a!BklTo zGv9n~_U)`Z;~4-5jSk4-X8^B&xV?d4E{NO*lBY3GJdAEf82aA_*4qJ23Srb=ZUI>D z^Y*#j2C&Y9@KE3hQ4g9X`1q{P?S0mUdo=aElWv|v^BkHz(CmR`54>FuSlMEJl^=W% z@Tu`@Km7h{JTnv+t{4q`&idWc2;?=tAhT9Zwt4)3+157l+QZ zxc^62Z#fu^ZsYy?==tM^)tr?Kb;mb;?MDCl&yA}4??*Zo&v*Z(9_r!#Jv{LV-2caM z&NLj!SzgBc{<|OdIX5p{J*npHdPNis#c5FHWUCT^&&eXrNc`ols`9F>O~k zLS=8Ia6}6Cd*{bP2p{rY7$j)zOcxPq1YKC7^@;eRV znWo}=5|0Wo1wApEiSYPn%Ke`3gUF2V5scw*+Udn(>GbCrKJ -#include -#include -#include -#include -#include "YabWindow.h" -#include "YabBitmapView.h" - -YabBitmapView::YabBitmapView(BRect frame, const char *name, uint32 resizingMode, uint32 flags) - : BView(frame, name, resizingMode, flags) -{ - bmp = new BBitmap(BRect(0,0, frame.Width(), frame.Height()), B_RGBA32, true); - BView *myView = new BView(BRect(0,0, frame.Width(), frame.Height()), "canvas", B_FOLLOW_NONE, 0); - bmp->AddChild(myView); - SetDrawingMode(B_OP_COPY); - SetViewColor(0,0,0,255); - mouseMovedInfo = 1; - mouseStateInfo = -1; - prevMouseStateInfo = 0; - mouseX = 0; - mouseY = 0; - mouseLButton = 0; - mouseMButton = 0; - mouseRButton = 0; -} - -YabBitmapView::~YabBitmapView() -{ - delete bmp; -} - -BBitmap* YabBitmapView::GetBitmap() -{ - return bmp; -} - -BView* YabBitmapView::GetBitmapView() -{ - return bmp->FindView("canvas"); -} - -void YabBitmapView::Draw(BRect updateRect) -{ - DrawBitmap(bmp, updateRect, updateRect); -} - -void YabBitmapView::MouseMoved(BPoint point, uint32 transit, const BMessage *message) -{ - BPoint ptCursor; - uint32 uButtons = 0; - GetMouse(&ptCursor, &uButtons, true); - - mouseX = (int)ptCursor.x; - mouseY = (int)ptCursor.y; - if(uButtons & B_PRIMARY_MOUSE_BUTTON) mouseLButton = 1; else mouseLButton = 0; - if(uButtons & B_SECONDARY_MOUSE_BUTTON) mouseRButton = 1; else mouseRButton = 0; - if(uButtons & B_TERTIARY_MOUSE_BUTTON) mouseMButton = 1; else mouseMButton = 0; - - switch(transit) - { - case B_INSIDE_VIEW: - if(prevMouseStateInfo==1) - mouseStateInfo = 0; - else - { - mouseStateInfo = 1; - prevMouseStateInfo = 1; - } - mouseMovedInfo = 0; - break; - case B_ENTERED_VIEW: - mouseStateInfo = 1; - mouseMovedInfo = 0; - break; - case B_OUTSIDE_VIEW: - mouseStateInfo = 2; - mouseMovedInfo = 1; - break; - case B_EXITED_VIEW: - mouseStateInfo = 3; - mouseMovedInfo = 1; - prevMouseStateInfo = 0; - break; - } - BView::MouseMoved(point, transit, message); -} - -void YabBitmapView::MouseDown(BPoint point) -{ - BPoint ptCursor; - uint32 uButtons = 0; - GetMouse(&ptCursor, &uButtons, false); - - mouseX = (int)ptCursor.x; - mouseY = (int)ptCursor.y; - if(uButtons & B_PRIMARY_MOUSE_BUTTON) mouseLButton = 1; else mouseLButton = 0; - if(uButtons & B_SECONDARY_MOUSE_BUTTON) mouseRButton = 1; else mouseRButton = 0; - if(uButtons & B_TERTIARY_MOUSE_BUTTON) mouseMButton = 1; else mouseMButton = 0; - mouseStateInfo = 4; - BView::MouseDown(point); -} - -void YabBitmapView::MouseUp(BPoint point) -{ - BPoint ptCursor; - uint32 uButtons = 0; - GetMouse(&ptCursor, &uButtons, false); - - mouseX = (int)ptCursor.x; - mouseY = (int)ptCursor.y; - if(uButtons & B_PRIMARY_MOUSE_BUTTON) mouseLButton = 1; else mouseLButton = 0; - if(uButtons & B_SECONDARY_MOUSE_BUTTON) mouseRButton = 1; else mouseRButton = 0; - if(uButtons & B_TERTIARY_MOUSE_BUTTON) mouseMButton = 1; else mouseMButton = 0; - mouseStateInfo = 5; - BView::MouseUp(point); -} - diff --git a/src/YabBitmapView.h b/src/YabBitmapView.h deleted file mode 100644 index 0561d6b..0000000 --- a/src/YabBitmapView.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef YABBITMAPVIEW_H -#define YABBITMAPVIEW_H - -#include - -class YabBitmapView : public BView -{ - public: - YabBitmapView(BRect frame, const char *name, uint32 resizingMode, uint32 flags); - ~YabBitmapView(); - virtual void Draw(BRect updateRect); - BBitmap* GetBitmap(); - BView* GetBitmapView(); - BBitmap *bmp; - - virtual void MouseMoved(BPoint point, uint32 transit, const BMessage *message); - virtual void MouseUp(BPoint point); - virtual void MouseDown(BPoint point); - int mouseStateInfo; - int mouseMovedInfo; - int mouseX; - int mouseY; - uint mouseLButton; - uint mouseMButton; - uint mouseRButton; - private: - int prevMouseStateInfo; - -}; - -#endif diff --git a/src/YabFilePanel.cpp b/src/YabFilePanel.cpp deleted file mode 100644 index ea022cf..0000000 --- a/src/YabFilePanel.cpp +++ /dev/null @@ -1,79 +0,0 @@ -#include -#include -#include -#include -#include -#include "YabFilePanel.h" -#include "YabFilePanelLooper.h" - -BEntry *YabFilePanel::MyFilePanel(const char *name, const char *directory, const char* filename, int mode) -{ - BEntry *myEntry = NULL; - entry_ref ref; - - sem_id semaphore = create_sem(0, "yabfilepanel"); - YabFilePanelLooper *myLooper = new YabFilePanelLooper(semaphore); - myLooper->Run(); - - if(directory) - { - myEntry=new BEntry(directory); - if(myEntry->GetRef(&ref)!=B_OK) - { - myEntry->Unset(); - myEntry->SetTo("/boot/home/"); - myEntry->GetRef(&ref); - } - myEntry->Unset(); - delete myEntry; - } - - BFilePanel *myFilePanel = NULL; - switch(mode) - { - case 0: - myFilePanel = new BFilePanel(B_OPEN_PANEL, new BMessenger(myLooper, myLooper), &ref, B_FILE_NODE, false, NULL, NULL, true, true); - break; - case 1: - myFilePanel = new BFilePanel(B_SAVE_PANEL, new BMessenger(myLooper, myLooper), &ref, B_FILE_NODE, false, NULL, NULL, true, true); - if (filename) myFilePanel->SetSaveText(filename); - break; - case 2: - myFilePanel = new BFilePanel(B_OPEN_PANEL, new BMessenger(myLooper, myLooper), &ref, B_DIRECTORY_NODE, false, NULL, NULL, true, true); - break; - case 3: - myFilePanel = new BFilePanel(B_OPEN_PANEL, new BMessenger(myLooper, myLooper), &ref, B_FILE_NODE|B_DIRECTORY_NODE, false, NULL, NULL, true, true); - break; - } - - if(name) myFilePanel->Window()->SetTitle(name); - myFilePanel->Show(); - - bool inloop = true; - while(inloop) - { - while(acquire_sem_etc(semaphore, 1, B_RELATIVE_TIMEOUT, 10000)==B_TIMED_OUT) ; - - myEntry = myLooper->GetChosenFile(); - inloop = false; -/* - if(mode!=2) - inloop = false; - else - { - if(myEntry->IsDirectory()) - inloop = false; - else - { - myFilePanel->Show(); - } - } -*/ - } - myLooper->Lock(); - myLooper->Quit(); - - delete_sem(semaphore); - delete myFilePanel; - return myEntry; -} diff --git a/src/YabFilePanel.h b/src/YabFilePanel.h deleted file mode 100644 index 67b633a..0000000 --- a/src/YabFilePanel.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef YABFILEPANEL_H -#define YABFILEPANEL_H - -class YabFilePanel -{ - public: - BEntry *MyFilePanel(const char *name, const char *directory, const char* filename, int panelType); -}; - -#endif diff --git a/src/YabFilePanelLooper.cpp b/src/YabFilePanelLooper.cpp deleted file mode 100644 index 08a8994..0000000 --- a/src/YabFilePanelLooper.cpp +++ /dev/null @@ -1,57 +0,0 @@ -#include -#include -#include "YabFilePanelLooper.h" - -YabFilePanelLooper::YabFilePanelLooper(sem_id semaphore) : BLooper("YabFilePanelLooper") -{ - myEntry=new BEntry(); - mySemaphore = semaphore; -} - -BEntry *YabFilePanelLooper::GetChosenFile() -{ - return myEntry; -} - -void YabFilePanelLooper::MessageReceived(BMessage *msg) -{ - switch(msg->what) - { - case B_REFS_RECEIVED: - { - entry_ref ref; - if (msg->FindRef("refs", 0, &ref)==B_OK) - myEntry->SetTo(&ref); - else - myEntry->Unset(); - } - break; - - case B_SAVE_REQUESTED: - { - const char *selected; - entry_ref ref; - - if (msg->FindString("name", &selected)!=B_OK) - myEntry->Unset(); - else - { - if (msg->FindRef("directory", 0, &ref)==B_OK) - { - BDirectory *myDirectory = new BDirectory(&ref); - myEntry->SetTo(myDirectory, selected); - myDirectory->Unset(); - delete myDirectory; - } - else - myEntry->Unset(); - } - } - break; - - case B_CANCEL: - release_sem(mySemaphore); - break; - } -} - diff --git a/src/YabFilePanelLooper.h b/src/YabFilePanelLooper.h deleted file mode 100644 index 77ebc98..0000000 --- a/src/YabFilePanelLooper.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef YABFPLOOPER_H -#define YABFPLOOPER_H - -#include -#include -#include - -class YabFilePanelLooper : public BLooper -{ - public: - YabFilePanelLooper(sem_id semaphore); - void MessageReceived(BMessage *msg); - BEntry *GetChosenFile(); - private: - BEntry *myEntry; - sem_id mySemaphore; -}; - -#endif diff --git a/src/YabInterface.cpp b/src/YabInterface.cpp deleted file mode 100644 index e2ba054..0000000 --- a/src/YabInterface.cpp +++ /dev/null @@ -1,11085 +0,0 @@ -#include "global.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -//#include -//#include -//#include "GameSoundDevice.h" -#include -#include -#include -#include -#include -#include -//#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "config.h" - -#include "CalendarControl.h" -#include "YabFilePanel.h" -#include "SplitPane.h" -#include "URLView.h" -#include "Spinner.h" -#include "YabTabView.h" -#include "TabView.h" -#ifdef LIBBSVG - #include -#endif - -#include -#include - -#include "YabInterface.h" -#include "YabWindow.h" -#include "YabView.h" -#include "YabBitmapView.h" -#include "YabList.h" - -#include "YabText.h" -#include "YabMenu.h" -#include "YabStackView.h" -#include "column/YabColumnType.h" -#include "column/ColorTools.h" -#include "column/ColumnListView.h" - - -BMediaTrack* playTrack; -media_format playFormat; -BSoundPlayer* player = 0; - - -const uint32 YABBUTTON = 'YBbu'; -const uint32 YABMENU = 'YBme'; -const uint32 YABSUBMENU = 'YBsu'; -const uint32 YABTEXTCONTROL = 'YBtc'; -const uint32 YABCHECKBOX = 'YBcb'; -const uint32 YABRADIOBUTTON = 'YBrb'; -const uint32 YABLISTBOXSELECT = 'YBls'; -const uint32 YABLISTBOXINVOKE = 'YBli'; -const uint32 YABDROPBOX = 'YBdb'; -const uint32 YABSLIDER = 'YBsl'; -const uint32 YABCOLORCONTROL = 'YBco'; -const uint32 YABTREEBOXSELECT = 'YBts'; -const uint32 YABTREEBOXINVOKE = 'YBti'; -const uint32 YABFILEBOXSELECT = 'YBfs'; -const uint32 YABFILEBOXINVOKE = 'YBfi'; -const uint32 YABSHORTCUT = 'YBsh'; -const uint32 TYPE_YABVIEW = 1; -char * refsRec=(char*)""; - -BCatalog *yabCatalog; - -static bool localize = false; -static bool quitting = false; -static property_info prop_list[] = { - { "YabSendString", {B_SET_PROPERTY, 0}, {B_NAME_SPECIFIER, 0}, "Send a string to MESSAGE$"}, - 0 // terminate list -}; - -const char* _L(const char* text) -{ - if(localize && yabCatalog) - return yabCatalog->GetString(text, NULL); //B_TRANSLATE_CONTEXT); - return text; -} -/** - * Start the interpreter thread - */ -int32 interpreter(void *data) -{ - int argc,t; - char **argv; - YabInterface *yab; - BList *myData = (BList*)data; - argc = (int)(addr_t)myData->ItemAt(0); - argv = (char**)myData->ItemAt(1); - yab = (YabInterface*)myData->ItemAt(2); - - t = mmain(argc,argv, yab); - return t; -} - -/** - * Constructor sets application directory, spawn the interpreter thread - */ -YabInterface::YabInterface(int argc, char **argv, const char* signature) - :BApplication(signature) -{ - BPath AppDirectory; - - // app directory - app_info appinfo; - - if( GetAppInfo( &appinfo) == B_OK) - { - BEntry ApplicationEntry( &appinfo.ref); - BEntry ApplicationDirectoryEntry; - - if( ApplicationEntry.GetParent( &ApplicationDirectoryEntry) == B_OK) - { - if( AppDirectory.SetTo( &ApplicationDirectoryEntry) == B_OK) - { - strcpy(ApplicationDirectory, AppDirectory.Path()); - // ApplicationDirectory.SetTo(AppDirectory.Path()); - } - } - } - - localMessage = ""; - - BList *myData = new BList(3); - myData->AddItem((void*)(addr_t)argc); - myData->AddItem((void*)argv); - myData->AddItem((void*)this); - myThread = spawn_thread(interpreter,"YabInterpreter",B_NORMAL_PRIORITY,(void*)myData); - if(myThread < B_OK) - { - printf("Can not start thread. Out of memory or maximum thread amount reached.\n"); - printf("Exiting now \n\n"); - exit(1); - } - - if(resume_thread(myThread) < B_OK) - { - printf("Error while starting interpreter!\n"); - printf("Exiting now \n\n"); - exit(1); - } - - viewList = new YabList(); - yabbitmaps = new BList(); - yabcanvas = new BList(); - drawStroking = false; - yabPattern = B_SOLID_HIGH; - yabAlpha = 255; - errorCode = 0; - Roster = NULL; - currentLineNumber = -1; - exiting = false; - - for(int i=0; i<63; i++) - mousemessagebuffer[i] = ' '; - mousemessagebuffer[63] = '\0'; - - myProps = new BPropertyInfo(prop_list); - currentLib = ""; - lastMouseMsg = ""; -} - -YabInterface::~YabInterface() -{ - delete mainFileName; - // delete song; - // delete fopen; - // delete fsave; - delete viewList; - // delete Roster; - delete myProps; - delete fPlayer; - if(yabCatalog) - delete yabCatalog; - while(yabbitmaps->CountItems()>0) - { - int i = 0; - BBitmap *b = (BBitmap*)yabbitmaps->RemoveItem(i); - delete b; - } -} - -/** - * Returns the application directory - */ -const char* YabInterface::GetApplicationDirectory() -{ - return (const char*) ApplicationDirectory; -} - -status_t YabInterface::GetSupportedSuites(BMessage *msg) -{ - msg->AddString("suites", "suite/vnd.yab-YabInterface"); - BPropertyInfo prop_info(prop_list); - msg->AddFlat("messages", &prop_info); - return BApplication::GetSupportedSuites(msg); -} - -BHandler* YabInterface::ResolveSpecifier(BMessage *msg, int32 index, BMessage *spec, int32 form, const char *prop) -{ - if (myProps->FindMatch(msg, index, spec, form, prop) >= 0) - return (BHandler*)this; - return BApplication::ResolveSpecifier(msg, index, spec, form, prop); -} - -void YabInterface::MessageReceived(BMessage *message) -{ - // message->PrintToStream(); - switch(message->what) - { - case B_SET_PROPERTY: - { - BMessage msg; - int32 i,w; - const char *prop; - - if(message->GetCurrentSpecifier(&i, &msg, &w, &prop) != B_BAD_SCRIPT_SYNTAX) - { - BString s; - msg.FindString("name", &s); - localMessage += "_Scripting:"; - localMessage += s; - localMessage +="|"; - } - } - break; - case B_REFS_RECEIVED: - { - entry_ref ref; - if(message->FindRef("refs", 0, &ref)==B_OK) - { - BEntry e(&ref); - BPath path; - e.GetPath(&path); - localMessage += "_RefsReceived:"; - localMessage += path.Path(); - localMessage +="|"; - } - } - break; - default: - BApplication::MessageReceived(message); - break; - } -} - -/** - * The QUIT_REQUESTED message arrived. If the interpreter thread is still active, - * kill it, otherwise exit directly. - */ -bool YabInterface::QuitRequested() -{ - //exiting = true; - //return false; - exiting = true; - ExitRequested(); - snooze(20000); - return true; -} - -void YabInterface::RefsReceived(BMessage *message){ - entry_ref ref; - BString tempstr; - if(message->FindRef("refs", 0, &ref)==B_OK) - { - BEntry e(&ref); - BPath path; - e.GetPath(&path); - tempstr += path.Path(); - refsRec = strdup(tempstr.String()); - } -} - -bool YabInterface::ExitRequested() -{ - status_t exit_val; - thread_info t; - // printf("QUITDEBUG: Exit\n"); - Lock(); - // printf("QUITDEBUG: Locked Ok\n"); - // if(!quitting) - // { - // printf("QUITDEBUG: quitting\n"); - // kill_thread(myThread); - // printf("QUITDEBUG: Kill Thread Ok\n"); - // } - // printf("QUITDEBUG: 1\n"); - - for(int i=0; iLock()) - w->Quit(); - } - - snooze(15000); - // printf("QUITDEBUG: 3\n"); - - - // BMessenger(be_app).SendMessage(new BMessage(B_QUIT_REQUESTED)); - Quit(); - // printf("QUITDEBUG: Quit\n"); - // printf("QUITDEBUG: wait\n"); - // wait_for_thread(myThread, &exit_val); - // get_thread_info(myThread, &t); - // kill_team(t.team); - // printf("QUITDEBUG: Stopped waiting\n"); - Unlock(); - // printf("QUITDEBUG: Unlock\n"); - - exit_thread(B_OK); - - return true; -} - -/** - * Open a window, add the main view. - */ -void YabInterface::OpenWindow(const BRect frame, const char* id, const char* title) -{ - YabWindow* w = new YabWindow(frame,title,id, B_TITLED_WINDOW_LOOK, B_NORMAL_WINDOW_FEEL, B_ASYNCHRONOUS_CONTROLS); - YabView* myView = new YabView(w->Bounds(), id, B_FOLLOW_ALL_SIDES, B_WILL_DRAW|B_NAVIGABLE_JUMP); - w->Lock(); - w->AddChild(myView); - - viewList->AddView(id, myView, TYPE_YABVIEW); - // viewList->PrintOut(); - - // w->Minimize(); - w->SetSizeLimits(10,3000,10,3000); - w->Show(); - w->Unlock(); - w->layout = -1; -} - -int YabInterface::CloseWindow(const char* view) -{ - int tmp = 0; - YabView *myView = cast_as((BView*)viewList->GetView(view), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - BView *child, *oldchild; - if(child = myView->ChildAt(0)) - { - while(child) - { - CleanupYabTabView(child); - if(is_kind_of(child, YabBitmapView)) - yabcanvas->RemoveItem(child); - - // viewList->PrintOut(); - CleanupSubchildView(child->ChildAt(0)); - if(viewList->GetView(child->Name())) - { - RemoveView(child); - viewList->DelView(child->Name()); - } - - oldchild = child; - child = child->NextSibling(); - - if(is_kind_of(oldchild, YabView)) - DrawClear(oldchild->Name(), true); - if(is_kind_of(oldchild, BMenuBar)) - { - oldchild->Hide(); - } - oldchild->RemoveSelf(); - delete oldchild; - } - } - if(is_kind_of(myView, YabView)) - DrawClear(myView->Name(), true); - if(is_kind_of(myView, BMenuBar)) - myView->Hide(); - myView->RemoveSelf(); - delete myView; - viewList->DelView(view); - // viewList->PrintOut(); - w->Quit(); - tmp = 1; - } - else - ErrorGen("Unable to lock window"); - } - else - Error(view, "VIEW"); - - return tmp; -} - -void YabInterface::View(BRect frame, const char* id, const char* view) -{ - YabView *myView = cast_as((BView*)viewList->GetView(view), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - YabView *newView = new YabView(frame, id, B_FOLLOW_ALL_SIDES, B_WILL_DRAW|B_NAVIGABLE_JUMP); - if(w->layout == -1) - newView->SetResizingMode(B_FOLLOW_RIGHT|B_FOLLOW_BOTTOM); - else - newView->SetResizingMode(w->layout); - myView->AddChild(newView); - - viewList->AddView(id, newView, TYPE_YABVIEW); - // viewList->PrintOut(); - - newView->Invalidate(); - - w->Unlock(); - } - else - ErrorGen("Unable to lock window"); - } - else - Error(view, "VIEW"); -} - -void YabInterface::BoxView(BRect frame, const char* id, const char* text, int lineType, const char* view) -{ - YabView *myView = cast_as((BView*)viewList->GetView(view), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - BBox *newBox = new BBox(frame, id, B_FOLLOW_ALL_SIDES, B_WILL_DRAW|B_FULL_UPDATE_ON_RESIZE|B_NAVIGABLE_JUMP); - font_height fh; - (be_bold_font)->GetHeight(&fh); - float y1 = fh.ascent + fh.descent + fh.leading + 1.0; - YabView *newView = new YabView(BRect(3,y1,frame.Width()-3,frame.Height()-3), id, B_FOLLOW_ALL_SIDES, B_WILL_DRAW|B_FULL_UPDATE_ON_RESIZE|B_NAVIGABLE_JUMP); - if(w->layout == -1) - { - newBox->SetResizingMode(B_FOLLOW_RIGHT|B_FOLLOW_BOTTOM); - newView->SetResizingMode(B_FOLLOW_RIGHT|B_FOLLOW_BOTTOM); - } - else - { - newBox->SetResizingMode(w->layout); - newView->SetResizingMode(w->layout); - } - newBox->SetLabel(text); - switch(lineType) - { - case 0: newBox->SetBorder(B_NO_BORDER); - break; - case 1: newBox->SetBorder(B_PLAIN_BORDER); - break; - default: newBox->SetBorder(B_FANCY_BORDER); - break; - } - - newBox->AddChild(newView); - myView->AddChild(newBox); - viewList->AddView(id, newView, TYPE_YABVIEW); - w->Unlock(); - } - else - ErrorGen("Unable to lock window"); - } - else - Error(view, "VIEW"); -} - -void YabInterface::BoxViewSet(const char* id, const char* option, const char* value) -{ - - YabView *myView = NULL; - BString tmpOption(option); - BString tmpValue(value); - BBox *myBox = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - - w->Lock(); - - myBox = cast_as(myView->FindView(id), BBox); - if(myBox) - { - if(tmpOption.IFindFirst("label")!=B_ERROR) - { - myBox->SetLabel(tmpValue); - w->Unlock(); - return; - } - if(tmpOption.IFindFirst("line")!=B_ERROR) - { - if(tmpValue.IFindFirst("0")!=B_ERROR) - { - myBox->SetBorder(B_NO_BORDER); - w->Unlock(); - return; - } - if(tmpValue.IFindFirst("1")!=B_ERROR) - { - myBox->SetBorder(B_PLAIN_BORDER); - w->Unlock(); - return; - } - if(tmpValue.IFindFirst("2")!=B_ERROR) - { - myBox->SetBorder(B_FANCY_BORDER); - w->Unlock(); - return; - } - - } - w->Unlock(); - } - else - w->Unlock(); - Error(id, "BOXVIEW"); - - } - - - } - - - } -} -void YabInterface::Tab(BRect frame, const char* id, const char* mode, const char* view) -{ - BTabView::tab_side side; - BString option(mode); - if(option.IFindFirst("top") != B_ERROR) - side = BTabView::kTopSide; - else if(option.IFindFirst("bottom") != B_ERROR) - side = BTabView::kBottomSide; - else if(option.IFindFirst("left") != B_ERROR) - side = BTabView::kLeftSide; - else if(option.IFindFirst("right") != B_ERROR) - side = BTabView::kRightSide; - else ErrorGen("Invalid Option"); - - YabView *myView = cast_as((BView*)viewList->GetView(view), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - - YabTabView *myTabView = new YabTabView(frame, id); - - if(w->layout == -1) - myTabView->SetResizingMode(B_FOLLOW_ALL); - else - myTabView->SetResizingMode(w->layout); - - myTabView->SetFlags(B_WILL_DRAW|B_FULL_UPDATE_ON_RESIZE|B_NAVIGABLE|B_NAVIGABLE_JUMP); - - myTabView->SetTabSide(side); - myTabView->SetTabWidth(B_WIDTH_FROM_LABEL); - //myTabView->SetTabWidth(B_WIDTH_AS_USUAL); - - myView->AddChild(myTabView); - - w->Unlock(); - } - else - ErrorGen("Unable to lock window"); - } - else - Error(view, "VIEW"); -} - -void YabInterface::TabAdd(const char* id, const char* tabname) -{ - YabView *myView = NULL; - YabTabView *myTabView = NULL; - - - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - //viewList->PrintOut(); - //fprintf(stderr, "Viewlist %d\n",viewList->ItemAt(i)); - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - myTabView = cast_as(myView->FindView(id), YabTabView); - - //myTabView->FindTabName(tabname); - if(myTabView) - { - BString t(id); - t << myTabView->CountTabs()+1; - BRect contentFrame = myTabView->Bounds(); - YabView *newView = new YabView(contentFrame, t.String(), B_FOLLOW_ALL_SIDES,B_WILL_DRAW|B_NAVIGABLE_JUMP); - viewList->AddView(t.String(), newView, TYPE_YABVIEW); - myTabView->AddTab(newView, tabname); - w->Unlock(); - return; - } - - w->Unlock(); - - } - } - - } - Error(id, "TABVIEW"); -} -void YabInterface::TabDel(const char* id, int num) //Reactivating Lorenz Glaser (aka lorglas) 20200801 -{ - YabView *myView = NULL; - YabTabView *myTabView=NULL; - - - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - myTabView = cast_as(myView->FindView(id), YabTabView); - if(myTabView) - { - if(num>=0 && num<=myTabView->CountTabs() && num != myTabView->Selection()) - { - if (num<=0) { - num=1; //If you deleted Tab Zero you must reselect Tab Zero - } - - myTabView->Select(num-1); //Selection of tab before - YabTabView* tabView = static_cast(myTabView); - YabView *t = static_cast(tabView->TabAt(num)->View()); - RemoveView(t); - //viewList->DelView(t->NameForTabView()); - myTabView->RemoveTab(num); //Remove Tab - - //viewList->PrintOut(); - } - w->Unlock(); - //viewList->PrintOut(); - return ; - } - //w->Unlock(); - } - } - } - Error(id, "TABVIEW"); -} -/* -void YabInterface::TabADD2(const char* id, int num) //Reactivating Lorenz Glaser (aka lorglas) 20200801 -{ - myTabView->AddTab(id, tabname); - myTabView->AddTab(num); - - } - Error(id, "TABVIEW"); -} -/* -void YabInterface::TabDel(const char* id, int num) -{ - - YabView *myView = NULL; - #ifdef BUILD_HAIKUTAB - YabTabView *myTabView = NULL; - #else - BTabView *myTabView = NULL; - #endif - - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - - if(w) - { - w->Lock(); - #ifdef BUILD_HAIKUTAB - myTabView = cast_as(myView->FindView(id), YabTabView); - #else - myTabView = cast_as(myView->FindView(id), BTabView); - #endif - if(myTabView) - { - if(num-1<0 || num-1>myTabView->CountTabs()) ErrorGen("Invalid tab number"); - BView *child, *oldchild; - if(child = myView->ChildAt(0)) - { - while(child) - { - BView *subchild; - if(subchild = child->ChildAt(0)) - while(subchild) - { - #ifdef BUILD_HAIKUTAB - if(is_kind_of(subchild, YabTabView)) - { - for(int i = 0; i<((YabTabView*)subchild)->CountTabs(); i++) - { - YabView *t = (YabView*)((YabTabView*)subchild)->TabAt(i); - RemoveView(t); - viewList->DelView(t->Name()); - } - } - #endif - if(viewList->GetView(subchild->Name())) - { - RemoveView(subchild); - viewList->DelView(subchild->Name()); - } - subchild = subchild->NextSibling(); - } - if(viewList->GetView(child->Name())) - { - RemoveView(child); - viewList->DelView(child->Name()); - } - - - oldchild = child; - child = child->NextSibling(); - - if(is_kind_of(oldchild, YabView)) - DrawClear(oldchild->Name(), true); - if(is_kind_of(oldchild, BMenuBar)) - { - oldchild->Hide(); - } - oldchild->RemoveSelf(); - delete oldchild; - } - } - if(is_kind_of(myView, YabView)) - DrawClear(myView->Name(), true); - if(is_kind_of(myView, BMenuBar)) - myView->Hide(); - BBox *box = cast_as(myView->Parent(), BBox); - myView->RemoveSelf(); - delete myView; - //viewList->DelView(w); - //viewList->DelView(window); - //viewList->DelView(id); - viewList->PrintOut(); - if(box) - { - box->RemoveSelf(); - delete box; - } - viewList->PrintOut(); - #ifdef BUILD_HAIKUTAB - WindowClear(myTabView->ItemAt(num-1)->Name()); - RemoveView(myTabView->ItemAt(num-1)); - //#endif - #else - - - //WindowClear((myTabView->Selection())); - //WindowClear(myTabView->TabAt(num-1)->Name()); - - //WindowClear(myTabView->ItemAt(num-1)->Name()); - //RemoveView(myTabView->ItemAt(num-1)); - - #endif - myTabView->RemoveTab(num); - - w->Unlock(); - return; - } - w->Unlock(); - } - } - } - Error(id, "TABVIEW"); -}*/ - -void YabInterface::TabSet(const char* id, int num) -{ - YabView *myView = NULL; - YabTabView *myTabView = NULL; - - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - myTabView = cast_as(myView->FindView(id), YabTabView); - if(myTabView) - { - if(num>0 && num<=myTabView->CountTabs() && num != myTabView->Selection()+1) - myTabView->Select(num-1); - w->Unlock(); - return; - } - w->Unlock(); - } - } - } - Error(id, "TABVIEW"); -} - -int YabInterface::TabViewGet(const char* id) -{ - int ret = -1; - YabView *myView = NULL; - YabTabView *myTabView = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - myTabView = cast_as(myView->FindView(id), YabTabView); - if(myTabView) - { - ret = myTabView->Selection(); - w->Unlock(); - return ret+1; - } - w->Unlock(); - } - } - } - Error(id, "TABVIEW"); -} - -void YabInterface::Launch(const char* strg) -{ - BString tst(strg); - - entry_ref *ref = new entry_ref(); - BEntry entry(strg); - entry.GetRef(ref); - if(entry.IsDirectory()) - { - BMessage msg, reply; - msg.what = B_REFS_RECEIVED; - msg.AddRef("refs", ref); - BMessenger("application/x-vnd.Be-TRAK").SendMessage(&msg, &reply); - return; - } - - status_t t = be_roster->Launch(ref); - if(t != B_OK) - { - if(tst.FindFirst("http://") != B_ERROR || tst.FindFirst("file://") != B_ERROR || tst.FindFirst("www.") != B_ERROR) - { - char *link = tst.LockBuffer( tst.Length()+1 ); - status_t result = be_roster->Launch( "text/html", 1, &link ); - tst.UnlockBuffer(); - } - } - delete ref; -} - -void YabInterface::CreateButton(BRect frame, const char* id, const char* title, const char* view) -{ - YabView *myView = cast_as((BView*)viewList->GetView(view), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - BButton* myButton = new BButton(frame,id,title,new BMessage(YABBUTTON)); - if(w->layout == -1) - myButton->SetResizingMode(B_FOLLOW_RIGHT|B_FOLLOW_BOTTOM); - else - myButton->SetResizingMode(w->layout); - myButton->SetFlags(B_WILL_DRAW|B_FULL_UPDATE_ON_RESIZE|B_NAVIGABLE); - // trick Haiku, resize button again - myButton->ResizeTo(frame.Width(), frame.Height()); - myView->AddChild(myButton); - // viewList->AddView(id, myButton, TYPE_BBUTTON); - w->Unlock(); - } - else - ErrorGen("Unable to lock window"); - } - else - Error(view, "VIEW"); -} - -int YabInterface::CreateImage(BPoint coordinates, const char* FileName, const char* window) -{ - BBitmap* myBitmap = NULL; - BFile imageFile; - BPath imagePath; - int ret = 0; - - if(*FileName=='/') - imageFile.SetTo(FileName, B_READ_ONLY); - else - if(!strcmp(ApplicationDirectory,"")) - { - if(imagePath.SetTo((const char*)ApplicationDirectory, FileName)==B_OK) - imageFile.SetTo(imagePath.Path(), B_READ_ONLY); - } - if(imageFile.InitCheck()!=B_OK) - imageFile.SetTo(FileName, B_READ_ONLY); - - if(imageFile.InitCheck()!=B_OK) - return 1; - - Roster = BTranslatorRoster::Default(); - - if(!Roster) - return 2; - - BBitmapStream Stream; - - if(Roster->Translate(&imageFile, NULL, NULL, &Stream, B_TRANSLATOR_BITMAP)GetView(window), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - YabDrawing *t = new YabDrawing(); - t->command = 10; - t->x1 = coordinates.x; t->y1 = coordinates.y; - t->bitmap = myBitmap; - myView->drawList->AddItem(t); - myView->Invalidate(BRect(coordinates.x, coordinates.y, coordinates.x+myBitmap->Bounds().Width(), coordinates.y+myBitmap->Bounds().Height())); - w->Unlock(); - } - else - ErrorGen("Unable to lock window"); - } - else - { - for(int i=0; iCountItems(); i++) - { - BBitmap *b = (BBitmap*)yabbitmaps->ItemAt(i); - BView *bview = b->FindView(window); - if(bview) - { - b->Lock(); - drawing_mode mode = bview->DrawingMode(); - bview->SetDrawingMode(B_OP_ALPHA); - bview->DrawBitmap(myBitmap, coordinates); - bview->SetDrawingMode(mode); - bview->Sync(); - b->Unlock(); - delete Roster; - delete myBitmap; - return 0; - } - } - for(int i=0; iCountItems(); i++) - { - YabBitmapView *myView = (YabBitmapView*)yabcanvas->ItemAt(i); - if(!strcmp(myView->Name(), window)) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - BBitmap *b = myView->GetBitmap(); - BView *bView = myView->GetBitmapView(); - b->Lock(); - drawing_mode mode = bView->DrawingMode(); - bView->SetDrawingMode(B_OP_ALPHA); - bView->DrawBitmap(myBitmap, coordinates); - bView->SetDrawingMode(mode); - bView->Sync(); - b->Unlock(); - - myView->Draw(BRect(coordinates.x, coordinates.y, coordinates.x+myBitmap->Bounds().Width(), coordinates.y+myBitmap->Bounds().Height())); - w->Unlock(); - delete Roster; - delete myBitmap; - return 0; - } - else - ErrorGen("Unable to lock window"); - } - } - Error(window, "VIEW, BITMAP or CANVAS"); - } - delete Roster; - return 0; -} - -int YabInterface::CreateImage(BRect frame, const char* FileName, const char* window) -{ - int scaling = 0; - if(frame.right == -1) scaling = 1; - if(frame.bottom == -1) scaling = 2; - if(frame.right == -1 && frame.bottom == -1) scaling = 3; - - BBitmap* myBitmap = NULL; - BFile ImageFile; - BPath ImagePath; - int ret = 0; - - if(*FileName=='/') - ImageFile.SetTo(FileName, B_READ_ONLY); - else - if(!strcmp(ApplicationDirectory,"")) - { - if( ImagePath.SetTo((const char*)ApplicationDirectory, FileName) == B_OK) - ImageFile.SetTo(ImagePath.Path(), B_READ_ONLY); - } - - if(ImageFile.InitCheck()!=B_OK) - ImageFile.SetTo(FileName, B_READ_ONLY); - - if(ImageFile.InitCheck()!=B_OK) - return 1; - - Roster = BTranslatorRoster::Default(); - - if(!Roster) - return 2; - - BBitmapStream Stream; - - if(Roster->Translate(&ImageFile, NULL, NULL, &Stream, B_TRANSLATOR_BITMAP) < B_OK) - return 3; - - if(Stream.DetachBitmap(&myBitmap) != B_OK) - return 4; - - BRect newframe; - switch(scaling) - { - case 1: - { - BRect t(myBitmap->Bounds()); - double width; - newframe = frame; - width = (t.right-t.left)*((frame.bottom-frame.top)/(t.bottom-t.top)); - newframe.right = newframe.left+width; - } - break; - case 2: - { - BRect t(myBitmap->Bounds()); - double height; - newframe = frame; - height = (t.bottom-t.top)*((frame.right-frame.left)/(t.right-t.left)); - newframe.bottom = newframe.top+height; - } - break; - case 3: newframe = myBitmap->Bounds(); - break; - default: newframe = frame; - } - - YabView *myView = cast_as((BView*)viewList->GetView(window), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - YabDrawing *t = new YabDrawing(); - t->command = 11; - t->x1 = newframe.left; t->y1 = newframe.top; - t->x2 = newframe.right; t->y2 = newframe.bottom; - t->bitmap = myBitmap; - myView->drawList->AddItem(t); - myView->Invalidate(newframe); - w->Unlock(); - } - else - ErrorGen("Unable to lock window"); - } - else - { - for(int i=0; iCountItems(); i++) - { - BBitmap *b = (BBitmap*)yabbitmaps->ItemAt(i); - BView *bview = b->FindView(window); - if(bview) - { - b->Lock(); - drawing_mode mode = bview->DrawingMode(); - bview->SetDrawingMode(B_OP_ALPHA); - bview->DrawBitmap(myBitmap, newframe); - bview->SetDrawingMode(mode); - bview->Sync(); - b->Unlock(); - delete Roster; - delete myBitmap; - return 0; - } - } - for(int i=0; iCountItems(); i++) - { - YabBitmapView *myView = (YabBitmapView*)yabcanvas->ItemAt(i); - if(!strcmp(myView->Name(), window)) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - BBitmap *b = myView->GetBitmap(); - BView *bView = myView->GetBitmapView(); - b->Lock(); - drawing_mode mode = bView->DrawingMode(); - bView->SetDrawingMode(B_OP_ALPHA); - bView->DrawBitmap(myBitmap, newframe); - bView->SetDrawingMode(mode); - bView->Sync(); - b->Unlock(); - - myView->Draw(newframe); - w->Unlock(); - delete Roster; - delete myBitmap; - return 0; - } - else - ErrorGen("Unable to lock window"); - } - } - Error(window, "VIEW, BITMAP or CANVAS"); - } - delete Roster; - return 0; -} - -int YabInterface::CreateSVG(BRect frame, const char* FileName, const char* window) -{ -#ifdef LIBBSVG - BPath path; - BString file; - file.SetTo(FileName); - if(FileName[0]!='/') - { - if(!strcmp(ApplicationDirectory,"")) - { - if(path.SetTo((const char*)ApplicationDirectory, FileName) == B_OK) - file.SetTo(path.Path()); - } - } - int ret = 0; - - YabView *myView = cast_as((BView*)viewList->GetView(window), YabView); // untested! - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - BSVGView *mySVG = new BSVGView(frame,"svgview",0); - mySVG->SetViewColor(myView->ViewColor()); - mySVG->SetScaleToFit(true); - if(w->layout == -1) - mySVG->SetResizingMode(B_FOLLOW_RIGHT|B_FOLLOW_BOTTOM); - else - mySVG->SetResizingMode(w->layout); - mySVG->SetFlags(B_WILL_DRAW|B_FULL_UPDATE_ON_RESIZE); - - if(mySVG->LoadFromFile(file.String())!=B_OK) - ret = 1; - else - myView->AddChild(mySVG); - myView->Invalidate(); - w->Unlock(); - } - else - ErrorGen("Unable to lock window"); - } - else - Error(window, "VIEW"); - return ret; -#else - return 2; -#endif -} - -void YabInterface::StatusBar(BRect frame, const char* id, const char* label1, const char* label2, const char* view) -{ - YabView *myView = cast_as((BView*)viewList->GetView(view), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - BStatusBar *bar = new BStatusBar(frame, id, label1, label2); - bar->SetBarHeight((float)frame.Height()-(be_plain_font)->Size()-5); - if(w->layout == -1) - bar->SetResizingMode(B_FOLLOW_RIGHT|B_FOLLOW_BOTTOM); - else - bar->SetResizingMode(w->layout); - myView->AddChild(bar); - bar->Draw(frame); - w->Unlock(); - } - else - ErrorGen("Unable to lock window"); - } - else - Error(view, "VIEW"); -} - -void YabInterface::StatusBarSet(const char* id, const char* label1, const char* label2, double state) -{ - YabView *myView = NULL; - BStatusBar *myBar = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - myBar = cast_as(myView->FindView(id), BStatusBar); - if(myBar) - { - myBar->Reset(); - myBar->Update((float)state, label1, label2); - w->Unlock(); - return; - } - w->Unlock(); - } - else - ErrorGen("Unable to lock window"); - } - } - Error(id, "STATUSBAR"); -} - -void YabInterface::StatusBarSet(BRect frame, const char* id, const char* view) -{ - // empty! -} - -void YabInterface::StatusBarSet(const char* id, int r, int g, int b) -{ - YabView *myView = NULL; - BStatusBar *myBar = NULL; - - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - myBar = cast_as(myView->FindView(id), BStatusBar); - if(myBar) - { - rgb_color rgb = {r,g,b,255}; - myBar->SetBarColor(rgb); - w->Unlock(); - return; - } - w->Unlock(); - } - else - ErrorGen("Unable to lock window"); - } - } - Error(id, "STATUSBAR"); -} - -void YabInterface::CreateMenu(const char* menuhead, const char* menuitem, const char *shortcut, const char* window) -{ - char myShortcut; - int32 modifiers = 0; - BString t(shortcut); - if(t.Length()>1) - { - myShortcut = shortcut[t.Length()-1]; - if(t.IFindFirst("s")!=B_ERROR && t.IFindFirst("s")GetView(window), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - BMenuBar *menubar; - YabMenu *menu = NULL; - BMenuItem *item = NULL; - w->Lock(); - menubar = cast_as(myView->FindView("menubar"), BMenuBar); - if(menubar == NULL) - { - menubar = new BMenuBar(myView->Bounds(),"menubar"); - myView->AddChild(menubar); - } - for(int i=0; iCountItems(); i++) - if(!strcmp( menubar->ItemAt(i)->Label(), menuhead)) - menu = cast_as(menubar->SubmenuAt(i), YabMenu); - if(menu == NULL) - { - menu = new YabMenu(menuhead); - menubar->AddItem((BMenu*)menu); - } - if(!strcmp(menuitem,"--")) - menu->AddItem(new BSeparatorItem()); - else - menu->AddItem(new BMenuItem(menuitem, new BMessage(YABMENU), myShortcut, modifiers)); - w->Unlock(); - } - else - ErrorGen("Unable to lock window"); - } - else - Error(window, "VIEW"); -} - -void YabInterface::CreateTextControl(BRect frame, const char* id, const char* label, const char* text, const char* window) -{ - - YabView *myView = cast_as((BView*)viewList->GetView(window), YabView); - //viewList->PrintOut(); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - BTextControl *textControl = new BTextControl(frame, id ,label, text, new BMessage(YABTEXTCONTROL)); - //If the label is not set, a space of 5 pixels was still reserved to the left of the field. This place is now fully used - if (strcmp(label, "") == 0) //check if Label was set - { - textControl->SetDivider(textControl->StringWidth(label)); //+5.0); - } - else if (strcmp(label,"") != 0) - { - textControl->SetDivider(textControl->StringWidth(label)+5.0); - } - if(w) - { - if(w->layout == -1) - textControl->SetResizingMode(B_FOLLOW_RIGHT|B_FOLLOW_BOTTOM); - else - textControl->SetResizingMode(w->layout); - } - textControl->SetFlags(B_WILL_DRAW|B_FULL_UPDATE_ON_RESIZE|B_NAVIGABLE); - myView->AddChild(textControl); - w->Unlock(); - } - else - ErrorGen("Unable to lock window"); - } - else - Error(window, "VIEW"); -} - -void YabInterface::CreateCheckBox(double x, double y, const char* id, const char* label, int isActivated, const char* window) -{ - YabView *myView = cast_as((BView*)viewList->GetView(window), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - BRect frame(x,y,x+1,y+1); - BCheckBox *checkBox = new BCheckBox(frame, id, label, new BMessage(YABCHECKBOX)); - checkBox->ResizeToPreferred(); - if(isActivated>0) checkBox->SetValue(B_CONTROL_ON); - if(w->layout == -1) - checkBox->SetResizingMode(B_FOLLOW_RIGHT|B_FOLLOW_BOTTOM); - else - checkBox->SetResizingMode(w->layout); - checkBox->SetFlags(B_WILL_DRAW|B_FULL_UPDATE_ON_RESIZE|B_NAVIGABLE); - myView->AddChild(checkBox); - w->Unlock(); - } - else - ErrorGen("Unable to lock window"); - } - else - Error(window, "VIEW"); -} - -void YabInterface::CreateRadioButton(double x, double y, const char* groupID, const char* label, int isActivated, const char* window) -{ - YabView *myView = cast_as((BView*)viewList->GetView(window), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - BRect frame(x,y,x+1,y+1); - BRadioButton *radio = new BRadioButton(frame, groupID, label, new BMessage(YABRADIOBUTTON)); - radio->ResizeToPreferred(); - if(isActivated>0) radio->SetValue(B_CONTROL_ON); - if(w->layout == -1) - radio->SetResizingMode(B_FOLLOW_RIGHT|B_FOLLOW_BOTTOM); - else - radio->SetResizingMode(w->layout); - radio->SetFlags(B_WILL_DRAW|B_FULL_UPDATE_ON_RESIZE|B_NAVIGABLE); - myView->AddChild(radio); - w->Unlock(); - } - else - ErrorGen("Unable to lock window"); - } - else - Error(window, "VIEW"); -} - -void YabInterface::CreateListBox(BRect frame, const char* title, int scrollbar, const char* window) -{ - YabView *myView = cast_as(((BView*)viewList->GetView(window)), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - uint32 resizeMode; - - w->Lock(); - - if(scrollbar == 3 || scrollbar == 1) frame.right -= B_V_SCROLL_BAR_WIDTH; - if(scrollbar>2) frame.bottom -= B_H_SCROLL_BAR_HEIGHT; - - BListView *list = new BListView(frame,title); - if(w->layout == -1) - resizeMode = B_FOLLOW_ALL; - else - resizeMode = w->layout; - list->SetResizingMode(resizeMode); - list->SetFlags(B_WILL_DRAW|B_FULL_UPDATE_ON_RESIZE|B_NAVIGABLE); - list->SetSelectionMessage(new BMessage(YABLISTBOXSELECT)); - list->SetInvocationMessage(new BMessage(YABLISTBOXINVOKE)); - switch(scrollbar) - { - case 3: // both - myView->AddChild(new BScrollView("scroll_list", list, resizeMode, B_WILL_DRAW|B_FULL_UPDATE_ON_RESIZE, true, true)); - break; - case 2: // horizontal - myView->AddChild(new BScrollView("scroll_list", list, resizeMode, B_WILL_DRAW|B_FULL_UPDATE_ON_RESIZE, true, false)); - break; - case 0: // none - myView->AddChild(list); - break; - default: // vertical is default - myView->AddChild(new BScrollView("scroll_list", list, resizeMode, B_WILL_DRAW|B_FULL_UPDATE_ON_RESIZE, false, true)); - break; - } - w->Unlock(); - } - else - ErrorGen("Unable to lock window"); - } - else - Error(window, "VIEW"); -} - -void YabInterface::CreateDropBox(BRect frame, const char* title, const char* label, const char* window) -{ - YabView *myView = cast_as((BView*)viewList->GetView(window), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - BPopUpMenu *dropmenu = new BPopUpMenu(""); - BMenuField *drop = new BMenuField(frame,title,label, dropmenu, true); - drop->ResizeToPreferred(); - //If the label is not set, a space of 5 pixels was still reserved to the left of the field. This place is now fully used - if (strcmp(label, "") == 0) //check if label was set - { - drop->SetDivider(drop->StringWidth(label)); - } - else if (strcmp(label,"") != 0) - { - drop->SetDivider(drop->StringWidth(label)+5.0); - } - //drop->SetDivider(drop->StringWidth(label)+5.0); - if(w->layout == -1) - drop->SetResizingMode(B_FOLLOW_RIGHT|B_FOLLOW_BOTTOM); - else - drop->SetResizingMode(w->layout); - drop->SetFlags(B_WILL_DRAW|B_FULL_UPDATE_ON_RESIZE|B_NAVIGABLE); - myView->AddChild(drop); - w->Unlock(); - } - else - ErrorGen("Unable to lock window"); - } - else - Error(window, "VIEW"); -} - -void YabInterface::CreateItem(const char* id, const char* item) -{ - YabView *myView = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - BMenuField *myMenuField = cast_as(myView->FindView(id), BMenuField); - if(myMenuField) - { - BPopUpMenu *myPopup = cast_as(myMenuField->Menu(), BPopUpMenu); - if(myPopup) - { - if(!strcmp(item,"--")) - myPopup->AddItem(new BSeparatorItem()); - else - { - BMenuItem *tmp = new BMenuItem(item, new BMessage(YABDROPBOX)); - myPopup->AddItem(tmp); - if(myPopup->CountItems()==1) // first Item - tmp->SetMarked(true); - } - w->Unlock(); - return; - } - } - w->Unlock(); - } - } - } - Error(id, "DROPBOX"); -} - -void YabInterface::RemoveItem(const char* title, const char* item) -{ - YabView *myView = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - BListView *myList = cast_as(myView->FindView(title), BListView); - if(myList) - { - for(int i=0; iCountItems(); i++) - { - BStringItem *stritem = cast_as(myList->ItemAt(i), BStringItem); - if(stritem && !strcmp(stritem->Text(), item)) - { - myList->RemoveItem(i); - w->Unlock(); - return; - } - } - w->Unlock(); - ErrorGen("Item not found"); - } - w->Unlock(); - } - } - } - Error(title, "DROPBOX"); -} - -void YabInterface::ClearItems(const char* title) -{ - YabView *myView = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - BListView *myList = cast_as(myView->FindView(title), BListView); - if(myList) - { - myList->RemoveItems(0,myList->CountItems()); - w->Unlock(); - return; - } - w->Unlock(); - } - } - } - Error(title, "DROPBOX"); -} - -void YabInterface::DrawText(BPoint coordinates, const char* text, const char* window) -{ - YabView *myView = cast_as((BView*)viewList->GetView(window), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - YabDrawing *t = new YabDrawing(); - t->command = 0; - t->x1 = coordinates.x; t->y1 = coordinates.y; - t->chardata = strdup(text); - myView->drawList->AddItem(t); - - font_height height; - myView->GetFontHeight(&height); - BRect bbox; - bbox.left = coordinates.x; - bbox.top = coordinates.y - height.ascent; - bbox.right = coordinates.x + myView->StringWidth(text); - bbox.bottom = coordinates.y + height.descent; - - BFont tFont; - myView->GetFont(&tFont); - if(tFont.Rotation() == 0.0 && tFont.Shear() == 90.0) - myView->Invalidate(bbox); - else - myView->Invalidate(); - w->Unlock(); - } - else - ErrorGen("Unable to lock window"); - } - else - { - for(int i=0; iCountItems(); i++) - { - BBitmap *b = (BBitmap*)yabbitmaps->ItemAt(i); - BView *bview = b->FindView(window); - if(bview) - { - b->Lock(); - bview->SetDrawingMode(B_OP_ALPHA); - bview->SetBlendingMode(B_PIXEL_ALPHA, B_ALPHA_COMPOSITE); - bview->DrawString(text, coordinates); - bview->Sync(); - b->Unlock(); - return; - } - } - for(int i=0; iCountItems(); i++) - { - YabBitmapView *myView = (YabBitmapView*)yabcanvas->ItemAt(i); - if(!strcmp(myView->Name(), window)) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - BBitmap *b = myView->GetBitmap(); - BView *bView = myView->GetBitmapView(); - b->Lock(); - bView->SetDrawingMode(B_OP_ALPHA); - bView->SetBlendingMode(B_PIXEL_ALPHA, B_ALPHA_COMPOSITE); - bView->DrawString(text, coordinates); - bView->Sync(); - b->Unlock(); - - font_height height; - bView->GetFontHeight(&height); - BRect bbox; - bbox.left = coordinates.x; - bbox.top = coordinates.y - height.ascent; - bbox.right = coordinates.x + bView->StringWidth(text); - bbox.bottom = coordinates.y + height.descent; - - myView->Draw(bbox); - w->Unlock(); - return; - } - else - ErrorGen("Unable to lock window"); - } - } - Error(window, "VIEW, BITMAP or CANVAS"); - } -} - -void YabInterface::DrawRect(BRect frame, const char* window) -{ - YabView *myView = cast_as((BView*)viewList->GetView(window), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - YabDrawing *t = new YabDrawing(); - if(drawStroking) - t->command = 4; - else - t->command = 5; - t->x1 = frame.left; t->y1 = frame.top; - t->x2 = frame.right; t->y2 = frame.bottom; - t->p = yabPattern; - myView->drawList->AddItem(t); - myView->Invalidate(frame); - w->Unlock(); - } - else - ErrorGen("Unable to lock window"); - } - else - { - for(int i=0; iCountItems(); i++) - { - BBitmap *b = (BBitmap*)yabbitmaps->ItemAt(i); - BView *bview = b->FindView(window); - if(bview) - { - b->Lock(); - bview->SetDrawingMode(B_OP_ALPHA); - bview->SetBlendingMode(B_PIXEL_ALPHA, B_ALPHA_COMPOSITE); - if(drawStroking) - bview->StrokeRect(frame, yabPattern); - else - bview->FillRect(frame, yabPattern); - bview->Sync(); - b->Unlock(); - return; - } - } - for(int i=0; iCountItems(); i++) - { - YabBitmapView *myView = (YabBitmapView*)yabcanvas->ItemAt(i); - if(!strcmp(myView->Name(), window)) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - BBitmap *b = myView->GetBitmap(); - BView *bView = myView->GetBitmapView(); - b->Lock(); - // bView->SetDrawingMode(B_OP_ALPHA); - //bView->SetBlendingMode(B_PIXEL_ALPHA, B_ALPHA_COMPOSITE); - if(drawStroking) - bView->StrokeRect(frame, yabPattern); - else - bView->FillRect(frame, yabPattern); - bView->Sync(); - b->Unlock(); - - myView->Draw(frame); - w->Unlock(); - return; - } - else - ErrorGen("Unable to lock window"); - } - } - Error(window, "VIEW, BITMAP or CANVAS"); - } -} - -void YabInterface::DrawClear(const char* window, bool isExit) -{ - YabView *myView = cast_as((BView*)viewList->GetView(window), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - rgb_color lowcolor = myView->LowColor(); - rgb_color highcolor = myView->HighColor(); - BFont lastfont; - myView->GetFont(&lastfont); - while(myView->drawList->CountItems()>0) - { - YabDrawing *t = (YabDrawing*)myView->drawList->LastItem(); - myView->drawList->RemoveItem(t); - if(t->command == 0) delete [] t->chardata; - if(t->command == 10 || t->command == 11) delete t->bitmap; - delete t; - } - YabDrawing *t1 = new YabDrawing(); - t1->command = 7; - t1->r = lowcolor.red; t1->g = lowcolor.green; - t1->b = lowcolor.blue; t1->alpha = yabAlpha; - myView->drawList->AddItem(t1); - YabDrawing *t2 = new YabDrawing(); - t2->command = 6; - t2->r = highcolor.red; t2->g = highcolor.green; - t2->b = highcolor.blue; t2->alpha = yabAlpha; - myView->drawList->AddItem(t2); - YabDrawing *t3 = new YabDrawing(); - t3->command = 12; - t3->font = lastfont; - myView->drawList->AddItem(t3); - myView->Invalidate(); - w->Unlock(); - } - else - ErrorGen("Unable to lock window"); - } - else - if(!isExit) Error(window, "VIEW"); -} - -void YabInterface::DrawDot(double x, double y, const char* window) -{ - YabView *myView = cast_as((BView*)viewList->GetView(window), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - YabDrawing *t = new YabDrawing(); - t->command = 1; - t->x1 = x; t->y1 = y; - t->x2 = x; t->y2 = y; - t->p = yabPattern; - myView->drawList->AddItem(t); - myView->Invalidate(BRect(x,y,x,y)); - w->Unlock(); - } - else - ErrorGen("Unable to lock window"); - } - else - { - for(int i=0; iCountItems(); i++) - { - BBitmap *b = (BBitmap*)yabbitmaps->ItemAt(i); - BView *bview = b->FindView(window); - if(bview) - { - b->Lock(); - bview->SetDrawingMode(B_OP_ALPHA); - bview->SetBlendingMode(B_PIXEL_ALPHA, B_ALPHA_COMPOSITE); - bview->StrokeLine(BPoint(x,y), BPoint(x,y), yabPattern); - bview->Sync(); - b->Unlock(); - return; - } - } - for(int i=0; iCountItems(); i++) - { - YabBitmapView *myView = (YabBitmapView*)yabcanvas->ItemAt(i); - if(!strcmp(myView->Name(), window)) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - BBitmap *b = myView->GetBitmap(); - BView *bView = myView->GetBitmapView(); - b->Lock(); - // bView->SetDrawingMode(B_OP_ALPHA); - // bView->SetBlendingMode(B_PIXEL_ALPHA, B_ALPHA_COMPOSITE); - bView->StrokeLine(BPoint(x,y), BPoint(x,y), yabPattern); - bView->Sync(); - b->Unlock(); - - myView->Draw(BRect(x,y,x,y)); - w->Unlock(); - return; - } - else - ErrorGen("Unable to lock window"); - } - } - Error(window, "VIEW, BITMAP or CANVAS"); - } -} - -void YabInterface::DrawLine(double x1, double y1, double x2, double y2, const char* window) -{ - YabView *myView = cast_as((BView*)viewList->GetView(window), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - YabDrawing *t = new YabDrawing(); - t->command = 1; - t->x1 = x1; t->y1 = y1; - t->x2 = x2; t->y2 = y2; - t->p = yabPattern; - myView->drawList->AddItem(t); - double minx1 = x1Invalidate(BRect(minx1,miny1,minx2,miny2)); - w->Unlock(); - } - else - ErrorGen("Unable to lock window"); - } - else - { - for(int i=0; iCountItems(); i++) - { - BBitmap *b = (BBitmap*)yabbitmaps->ItemAt(i); - BView *bview = b->FindView(window); - if(bview) - { - b->Lock(); - bview->SetDrawingMode(B_OP_ALPHA); - bview->SetBlendingMode(B_PIXEL_ALPHA, B_ALPHA_COMPOSITE); - bview->StrokeLine(BPoint(x1,y1), BPoint(x2,y2), yabPattern); - bview->Sync(); - b->Unlock(); - return; - } - } - for(int i=0; iCountItems(); i++) - { - YabBitmapView *myView = (YabBitmapView*)yabcanvas->ItemAt(i); - if(!strcmp(myView->Name(), window)) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - BBitmap *b = myView->GetBitmap(); - BView *bView = myView->GetBitmapView(); - b->Lock(); - //bView->SetDrawingMode(B_OP_ALPHA); - //bView->SetBlendingMode(B_PIXEL_ALPHA, B_ALPHA_COMPOSITE); - bView->StrokeLine(BPoint(x1,y1), BPoint(x2,y2), yabPattern); - bView->Sync(); - b->Unlock(); - - double minx1 = x1Invalidate(BRect(minx1,miny1,minx2,miny2)); - myView->Draw(BRect(minx1,miny1,minx2,miny2)); - w->Unlock(); - return; - } - else - ErrorGen("Unable to lock window"); - } - } - Error(window, "VIEW, BITMAP or CANVAS"); - } -} - -void YabInterface::DrawCircle(double x, double y, double r, const char* window) -{ - YabView *myView = cast_as((BView*)viewList->GetView(window), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - YabDrawing *t = new YabDrawing(); - if(drawStroking) - t->command = 2; - else - t->command = 3; - t->x1 = x; t->y1 = y; - t->x2 = r; t->y2 = r; - t->p = yabPattern; - myView->drawList->AddItem(t); - myView->Invalidate(BRect(x-r,y-r,x+r,y+r)); - w->Unlock(); - } - else - ErrorGen("Unable to lock window"); - } - else - { - for(int i=0; iCountItems(); i++) - { - BBitmap *b = (BBitmap*)yabbitmaps->ItemAt(i); - BView *bview = b->FindView(window); - if(bview) - { - b->Lock(); - - bview->SetDrawingMode(B_OP_ALPHA); - bview->SetBlendingMode(B_PIXEL_ALPHA, B_ALPHA_COMPOSITE); - - if(drawStroking) - bview->StrokeEllipse(BPoint(x,y), r, r, yabPattern); - else - bview->FillEllipse(BPoint(x,y), r, r, yabPattern); - bview->Sync(); - b->Unlock(); - return; - } - } - for(int i=0; iCountItems(); i++) - { - YabBitmapView *myView = (YabBitmapView*)yabcanvas->ItemAt(i); - if(!strcmp(myView->Name(), window)) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - BBitmap *b = myView->GetBitmap(); - BView *bView = myView->GetBitmapView(); - - b->Lock(); - // bView->SetDrawingMode(B_OP_ALPHA); - // bView->SetBlendingMode(B_PIXEL_ALPHA, B_ALPHA_COMPOSITE); - // bView->SetDrawingMode(B_OP_OVER); - if(drawStroking) - bView->StrokeEllipse(BPoint(x,y), r, r, yabPattern); - else - bView->FillEllipse(BPoint(x,y), r, r, yabPattern); - bView->Sync(); - b->Unlock(); - - myView->Draw(BRect(x-r,y-r,x+r,y+r)); - w->Unlock(); - return; - } - else - ErrorGen("Unable to lock window"); - } - } - Error(window, "VIEW, BITMAP or CANVAS"); - } -} - -void YabInterface::DrawEllipse(double x, double y, double r1, double r2, const char* window) -{ - YabView *myView = cast_as((BView*)viewList->GetView(window), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - YabDrawing *t = new YabDrawing(); - if(drawStroking) - t->command = 2; - else - t->command = 3; - t->x1 = x; t->y1 = y; - t->x2 = r1; t->y2 = r2; - t->p = yabPattern; - myView->drawList->AddItem(t); - myView->Invalidate(BRect(x-r1,y-r2,x+r1,y+r2)); - w->Unlock(); - } - else - ErrorGen("Unable to lock window"); - } - else - { - for(int i=0; iCountItems(); i++) - { - BBitmap *b = (BBitmap*)yabbitmaps->ItemAt(i); - BView *bview = b->FindView(window); - if(bview) - { - b->Lock(); - bview->SetDrawingMode(B_OP_ALPHA); - bview->SetBlendingMode(B_PIXEL_ALPHA, B_ALPHA_COMPOSITE); - if(drawStroking) - bview->StrokeEllipse(BPoint(x,y), r1, r2, yabPattern); - else - bview->FillEllipse(BPoint(x,y), r1, r2, yabPattern); - bview->Sync(); - b->Unlock(); - return; - } - } - for(int i=0; iCountItems(); i++) - { - YabBitmapView *myView = (YabBitmapView*)yabcanvas->ItemAt(i); - if(!strcmp(myView->Name(), window)) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - BBitmap *b = myView->GetBitmap(); - BView *bView = myView->GetBitmapView(); - b->Lock(); - // bView->SetDrawingMode(B_OP_ALPHA); - // bView->SetBlendingMode(B_PIXEL_ALPHA, B_ALPHA_COMPOSITE); - if(drawStroking) - bView->StrokeEllipse(BPoint(x,y), r1, r2, yabPattern); - else - bView->FillEllipse(BPoint(x,y), r1, r2, yabPattern); - bView->Sync(); - b->Unlock(); - - myView->Draw(BRect(x-r1,y-r2,x+r1,y+r2)); - w->Unlock(); - return; - } - else - ErrorGen("Unable to lock window"); - } - } - Error(window, "VIEW, BITMAP or CANVAS"); - } -} - -void YabInterface::DrawCurve(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4, const char* window) -{ - double invx1 = x1x2?x1:x2; invx2 = invx2>x3?invx2:x3; invx2 = invx2>x4?invx2:x4; - double invy1 = y1y2?y1:y2; invy2 = invy2>y3?invy2:y3; invy2 = invy2>y4?invy2:y4; - - YabView *myView = cast_as((BView*)viewList->GetView(window), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - YabDrawing *t = new YabDrawing(); - if(drawStroking) - t->command = 8; - else - t->command = 9; - t->x1 = x1; t->y1 = y1; - t->x2 = x2; t->y2 = y2; - t->x3 = x3; t->y3 = y3; - t->x4 = x4; t->y4 = y4; - t->p = yabPattern; - myView->drawList->AddItem(t); - myView->Invalidate(BRect(invx1,invy1,invx2,invy2)); - w->Unlock(); - } - else - ErrorGen("Unable to lock window"); - } - else - { - for(int i=0; iCountItems(); i++) - { - BBitmap *b = (BBitmap*)yabbitmaps->ItemAt(i); - BView *bview = b->FindView(window); - if(bview) - { - b->Lock(); - bview->SetDrawingMode(B_OP_ALPHA); - bview->SetBlendingMode(B_PIXEL_ALPHA, B_ALPHA_COMPOSITE); - BPoint p[4]; - p[0].Set(x1,y1); - p[1].Set(x2,y2); - p[2].Set(x3,y3); - p[3].Set(x4,y4); - - if(drawStroking) - { - bview->SetPenSize(1.01); - bview->StrokeBezier(p, yabPattern); - bview->SetPenSize(1.0); - } - else - bview->FillBezier(p, yabPattern); - bview->Sync(); - b->Unlock(); - return; - } - } - for(int i=0; iCountItems(); i++) - { - YabBitmapView *myView = (YabBitmapView*)yabcanvas->ItemAt(i); - if(!strcmp(myView->Name(), window)) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - BBitmap *b = myView->GetBitmap(); - BView *bView = myView->GetBitmapView(); - b->Lock(); - // bView->SetDrawingMode(B_OP_ALPHA); - // bView->SetBlendingMode(B_PIXEL_ALPHA, B_ALPHA_COMPOSITE); - BPoint p[4]; - p[0].Set(x1,y1); - p[1].Set(x2,y2); - p[2].Set(x3,y3); - p[3].Set(x4,y4); - - if(drawStroking) - { - bView->SetPenSize(1.01); - bView->StrokeBezier(p, yabPattern); - bView->SetPenSize(1.0); - } - else - bView->FillBezier(p, yabPattern); - bView->Sync(); - b->Unlock(); - - myView->Draw(BRect(invx1,invy1,invx2,invy2)); - w->Unlock(); - return; - } - else - ErrorGen("Unable to lock window"); - } - } - Error(window, "VIEW, BITMAP or CANVAS"); - } -} - -void YabInterface::CreateText(double x, double y, const char* id, const char* text, const char* window) -{ - YabView *myView = cast_as((BView*)viewList->GetView(window), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - double h,b; - b = be_plain_font->StringWidth(text)+1; - h = be_plain_font->Size(); - BStringView *s = new BStringView(BRect(x,y-3,x+b,y+h-3), id, text); - s->ResizeToPreferred(); - if(w->layout == -1) - s->SetResizingMode(B_FOLLOW_RIGHT|B_FOLLOW_BOTTOM); - else - s->SetResizingMode(w->layout); - s->SetFlags(B_WILL_DRAW|B_FULL_UPDATE_ON_RESIZE); - myView->AddChild(s); - w->Unlock(); - } - else - ErrorGen("Unable to lock window"); - } - else - Error(window, "VIEW"); -} - -void YabInterface::Text2(BRect frame, const char* id, const char* text, const char* window) -{ - YabView *myView = cast_as((BView*)viewList->GetView(window), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - BStringView *s = new BStringView(frame, id, text); - if(w->layout == -1) - s->SetResizingMode(B_FOLLOW_RIGHT|B_FOLLOW_BOTTOM); - else - s->SetResizingMode(w->layout); - s->SetFlags(B_WILL_DRAW|B_FULL_UPDATE_ON_RESIZE); - myView->AddChild(s); - w->Unlock(); - } - else - ErrorGen("Unable to lock window"); - } - else - Error(window, "VIEW"); -} - -void YabInterface::TextAlign(const char* txt, const char* option) -{ - BString tmp(option); - alignment align; - if(tmp.IFindFirst("align-left")!=B_ERROR) - align = B_ALIGN_LEFT; - else if(tmp.IFindFirst("align-center")!=B_ERROR) - align = B_ALIGN_CENTER; - else if(tmp.IFindFirst("align-right")!=B_ERROR) - align = B_ALIGN_RIGHT; - else - ErrorGen("Unknown option"); - - YabView *myView = NULL; - BStringView *myStringView = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - myStringView = cast_as(myView->FindView(txt), BStringView); - if(myStringView) - { - myStringView->SetAlignment(align); - w->Unlock(); - return; - } - w->Unlock(); - } - } - } - Error(txt, "TEXT"); -} - -void YabInterface::Slider(BRect frame, const char* id, const char* title, int min, int max, const char* view) -{ - YabView *myView = cast_as((BView*)viewList->GetView(view), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - BSlider *mySlider = new BSlider(frame, id, title, new BMessage(YABSLIDER), min, max); - if(w->layout == -1) - mySlider->SetResizingMode(B_FOLLOW_RIGHT|B_FOLLOW_BOTTOM); - else - mySlider->SetResizingMode(w->layout); - mySlider->SetFlags(B_WILL_DRAW|B_FULL_UPDATE_ON_RESIZE|B_NAVIGABLE); - myView->AddChild(mySlider); - w->Unlock(); - } - else - ErrorGen("Unable to lock window"); - } - else - Error(view, "VIEW"); -} - -void YabInterface::Slider(BRect frame, const char* id, const char* title, int min, int max, const char* option, const char* view) -{ - BString tmp(option); - bool thumb = true, orient = true; - if(tmp.IFindFirst("vertical")!=B_ERROR) - orient = false; - if(tmp.IFindFirst("triangle")!=B_ERROR) - thumb = false; - YabView *myView = cast_as((BView*)viewList->GetView(view), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - BSlider *mySlider = new BSlider(frame, id, title, new BMessage(YABSLIDER), min, max); - if(w->layout == -1) - mySlider->SetResizingMode(B_FOLLOW_RIGHT|B_FOLLOW_BOTTOM); - else - mySlider->SetResizingMode(w->layout); - mySlider->SetFlags(B_WILL_DRAW|B_FULL_UPDATE_ON_RESIZE|B_NAVIGABLE); - if(!orient) - { - mySlider->SetOrientation(B_VERTICAL); - mySlider->SetBarThickness(10); - } - if(!thumb) mySlider->SetStyle(B_TRIANGLE_THUMB); - myView->AddChild(mySlider); - w->Unlock(); - } - else - ErrorGen("Unable to lock window"); - } - else - Error(view, "VIEW"); -} - -void YabInterface::SetSlider(const char* id, const char* label1, const char* label2) -{ - YabView *myView = NULL; - BSlider *mySlider = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - mySlider = cast_as(myView->FindView(id), BSlider); - if(mySlider) - { - mySlider->SetLimitLabels(label1, label2); - w->Unlock(); - return; - } - w->Unlock(); - } - } - } - Error(id, "SLIDER"); -} - -void YabInterface::SetSlider(const char* id, const char* bottomtop, int count) -{ - hash_mark_location location = B_HASH_MARKS_BOTH; - BString tmp(bottomtop); - if(tmp.IFindFirst("none")!=B_ERROR) - location = B_HASH_MARKS_NONE; - if(tmp.IFindFirst("left")!=B_ERROR) - location = B_HASH_MARKS_LEFT; - if(tmp.IFindFirst("right")!=B_ERROR) - location = B_HASH_MARKS_RIGHT; - if(tmp.IFindFirst("top")!=B_ERROR) - location = B_HASH_MARKS_TOP; - if(tmp.IFindFirst("bottom")!=B_ERROR) - location = B_HASH_MARKS_BOTTOM; - YabView *myView = NULL; - BSlider *mySlider = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - mySlider = cast_as(myView->FindView(id), BSlider); - if(mySlider) - { - mySlider->SetHashMarks(location); - mySlider->SetHashMarkCount(count); - w->Unlock(); - return; - } - w->Unlock(); - } - } - } - Error(id, "SLIDER"); -} - -void YabInterface::SetSlider(const char* id, const char* part, int r, int g, int b) -{ - bool barcolor = true; - BString tmp(part); - if(tmp.IFindFirst("fillcolor")) - barcolor = false; - - YabView *myView = NULL; - BSlider *mySlider = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - mySlider = cast_as(myView->FindView(id), BSlider); - if(mySlider) - { - rgb_color rgb = {r,g,b,255}; - if(barcolor) - mySlider->SetBarColor(rgb); - else - mySlider->UseFillColor(true,&rgb); - w->Unlock(); - return; - } - w->Unlock(); - } - } - } - Error(id, "SLIDER"); -} - -void YabInterface::SetSlider(const char* id, int value) -{ - YabView *myView = NULL; - BSlider *mySlider = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - mySlider = cast_as(myView->FindView(id), BSlider); - if(mySlider) - { - mySlider->SetValue(value); - w->Unlock(); - return; - } - w->Unlock(); - } - } - } - Error(id, "SLIDER"); -} - -void YabInterface::SetOption(const char* id, const char* option, const char* value) -{ - bool label = false; - BString tmpOption(option); - if(tmpOption.IFindFirst("label")!=B_ERROR) - label = true; - - if(!label) - ErrorGen("Unknown option"); - - YabView *myView = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - BControl *target = cast_as(myView->FindView(id), BControl); - if(target) - { - target->SetLabel(value); - w->Unlock(); - return; - } - w->Unlock(); - } - } - } - Error(id, "CONTROL"); -} - -void YabInterface::SetOption(const char* id, const char* option, int r, int g, int b) -{ - YabView *myView = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - BView *target = myView->FindView(id); - if(target) - { - rgb_color rgb = {r,g,b,0}; - target->SetViewColor(rgb); - w->Unlock(); - return; - } - w->Unlock(); - } - } - } - Error(id, "VIEW"); -} - -void YabInterface::SetOption(const char* id, const char* option) -{ - BString tmpOption(option); - if(tmpOption.IFindFirst("auto-resize")==B_ERROR) - ErrorGen("Unknown option"); - - YabView *myView = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - BView *target = myView->FindView(id); - if(target) - { - target->ResizeToPreferred(); - w->Unlock(); - return; - } - w->Unlock(); - } - } - } - ErrorGen("View not found"); -} - -void YabInterface::SetOption(const char* id, const char* option, int value) -{ - BString tmpOption(option); - bool isFocus = false; - bool isEnabled = false; - bool isVisible = false; - - if(tmpOption.IFindFirst("enabled")!=B_ERROR) - isEnabled = true; - if(tmpOption.IFindFirst("focus")!=B_ERROR) - isFocus = true; - if(tmpOption.IFindFirst("visible")!=B_ERROR) - isVisible = true; - - if(!isFocus && !isEnabled && !isVisible) - ErrorGen("Unknown option"); - - YabView *myView = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - BView *target = myView->FindView(id); - if(target) - { - if(isEnabled) - { - BControl *myControl = cast_as(target, BControl); - if(myControl) - myControl->SetEnabled(value); - else - { - BMenuField *myMenu = cast_as(target, BMenuField); - if(myMenu) - myMenu->SetEnabled(value); - else - Error(id, "CONTROL or DROPBOX"); - } - } - if(isFocus) - { - target->MakeFocus(value); - } - if(isVisible) - { - BControl *myControl = cast_as(target, BControl); - if(myControl) - { - if(value) - { - if (myControl->IsHidden()) - { - myControl->Show(); - } - } - else - { - if (!myControl->IsHidden()) - { - myControl->Hide(); - } - } - - } - - } - w->Unlock(); - return; - } - w->Unlock(); - } - } - } - ErrorGen("View not found"); -} - -void YabInterface::DropZone(const char* view) -{ - YabView *myView = cast_as((BView*)viewList->GetView(view), YabView); - if(myView) - myView->dropZone = true; - else - Error(view, "VIEW"); -} - -void YabInterface::ColorControl(double x, double y, const char* id, const char* view) -{ - YabView *myView = cast_as((BView*)viewList->GetView(view), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - BColorControl *myCControl = new BColorControl(BPoint(x,y), B_CELLS_32x8, 2, id, new BMessage(YABCOLORCONTROL),false); - if(w->layout == -1) - myCControl->SetResizingMode(B_FOLLOW_RIGHT|B_FOLLOW_BOTTOM); - else - myCControl->SetResizingMode(w->layout); - myCControl->SetFlags(B_WILL_DRAW|B_FULL_UPDATE_ON_RESIZE|B_NAVIGABLE); - myView->AddChild(myCControl); - w->Unlock(); - } - else - ErrorGen("Unable to lock window"); - } - else - Error(view, "VIEW"); -} - -void YabInterface::ColorControl(const char* id, int r, int g, int b) -{ - YabView *myView = NULL; - BColorControl *myCControl = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - myCControl = cast_as(myView->FindView(id), BColorControl); - if(myCControl) - { - rgb_color t = {r,g,b,255}; - myCControl->SetValue(t); - w->Unlock(); - return; - } - w->Unlock(); - } - } - } - Error(id, "COLORCONTROL"); -} - -void YabInterface::TextControl(const char* id, const char* text) -{ - YabView *myView = NULL; - BTextControl *myTControl = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - myTControl = cast_as(myView->FindView(id), BTextControl); - if(myTControl) - { - myTControl->SetText(text); - w->Unlock(); - return; - } - w->Unlock(); - } - } - } - Error(id, "TEXTCONTROL"); -} - -void YabInterface::TextControl(const char* id, int mode) -{ - YabView *myView = NULL; - BTextControl *myTControl = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - myTControl = cast_as(myView->FindView(id), BTextControl); - if(myTControl) - { - BTextView *myTView = myTControl->TextView(); - - switch(mode) - { - case 1: - myTView->HideTyping(true); - break; - - default: - myTView->HideTyping(false); - - break; - } - w->Unlock(); - return; - } - w->Unlock(); - } - } - } - Error(id, "TEXTCONTROL"); -} - -void YabInterface::TextControl(const char* id, const char* option, const char* value) -{ - YabView *myView = NULL; - BString tmpOption(option); - BString tmpValue(value); - BTextControl *myTControl = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - - if(w) - { - w->Lock(); - int32 x=0; - myTControl = cast_as(myView->FindView(id), BTextControl); - - if(myTControl) - { - - BTextView *myTView = myTControl->TextView(); - if(tmpOption.IFindFirst("focus")!=B_ERROR) - { - if(tmpValue.IFindFirst("true")!=B_ERROR) - { - bool focused = true; - int32 ofset=0; - myTControl -> MakeFocus(focused); - myTView-> Select(ofset,ofset); - } - if(tmpValue.IFindFirst("false")!=B_ERROR) - { - bool focused = false; - myTControl -> MakeFocus(focused); - } - } - if(tmpOption.IFindFirst("Curser")!=B_ERROR || tmpOption.IFindFirst("Cursor")!=B_ERROR ) - { - const char* str_int = tmpValue.String(); - bool focused = true; - int32 ofset=0; - ofset= atoi(str_int); - myTControl -> MakeFocus(focused); - myTView-> Select(ofset,ofset); - } - if(tmpOption.IFindFirst("type")!=B_ERROR) - { - if(tmpValue.IFindFirst("number")!=B_ERROR) - { - - //Changing from for to String Method because it was possible to enter äöü and so on - //20.02.2019 Lorent Glaser - /*for (x=0;x<48; x++) - { - myTView->DisallowChar(x); - } - for (x=58;x<128; x++) - { - myTView->DisallowChar(x); - } - x=46; - myTView-> AllowChar(x);*/ - BString string("QWERTYUIOP[]\\ASDFGHJKL;'ZXCVBNM,/qwertyuiop{}| " - "asdfghjkl:\"zxcvbnm<>?!@#$%^&*()-_=+`´°~\röäüÖÄÜß"); - for(int32 i=0; iDisallowChar(c); - } - } - - if(tmpValue.IFindFirst("alphanumeric")!=B_ERROR) - { - for (x=0;x<128; x++) - { - myTView->AllowChar(x); - } - - } - - } - if(tmpOption.IFindFirst("align")!=B_ERROR) - { - if(tmpValue.IFindFirst("right")!=B_ERROR) - { - myTControl->SetAlignment(B_ALIGN_LEFT,B_ALIGN_RIGHT); - } - if(tmpValue.IFindFirst("center")!=B_ERROR) - { - myTControl->SetAlignment(B_ALIGN_LEFT,B_ALIGN_CENTER); - } - if(tmpValue.IFindFirst("left")!=B_ERROR) - { - myTControl->SetAlignment(B_ALIGN_LEFT,B_ALIGN_LEFT); - } - } - if(tmpOption.IFindFirst("length")!=B_ERROR) - { - const char* str_int = tmpValue.String(); - int i = atoi(str_int); - if (i>0) - { - myTView->SetMaxBytes(i); - myTView->SetFontAndColor(be_fixed_font); - } - if (i=0) - { - ErrorGen("Bad length"); - } - } - - if(tmpOption.IFindFirst("exclude")!=B_ERROR) - { - int i; - for (i=0; i<= tmpValue.CountChars();i++) - { - x=tmpValue.ByteAt(i); - myTView->DisallowChar(x); - } - } - if(tmpOption.IFindFirst("include")!=B_ERROR) - { - int i; - for (i=0; i<= tmpValue.CountChars();i++) - { - x=tmpValue.ByteAt(i); - myTView->AllowChar(x); - } - } - } - w->Unlock(); - return; - } - w->Unlock(); - } - } -Error(id, "TEXTCONTROL"); -} - -void YabInterface::TextControl(const char* id) -{ - YabView *myView = NULL; - BTextControl *myTControl = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - myTControl = cast_as(myView->FindView(id), BTextControl); - if(myTControl) - { - myTControl->SetText(""); - w->Unlock(); - return; - } - w->Unlock(); - } - } - } - Error(id, "TEXTCONTROL"); -} - - -void YabInterface::CreateAlert(const char* text, const char* button1, const char* option) -{ - alert_type tmp; - BString typ(option); - tmp = B_EMPTY_ALERT; - if(typ.IFindFirst("info")!=B_ERROR) tmp = B_INFO_ALERT; - else if(typ.IFindFirst("idea")!=B_ERROR) tmp = B_IDEA_ALERT; - else if(typ.IFindFirst("warning")!=B_ERROR) tmp = B_WARNING_ALERT; - else if(typ.IFindFirst("stop")!=B_ERROR) tmp = B_STOP_ALERT; - - (new BAlert("Alert!",text,button1,NULL,NULL,B_WIDTH_AS_USUAL,tmp))->Go(); -} - -const char* YabInterface::LoadFilePanel(const char *mode, const char* title, const char* directory) -{ - int myMode = -1; - BString opt(mode); - if(opt.IFindFirst("Load-File")!=B_ERROR) - myMode = 0; - if(opt.IFindFirst("Save-File")!=B_ERROR) - myMode = 1; - if(opt.IFindFirst("Load-Directory")!=B_ERROR) - myMode = 2; - if(opt.IFindFirst("Load-File-and-Directory")!=B_ERROR) - myMode = 3; - if(myMode == -1) ErrorGen("Invalid Option"); - - YabFilePanel tmp; - BPath path; - BString myTitle(title); - BEntry *entry = tmp.MyFilePanel(myTitle.String(),directory, "", myMode); - entry->GetPath(&path); - if(myMode != 1 && !entry->Exists()) - loadPanel[0] = '\0'; - else - { - if(path.InitCheck() == B_OK) - strcpy(loadPanel,path.Path()); - else - loadPanel[0] = '\0'; - } - - delete entry; - - return (const char*)loadPanel; -} - -const char* YabInterface::SaveFilePanel(const char *mode, const char* title, const char* directory, const char* filename) -{ - int myMode = -1; - BString opt(mode); - if(opt.IFindFirst("Load-File")!=B_ERROR) - myMode = 0; - if(opt.IFindFirst("Save-File")!=B_ERROR) - myMode = 1; - if(opt.IFindFirst("Load-Directory")!=B_ERROR) - myMode = 2; - if(opt.IFindFirst("Load-File-and-Directory")!=B_ERROR) - myMode = 3; - if(myMode == -1) ErrorGen("Invalid Option"); - - YabFilePanel tmp; - BPath path; - BString myTitle(title); - BEntry *entry = tmp.MyFilePanel(myTitle.String(),directory, filename, myMode); - entry->GetPath(&path); - if(myMode != 1 && !entry->Exists()) - loadPanel[0] = '\0'; - else - { - if(path.InitCheck() == B_OK) - strcpy(loadPanel,path.Path()); - else - loadPanel[0] = '\0'; - } - delete entry; - - return (const char*)loadPanel; -} - -void YabInterface::SetLayout(const char* layout, const char* window) -{ - BString tmp(layout); - YabView *myView = cast_as((BView*)viewList->GetView(window), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - if(tmp.IFindFirst("standard")!=B_ERROR) - w->layout = -1; - else if(tmp.IFindFirst("all")!=B_ERROR) - w->layout = B_FOLLOW_ALL; - else if(tmp.IFindFirst("none")!=B_ERROR) - w->layout = B_FOLLOW_NONE; - else - { - uint32 horizontal, vertical; - if(tmp.IFindFirst("h-center")!=B_ERROR) - horizontal = B_FOLLOW_H_CENTER; - else if((tmp.IFindFirst("left")!=B_ERROR)&&(tmp.IFindFirst("right")!=B_ERROR)) - horizontal = B_FOLLOW_LEFT_RIGHT; - else if(tmp.IFindFirst("right")!=B_ERROR) - horizontal = B_FOLLOW_RIGHT; - else - horizontal = B_FOLLOW_LEFT; - - if(tmp.IFindFirst("v-center")!=B_ERROR) - vertical = B_FOLLOW_V_CENTER; - else if((tmp.IFindFirst("top")!=B_ERROR)&&(tmp.IFindFirst("bottom")!=B_ERROR)) - vertical = B_FOLLOW_TOP_BOTTOM; - else if(tmp.IFindFirst("bottom")!=B_ERROR) - vertical = B_FOLLOW_BOTTOM; - else - vertical = B_FOLLOW_TOP; - w->layout = horizontal|vertical; - } - } - else - ErrorGen("Unable to lock window"); - } - else - Error(window, "VIEW"); -} - -void YabInterface::WindowSet(const char* option, const char* value, const char* window) -{ - BString tmp(option); - BString val(value); - uint32 flags = 0; - - YabView *myView = cast_as((BView*)viewList->GetView(window), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - if(tmp.IFindFirst("Flags")!=B_ERROR) - { - if(val.IFindFirst("Reset")!=B_ERROR) - { - w->SetFlags(0); - w->SetFlags(B_ASYNCHRONOUS_CONTROLS); - } - else - { - flags = w->Flags(); - if(val.IFindFirst("Not-Movable")!=B_ERROR) - flags = flags|B_NOT_MOVABLE; - if(val.IFindFirst("Not-Closable")!=B_ERROR) - flags = flags|B_NOT_CLOSABLE; - if(val.IFindFirst("Not-Zoomable")!=B_ERROR) - flags = flags|B_NOT_ZOOMABLE; - if(val.IFindFirst("Not-Minimizable")!=B_ERROR) - flags = flags|B_NOT_MINIMIZABLE; - if(val.IFindFirst("Not-Resizable")!=B_ERROR) - flags = flags|B_NOT_RESIZABLE; - if(val.IFindFirst("Not-H-Resizable")!=B_ERROR) - flags = flags|B_NOT_H_RESIZABLE; - if(val.IFindFirst("Not-V-Resizable")!=B_ERROR) - flags = flags|B_NOT_V_RESIZABLE; - if(val.IFindFirst("Accept-First-Click")!=B_ERROR) - flags = flags|B_WILL_ACCEPT_FIRST_CLICK; - if(val.IFindFirst("No-Workspace-Activation")!=B_ERROR) - flags = flags|B_NO_WORKSPACE_ACTIVATION; - w->SetFlags(flags|B_ASYNCHRONOUS_CONTROLS); - } - } - else if(tmp.IFindFirst("Look")!=B_ERROR) - { - if(val.IFindFirst("Document")!=B_ERROR) - w->SetLook(B_DOCUMENT_WINDOW_LOOK); - else if(val.IFindFirst("Titled")!=B_ERROR) - w->SetLook(B_TITLED_WINDOW_LOOK); - else if(val.IFindFirst("Floating")!=B_ERROR) - w->SetLook(B_FLOATING_WINDOW_LOOK); - else if(val.IFindFirst("Modal")!=B_ERROR) - w->SetLook(B_MODAL_WINDOW_LOOK); - else if(val.IFindFirst("Bordered")!=B_ERROR) - w->SetLook(B_BORDERED_WINDOW_LOOK); - else if(val.IFindFirst("No-Border")!=B_ERROR) - w->SetLook(B_NO_BORDER_WINDOW_LOOK); - else - ErrorGen("Unknown option"); - } - else if(tmp.IFindFirst("Feel")!=B_ERROR) - { - if(val.IFindFirst("Normal")!=B_ERROR) - w->SetFeel(B_NORMAL_WINDOW_FEEL); - else if(val.IFindFirst("Modal-App")!=B_ERROR) - w->SetFeel(B_MODAL_APP_WINDOW_FEEL); - else if(val.IFindFirst("Modal-All")!=B_ERROR) - w->SetFeel(B_MODAL_ALL_WINDOW_FEEL); - else if(val.IFindFirst("Floating-App")!=B_ERROR) - w->SetFeel(B_FLOATING_APP_WINDOW_FEEL); - else if(val.IFindFirst("Floating-All")!=B_ERROR) - w->SetFeel(B_FLOATING_ALL_WINDOW_FEEL); - else - ErrorGen("Unknown option"); - } - else if(tmp.IFindFirst("Workspace")!=B_ERROR) - { - if(val.IFindFirst("Current")!=B_ERROR) - w->SetWorkspaces(B_CURRENT_WORKSPACE); - else if(val.IFindFirst("All")!=B_ERROR) - w->SetWorkspaces(B_ALL_WORKSPACES); - else if(atoi(val.String()) >= 1) - { - int bit = 1 << atoi(val.String()) - 1; - w->SetWorkspaces(bit); - } - else - ErrorGen("Unknown option"); - } - else if(tmp.IFindFirst("Title")!=B_ERROR) - { - w->SetTitle(value); - } - else - ErrorGen("Unknown option"); - // w->UpdateIfNeeded(); - } - else - ErrorGen("Unable to lock window"); - } - else - Error(window, "VIEW"); -} - -void YabInterface::WindowSet(const char* option, const char* window) -{ - BString tmp(option); - uint32 flags = 0; - - YabView *myView = cast_as((BView*)viewList->GetView(window), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - if(tmp.IFindFirst("maximize")!=B_ERROR) - w->Zoom(); - else if(tmp.IFindFirst("minimize")!=B_ERROR) - w->Minimize(!w->IsMinimized()); - else if(tmp.IFindFirst("deactivate")!=B_ERROR) - w->Activate(false); - else if(tmp.IFindFirst("activate")!=B_ERROR) - w->Activate(true); - else if(tmp.IFindFirst("disable-updates")!=B_ERROR) - w->DisableUpdates(); - else if(tmp.IFindFirst("enable-updates")!=B_ERROR) - w->EnableUpdates(); - else - ErrorGen("Unknown option"); - } - else - ErrorGen("Unable to lock window"); - } - else - Error(window, "VIEW"); -} - -void YabInterface::WindowSet(const char* option, int r, int g, int b, const char* window) -{ - BString tmp(option); - if(r>255) r=255; if(r<0) r=0; - if(g>255) g=255; if(g<0) g=0; - if(b>255) b=255; if(b<0) b=0; - - YabView *myView = cast_as((BView*)viewList->GetView(window), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - if(tmp.IFindFirst("BGColor")!=B_ERROR) - { - myView->SetViewColor(r,g,b,yabAlpha); - myView->Invalidate(); - } - else if(tmp.IFindFirst("HighColor")!=B_ERROR) - { - if(yabAlpha == 255) - myView->SetDrawingMode(B_OP_COPY); - else - myView->SetDrawingMode(B_OP_ALPHA); - myView->SetHighColor(r,g,b,yabAlpha); - YabDrawing *t = new YabDrawing(); - t->command = 6; - t->r = r; t->g = g; - t->b = b; t->alpha = yabAlpha; - myView->drawList->AddItem(t); - } - else if(tmp.IFindFirst("LowColor")!=B_ERROR) - { - if(yabAlpha == 255) - myView->SetDrawingMode(B_OP_COPY); - else - myView->SetDrawingMode(B_OP_ALPHA); - myView->SetLowColor(r,g,b,yabAlpha); - YabDrawing *t = new YabDrawing(); - t->command = 7; - t->r = r; t->g = g; - t->b = b; t->alpha = yabAlpha; - myView->drawList->AddItem(t); - } - else - ErrorGen("Unknown option"); - w->Unlock(); - } - else - ErrorGen("Unable to lock window"); - } - else - { - for(int i=0; iCountItems(); i++) - { - BBitmap *bmp = (BBitmap*)yabbitmaps->ItemAt(i); - BView *bView = bmp->FindView(window); - if(bView) - { - if(tmp.IFindFirst("HighColor")!=B_ERROR) - { - bmp->Lock(); - if(yabAlpha == 255) - bView->SetDrawingMode(B_OP_COPY); - else - bView->SetDrawingMode(B_OP_ALPHA); - bView->SetHighColor(r,g,b,yabAlpha); - bView->Sync(); - bmp->Unlock(); - return; - } - else if(tmp.IFindFirst("LowColor")!=B_ERROR) - { - bmp->Lock(); - if(yabAlpha == 255) - bView->SetDrawingMode(B_OP_COPY); - else - bView->SetDrawingMode(B_OP_ALPHA); - bView->SetLowColor(r,g,b,yabAlpha); - bView->Sync(); - bmp->Unlock(); - return; - } - else - ErrorGen("Unknown option"); - } - } - for(int i=0; iCountItems(); i++) - { - YabBitmapView *myView = (YabBitmapView*)yabcanvas->ItemAt(i); - if(!strcmp(myView->Name(), window)) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - BBitmap *bmp = myView->GetBitmap(); - BView *bView = myView->GetBitmapView(); - if(tmp.IFindFirst("HighColor")!=B_ERROR) - { - bmp->Lock(); - if(yabAlpha == 255) - bView->SetDrawingMode(B_OP_COPY); - else - bView->SetDrawingMode(B_OP_ALPHA); - bView->SetHighColor(r,g,b,yabAlpha); - bView->Sync(); - bmp->Unlock(); - w->Unlock(); - return; - } - else if(tmp.IFindFirst("LowColor")!=B_ERROR) - { - bmp->Lock(); - if(yabAlpha == 255) - bView->SetDrawingMode(B_OP_COPY); - else - bView->SetDrawingMode(B_OP_ALPHA); - bView->SetLowColor(r,g,b,yabAlpha); - bView->Sync(); - bmp->Unlock(); - w->Unlock(); - return; - } - else - ErrorGen("Unknown option"); - } - else - ErrorGen("Unable to lock window"); - } - } - Error(window, "VIEW, BITMAP or CANVAS"); - } -} - -void YabInterface::WindowSet(const char* option, double x, double y, const char* window) -{ - BString tmp(option); - YabView *myView = cast_as((BView*)viewList->GetView(window), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - if(tmp.IFindFirst("ResizeTo")!=B_ERROR) - w->ResizeTo(x,y); - else if(tmp.IFindFirst("MoveTo")!=B_ERROR) - w->MoveTo(x,y); - else if(tmp.IFindFirst("MinimumTo")!=B_ERROR) - { - float x1, x2, y1, y2; - w->GetSizeLimits(&x1,&x2,&y1,&y2); - w->SetSizeLimits((float)x,x2,(float)y,y2); - } - else if(tmp.IFindFirst("MaximumTo")!=B_ERROR) - { - float x1, x2, y1, y2; - w->GetSizeLimits(&x1,&x2,&y1,&y2); - w->SetSizeLimits(x1,(float)x,y1,(float)y); - } - else - ErrorGen("Unknown option"); - w->Unlock(); - // w->UpdateIfNeeded(); - } - else - ErrorGen("Unable to lock window"); - } - else - Error(window, "VIEW"); -} - -void YabInterface::WindowClear(const char* window) -{ - bool delMenuBar; - YabView *myView = cast_as((BView*)viewList->GetView(window), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w && myView->Parent()) - { - w->Lock(); - BView *child, *oldchild; - if(child = myView->ChildAt(0)) - { - while(child) - { - CleanupYabTabView(child); - if(is_kind_of(child, YabBitmapView)) - yabcanvas->RemoveItem(child); - CleanupSubchildView(child->ChildAt(0)); - if(viewList->GetView(child->Name())) - { - RemoveView(child); - viewList->DelView(child->Name()); - } - - - oldchild = child; - child = child->NextSibling(); - - if(is_kind_of(oldchild, YabView)) - DrawClear(oldchild->Name(), true); - if(is_kind_of(oldchild, BMenuBar)) - { - oldchild->Hide(); - } - oldchild->RemoveSelf(); - delete oldchild; - } - } - if(is_kind_of(myView, YabView)) - DrawClear(myView->Name(), true); - if(is_kind_of(myView, BMenuBar)) - myView->Hide(); - BBox *box = cast_as(myView->Parent(), BBox); - myView->RemoveSelf(); - delete myView; - viewList->DelView(window); - if(box) - { - box->RemoveSelf(); - delete box; - } - w->Unlock(); - } - else - ErrorGen("Unable to lock window"); - } - else - Error(window, "VIEW"); -} - -void YabInterface::RemoveView(BView *myView) -{ - BView *child, *oldchild; - if(child = myView->ChildAt(0)) - while(child) - { - CleanupYabTabView(child); - if(is_kind_of(child, YabBitmapView)) - yabcanvas->RemoveItem(child); - CleanupSubchildView(child->ChildAt(0)); - if(viewList->GetView(child->Name())) - { - RemoveView(child); - viewList->DelView(child->Name()); - } - oldchild = child; - child = child->NextSibling(); - - if(is_kind_of(oldchild, YabView)) - DrawClear(oldchild->Name(), true); - if(is_kind_of(oldchild, BMenuBar)) - oldchild->Hide(); - if(is_kind_of(oldchild, BMenuBar)) - { - BMenuBar *b = cast_as(oldchild, BMenuBar); - for(int i=0; iCountItems(); i++) - { - YabMenu *m = (YabMenu*)b->SubmenuAt(i); - if(m) - { - // check for subsubmenus - for(int j=0; jCountItems(); j++) - { - YabMenu *n = (YabMenu*)m->SubmenuAt(j); - if(n) n->MyHide(); - } - m->MyHide(); - // printf("hiden\n"); - } - } - b->Hide(); - } - oldchild->RemoveSelf(); - delete oldchild; - } -} - -void YabInterface::CleanupYabTabView(BView* view) -{ - if(view == NULL || viewList == NULL) return; - - if(is_kind_of(view, YabTabView)) { - YabTabView* tabView = static_cast(view); - for(int i = 0; i < tabView->CountTabs(); i++) - { - YabView *t = static_cast(tabView->TabAt(i)->View()); - RemoveView(t); - viewList->DelView(t->NameForTabView()); - } - } -} - -void YabInterface::CleanupSubchildView(BView* view) -{ - if(view == NULL || viewList == NULL) return; - - while(view) - { - CleanupYabTabView(view); - if(viewList->GetView(view->Name())) - { - RemoveView(view); - viewList->DelView(view->Name()); - } - view = view->NextSibling(); - } -} - -void YabInterface::TextEdit(BRect frame, const char* title, int scrollbar, const char* window) -{ - YabView *myView = cast_as((BView*)viewList->GetView(window), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - uint32 resizeMode; - BRect textframe; - - w->Lock(); - - if(scrollbar == 3 || scrollbar == 1) frame.right -= B_V_SCROLL_BAR_WIDTH; - if(scrollbar>2) frame.bottom -= B_H_SCROLL_BAR_HEIGHT; - - textframe = frame; - textframe.OffsetTo(B_ORIGIN); - textframe.right -=2; - textframe.bottom -=2; - textframe.top +=2; - textframe.left +=2; - - if(w->layout == -1) - resizeMode = B_FOLLOW_ALL; - else - resizeMode = w->layout; - - // BTextView *txtView = new BTextView(frame, title, textframe, B_FOLLOW_ALL_SIDES, B_WILL_DRAW|B_PULSE_NEEDED|B_NAVIGABLE); - YabText *txtView = new YabText(frame, title, textframe, B_FOLLOW_ALL_SIDES, B_WILL_DRAW|B_PULSE_NEEDED|B_NAVIGABLE); - txtView->SetWordWrap(true); - // txtView->SetFontAndColor(be_fixed_font); - - switch(scrollbar) - { - case 3: // both - myView->AddChild(new BScrollView("scroll_list", txtView, resizeMode, B_WILL_DRAW|B_FULL_UPDATE_ON_RESIZE, true, true)); - break; - case 2: // horizontal - myView->AddChild(new BScrollView("scroll_list", txtView, resizeMode, B_WILL_DRAW|B_FULL_UPDATE_ON_RESIZE, true, false)); - break; - case 0: // none - myView->AddChild(txtView); - break; - default: // vertical is default - myView->AddChild(new BScrollView("scroll_list", txtView, resizeMode, B_WILL_DRAW|B_FULL_UPDATE_ON_RESIZE, false, true)); - break; - } - w->Unlock(); - } - else - ErrorGen("Unable to lock window"); - } - else - Error(window, "VIEW"); -} - -void YabInterface::TextAdd(const char* title, const char* text) -{ - YabView *myView = NULL; - YabText *myText = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(),YabWindow); - if(w) - { - w->Lock(); - myText = cast_as(myView->FindView(title),YabText); - if(myText) - { - myText->Insert(text); - w->Unlock(); - return; - } - w->Unlock(); - } - } - } - Error(title, "TEXTEDIT"); -} - -void YabInterface::TextSet(const char* title, const char* option) -{ - BString tmp(option); - YabView *myView = NULL; - YabText *myText = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(),YabWindow); - if(w) - { - w->Lock(); - myText = cast_as(myView->FindView(title),YabText); - if(myText) - { - if(tmp.IFindFirst("Cut")!=B_ERROR) - myText->Cut(be_clipboard); - else if(tmp.IFindFirst("Copy")!=B_ERROR) - { - int32 a,b; - myText->GetSelection(&a, &b); - if(a != b) - myText->Copy(be_clipboard); - } - else if(tmp.IFindFirst("Paste")!=B_ERROR) - myText->Paste(be_clipboard); - else if(tmp.IFindFirst("Clear")!=B_ERROR) - myText->Clear(); - else if(tmp.IFindFirst("Select-All")!=B_ERROR) - myText->SelectAll(); - else if(tmp.IFindFirst("Undo")!=B_ERROR) - myText->Undo(be_clipboard); - else if(tmp.IFindFirst("Redo")!=B_ERROR) - // myText->Redo(be_clipboard); - ; - else - ErrorGen("Unknown option"); - w->Unlock(); - return; - } - w->Unlock(); - } - } - } - Error(title, "TEXTEDIT"); -} - -void YabInterface::TextSet(const char* title, const char* option, const char* value) -{ - YabView *myView = NULL; - YabText *myText = NULL; - BString tmp(option); - BString tmp2(value); - - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(),YabWindow); - if(w) - { - w->Lock(); - myText = cast_as(myView->FindView(title),YabText); - if(myText) - { - - - - - - if(tmp.IFindFirst("align")!=B_ERROR) - { - if(tmp2.IFindFirst("left")!=B_ERROR) - myText->SetAlignment(B_ALIGN_LEFT); - else if(tmp2.IFindFirst("center")!=B_ERROR) - myText->SetAlignment(B_ALIGN_CENTER); - else if(tmp2.IFindFirst("right")!=B_ERROR) - myText->SetAlignment(B_ALIGN_RIGHT); - } - else if(tmp.IFindFirst("fixed")!=B_ERROR) - { - const char* str_int = tmp2.String(); - int i = atoi(str_int); - if (i>6) - { - BFont myFont=(be_fixed_font); - int myFontSize = i; - myFont.SetSize(myFontSize); - int TL = myText->TextLength(); - const rgb_color Textcolor = {0,0,0,255}; - myText->SetFontAndColor(0,TL,&myFont,B_FONT_ALL,&Textcolor); - } - - } - else if(tmp.IFindFirst("plain")!=B_ERROR) - { - const char* str_int = tmp2.String(); - int i = atoi(str_int); - if (i>6) - { - BFont myFont=(be_plain_font); - int myFontSize = i; - myFont.SetSize(myFontSize); - int TL = myText->TextLength(); - const rgb_color Textcolor = {0,0,0,255}; - myText->SetFontAndColor(0,TL,&myFont,B_FONT_ALL,&Textcolor); - } - - } - else if(tmp.IFindFirst("bold")!=B_ERROR) - { - const char* str_int = tmp2.String(); - int i = atoi(str_int); - if (i>6) - { - BFont myFont=(be_bold_font); - int myFontSize = i; - myFont.SetSize(myFontSize); - int TL = myText->TextLength(); - const rgb_color Textcolor = {0,0,0,255}; - myText->SetFontAndColor(0,TL,&myFont,B_FONT_ALL,&Textcolor); - } - - } - else if(tmp.IFindFirst("autocomplete")!=B_ERROR) - myText->AddWord(new BString(value)); - else if(tmp.IFindFirst("font")!=B_ERROR) - { - BFont myFont; - BString opt; - - // Font family - int pos1 = 0; - int pos2 = tmp2.FindFirst(','); - if(pos2 != B_ERROR) - { - tmp2.CopyInto(opt, pos1, pos2-pos1); - while(opt[0] == ' ') opt.RemoveFirst(" "); - while(opt[opt.Length()-1] == ' ') opt.RemoveLast(" "); - font_family fam; - sprintf((char*)fam, "%s" , opt.String()); - if(myFont.SetFamilyAndFace(fam, B_REGULAR_FACE) == B_OK) - { - myView->SetFont(&myFont, B_FONT_FAMILY_AND_STYLE); - // Font style - pos1 = pos2+1; - pos2 = tmp2.FindFirst(',', pos2+1); - if(pos2 != B_ERROR) - { - tmp2.CopyInto(opt, pos1, pos2-pos1); - while(opt[0] == ' ') opt.RemoveFirst(" "); - while(opt[opt.Length()-1] == ' ') opt.RemoveLast(" "); - font_style style; - sprintf((char*)style, "%s" , opt.String()); - if(myFont.SetFamilyAndStyle(fam,style) == B_OK) - { - // Font size - pos1 = pos2+1; - pos2 = tmp2.FindFirst(',', pos2+1); - if(pos2 == B_ERROR) pos2 = tmp2.Length(); - tmp2.CopyInto(opt, pos1, pos2-pos1); - while(opt[0] == ' ') opt.RemoveFirst(" "); - while(opt[opt.Length()-1] == ' ') opt.RemoveLast(" "); - double size = atof(opt.String()); - myFont.SetSize(size); - } - } - } - } - else if(tmp2.IFindFirst("system-plain")!=B_ERROR) - myFont = be_plain_font; - else if(tmp2.IFindFirst("system-fixed")!=B_ERROR) - myFont = be_fixed_font; - else if(tmp2.IFindFirst("system-bold")!=B_ERROR) - myFont = be_bold_font; - - else - ErrorGen("Unknown option"); - int32 start,finish; - myText->GetSelection(&start, &finish); - myText->SelectAll(); - myText->SetFontAndColor(&myFont); - myText->Select(start,finish); - } - else if (tmp.IFindFirst("focus")!=B_ERROR) - { - if (tmp2.IFindFirst("true")!=B_ERROR) - { - bool focused = true; - myText->MakeFocus(focused); - } - else - { - bool focused = false; - myText->MakeFocus(focused); - } - } - else - - ErrorGen("Unknown option"); - w->Unlock(); - return; - } - w->Unlock(); - } - } - } - Error(title, "TEXTEDIT"); -} - -void YabInterface::TextSet(const char* title, const char* option, int value) -{ - YabView *myView = NULL; - YabText *myText = NULL; - BString tmp(option); - - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(),YabWindow); - if(w) - { - w->Lock(); - myText = cast_as(myView->FindView(title),YabText); - if(myText) - { - if(tmp.IFindFirst("autocomplete-start")!=B_ERROR) - myText->SetAutoCompleteStart(value-1); - else if(tmp.IFindFirst("has-autocompletion")!=B_ERROR) - myText->HasAutoCompletion((bool)value); - else if(tmp.IFindFirst("autoindent")!=B_ERROR) - myText->SetAutoindent((bool)value); - else if(tmp.IFindFirst("wordwrap")!=B_ERROR) - myText->SetWordWrap((bool)value); - else if(tmp.IFindFirst("editable")!=B_ERROR) - myText->MakeEditable((bool)value); - else if(tmp.IFindFirst("color-case-sensitive")!=B_ERROR) - myText->SetCaseSensitive((bool)value); - else if(tmp.IFindFirst("tabwidth")!=B_ERROR) - myText->SetTabWidth(value); - else if(tmp.IFindFirst("cursor")!=B_ERROR) - myText->Select(value, value); - else if(tmp.IFindFirst("textwidth")!=B_ERROR) - - { - // BRect txtframe = myText->TextRect(); - // txtframe.right = txtframe.left + value; - // myText->SetTextRect(txtframe); - myText->SetTextRect(BRect(0,0, value,1)); - // BRect txtbounds = myText->Bounds(); - // myText->FrameResized(txtbounds.Width(), txtbounds.Height()); - BRect bounds(myText->Bounds()); - BScrollBar* horizontalScrollBar = myText->ScrollBar(B_HORIZONTAL); - - // do we have a horizontal scroll bar? - if (horizontalScrollBar != NULL) { - long viewWidth = bounds.IntegerWidth(); - long dataWidth = (long)value; - - long maxRange = dataWidth - viewWidth; - maxRange = max_c(maxRange, 0); - - horizontalScrollBar->SetRange(0, 1000); //(float)maxRange); - // horizontalScrollBar->SetProportion((float)viewWidth / (float)dataWidth); - // horizontalScrollBar->SetSteps(10.0, dataWidth / 10); - // std::cout << "dataWidth: " << dataWidth << " maxrange: " << maxRange << std::endl; - } - - } - else if(tmp.IFindFirst("gotoline")!=B_ERROR) - { - if(value<1) value = 1; - myText->GoToLine(value-1); - myText->ScrollToSelection(); - } - else if(tmp.IFindFirst("select")!=B_ERROR) - { - int start, num; - if(value <= 0) - myText->Select(0,0); - else - { - if(value-1 == 0) - start = 0; - else - start = myText->OffsetAt(value-1); - if(myText->CountLines()>value) - num = myText->OffsetAt(value)-start-1; - else - num = myText->OffsetAt(value)-start; - // num = myText->TextLength()-start; - myText->Select(start,start+num); - myText->ScrollToSelection(); - } - } - else if(tmp.IFindFirst("changed")!=B_ERROR) - myText->SetChanged((bool)value); - else - ErrorGen("Unknown option"); - w->Unlock(); - return; - } - w->Unlock(); - } - } - } - Error(title, "TEXTEDIT"); -} - -void YabInterface::TextColor(const char* title, const char* option, const char* command) -{ - YabView *myView = NULL; - YabText *myText = NULL; - BString tmp(option); - - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(),YabWindow); - if(w) - { - w->Lock(); - myText = cast_as(myView->FindView(title),YabText); - if(myText) - { - if(tmp.IFindFirst("Color1")!=B_ERROR) - myText->AddCommand(command,0); - else if(tmp.IFindFirst("Color2")!=B_ERROR) - myText->AddCommand(command,1); - else if(tmp.IFindFirst("Color3")!=B_ERROR) - myText->AddCommand(command,2); - else if(tmp.IFindFirst("Color4")!=B_ERROR) - myText->AddCommand(command,3); - else if(tmp.IFindFirst("char-color")!=B_ERROR) - myText->AddCommand(command,4); - else - ErrorGen("Unknown option"); - w->Unlock(); - return; - } - w->Unlock(); - } - } - } - Error(title, "TEXTEDIT"); -} - -void YabInterface::TextColor(const char* title, const char* option, int r, int g, int b) -{ - YabView *myView = NULL; - YabText *myText = NULL; - BString tmp(option); - - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(),YabWindow); - if(w) - { - w->Lock(); - myText = cast_as(myView->FindView(title),YabText); - if(myText) - { - if(tmp.IFindFirst("color1")!=B_ERROR) - myText->SetColors(0,r,g,b); - else if(tmp.IFindFirst("color2")!=B_ERROR) - myText->SetColors(1,r,g,b); - else if(tmp.IFindFirst("color3")!=B_ERROR) - myText->SetColors(2,r,g,b); - else if(tmp.IFindFirst("color4")!=B_ERROR) - myText->SetColors(3,r,g,b); - else if(tmp.IFindFirst("char-color")!=B_ERROR) - myText->SetColors(4,r,g,b); - else if(tmp.IFindFirst("bgcolor")!=B_ERROR) - myText->SetColors(5,r,g,b); - else if(tmp.IFindFirst("textcolor")!=B_ERROR) - myText->SetColors(6,r,g,b); - else - ErrorGen("Unknown option"); - w->Unlock(); - return; - } - w->Unlock(); - } - } - } - Error(title, "TEXTEDIT"); -} - -int YabInterface::TextGet(const char* title, const char* option, const char* option2) -{ - int ret = -1; - YabView *myView = NULL; - YabText *myText = NULL; - BString tmp(option); - - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(),YabWindow); - if(w) - { - w->Lock(); - myText = cast_as(myView->FindView(title),YabText); - if(myText) - { - if(tmp.IFindFirst("case-sensitive-find")!=B_ERROR) - { - int32 startOffset, endOffset; - myText->GetSelection(&startOffset, &endOffset); - bool isFinished = false; - int foundOffset, l = myText->TextLength() - endOffset; - char* s; - s = new char[l+1]; - myText->GetText(endOffset, l, s); - BString line(s); - foundOffset = line.FindFirst(option2); - if(foundOffset == B_ERROR) - { - delete s; - s = new char[endOffset]; - myText->GetText(0, endOffset-1, s); - line = s; - foundOffset = line.FindFirst(option2); - } - else - foundOffset += endOffset; - if(foundOffset != B_ERROR) - { - delete s; - myText->Select(foundOffset, foundOffset+strlen(option2)); - myText->ScrollToSelection(); - ret = myText->LineAt(foundOffset)+1; - // myText->GoToLine(myText->LineAt(foundOffset)); - } - } - else if(tmp.IFindFirst("find")!=B_ERROR) - { - int32 startOffset, endOffset; - myText->GetSelection(&startOffset, &endOffset); - // = myText->OffsetAt(myText->CurrentLine()); - bool isFinished = false; - int foundOffset, l = myText->TextLength() - endOffset; - char* s; - s = new char[l+1]; - myText->GetText(endOffset, l, s); - BString line(s); - foundOffset = line.IFindFirst(option2); - if(foundOffset == B_ERROR) - { - delete s; - s = new char[endOffset]; - myText->GetText(0, endOffset-1, s); - line = s; - foundOffset = line.IFindFirst(option2); - } - else - foundOffset += endOffset; - if(foundOffset != B_ERROR) - { - delete s; - myText->Select(foundOffset, foundOffset+strlen(option2)); - myText->ScrollToSelection(); - ret = myText->LineAt(foundOffset)+1; - // myText->GoToLine(myText->LineAt(foundOffset)); - } - } - else - ErrorGen("Unknown option"); - w->Unlock(); - return ret; - } - w->Unlock(); - } - } - } - Error(title, "TEXTEDIT"); -} - -double YabInterface::TextGet(const char* title, const char* option, int line) -{ - double ret = -1.0; - YabView *myView = NULL; - YabText *myText = NULL; - BString tmp(option); - - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(),YabWindow); - if(w) - { - w->Lock(); - myText = cast_as(myView->FindView(title),YabText); - if(myText) - { - if(tmp.IFindFirst("line-width")!=B_ERROR) - ret = myText->LineWidth(line); - else if(tmp.IFindFirst("line-height")!=B_ERROR) - ret = myText->LineHeight(line); - else - ErrorGen("Unknown option"); - w->Unlock(); - return ret; - } - w->Unlock(); - } - } - } - Error(title, "TEXTEDIT"); -} - -int YabInterface::TextGet(const char* title, const char* option) -{ - int ret = -1; - YabView *myView = NULL; - YabText *myText = NULL; - BString tmp(option); - - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(),YabWindow); - if(w) - { - w->Lock(); - myText = cast_as(myView->FindView(title),YabText); - if(myText) - { - if(tmp.IFindFirst("currentline")!=B_ERROR) - ret = myText->CurrentLine()+1; - else if(tmp.IFindFirst("vertical-scrollbar")!=B_ERROR) - { - float f = -1.0; - BScrollView *s = cast_as(myText->Parent(), BScrollView); - if(s) - { - BScrollBar *b = s->ScrollBar(B_VERTICAL); - if(b) f = b->Value(); - else - ErrorGen("TEXTEDIT has no vertical scrollbar"); - } - else - ErrorGen("TEXTEDIT has no vertical scrollbar"); - ret = (int)f; - } - else if(tmp.IFindFirst("horizontal-scrollbar")!=B_ERROR) - { - float f = -1.0; - BScrollView *s = cast_as(myText->Parent(), BScrollView); - if(s) - { - BScrollBar *b = s->ScrollBar(B_HORIZONTAL); - if(b) f = b->Value(); - else - ErrorGen("TEXTEDIT has no horizontal scrollbar"); - } - else - ErrorGen("TEXTEDIT has no horizontal scrollbar"); - ret = (int)f; - } - else if(tmp.IFindFirst("countlines")!=B_ERROR) - ret = myText->CountLines(); - else if(tmp.IFindFirst("countphysicallines")!=B_ERROR) - ret=myText->CountPhysicalLines(); - else if(tmp.IFindFirst("textlength")!=B_ERROR) - ret = myText->TextLength(); - else if(tmp.IFindFirst("haschanged")!=B_ERROR) - ret = myText->HasChanged()?1:0; - else if(tmp.IFindFirst("cursor-position")!=B_ERROR) - { - int32 start, end, pos1,pos2; - myText->GetSelection(&start, &end); - ret = end; - } - else - ErrorGen("Unknown option"); - w->Unlock(); - return ret; - } - w->Unlock(); - } - } - } - Error(title, "TEXTEDIT"); -} - -const char* YabInterface::TextGet(const char* title, int linenum) -{ - YabView *myView = NULL; - YabText *myText = NULL; - - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(),YabWindow); - if(w) - { - w->Lock(); - myText = cast_as(myView->FindView(title),YabText); - if(myText) - { - char* ret; - int start, num; - if(linenum-1 == 0) - start = 0; - else - start = myText->OffsetAt(linenum-1); - if(myText->CountLines()>linenum) - num = myText->OffsetAt(linenum)-start-1; - else - num = myText->TextLength()-start; - ret = new char[num+1]; - myText->GetText(start, num, ret); - w->Unlock(); - return (const char*)ret; - } - w->Unlock(); - } - } - } - Error(title, "TEXTEDIT"); -} - -const char* YabInterface::TextGet6(const char* title, const char* option) -{ - YabView *myView = NULL; - YabText *myText = NULL; - BString tmp(option); - - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(),YabWindow); - if(w) - { - w->Lock(); - myText = cast_as(myView->FindView(title),YabText); - if(myText) - { - if(tmp.IFindFirst("selection")!=B_ERROR) - { - char* ret; - int32 start, finish; - myText->GetSelection(&start, &finish); - if(finish == 0 || (finish-start)<=0) - { - ret = new char[1]; - ret[0] = '\0'; - } - else - { - ret = new char[finish-start+1]; - myText->GetText(start, finish-start, ret); - } - - w->Unlock(); - return (const char*)ret; - } - else - ErrorGen("Unknown option"); - } - w->Unlock(); - } - } - } - Error(title, "TEXTEDIT"); -} - -double YabInterface::DrawGet(const char* option, const char* txt, const char* view) -{ - double ret = 0; - BString tmp(option); - YabView *myView = cast_as((BView*)viewList->GetView(view), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - if(tmp.IFindFirst("Text-Width")!=B_ERROR) - ret = myView->StringWidth(txt); - if(tmp.IFindFirst("Max-Text-Height")!=B_ERROR) - { - font_height height; - myView->GetFontHeight(&height); - ret = height.ascent+height.descent; - } - w->Unlock(); - } - else - ErrorGen("Unable to lock window"); - } - else - { - for(int i=0; iCountItems(); i++) - { - YabBitmapView *myView = (YabBitmapView*)yabcanvas->ItemAt(i); - if(!strcmp(myView->Name(), view)) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - BBitmap *b = myView->GetBitmap(); - BView *bView = myView->GetBitmapView(); - b->Lock(); - if(tmp.IFindFirst("Text-Width")!=B_ERROR) - ret = bView->StringWidth(txt); - if(tmp.IFindFirst("Max-Text-Height")!=B_ERROR) - { - font_height height; - bView->GetFontHeight(&height); - ret = height.ascent+height.descent; - } - b->Unlock(); - - w->Unlock(); - return ret; - } - else - ErrorGen("Unable to lock window"); - } - } - Error(view, "VIEW or CANVAS"); - } - return ret; -} - -const char* YabInterface::DrawGet(const char* option) -{ - BString t(option); - char* ret; - if(t.IFindFirst("fontfamily")!=B_ERROR) - { - int32 numFamilies = count_font_families(); - ret = new char[numFamilies*(B_FONT_FAMILY_LENGTH + 1)]; - BString tmp(""); - for(int32 i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - myText = cast_as(myView->FindView(title), YabText); - if(myText) - { - myText->SetText("", 0); - w->Unlock(); - return; - } - w->Unlock(); - } - } - } - Error(title, "TEXTEDIT"); -} - -const char* YabInterface::TextGet(const char* title) -{ - const char* tmp; - YabView *myView = NULL; - YabText *myText = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - myText = cast_as(myView->FindView(title), YabText); - if(myText) - { - tmp = myText->Text(); - w->Unlock(); - return tmp; - } - w->Unlock(); - } - } - } - Error(title, "TEXTEDIT"); -} - -void YabInterface::TreeBox1(BRect frame, const char* id, int scrollbarType, const char* view) -{ - YabView *myView = cast_as((BView*)viewList->GetView(view), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - uint32 resizeMode; - - w->Lock(); - - if(scrollbarType == 3 || scrollbarType == 1) frame.right -= B_V_SCROLL_BAR_WIDTH; - if(scrollbarType>2) frame.bottom -= B_H_SCROLL_BAR_HEIGHT; - - BOutlineListView *list = new BOutlineListView(frame,id); - if(w->layout == -1) - resizeMode = B_FOLLOW_ALL; - else - resizeMode = w->layout; - list->SetResizingMode(resizeMode); - list->SetFlags(B_WILL_DRAW|B_FULL_UPDATE_ON_RESIZE|B_NAVIGABLE); - list->SetSelectionMessage(new BMessage(YABTREEBOXSELECT)); - list->SetInvocationMessage(new BMessage(YABTREEBOXINVOKE)); - switch(scrollbarType) - { - case 3: // both - myView->AddChild(new BScrollView("scroll_list", list, resizeMode, B_WILL_DRAW|B_FULL_UPDATE_ON_RESIZE, true, true)); - break; - case 2: // horizontal - myView->AddChild(new BScrollView("scroll_list", list, resizeMode, B_WILL_DRAW|B_FULL_UPDATE_ON_RESIZE, true, false)); - break; - case 0: // none - myView->AddChild(list); - break; - default: // vertical is default - myView->AddChild(new BScrollView("scroll_list", list, resizeMode, B_WILL_DRAW|B_FULL_UPDATE_ON_RESIZE, false, true)); - break; - } - w->Unlock(); - } - else - ErrorGen("Unable to lock window"); - } - else - Error(view, "VIEW"); -} - -void YabInterface::TreeBox2(const char* id, const char* item) -{ - YabView *myView = NULL; - BOutlineListView *myTree = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - myTree = cast_as(myView->FindView(id), BOutlineListView); - if(myTree) - { - myTree->AddItem(new BStringItem(item)); - w->Unlock(); - return; - } - w->Unlock(); - } - } - } - Error(id, "TREEBOX"); -} -//Correction of Subitem by Stephan Aßmus on BeGeistert 2018 -void YabInterface::TreeBox3(const char* id, const char* head, const char* item, int isExpanded) -{ - YabView *myView = NULL; - BOutlineListView *myTree = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - myTree = cast_as(myView->FindView(id), BOutlineListView); - if(myTree) - { - for(int i=0; iFullListCountItems(); i++) - { - BStringItem *stritem = (BStringItem*)myTree->FullListItemAt(i); - if(!strcmp(stritem->Text(), head)) - { - int32 level = stritem->OutlineLevel() + 1; - BStringItem *tmp = new BStringItem(item, level); - //myTree->AddUnder(tmp,stritem); - int32 fullSubItemCount = myTree->CountItemsUnder(stritem, false); - //printf("found item '%s' at %ld with level %ld, number of sub-items: %ld\n", - // head, i, level - 1, fullSubItemCount); - myTree->AddItem(tmp, i + fullSubItemCount + 1); - - if(isExpanded<1) - myTree->Collapse(stritem); - - w->Unlock(); - return; - } - } - w->Unlock(); - ErrorGen("Item not found"); - } - w->Unlock(); - } - } - } - Error(id, "TREEBOX"); -} - -void YabInterface::TreeBox4(const char* id) -{ - YabView *myView = NULL; - BOutlineListView *myTree = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - myTree = cast_as(myView->FindView(id), BOutlineListView); - if(myTree) - { - myTree->MakeEmpty(); - w->Unlock(); - return; - } - w->Unlock(); - } - } - } - Error(id, "TREEBOX"); -} - -void YabInterface::TreeBox5(const char* id, const char* item) -{ - YabView *myView = NULL; - BOutlineListView *myTree = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - myTree = cast_as(myView->FindView(id), BOutlineListView); - if(myTree) - { - for(int i=0; iFullListCountItems(); i++) - { - BStringItem *stritem = (BStringItem*)myTree->FullListItemAt(i); - if(!strcmp(stritem->Text(), item)) - { - myTree->RemoveItem(i); - w->Unlock(); - return; - } - } - w->Unlock(); - ErrorGen("Item not found"); - } - w->Unlock(); - } - } - } - Error(id, "TREEBOX"); -} - -void YabInterface::TreeBox7(const char* id, int pos) -{ - pos--; - YabView *myView = NULL; - BOutlineListView *myTree = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - myTree = cast_as(myView->FindView(id), BOutlineListView); - if(myTree) - { - if(pos==0) - myTree->DeselectAll(); - else - { - BListItem *item = myTree->FullListItemAt(pos); - if(item) - myTree->Select(myTree->IndexOf(item)); - } - w->Unlock(); - return; - } - w->Unlock(); - } - } - } - Error(id, "TREEBOX"); -} - -void YabInterface::TreeBox8(const char* id, int pos) -{ - pos--; - YabView *myView = NULL; - BOutlineListView *myTree = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - myTree = cast_as(myView->FindView(id), BOutlineListView); - if(myTree) - { - myTree->RemoveItem(pos); - w->Unlock(); - return; - } - w->Unlock(); - } - } - } - Error(id, "TREEBOX"); -} -void YabInterface::TreeBox9(const char* id, const char* head, const char* item) -{ - YabView *myView = NULL; - BOutlineListView *myTree = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - myTree = cast_as(myView->FindView(id), BOutlineListView); - if(myTree) - { - for(int i=0; iFullListCountItems(); i++) - { - BStringItem *stritem = (BStringItem*)myTree->FullListItemAt(i); - if(!strcmp(stritem->Text(), head)) - { - for(int j=0; iCountItemsUnder(stritem, false); j++) - { - BStringItem *subitem = (BStringItem*)myTree->FullListItemAt(i+j+1); - if(!strcmp(subitem->Text(), item)) - { - myTree->RemoveItem((BListItem*)subitem); - w->Unlock(); - return; - } - } - } - } - w->Unlock(); - ErrorGen("Item not found"); - } - w->Unlock(); - } - } - } - Error(id, "TREEBOX"); -} - -void YabInterface::TreeBox10(const char* id, const char* head) -{ - YabView *myView = NULL; - BOutlineListView *myTree = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - myTree = cast_as(myView->FindView(id), BOutlineListView); - if(myTree) - { - for(int i=0; iFullListCountItems(); i++) - { - BStringItem *stritem = (BStringItem*)myTree->FullListItemAt(i); - if(!strcmp(stritem->Text(), head)) - { - myTree->Expand((BListItem*)stritem); - w->Unlock(); - return; - } - } - w->Unlock(); - ErrorGen("Item not found"); - } - w->Unlock(); - } - } - } - Error(id, "TREEBOX"); -} -void YabInterface::TreeBox11(const char* id, const char* head) -{ - YabView *myView = NULL; - BOutlineListView *myTree = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - myTree = cast_as(myView->FindView(id), BOutlineListView); - if(myTree) - { - for(int i=0; iFullListCountItems(); i++) - { - BStringItem *stritem = (BStringItem*)myTree->FullListItemAt(i); - if(!strcmp(stritem->Text(), head)) - { - myTree->Collapse((BListItem*)stritem); - w->Unlock(); - return; - } - } - w->Unlock(); - ErrorGen("Item not found"); - } - w->Unlock(); - } - } - } - Error(id, "TREEBOX"); -} - -void YabInterface::TreeBox12(const char* id, const char* item, int pos) -{ - if(pos<1) pos = 1; - - YabView *myView = NULL; - BOutlineListView *myTree = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - myTree = cast_as(myView->FindView(id),BOutlineListView); - if(myTree) - { - if(pos<=myTree->FullListCountItems()) - { - uint32 outline = (myTree->FullListItemAt(pos-1))->OutlineLevel(); - myTree->AddItem(new BStringItem(item, outline),pos-1); - } - else - myTree->AddItem(new BStringItem(item)); - w->Unlock(); - return; - } - w->Unlock(); - } - } - } - Error(id, "TREEBOX"); -} - -const char* YabInterface::TreeboxGet(const char* treebox, int pos) -{ - pos--; - YabView *myView = NULL; - BOutlineListView *myTree = NULL; - for(int i=0; iCountItems(); i++) //CountItems() - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - myTree = cast_as(myView->FindView(treebox), BOutlineListView); - if(myTree) - { - BStringItem *t = (BStringItem*)myTree->FullListItemAt(pos); - if(t) - { - const char* txt = t->Text(); - //printf(txt); - w->Unlock(); - return txt; - } - } - w->Unlock(); - } - } - } - Error(treebox, "TREEBOX"); -} - -int YabInterface::TreeboxCount(const char* treebox) -{ - int32 ret; - YabView *myView = NULL; - BOutlineListView *myTree = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - myTree = cast_as(myView->FindView(treebox), BOutlineListView); - if(myTree) - { - ret = myTree->FullListCountItems(); - w->Unlock(); - return ret; - } - w->Unlock(); - } - } - } - Error(treebox, "TREEBOX"); -} - -BBitmap* YabInterface::loadImage(const char* FileName) -{ - BBitmap* LogoBitmap = NULL; - BFile ImageFile; - BPath ImagePath; - int ret = 0; - - if( *FileName == '/') - ImageFile.SetTo( FileName, B_READ_ONLY); - else - // App directory. - if(!strcmp(ApplicationDirectory,"")) - { - if( ImagePath.SetTo((const char*)ApplicationDirectory, FileName) == B_OK) - ImageFile.SetTo( ImagePath.Path(), B_READ_ONLY); - } - - if( ImageFile.InitCheck() != B_OK) - ImageFile.SetTo( FileName, B_READ_ONLY); - - if( ImageFile.InitCheck() != B_OK) - return NULL; - - Roster = BTranslatorRoster::Default(); - - if( !Roster) - return NULL; - - BBitmapStream Stream; - - if( Roster->Translate( &ImageFile, NULL, NULL, &Stream, B_TRANSLATOR_BITMAP) < B_OK) - return NULL; - - if( Stream.DetachBitmap( &LogoBitmap) != B_OK) - return NULL; - - - return LogoBitmap; -} - -void YabInterface::ButtonImage(double x,double y, const char* id,const char* enabledon, const char* enabledoff, const char* disabled, const char* view) -{ - YabView *myView = cast_as((BView*)viewList->GetView(view), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - BPicture *pic1 = NULL, *pic2 = NULL, *pic3 = NULL; - BBitmap *bitmap = NULL; - BView *tmpView = new BView(BRect(0,0,1000,1000),"tmp",0, B_WILL_DRAW); - w->AddChild(tmpView); - tmpView->SetDrawingMode(B_OP_ALPHA); - - bitmap = loadImage(enabledon); - tmpView->BeginPicture(new BPicture); - if(bitmap) - { - // drawing_mode mode = myView->DrawingMode(); - // tmpView->SetDrawingMode(B_OP_ALPHA); - tmpView->DrawBitmap(bitmap,bitmap->Bounds()); - // myView->SetDrawingMode(mode); - } - pic1 = tmpView->EndPicture(); - - BRect r; - r.SetLeftTop(BPoint(x,y)); - if(bitmap) - r.SetRightBottom(BPoint(x,y) + bitmap->Bounds().RightBottom()); - else - r.SetRightBottom(BPoint(x,y)); - - bitmap = loadImage(enabledoff); - tmpView->BeginPicture(new BPicture); - if(bitmap) - { - // drawing_mode mode = myView->DrawingMode(); - // tmpView->SetDrawingMode(B_OP_ALPHA); - tmpView->DrawBitmap(bitmap,bitmap->Bounds()); - // myView->SetDrawingMode(mode); - } - pic2 = tmpView->EndPicture(); - - bitmap = loadImage(disabled); - tmpView->BeginPicture(new BPicture); - if(bitmap) tmpView->DrawBitmap(bitmap,bitmap->Bounds()); - pic3 = tmpView->EndPicture(); - - - BPictureButton *myButton = new BPictureButton(r, id, pic2, pic1, new BMessage(YABBUTTON)); - myButton->SetDisabledOff(pic3); - - if(w->layout == -1) - myButton->SetResizingMode(B_FOLLOW_RIGHT|B_FOLLOW_BOTTOM); - else - myButton->SetResizingMode(w->layout); - myButton->SetFlags(B_WILL_DRAW|B_FULL_UPDATE_ON_RESIZE|B_NAVIGABLE); - myView->AddChild(myButton); - tmpView->RemoveSelf(); - delete tmpView; - // delete Roster; - w->Unlock(); - } - else - ErrorGen("Unable to lock window"); - } - else - Error(view, "VIEW"); -} - -void YabInterface::CheckboxImage(double x, double y,const char* id,const char* enabledon, const char* enabledoff, const char *disabledon, const char *disabledoff, int isActivated, const char* view) -{ - YabView *myView = cast_as((BView*)viewList->GetView(view), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - BPicture *pic1 = NULL, *pic2 = NULL, *pic3 = NULL, *pic4 = NULL; - BBitmap *bitmap = NULL; - BView *tmpView = new BView(BRect(0,0,1000,1000),"tmp",0, B_WILL_DRAW); - w->AddChild(tmpView); - tmpView->SetDrawingMode(B_OP_ALPHA); - - bitmap = loadImage(enabledon); - tmpView->BeginPicture(new BPicture); - if(bitmap) - { - // drawing_mode mode = myView->DrawingMode(); - // myView->SetDrawingMode(B_OP_ALPHA); - tmpView->DrawBitmap(bitmap,bitmap->Bounds()); - // myView->SetDrawingMode(mode); - } - pic1 = tmpView->EndPicture(); - - BRect r; - r.SetLeftTop(BPoint(x,y)); - if(bitmap) - r.SetRightBottom(BPoint(x,y) + bitmap->Bounds().RightBottom()); - else - r.SetRightBottom(BPoint(x,y)); - - bitmap = loadImage(enabledoff); - tmpView->BeginPicture(new BPicture); - if(bitmap) - { - // drawing_mode mode = myView->DrawingMode(); - // myView->SetDrawingMode(B_OP_ALPHA); - tmpView->DrawBitmap(bitmap,bitmap->Bounds()); - // myView->SetDrawingMode(mode); - } - pic2 = tmpView->EndPicture(); - - bitmap = loadImage(disabledon); - tmpView->BeginPicture(new BPicture); - if(bitmap) - { - // drawing_mode mode = myView->DrawingMode(); - // myView->SetDrawingMode(B_OP_ALPHA); - tmpView->DrawBitmap(bitmap,bitmap->Bounds()); - // myView->SetDrawingMode(mode); - } - pic3 = tmpView->EndPicture(); - - bitmap = loadImage(disabledoff); - tmpView->BeginPicture(new BPicture); - if(bitmap) - { - // drawing_mode mode = myView->DrawingMode(); - // myView->SetDrawingMode(B_OP_ALPHA); - tmpView->DrawBitmap(bitmap,bitmap->Bounds()); - // myView->SetDrawingMode(mode); - } - pic4 = tmpView->EndPicture(); - - BPictureButton *myButton = new BPictureButton(r, id, pic2, pic1, new BMessage(YABCHECKBOX),B_TWO_STATE_BUTTON); - myButton->SetDisabledOn(pic3); - myButton->SetDisabledOff(pic4); - - if(w->layout == -1) - myButton->SetResizingMode(B_FOLLOW_RIGHT|B_FOLLOW_BOTTOM); - else - myButton->SetResizingMode(w->layout); - myButton->SetValue(isActivated); - myButton->SetFlags(B_WILL_DRAW|B_FULL_UPDATE_ON_RESIZE|B_NAVIGABLE); - myView->AddChild(myButton); - tmpView->RemoveSelf(); - delete tmpView; - // delete Roster; - w->Unlock(); - } - else - ErrorGen("Unable to lock window"); - } - else - Error(view, "VIEW"); -} - -void YabInterface::CheckboxSet(const char* id, int isActivated) -{ - YabView *myView = NULL; - BCheckBox *myCheckBox = NULL; - BPictureButton *myPicButton = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - myCheckBox = cast_as(myView->FindView(id), BCheckBox); - if(myCheckBox) - { - myCheckBox->SetValue(isActivated); - w->Unlock(); - return; - } - else - { - myPicButton = cast_as(myView->FindView(id), BPictureButton); - if(myPicButton) - { - if(myPicButton->Behavior() == B_TWO_STATE_BUTTON) - { - myPicButton->SetValue(isActivated); - w->Unlock(); - return; - } - } - } - w->Unlock(); - } - } - } - Error(id, "CHECKBOX"); -} - -void YabInterface::RadioSet(const char* id, int isActivated) -{ - YabView *myView = NULL; - BRadioButton *myRadioButton= NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - myRadioButton = cast_as(myView->FindView(id), BRadioButton); - if(myRadioButton) - { - myRadioButton->SetValue(isActivated); - w->Unlock(); - return; - } - w->Unlock(); - } - } - } - Error(id, "RADIOBUTTON"); -} - -const char* YabInterface::TextControlGet(const char* id) -{ - const char* tmp = NULL; - YabView *myView = NULL; - BTextControl *myTControl = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - myTControl = cast_as(myView->FindView(id), BTextControl); - if(myTControl) - { - tmp = myTControl->Text(); - w->Unlock(); - return tmp; - } - w->Unlock(); - } - } - } - Error(id, "TEXTCONTROL"); -} - -void YabInterface::ToolTips(const char* view, const char* text) -{ - YabView *myView = NULL; - BView *theView = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - theView = w->FindView(view); - if(theView) - { - if(theView->Name()) - { - if(!strcmp(theView->Name(), view)) - { - if(text[0] == '\0') - // tooltip->SetHelp(theView, NULL); - ; - else - theView->SetToolTip(text); - w->Unlock(); - return; - } - } - } - w->Unlock(); - } - } - } - Error(view, "VIEW"); -} - -void YabInterface::ToolTipsNew(const char* view, const char* text, const char* color, int r, int g, int b) -{ - printf("View %s",view); - printf("View %s",text); - printf("View %s",color); - printf("View %d",r); - printf("View %d",g); - printf("View %d",b); - - //SetViewColor(b1); - //SetLowColor(b1); - //SetHighColor(b2); - YabView *myView = NULL; - BView *theView = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - theView = w->FindView(view); - if(theView) - { - if(theView->Name()) - { - if(!strcmp(theView->Name(), view)) - { - if(text[0] == '\0') - // tooltip->SetHelp(theView, NULL); - ; - else - theView->SetLowColor(r,g,b,255); - theView->SetToolTip(text); - - w->Unlock(); - return; - } - } - } - w->Unlock(); - } - } - } - Error(view, "VIEW"); -} -void YabInterface::ToolTipsColor(const char* color, int r, int g, int b) -{ - /* - BString tmp(color); - rgb_color rgb = {r,g,b}; - if(tmp.IFindFirst("BGColor")!=B_ERROR) - { - //tooltip->SetColor(rgb); - - } - else if(tmp.IFindFirst("TextColor")!=B_ERROR) - { - //tooltip->SetTextColor(rgb); - - } - */ -} - -void YabInterface::TreeSort(const char* view) -{ - ErrorGen("Sorry, this command is not working yet"); - YabView *myView = NULL; - BOutlineListView *myList = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - myList = cast_as(myView->FindView(view), BOutlineListView); - if(myList) - { - myList->FullListSortItems((int(*)(const BListItem *, const BListItem *))YabInterface::compare); - w->Unlock(); - return; - } - w->Unlock(); - } - } - } - Error(view, "TREEBOX"); -} - -void YabInterface::ListSort(const char* view) -{ - YabView *myView = NULL; - BListView *myList = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - myList = cast_as(myView->FindView(view), BListView); - if(myList) - { - myList->SortItems((int(*)(const void*, const void*))YabInterface::compare); - w->Unlock(); - return; - - } - w->Unlock(); - } - } - } - Error(view, "LISTBOX"); -} - -int YabInterface::compare(BListItem **firstArg, BListItem **secondArg) -{ - if(firstArg != NULL && secondArg != NULL) - { - BString item1(((BStringItem*)*firstArg)->Text()); - BString item2(((BStringItem*)*secondArg)->Text()); - if(((BListItem*)*firstArg)->OutlineLevel()!=((BListItem*)*secondArg)->OutlineLevel()) - return 0; - return item1.ICompare(item2); - } - return 0; -} - -void YabInterface::FileBox(BRect frame, const char* id, bool hasHScrollbar, const char* option, const char* view) -{ - BString tmp(option); - - border_style plain = B_PLAIN_BORDER; - if(tmp.IFindFirst("no-border")!=B_ERROR) - plain = B_NO_BORDER; - YabView *myView = cast_as((BView*)viewList->GetView(view), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - BColumnListView* myColumnList; - myColumnList = new BColumnListView(frame, id, B_FOLLOW_ALL_SIDES, B_WILL_DRAW|B_FRAME_EVENTS|B_NAVIGABLE,plain, hasHScrollbar); - BMessage *msg1, *msg2; - msg1 = new BMessage(YABFILEBOXINVOKE); - msg1->AddPointer("source", myColumnList); - msg2 = new BMessage(YABFILEBOXSELECT); - msg2->AddPointer("source", myColumnList); - myColumnList->SetInvocationMessage(msg1); - myColumnList->SetSelectionMessage(msg2); - myColumnList->SetSortingEnabled(false); - myColumnList->SetSelectionMode(B_SINGLE_SELECTION_LIST); - rgb_color rgb = {195,195,195,255}; - myColumnList->SetColor(B_COLOR_SELECTION, rgb); - - int flags = B_ALLOW_COLUMN_NONE; - if(tmp.IFindFirst("movable")!=B_ERROR) - flags += B_ALLOW_COLUMN_MOVE; - if(tmp.IFindFirst("resizable")!=B_ERROR) - flags += B_ALLOW_COLUMN_RESIZE; - if(tmp.IFindFirst("popup")!=B_ERROR) - flags += B_ALLOW_COLUMN_POPUP; - if(tmp.IFindFirst("removable")!=B_ERROR) - flags += B_ALLOW_COLUMN_REMOVE; - myColumnList->SetColumnFlags((column_flags) flags); - myColumnList->SetLatchWidth(0.0); - myView->AddChild(myColumnList); - - w->Unlock(); - } - else - ErrorGen("Unable to lock window"); - } - else - Error(view, "VIEW"); -} - -void YabInterface::ColumnBoxAdd(const char* id, int column, int position, int height, const char* text) -{ - YabView *myView = NULL; - BColumnListView *myColumnList = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - myColumnList = cast_as(myView->FindView(id), BColumnListView); - if(myColumnList) - { - BRow *myRow = myColumnList->RowAt(position-1); - if(!myRow) - { - myRow = new BRow(height); - myColumnList->AddRow(myRow, position); - for(int j=0; jCountColumns(); j++) - { - BYabField *myField = new BYabField(""); - myRow->SetField(myField, j); - } - } - - BYabField *myField = (BYabField*)myRow->GetField(column-1); - myField->SetString(text, height); - - myColumnList->Refresh(); - w->Unlock(); - return; - } - w->Unlock(); - } - } - } - Error(id, "COLUMNBOX"); -} - -void YabInterface::FileBoxAdd(const char* columnbox, const char* name, int32 pos, double minWidth, double maxWidth, double width, const char* option) -{ - BString tmp(option); - alignment align = B_ALIGN_LEFT; - if(tmp.IFindFirst("align-left")!=B_ERROR) - align = B_ALIGN_LEFT; - if(tmp.IFindFirst("align-center")!=B_ERROR) - align = B_ALIGN_CENTER; - if(tmp.IFindFirst("align-right")!=B_ERROR) - align = B_ALIGN_RIGHT; - YabView *myView = NULL; - BColumnListView *myColumnList = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - myColumnList = cast_as(myView->FindView(columnbox), BColumnListView); - if(myColumnList) - { - BYabColumn *myColumn = new BYabColumn(name,width,maxWidth, minWidth,width, align); - myColumnList->AddColumn(myColumn, pos-1); - w->Unlock(); - return; - } - w->Unlock(); - } - } - } - Error(columnbox, "COLUMNBOX"); -} - -void YabInterface::FileBoxClear(const char* columnbox) -{ - YabView *myView = NULL; - BColumnListView *myColumnList = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - myColumnList = cast_as(myView->FindView(columnbox), BColumnListView); - if(myColumnList) - { - myColumnList->Clear(); - w->Unlock(); - return; - } - w->Unlock(); - } - } - } - Error(columnbox, "COLUMNBOX"); -} - -void YabInterface::ColumnBoxRemove(const char* columnbox, int position) -{ - YabView *myView = NULL; - BColumnListView *myColumnList = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - myColumnList = cast_as(myView->FindView(columnbox), BColumnListView); - if(myColumnList) - { - BRow *myRow; - myRow = myColumnList->RowAt(position-1); - if(myRow) - { - myColumnList->RemoveRow(myRow); - delete myRow; - } - else - { - w->Unlock(); - ErrorGen("Row not found"); - } - w->Unlock(); - return; - } - w->Unlock(); - } - } - } - Error(columnbox, "COLUMNBOX"); -} - -void YabInterface::ColumnBoxColor(const char* columnbox, const char* option, int r, int g, int b) -{ - YabView *myView = NULL; - BColumnListView *myColumnList = NULL; - BString tmp(option); - ColumnListViewColor col; - if(tmp.IFindFirst("selection-text")!=B_ERROR) - col = B_COLOR_SELECTION_TEXT; - else if(tmp.IFindFirst("non-focus-selection")!=B_ERROR) - col = B_COLOR_NON_FOCUS_SELECTION; - else if(tmp.IFindFirst("selection")!=B_ERROR) - col = B_COLOR_SELECTION; - else if(tmp.IFindFirst("text")!=B_ERROR) - col = B_COLOR_TEXT; - else if(tmp.IFindFirst("row-divider")!=B_ERROR) - col = B_COLOR_ROW_DIVIDER; - else if(tmp.IFindFirst("background")!=B_ERROR) - col = B_COLOR_BACKGROUND; - else - ErrorGen("Invalid option"); - - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - myColumnList = cast_as(myView->FindView(columnbox), BColumnListView); - if(myColumnList) - { - rgb_color rgb = {r,g,b,255}; - myColumnList->SetColor(col, rgb); - myColumnList->Refresh(); - myColumnList->Invalidate(); - w->Unlock(); - return; - } - w->Unlock(); - } - } - } - Error(columnbox, "COLUMNBOX"); -} - -void YabInterface::ColumnBoxSelect(const char* columnbox, int position) -{ - YabView *myView = NULL; - BColumnListView *myColumnList = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - myColumnList = cast_as(myView->FindView(columnbox), BColumnListView); - if(myColumnList) - { - if(position == 0) - myColumnList->DeselectAll(); - else - { - myColumnList->AddToSelection(myColumnList->RowAt(position-1)); - myColumnList->ScrollTo(myColumnList->RowAt(position-1)); - } - w->Unlock(); - return; - } - w->Unlock(); - } - } - } - Error(columnbox, "COLUMNBOX"); -} - -const char* YabInterface::ColumnBoxGet(const char* columnbox, int column, int position) -{ - YabView *myView = NULL; - BColumnListView *myColumnList = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - myColumnList = cast_as(myView->FindView(columnbox), BColumnListView); - if(myColumnList) - { - BRow* myRow = myColumnList->RowAt(position-1); - if(myRow) - { - BYabField *myField = cast_as(myRow->GetField(column-1), BYabField); - if(myField) - { - const char* t = myField->String(); - w->Unlock(); - return t; - } - w->Unlock(); - ErrorGen("Column not found"); - } - w->Unlock(); - ErrorGen("Row not found"); - } - w->Unlock(); - } - } - } - Error(columnbox, "COLUMNBOX"); -} - -int YabInterface::ColumnBoxCount(const char* columnbox) -{ - YabView *myView = NULL; - BColumnListView *myColumnList = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - myColumnList = cast_as(myView->FindView(columnbox), BColumnListView); - if(myColumnList) - { - int32 ret = myColumnList->CountRows(); - w->Unlock(); - return ret; - } - w->Unlock(); - } - } - } - Error(columnbox, "COLUMNBOX"); -} - -void YabInterface::ListboxAdd(const char* listbox, const char* item) -{ - YabView *myView = NULL; - BListView *myList = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - myList = cast_as(myView->FindView(listbox), BListView); - // myList = (BListView*)myView->FindView(listbox); - if(myList) - { - myList->AddItem(new BStringItem(item)); - w->Unlock(); - return; - } - w->Unlock(); - } - } - } - Error(listbox, "LISTBOX"); -} - -void YabInterface::ListboxAdd(const char* listbox, int pos, const char* item) -{ - YabView *myView = NULL; - BListView *myList = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - myList = cast_as(myView->FindView(listbox), BListView); - if(myList) - { - myList->AddItem(new BStringItem(item), pos-1); - w->Unlock(); - return; - } - w->Unlock(); - } - } - } - Error(listbox, "LISTBOX"); -} - -void YabInterface::ListboxSelect(const char* listbox, int pos) -{ - YabView *myView = NULL; - BListView *myList = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - myList = cast_as(myView->FindView(listbox), BListView); - if(myList) - { - if(pos == 0) - myList->DeselectAll(); - else - { - myList->Select(pos-1); - myList->ScrollToSelection(); - } - w->Unlock(); - return; - } - w->Unlock(); - } - } - } - Error(listbox, "LISTBOX"); -} - -void YabInterface::ListboxRemove(const char* listbox, int pos) -{ - YabView *myView = NULL; - BListView *myList = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - myList = cast_as(myView->FindView(listbox), BListView); - if(myList) - { - myList->RemoveItem(pos-1); - w->Unlock(); - return; - } - w->Unlock(); - } - } - } - Error(listbox, "LISTBOX"); -} - -const char* YabInterface::ListboxGet(const char* listbox, int pos) -{ - YabView *myView = NULL; - BListView *myList = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - columntext[0] = '\0'; - myList = cast_as(myView->FindView(listbox), BListView); - if(myList) - { - BStringItem *t = cast_as(myList->ItemAt(pos-1), BStringItem); - if(t) - { - const char* txt = t->Text(); - w->Unlock(); - return txt; - } - else - { - w->Unlock(); - ErrorGen("Item not found"); - } - } - w->Unlock(); - } - } - } - Error(listbox, "LISTBOX"); -} - -int YabInterface::ListboxCount(const char* listbox) -{ - int ret = 0; - YabView *myView = NULL; - BListView *myList = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - myList = cast_as(myView->FindView(listbox), BListView); - if(myList) - { - ret = myList->CountItems(); - w->Unlock(); - return ret; - } - w->Unlock(); - } - } - } - Error(listbox, "LISTBOX"); -} - -void YabInterface::DrawSet1(const char* option, const char* window) -{ - BString tmp(option); - - BFont myFont; - BString opt; - - // Font family - int pos1 = 0; - int pos2 = tmp.FindFirst(','); - if(pos2 != B_ERROR) - { - tmp.CopyInto(opt, pos1, pos2-pos1); - while(opt[0] == ' ') opt.RemoveFirst(" "); - while(opt[opt.Length()-1] == ' ') opt.RemoveLast(" "); - font_family fam; - sprintf((char*)fam, "%s" , opt.String()); - if(myFont.SetFamilyAndFace(fam, B_REGULAR_FACE) == B_OK) - { - // myView->SetFont(&myFont, B_FONT_FAMILY_AND_STYLE); - - // Font style - pos1 = pos2+1; - pos2 = tmp.FindFirst(',', pos2+1); - if(pos2 != B_ERROR) - { - tmp.CopyInto(opt, pos1, pos2-pos1); - while(opt[0] == ' ') opt.RemoveFirst(" "); - while(opt[opt.Length()-1] == ' ') opt.RemoveLast(" "); - font_style style; - sprintf((char*)style, "%s" , opt.String()); - if(myFont.SetFamilyAndStyle(fam,style) == B_OK) - { - // myView->SetFont(&myFont, B_FONT_FAMILY_AND_STYLE); - - // Font size - pos1 = pos2+1; - pos2 = tmp.FindFirst(',', pos2+1); - if(pos2 == B_ERROR) pos2 = tmp.Length(); - tmp.CopyInto(opt, pos1, pos2-pos1); - while(opt[0] == ' ') opt.RemoveFirst(" "); - while(opt[opt.Length()-1] == ' ') opt.RemoveLast(" "); - double size = atof(opt.String()); - myFont.SetSize(size); - // myView->SetFont(&myFont, B_FONT_SIZE); - - if(pos2 != tmp.Length()) - { - pos1 = pos2+1; - pos2 = tmp.FindFirst(',', pos2+1); - if(pos2 == B_ERROR) pos2 = tmp.Length(); - tmp.CopyInto(opt, pos1, pos2-pos1); - while(opt[0] == ' ') opt.RemoveFirst(" "); - while(opt[opt.Length()-1] == ' ') opt.RemoveLast(" "); - if(opt.IFindFirst("bold") != B_ERROR) - myFont.SetFace(B_BOLD_FACE); - else if(opt.IFindFirst("italic") != B_ERROR) - myFont.SetFace(B_ITALIC_FACE); - else if(opt.IFindFirst("regular") != B_ERROR) - myFont.SetFace(B_REGULAR_FACE); - else if(opt.IFindFirst("outlined") != B_ERROR) - myFont.SetFace(B_OUTLINED_FACE); - else if(opt.IFindFirst("strikeout") != B_ERROR) - myFont.SetFace(B_STRIKEOUT_FACE); - else if(opt.IFindFirst("underscore") != B_ERROR) - myFont.SetFace(B_UNDERSCORE_FACE); - - if(pos2 != tmp.Length()) - { - pos1 = pos2 + 1; - pos2 = tmp.FindFirst(',', pos2+1); - if(pos2 == B_ERROR) pos2 = tmp.Length(); - tmp.CopyInto(opt, pos1, pos2-pos1); - while(opt[0] == ' ') opt.RemoveFirst(" "); - while(opt[opt.Length()-1] == ' ') opt.RemoveLast(" "); - float rotation = atof(opt.String()); - myFont.SetRotation(rotation); - - if(pos2 != tmp.Length()) - { - pos1 = pos2 + 1; - pos2 = tmp.FindFirst(',', pos2+1); - if(pos2 == B_ERROR) pos2 = tmp.Length(); - tmp.CopyInto(opt, pos1, pos2-pos1); - while(opt[0] == ' ') opt.RemoveFirst(" "); - while(opt[opt.Length()-1] == ' ') opt.RemoveLast(" "); - float shear = atof(opt.String()); - myFont.SetShear(shear); - } - } - - } - - - // Font flags - /*bool looping = true; - while(looping) - { - pos1 = pos2+1; - pos2 = tmp.FindFirst(',', pos2+1); - if(pos2 == B_ERROR) - { - looping = false; - pos2 = tmp.Length(); - } - tmp.CopyInto(opt, pos1, pos2-pos1); - while(opt[0] == ' ') opt.RemoveFirst(" "); - while(opt[opt.Length()-1] == ' ') opt.RemoveLast(" "); - }*/ - } - } - } - } - else if(tmp.IFindFirst("system-plain")!=B_ERROR) - { - myFont = be_plain_font; - // myView->SetFont(&myFont); - } - else if(tmp.IFindFirst("system-fixed")!=B_ERROR) - { - myFont = be_fixed_font; - // myView->SetFont(&myFont); - } - else if(tmp.IFindFirst("system-bold")!=B_ERROR) - { - myFont = be_bold_font; - // myView->SetFont(&myFont); - } - - YabView *myView = cast_as((BView*)viewList->GetView(window), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - myView->SetFont(&myFont); - YabDrawing *t = new YabDrawing(); - t->command = 12; - t->font = myFont; - myView->drawList->AddItem(t); - w->Unlock(); - } - else - ErrorGen("Unable to lock window"); - } - else - { - for(int i=0; iCountItems(); i++) - { - BBitmap *b = (BBitmap*)yabbitmaps->ItemAt(i); - BView *bview = b->FindView(window); - if(bview) - { - b->Lock(); - bview->SetFont(&myFont); - bview->Sync(); - b->Unlock(); - return; - } - } - for(int i=0; iCountItems(); i++) - { - YabBitmapView *myView = (YabBitmapView*)yabcanvas->ItemAt(i); - if(!strcmp(myView->Name(), window)) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - BBitmap *b = myView->GetBitmap(); - BView *bView = myView->GetBitmapView(); - b->Lock(); - bView->SetFont(&myFont); - bView->Sync(); - b->Unlock(); - - // myView->Draw(myView->Bounds()); - w->Unlock(); - return; - } - else - ErrorGen("Unable to lock window"); - } - } - Error(window, "VIEW, BITMAP or CANVAS"); - } -} - -void YabInterface::DrawSet2(int fillorstroke, const char* mypattern) -{ - BString tmp(mypattern); - if(fillorstroke) drawStroking = true; else drawStroking = false; - if(tmp.IFindFirst("HighSolidFill")!=B_ERROR) - yabPattern = B_SOLID_HIGH; - else if(tmp.IFindFirst("LowSolidFill")!=B_ERROR) - yabPattern = B_SOLID_LOW; - else if(tmp.IFindFirst("CheckeredFill")!=B_ERROR) - yabPattern = B_MIXED_COLORS; - else - { - for(int i = 0; i<8; i++) - if(iGetView(view), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - if(opt>0 && opt<5) - { - BRect r = w->Frame(); - switch(opt) - { - case 1: ret = (int)r.LeftTop().x; - break; - case 2: ret = (int)r.LeftTop().y; - break; - case 3: ret = r.IntegerWidth(); - break; - case 4: ret = r.IntegerHeight(); - break; - } - } - if(opt>4) - { - float x1,y1,x2,y2; - w->GetSizeLimits(&x1,&x2,&y1,&y2); - switch(opt) - { - case 5: ret = (int)x1; - break; - case 6: ret = (int)y1; - break; - case 7: ret = (int)x2; - break; - case 8: ret = (int)y2; - break; - case 10: ret = w->IsMinimized(); - break; - } - } - if (opt==9) - { - return true; - } - } - else - { - if (opt==9) - { - return false; - } - else - ErrorGen("Unable to lock window"); - } - } - else - { - if (opt==9) - { - return false; - } - else - Error(view, "VIEW"); - } - return ret; -} - -int YabInterface::ViewGet(const char* view, const char* option) -{ - int opt = 0; - int ret = -1; - BString t(option); - YabView *myView = NULL; - if(t.IFindFirst("position-x")!=B_ERROR) opt = 1; - else if(t.IFindFirst("position-y")!=B_ERROR) opt = 2; - else if(t.IFindFirst("width")!=B_ERROR) opt = 3; - else if(t.IFindFirst("height")!=B_ERROR) opt = 4; - else if(t.IFindFirst("exists")!=B_ERROR) opt = 5; - else if(t.IFindFirst("focused")!=B_ERROR) opt = 6; - else - ErrorGen("Invalid option"); - - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - BView *theView = cast_as(myView->FindView(view), BView); - if(theView) - { - BRect r = theView->Frame(); - switch(opt) - { - case 1: ret = (int)r.LeftTop().x; - break; - case 2: ret = (int)r.LeftTop().y; - break; - case 3: ret = r.IntegerWidth(); - break; - case 4: ret = r.IntegerHeight(); - break; - case 5: ret = true; - break; - case 6: ret = theView->IsFocus(); - break; - } - w->Unlock(); - return ret; - } - w->Unlock(); - } - } - } - if( opt == 5 ) - ret=false; - else - Error(view, "VIEW"); - - return ret; -} - -void YabInterface::ClipboardCopy(const char* text) -{ - BMessage *clip = (BMessage *)NULL; - - if (be_clipboard->Lock()) - { - be_clipboard->Clear(); - if (clip = be_clipboard->Data()) - { - clip->AddData("text/plain", B_MIME_TYPE, text, strlen(text)); - be_clipboard->Commit(); - } - be_clipboard->Unlock(); - } -} - -int YabInterface::Printer(const char* docname, const char *config, const char* view) -{ - BPrintJob job(docname); - BMessage *setup; - BFile myFile(config, B_READ_ONLY); - - if(myFile.InitCheck()!=B_OK) - { - if(job.ConfigPage()==B_OK) - setup = job.Settings(); - else - { - // (new BAlert(_L("Printer Error!"),_L("Could not setup the printer!"), "Ok"))->Go(); - return 1; - } - } - else - { - setup = new BMessage(); - if(setup->Unflatten(&myFile)!=B_OK) - { - if(job.ConfigPage()==B_OK) - setup = job.Settings(); - else - { - // (new BAlert(_L("Printer Error!"),_L("Could not setup the printer!"), "Ok"))->Go(); - return 1; - } - } - else - if(job.IsSettingsMessageValid(setup)) - job.SetSettings(setup); - else - { - // (new BAlert(_L("Printer Error!"),_L("Could not setup the printer!"), "Ok"))->Go(); - return 2; - } - } - - int32 firstPage, lastPage, nbPages; - BRect printableRect = job.PrintableRect(); - firstPage =0 ;//= job.FirstPage(); Since we aren't calling the set-up print pages, firstpage is always 0 - lastPage = job.LastPage(); - // printf("PRINTER DEBUG Printable BRect %f %f %f %f\n", printableRect.left,printableRect.top, printableRect.right, printableRect.bottom); - YabView *myView = NULL; - BView *newView = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - newView = myView->FindView(view); - w->Unlock(); - if(newView) - break; - } - } - } - - if(!newView) - { - // (new BAlert(_L("Printer Error!"),_L("Could not setup the printer!"), "Ok"))->Go(); - return 3; - } - - - BWindow *w = newView->Window(); - w->Lock(); - - int32 viewHeight = newView->Bounds().IntegerHeight(); - float viewWidth = newView->Bounds().Width(); - if(is_kind_of(newView, YabText)) - viewHeight = (int32)((YabText*)newView)->TextHeight(0, ((YabText*)newView)->CountLines()); - if(is_kind_of(newView, BScrollView)) - { - float a,b; - - if(((BScrollView*)newView)->ScrollBar(B_VERTICAL)) - { - ((BScrollView*)newView)->ScrollBar(B_VERTICAL)->GetRange(&a, &b); - viewHeight = viewHeight + (int32)b; - if(((BScrollView*)newView)->ScrollBar(B_HORIZONTAL)) - viewHeight -= (int32)B_H_SCROLL_BAR_HEIGHT; - } - if(((BScrollView*)newView)->ScrollBar(B_HORIZONTAL)) - { - ((BScrollView*)newView)->ScrollBar(B_HORIZONTAL)->GetRange(&a, &b); - viewWidth = viewWidth + b; - if(((BScrollView*)newView)->ScrollBar(B_VERTICAL)) - viewWidth -= B_V_SCROLL_BAR_WIDTH; - } - - if(((BScrollView*)newView)->ScrollBar(B_VERTICAL)) - newView = ((BScrollView*)newView)->ScrollBar(B_VERTICAL)->Target(); - else - newView = ((BScrollView*)newView)->ScrollBar(B_HORIZONTAL)->Target(); - } - - // printf(" %d %f \n", viewHeight, viewWidth); - int32 printableHeight = printableRect.IntegerHeight(); - float printableWidth = printableRect.Width(); - w->Unlock(); - - int32 maxPages = viewHeight / printableHeight + 1; - if(lastPage>maxPages) - lastPage = maxPages; - nbPages = lastPage - firstPage + 1; - - //printf("PRINTER DEBUG First Page %d Last Page %d \n", firstPage, lastPage); - // printf("PRINTER DEBUG View Height %d Printable Height %d \n", viewHeight, printableHeight); - - if(nbPages<=0) - { - // (new BAlert(_L("Printer Error!"),_L("Could not setup the printer!"), "Ok"))->Go(); - return 4; - } - - job.BeginJob(); - bool can_continue = job.CanContinue(); - - w->Lock(); - - bool hasWordWrap; - float textWidth, textHeight; - - if(is_kind_of(newView, YabText)) - { - int lineheight; - hasWordWrap = ((YabText*)newView)->DoesWordWrap(); - if(!hasWordWrap) ((YabText*)newView)->SetWordWrap(true); - lineheight = (int)((YabText*)newView)->LineHeight(); - textWidth = ((YabText*)newView)->TextRect().Width(); - textHeight = ((YabText*)newView)->TextRect().Height(); - - ((YabText*)newView)->SetTextRect(BRect(0,0,printableWidth, viewHeight)); - - printableHeight -= printableHeight%lineheight; - } - - int32 newHeight; - if(printableHeightSetWordWrap(hasWordWrap); - ((YabText*)newView)->SetTextRect(BRect(0,0,textWidth, textHeight)); - } - - w->Unlock(); - - if(can_continue) - job.CommitJob(); - else - // (new BAlert(_L("Printer Error!"),_L("Could not setup the printer!"), "Ok"))->Go(); - return 5; - return 0; -} - -void YabInterface::PrinterConfig(const char* config) -{ - BPrintJob job(""); - if(job.ConfigPage()==B_OK) - { - BMessage *setup = job.Settings(); - BFile myFile(config, B_WRITE_ONLY|B_CREATE_FILE|B_ERASE_FILE); - if(myFile.InitCheck()==B_OK) - setup->Flatten(&myFile); - } -} - -const char* YabInterface::ClipboardPaste() -{ - const char *text; - ssize_t textlen; - BString returnstring; - BMessage *clip = (BMessage *)NULL; - - if (be_clipboard->Lock()) - { - BMessage *clip = be_clipboard->Data(); - clip->FindData("text/plain", B_MIME_TYPE, (const void **)&text, &textlen); - be_clipboard->Unlock(); - if (text != NULL) { - returnstring.SetTo(text, textlen); - } - } - - return returnstring; -} - -int YabInterface::NewAlert(const char* text, const char* button1, const char* button2, const char* button3, const char* option) -{ - alert_type tmp; - BString typ(option); - tmp = B_EMPTY_ALERT; - if(typ.IFindFirst("info")!=B_ERROR) tmp = B_INFO_ALERT; - else if(typ.IFindFirst("idea")!=B_ERROR) tmp = B_IDEA_ALERT; - else if(typ.IFindFirst("warning")!=B_ERROR) tmp = B_WARNING_ALERT; - else if(typ.IFindFirst("stop")!=B_ERROR) tmp = B_STOP_ALERT; - - if(!strcmp(button2,"")) button2 = NULL; - if(!strcmp(button3,"")) button3 = NULL; - - return (new BAlert("Alert!",text,button1,button2,button3,B_WIDTH_AS_USUAL,tmp))->Go() + 1; -} - -void YabInterface::Calendar(double x, double y, const char* id, const char* format, const char* date, const char* view) -{ - int day, month, year, look, myformat; - BString tYear, tMonth, tDay; - BString tDate(date); - tDate.MoveInto(tYear, 6,4); - tDate.MoveInto(tMonth, 3,2); - tDate.MoveInto(tDay, 0,2); - BString tFormat(format); - look = CC_DOT_DIVIDER; - myformat = CC_DD_MM_YYYY_FORMAT; - if(tFormat.FindFirst("/")!=B_ERROR) - look = CC_SLASH_DIVIDER; - else if(tFormat.FindFirst("-")!=B_ERROR) - look = CC_MINUS_DIVIDER; - if(tFormat.IFindFirst("MD")!=B_ERROR) - myformat = CC_MM_DD_YYYY_FORMAT; - - year = atoi(tYear.String()); - if(myformat == CC_MM_DD_YYYY_FORMAT) - { - month = atoi(tDay.String()); - day = atoi(tMonth.String()); - } - else - { - month = atoi(tMonth.String()); - day = atoi(tDay.String()); - } - YabView *myView = cast_as((BView*)viewList->GetView(view), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - CalendarControl* myCalendar = new CalendarControl(BPoint(x,y),id,day, month, year, myformat, look); - if(w->layout == -1) - myCalendar->SetResizingMode(B_FOLLOW_RIGHT|B_FOLLOW_BOTTOM); - else - myCalendar->SetResizingMode(w->layout); - myView->AddChild(myCalendar); - w->Unlock(); - } - else - ErrorGen("Unable to lock window"); - } - else - Error(view, "VIEW"); -} - -const char* YabInterface::Calendar(const char* id) -{ - const char* txt; - YabView *myView = NULL; - CalendarControl *myCalendar = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - myCalendar = cast_as(myView->FindView(id), CalendarControl); - if(myCalendar) - { - txt = myCalendar->Text(); - w->Unlock(); - return txt; - } - w->Unlock(); - } - } - } - Error(id, "CALENDAR"); -} - -void YabInterface::Calendar(const char* id, const char* date) -{ - int day, month, year, look, myformat; - BString tYear, tMonth, tDay; - BString tDate(date); - tDate.MoveInto(tYear, 6,4); - tDate.MoveInto(tMonth, 3,2); - tDate.MoveInto(tDay, 0,2); - - YabView *myView = NULL; - CalendarControl *myCalendar = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - myCalendar = cast_as(myView->FindView(id), CalendarControl); - if(myCalendar) - { - myformat = myCalendar->GetFlags(); - year = atoi(tYear.String()); - if(myformat == CC_MM_DD_YYYY_FORMAT) - { - month = atoi(tDay.String()); - day = atoi(tMonth.String()); - } - else - { - month = atoi(tMonth.String()); - day = atoi(tDay.String()); - } - - myCalendar->SetDate(day,month,year); - - w->Unlock(); - return; - } - w->Unlock(); - } - } - } - Error(id, "CALENDAR"); -} - -void YabInterface::Scrollbar(const char* id, int format, const char* view) -{ - YabView *myView = NULL; - BView *myBView = NULL; - if(format != 0) - { - bool hasHor = false, hasVer = false; - if(format>1) hasHor = true; - if(format == 1 || format == 3) hasVer = true; - - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - myBView = myView->FindView(view); - if(myBView) - { - if(myView->RemoveChild(myBView)) - { - BScrollView *myScrollView = new BScrollView(id, myBView, B_FOLLOW_LEFT|B_FOLLOW_TOP, 0, hasHor, hasVer); - if(w->layout == -1) - myScrollView->SetResizingMode(B_FOLLOW_RIGHT|B_FOLLOW_BOTTOM); - else - myScrollView->SetResizingMode(w->layout); - myScrollView->SetFlags(B_WILL_DRAW|B_FULL_UPDATE_ON_RESIZE|B_NAVIGABLE); - myView->AddChild(myScrollView); - myScrollView->SetViewColor(myBView->ViewColor()); - w->Unlock(); - return; - } - } - w->Unlock(); - } - } - } - Error(view, "VIEW"); - } - ErrorGen("Unknown option"); -} - -void YabInterface::ScrollbarSet(const char* scrollview, const char* option, double position) -{ - BString tOption(option); - orientation isHorizontal; - if(tOption.IFindFirst("Vertical Position")!=B_ERROR) isHorizontal = B_VERTICAL; - if(tOption.IFindFirst("Horizontal Position")!=B_ERROR) isHorizontal = B_HORIZONTAL; - if(isHorizontal == B_VERTICAL || isHorizontal == B_HORIZONTAL) - { - YabView *myView = NULL; - BScrollView *myScrollView = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - myScrollView = cast_as((BView*)myView->FindView(scrollview),BScrollView); - if(myScrollView) - { - BScrollBar *myScrollbar = myScrollView->ScrollBar(isHorizontal); - if(myScrollbar) - myScrollbar->SetValue(position); - else - ErrorGen("SCROLLBAR is not valid!"); - w->Unlock(); - return; - } - w->Unlock(); - } - } - } - Error(scrollview, "SCROLLBAR"); - } - ErrorGen("Unknown option"); -} - -void YabInterface::ScrollbarSet(const char* scrollview, const char* option) -{ - BString tOption(option); - border_style border; - if(tOption.IFindFirst("no-border")!=B_ERROR) - border = B_NO_BORDER; - else if(tOption.IFindFirst("plain-border")!=B_ERROR) - border = B_PLAIN_BORDER; - else if(tOption.IFindFirst("fancy-border")!=B_ERROR) - border = B_FANCY_BORDER; - else - ErrorGen("Invalid option"); - - YabView *myView = NULL; - BScrollView *myScrollView = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - myScrollView = cast_as((BView*)myView->FindView(scrollview),BScrollView); - if(myScrollView) - { - myScrollView->SetBorder(border); - w->Unlock(); - return; - } - w->Unlock(); - } - } - } - Error(scrollview, "SCROLLBAR"); -} - -void YabInterface::ScrollbarSet(const char* scrollview, const char* option, double opt1, double opt2) -{ - BString tOption(option); - orientation isHorizontal; - int isRange = -1; - if(tOption.IFindFirst("Vertical")!=B_ERROR) isHorizontal = B_VERTICAL; - if(tOption.IFindFirst("Horizontal")!=B_ERROR) isHorizontal = B_HORIZONTAL; - if(tOption.IFindFirst("Range")!=B_ERROR) isRange = 1; - if(tOption.IFindFirst("Steps")!=B_ERROR) isRange = 0; - if((isHorizontal == B_VERTICAL || isHorizontal == B_HORIZONTAL) && isRange != -1) - { - YabView *myView = NULL; - BScrollView *myScrollView = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - myScrollView = cast_as((BView*)myView->FindView(scrollview),BScrollView); - if(myScrollView) - { - /* - if(isRange) - { - BRect f(myView->Bounds()); - // printf("%f %f\n", opt1, opt2); - if(isHorizontal == B_HORIZONTAL) - { - f.left = opt1; - f.right = opt2; - } - else - { - f.top = opt1; - f.bottom = opt2; - } - myScrollView->SetDataRect(f); - } - else - { - BScrollBar *myScrollbar = myScrollView->ScrollBar(isHorizontal); - if(myScrollbar) myScrollbar->SetSteps(opt1,opt2); - }*/ - - BScrollBar *myScrollbar = myScrollView->ScrollBar(isHorizontal); - if(isRange == 1) - { - if(myScrollbar) - myScrollbar->SetRange(opt1,opt2); - else - ErrorGen("SCROLLBAR is not valid!"); - } - else - { - if(myScrollbar) - myScrollbar->SetSteps(opt1,opt2); - else - ErrorGen("SCROLLBAR is not valid!"); - } - - w->Unlock(); - return; - } - w->Unlock(); - } - } - } - Error(scrollview, "SCROLLBAR"); - } - ErrorGen("Unknown option"); -} - -double YabInterface::ScrollbarGet(const char* scrollview, const char* option) -{ - BString tOption(option); - orientation isHorizontal; - double res = 0; - if(tOption.IFindFirst("Vertical")!=B_ERROR) isHorizontal = B_VERTICAL; - if(tOption.IFindFirst("Horizontal")!=B_ERROR) isHorizontal = B_HORIZONTAL; - if(isHorizontal == B_VERTICAL || isHorizontal == B_HORIZONTAL) - { - YabView *myView = NULL; - BScrollView *myScrollView = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - myScrollView = (BScrollView*)myView->FindView(scrollview); - if(myScrollView) - { - BScrollBar *myScrollbar = myScrollView->ScrollBar(isHorizontal); - if(myScrollbar) - res = myScrollbar->Value(); - else - ErrorGen("SCROLLBAR is not valid!"); - w->Unlock(); - return res; - } - w->Unlock(); - } - } - } - Error(scrollview, "SCROLLBAR"); - } - ErrorGen("Unknown option"); -} - -void YabInterface::SplitView(BRect frame, const char* id, int isVertical, int style, const char* view) -{ - orientation posture = isVertical>0?B_VERTICAL:B_HORIZONTAL; - - double pos; - - if(posture==B_VERTICAL) - pos = (frame.right-frame.left)/2; - else - pos = (frame.bottom-frame.top)/2; - - YabView *myView = cast_as((BView*)viewList->GetView(view), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - - BRect frame1(frame); - BRect frame2(frame); - - if(posture==B_VERTICAL) - { - frame1.Set(0,0,pos,frame.bottom-frame.top); - frame2.Set(pos+10,0,frame.right-frame.left, frame.bottom-frame.top); - } - else - { - frame1.Set(0,0,frame.right-frame.left, pos-10); - frame2.Set(0,pos,frame.right-frame.left,frame.bottom-frame.top); - } - - BString t1(id); t1 += "1"; - BString t2(id); t2 += "2"; - - YabView *newView1 = new YabView(frame1, t1.String(), B_FOLLOW_ALL_SIDES,B_WILL_DRAW|B_NAVIGABLE_JUMP); - viewList->AddView(t1.String(), newView1, TYPE_YABVIEW); - - YabView *newView2 = new YabView(frame2, t2.String(), B_FOLLOW_ALL_SIDES, B_WILL_DRAW|B_NAVIGABLE_JUMP); - viewList->AddView(t2.String(), newView2, TYPE_YABVIEW); - - SplitPane *mySplit = new SplitPane(frame, id, (BView*)newView1, (BView*)newView2, 0); - if(style) - mySplit->SetBarThickness(10); - else - mySplit->SetBarThickness(5); - mySplit->SetAlignment(posture); - - if(w->layout == -1) - mySplit->SetResizingMode(B_FOLLOW_ALL_SIDES); - else - mySplit->SetResizingMode(w->layout); - - myView->AddChild(mySplit); - - w->Unlock(); - } - else - ErrorGen("Unable to lock window"); - } - else - Error(view, "VIEW"); -} - -void YabInterface::SplitView(const char* splitView, const char* option, double position) -{ - YabView *myView = NULL; - SplitPane *mySplit = NULL; - BString t(option); - if(t.IFindFirst("Divider")==B_ERROR) - ErrorGen("Unknown option"); - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - mySplit = cast_as(myView->FindView(splitView), SplitPane); - if(mySplit) - { - mySplit->SetBarPosition((int)position); - w->Unlock(); - return; - } - w->Unlock(); - } - } - } - Error(splitView, "SPLITVIEW"); -} - -void YabInterface::SplitView(const char* splitView, const char* option, double left, double right) -{ - YabView *myView = NULL; - SplitPane *mySplit = NULL; - BString t(option); - if(t.IFindFirst("MinimumSizes")==B_ERROR) - ErrorGen("Unknown option"); - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - mySplit = cast_as(myView->FindView(splitView), SplitPane); - if(mySplit) - { - mySplit->SetMinSizeOne((int)left); - mySplit->SetMinSizeTwo((int)right); - w->Unlock(); - return; - } - w->Unlock(); - } - } - } - Error(splitView, "SPLITVIEW"); -} - -double YabInterface::SplitViewGet(const char* splitView, const char* option) -{ - double ret = -1; - YabView *myView = NULL; - SplitPane *mySplit = NULL; - BString t(option); - if(t.IFindFirst("Divider")==B_ERROR) - ErrorGen("Unknown option"); - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - mySplit = cast_as(myView->FindView(splitView), SplitPane); - if(mySplit) - { - ret = (double)mySplit->GetBarPosition(); - w->Unlock(); - return ret; - } - w->Unlock(); - } - } - } - Error(splitView, "SPLITVIEW"); -} - -void YabInterface::StackViews(BRect frame, const char* id, int number, const char* view) -{ - YabView *myView = cast_as((BView*)viewList->GetView(view), YabView); - if(myView && number<1000) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - - YabStackView *myStackView = new YabStackView(frame, id, number); - if(w->layout == -1) - myStackView->SetResizingMode(B_FOLLOW_ALL); - else - myStackView->SetResizingMode(w->layout); - // myTabView->SetFlags(B_WILL_DRAW|B_FULL_UPDATE_ON_RESIZE); - - YabView *newViews[number]; - for(int i=0; iBounds(), t.String(), B_FOLLOW_ALL_SIDES,B_WILL_DRAW|B_NAVIGABLE_JUMP); - viewList->AddView(t.String(), newViews[i], TYPE_YABVIEW); - - } - myStackView->AddViews((BView**)newViews); - - myView->AddChild(myStackView); - - w->Unlock(); - } - else - ErrorGen("Unable to lock window"); - } - else - if(number<1000) Error(view, "VIEW"); - else ErrorGen("Too many views!"); -} - -void YabInterface::StackViews(const char* id, int num) -{ - YabView *myView = NULL; - YabStackView *myStackView = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - myStackView = cast_as(myView->FindView(id), YabStackView); - if(myStackView) - { - myStackView->SelectView(num-1); - w->Unlock(); - return; - } - w->Unlock(); - } - } - } - Error(id, "STACKVIEW"); -} - -int YabInterface::StackViewGet(const char* id) -{ - int ret; - YabView *myView = NULL; - YabStackView *myStackView = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - myStackView = cast_as(myView->FindView(id), YabStackView); - if(myStackView) - { - ret = myStackView->CurrentView(); - w->Unlock(); - return ret+1; - } - w->Unlock(); - } - } - } - Error(id, "STACKVIEW"); -} - -void YabInterface::DrawSet3(const char* option, int transparency) -{ - BString t(option); - if(t.IFindFirst("alpha") != B_ERROR) - { - yabAlpha = transparency; - if(yabAlpha<0) yabAlpha = 0; - if(yabAlpha>255) yabAlpha = 255; - } -} -//Texturl modified by Lorenz Glaser (aka lorglas) 03.10.2019 -void YabInterface::TextURL(double x, double y, const char* id, const char* text, const char* url, const char* view) -{ - YabView *myView = cast_as((BView*)viewList->GetView(view), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - double h,b; - - b = be_plain_font->StringWidth(text)+1; - h = be_plain_font->Size(); - - URLView *s = new URLView(BRect(x,y,x+b,y+h+3), id, text, url); //Correction of Height +3 added,because text wasn't fully displayed. Lorglas - s->SetHoverEnabled(true); - if(w->layout == -1) - s->SetResizingMode(B_FOLLOW_RIGHT|B_FOLLOW_BOTTOM); - else - s->SetResizingMode(w->layout); - s->SetFlags(B_WILL_DRAW); - myView->AddChild(s); - w->Unlock(); - } - else - ErrorGen("Unable to lock window"); - } - else - Error(view, "VIEW"); -} - -void YabInterface::TextURL(const char* id, const char* option, int r, int g, int b) -{ - int opt = 0; - BString t(option); - if(t.IFindFirst("label") != B_ERROR) opt = 1; - if(t.IFindFirst("click") != B_ERROR) opt = 2; - if(t.IFindFirst("mouse-over") != B_ERROR) opt = 3; - - YabView *myView = NULL; - URLView *myURLView = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - myURLView = cast_as(myView->FindView(id), URLView); - if(myURLView) - { - rgb_color col = {r,g,b,255}; - switch(opt) - { - case 1: myURLView->SetColor(col); - break; - case 2: myURLView->SetClickColor(col); - break; - case 3: myURLView->SetHoverColor(col); - break; - default: break; - } - w->Unlock(); - return; - } - w->Unlock(); - } - } - } - Error(id, "TEXTURL"); -} - -void YabInterface::Menu(const char* menuHead, int isRadio, const char* view) -{ - bool radio = isRadio?true:false; - YabView *myView = cast_as((BView*)viewList->GetView(view), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - BMenuBar *menubar; - BMenu *menu = NULL; - BMenuItem *item = NULL; - w->Lock(); - - menubar = cast_as(myView->FindView("menubar"), BMenuBar); - if(menubar != NULL) - { - for(int i=0; iCountItems(); i++) - if(!strcmp( menubar->ItemAt(i)->Label(), menuHead)) - { - menu = menubar->SubmenuAt(i); - menu->SetRadioMode(radio); - break; - } - } - - w->Unlock(); - } - else - ErrorGen("Unable to lock window"); - } - else - Error(view, "VIEW"); -} - -void YabInterface::SubMenu(const char* menuHead, const char* menuItem, const char* subMenuItem, const char* shortcut, const char* view) -{ - char myShortcut; - int32 modifiers = 0; - BString t(shortcut); - if(t.Length()>1) - { - myShortcut = shortcut[t.Length()-1]; - if(t.IFindFirst("s")!=B_ERROR && t.IFindFirst("s")GetView(view), YabView); - - if(!strcmp(menuItem, "--")) - return; - - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - BMenuBar *menubar; - YabMenu *menu = NULL; - YabMenu *submenu = NULL; - BMenuItem *item = NULL; - w->Lock(); - menubar = cast_as(myView->FindView("menubar"), BMenuBar); - if(menubar == NULL) - { - menubar = new BMenuBar(myView->Bounds(),"menubar"); - myView->AddChild(menubar); - } - - for(int i=0; iCountItems(); i++) - if(!strcmp( menubar->ItemAt(i)->Label(), menuHead)) - menu = (YabMenu*)menubar->SubmenuAt(i); - - if(menu == NULL) - { - menu = new YabMenu(menuHead); - menubar->AddItem(menu); - } - - int isInMenu = -1; - for(int i=0; iCountItems(); i++) - if(!strcmp(menu->ItemAt(i)->Label(), menuItem)) - { - isInMenu = i; - break; - } - - if(isInMenu == -1) - { - submenu = new YabMenu(menuItem); - menu->AddItem(submenu); - } - else - { - submenu = cast_as(menu->SubmenuAt(isInMenu),YabMenu); - if(submenu == NULL) - { - BMenuItem *myItem = menu->RemoveItem(isInMenu); - delete myItem; - - submenu = new YabMenu(menuItem); - menu->AddItem(submenu, isInMenu); - } - } - - if(!strcmp(subMenuItem,"--")) - submenu->AddItem(new BSeparatorItem()); - else - submenu->AddItem(new BMenuItem(subMenuItem, new BMessage(YABSUBMENU), myShortcut, modifiers)); - - w->Unlock(); - } - else - ErrorGen("Unable to lock window"); - } - else - Error(view, "VIEW"); -} - -void YabInterface::SubMenu(const char* menuHead, const char* menuItem, int isRadio, const char* view) -{ - bool radio = isRadio?true:false; - YabView *myView = cast_as((BView*)viewList->GetView(view), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - BMenuBar *menubar; - BMenu *menu = NULL; - BMenu *submenu = NULL; - BMenuItem *item = NULL; - w->Lock(); - - menubar = cast_as(myView->FindView("menubar"), BMenuBar); - if(menubar != NULL) - { - for(int i=0; iCountItems(); i++) - if(!strcmp( menubar->ItemAt(i)->Label(), menuHead)) - { - menu = menubar->SubmenuAt(i); - for(int j=0; jCountItems(); j++) - if(!strcmp( menu->ItemAt(j)->Label(), menuItem)) - { - submenu = menu->SubmenuAt(j); - if(submenu) - { - submenu->SetRadioMode(radio); - break; - } - } - - if(submenu) break; - } - } - - w->Unlock(); - } - else - ErrorGen("Unable to lock window"); - } - else - Error(view, "VIEW"); -} - -int YabInterface::ColorControlGet(const char* colorcontrol, const char* option) -{ - int ret = -1; - int myOption = -1; - BString myString(option); - if(myString.IFindFirst("Red") != B_ERROR) myOption = 0; - if(myString.IFindFirst("Green") != B_ERROR) myOption = 1; - if(myString.IFindFirst("Blue") != B_ERROR) myOption = 2; - - if(myOption<0) ErrorGen("Unknown option"); - - YabView *myView = NULL; - BColorControl *myCControl = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView && myOption>-1) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - myCControl = cast_as(myView->FindView(colorcontrol), BColorControl); - if(myCControl) - { - rgb_color t = myCControl->ValueAsColor(); - switch(myOption) - { - case 0: ret = t.red; - break; - case 1: ret = t.green; - break; - case 2: ret = t.blue; - break; - } - w->Unlock(); - return ret; - } - w->Unlock(); - } - } - } - Error(colorcontrol, "COLORCONTROL"); -} - -int YabInterface::SliderGet(const char* slider) -{ - int ret = -1; - YabView *myView = NULL; - BSlider *mySlider = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - mySlider = cast_as(myView->FindView(slider), BSlider); - if(mySlider) - { - ret = mySlider->Value(); - w->Unlock(); - return ret; - } - w->Unlock(); - } - } - } - Error(slider, "SLIDER"); -} - -void YabInterface::SubMenu3(const char* menuHead, const char* menuItem, const char* subMenuItem, const char* option, const char* view) -{ - int myOption = -1; - BString t(option); - if(t.IFindFirst("disable")!=B_ERROR) myOption = 0; - if(t.IFindFirst("enable")!=B_ERROR) myOption = 1; - if(t.IFindFirst("mark")!=B_ERROR) myOption = 2; - if(t.IFindFirst("plain")!=B_ERROR) myOption = 3; - if(t.IFindFirst("remove")!=B_ERROR) myOption = 4; - - YabView *myView = cast_as((BView*)viewList->GetView(view), YabView); - if(myView && myOption>-1) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - BMenuBar *menubar; - BMenu *menu = NULL; - BMenu *submenu = NULL; - BMenuItem *item = NULL; - w->Lock(); - - menubar = cast_as(myView->FindView("menubar"), BMenuBar); - if(menubar) - { - for(int i=0; iCountItems(); i++) - { - if(!strcmp( menubar->ItemAt(i)->Label(), menuHead)) - { - menu = menubar->SubmenuAt(i); - for(int j=0; jCountItems(); j++) - { - if(!strcmp( menu->ItemAt(j)->Label(), menuItem)) - { - submenu = menu->SubmenuAt(j); - if(submenu) - { - for(int k=0; kCountItems(); k++) - { - if(!strcmp( submenu->ItemAt(k)->Label(), subMenuItem)) - { - switch(myOption) - { - case 0: - submenu->ItemAt(k)->SetEnabled(false); - break; - case 1: - submenu->ItemAt(k)->SetEnabled(true); - break; - case 2: - submenu->ItemAt(k)->SetMarked(true); - break; - case 3: - submenu->ItemAt(k)->SetMarked(false); - break; - case 4: - submenu->RemoveItem( submenu->ItemAt(k) ); - if(submenu->CountItems() == 0) { - if(menu->RemoveItem(submenu)) - menu->AddItem(new BMenuItem(menuItem, new BMessage(YABMENU)), j); - } - break; - } - break; - } - } - } - } - } - } - } - } - - w->Unlock(); - } - else - ErrorGen("Unable to lock window"); - } - else - if(myOption>-1) Error(view, "VIEW"); - else ErrorGen("Unknown option"); -} - -void YabInterface::Menu3(const char* menuHead, const char* menuItem, const char* option,const char* view) -{ - int myOption = -1; - BString t(option); - if(t.IFindFirst("disable")!=B_ERROR) myOption = 0; - if(t.IFindFirst("enable")!=B_ERROR) myOption = 1; - if(t.IFindFirst("mark")!=B_ERROR) myOption = 2; - if(t.IFindFirst("plain")!=B_ERROR) myOption = 3; - if(t.IFindFirst("remove")!=B_ERROR) myOption = 4; - - YabView *myView = cast_as((BView*)viewList->GetView(view), YabView); - if(myView && myOption>-1) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - BMenuBar *menubar; - BMenu *menu = NULL; -// BMenuItem *item = NULL; - w->Lock(); - - menubar = cast_as(myView->FindView("menubar"), BMenuBar); - if(menubar != NULL) - { - for(int i=0; iCountItems(); i++) - if(!strcmp( menubar->ItemAt(i)->Label(), menuHead)) - { - menu = menubar->SubmenuAt(i); - for(int j=0; jCountItems(); j++) - if(!strcmp( menu->ItemAt(j)->Label(), menuItem)) - { - switch(myOption) - { - case 0: - menu->ItemAt(j)->SetEnabled(false); - break; - case 1: - menu->ItemAt(j)->SetEnabled(true); - break; - case 2: - menu->ItemAt(j)->SetMarked(true); - break; - case 3: - menu->ItemAt(j)->SetMarked(false); - break; - case 4: - menu->RemoveItem( menu->ItemAt(j) ); - } - break; - } - } - } - w->Unlock(); - } - else - ErrorGen("Unable to lock window"); - } - else - if(myOption>-1) Error(view, "VIEW"); - else ErrorGen("Unknown option"); -} - -void YabInterface::SpinControl(double x, double y, const char* id, const char* label, int min, int max, int step, const char* view) -{ - YabView *myView = cast_as((BView*)viewList->GetView(view), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - Spinner *mySpin = new Spinner(BRect(x,y,x+10,y+10), id, label, min, max, step, NULL); - if(w->layout == -1) - mySpin->SetResizingMode(B_FOLLOW_RIGHT|B_FOLLOW_BOTTOM); - else - mySpin->SetResizingMode(w->layout); - myView->AddChild(mySpin); - mySpin->SetViewColor(myView->ViewColor()); - w->Unlock(); - } - else - ErrorGen("Unable to lock window"); - } - else - Error(view, "VIEW"); -} - -void YabInterface::SpinControl(const char* spinControl, int value) -{ - YabView *myView = NULL; - Spinner *mySpin = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - mySpin = cast_as(myView->FindView(spinControl),Spinner); - if(mySpin) - { - mySpin->SetValue(value); - w->Unlock(); - return; - } - w->Unlock(); - } - } - } - Error(spinControl, "SPINCONTROL"); -} - -int YabInterface::SpinControlGet(const char *spinControl) -{ - int ret = 0; - YabView *myView = NULL; - Spinner *mySpin = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - mySpin = cast_as(myView->FindView(spinControl),Spinner); - if(mySpin) - { - ret = mySpin->Value(); - w->Unlock(); - return ret; - } - w->Unlock(); - } - } - } - Error(spinControl, "SPINCONTROL"); -} - -const char* YabInterface::PopUpMenu(double x, double y, const char* menuItems, const char* view) -{ - BString t(menuItems); - YabView *myView = cast_as((BView*)viewList->GetView(view), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - const char* res; - w->Lock(); - BPopUpMenu *returnMe = new BPopUpMenu( "YabPopup", false, false ); - returnMe->SetAsyncAutoDestruct(true); - - int oldi = 0; - for(int i=0; iAddItem(new BSeparatorItem()); - else - returnMe->AddItem(new BMenuItem(_L(j.String()), NULL)); - oldi=i+1; - } - BString j; - t.CopyInto(j,oldi, t.Length()-oldi); - returnMe->AddItem(new BMenuItem(j.String(), NULL)); - - BMenuItem *result = returnMe->Go(myView->ConvertToScreen(BPoint(x,y)), false, true); - if(result) - { - res = result->Label(); - w->Unlock(); - return res; - } - w->Unlock(); - } - else - ErrorGen("Unable to lock window"); - } - else - Error(view, "VIEW"); - - return ""; -} - -void YabInterface::DropBoxSelect(const char* dropbox, int position) -{ - YabView *myView = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - BMenuField *myMenuField = cast_as(myView->FindView(dropbox), BMenuField); - if(myMenuField) - { - BMenu *myMenu = (BMenu*)myMenuField->Menu(); - if(myMenu) - { - if(position<1) position = 1; - if(position>=myMenu->CountItems()) - position = myMenu->CountItems(); - if(myMenu->CountItems()!=0) - (myMenu->ItemAt(position-1))->SetMarked(true); - w->Unlock(); - return; - } - } - w->Unlock(); - } - } - } - Error(dropbox, "DROPBOX"); -} - -void YabInterface::DropBoxClear(const char* dropbox) -{ - YabView *myView = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - BMenuField *myMenuField = cast_as(myView->FindView(dropbox), BMenuField); - if(myMenuField) - { - BMenu *myMenu = (BMenu*)myMenuField->Menu(); - if(myMenu) - { - while(myMenu->CountItems()>0) - { - BMenuItem *myItem = myMenu->RemoveItem(myMenu->CountItems()-1); - delete myItem; - } - - // bad workaround! Add an empty MenuItem and delete it again - // so that the menu changes - BMenuItem *myItem = new BMenuItem("", NULL); - myMenu->AddItem(myItem); - myItem->SetMarked(true); - myMenu->RemoveItem(myItem); - delete myItem; - - w->Unlock(); - return; - } - } - w->Unlock(); - } - } - } - Error(dropbox, "DROPBOX"); -} - -void YabInterface::DropBoxRemove(const char* dropbox, int position) -{ - YabView *myView = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - BMenuField *myMenuField = cast_as(myView->FindView(dropbox), BMenuField); - if(myMenuField) - { - BMenu *myMenu = (BMenu*)myMenuField->Menu(); - if(myMenu) - { - position --; - if(position<0) position = 0; - if(position>=myMenu->CountItems()) - position = myMenu->CountItems()-1; - - if(myMenu->CountItems()!=0) - { - BMenuItem *myItem = myMenu->ItemAt(position); - if(myItem->IsMarked()) - { - if(myMenu->CountItems()>1 && position>0) - (myMenu->ItemAt(position-1))->SetMarked(true); - else if(myMenu->CountItems()>1 && position == 0) - (myMenu->ItemAt(position+1))->SetMarked(true); - else - { - BMenuItem *myItem = new BMenuItem("", NULL); - myMenu->AddItem(myItem); - myItem->SetMarked(true); - myMenu->RemoveItem(myItem); - delete myItem; - } - - } - myMenu->RemoveItem(myItem); - delete myItem; - } - w->Unlock(); - return; - } - } - w->Unlock(); - } - } - } - Error(dropbox, "DROPBOX"); -} - -int YabInterface::DropBoxCount(const char* dropbox) -{ - int ret = -1; - YabView *myView = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - BMenuField *myMenuField = cast_as(myView->FindView(dropbox), BMenuField); - if(myMenuField) - { - BMenu *myMenu = (BMenu*)myMenuField->Menu(); - if(myMenu) - { - ret = myMenu->CountItems(); - w->Unlock(); - return ret; - } - } - w->Unlock(); - } - } - } - Error(dropbox, "DROPBOX"); -} - -const char* YabInterface::DropBoxGet(const char* dropbox, int position) -{ - YabView *myView = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - BMenuField *myMenuField = cast_as(myView->FindView(dropbox), BMenuField); - if(myMenuField) - { - BMenu *myMenu = (BMenu*)myMenuField->Menu(); - if(myMenu) - { - const char *ret; - position --; - if(position<0) position = 0; - if(position>=myMenu->CountItems()) - position = myMenu->CountItems()-1; - if(myMenu->CountItems()!=0) - { - ret = (myMenu->ItemAt(position))->Label(); - w->Unlock(); - return ret; - } - else - { - w->Unlock(); - return ""; - } - } - } - w->Unlock(); - } - } - } - Error(dropbox, "DROPBOX"); -} - -double YabInterface::MenuHeight() -{ - double ret = -1; - for(int i=0; iLock(); - menubar = cast_as(w->FindView("menubar"), BMenuBar); - if(menubar) - { - ret = menubar->Bounds().bottom - menubar->Bounds().top; - w->Unlock(); - break; - } - w->Unlock(); - } - } - return ret; -} - -double YabInterface::TabHeight() -{ - BFont f = be_plain_font; - font_height fh; - f.GetHeight(&fh); - return fh.ascent + fh.descent + fh.leading + 10.0f; -} - -double YabInterface::ScrollbarWidth() -{ - return B_H_SCROLL_BAR_HEIGHT; -} - -const int YabInterface::IsMouseIn(const char* view) -{ - int t = 2; - YabView *myView = cast_as((BView*)viewList->GetView(view), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - t = myView->mouseMovedInfo; - w->Unlock(); - } - else - ErrorGen("Unable to lock window"); - } - else - Error(view, "VIEW"); - return 1-t; -} - -const char* YabInterface::GetMouseIn() -{ - snooze(20000); - BString ts; - mousemessagebuffer[0] = '\0'; - - int handled = -1; - YabView *myView = NULL; - - for(int i=0; iIsActive()) - { - w->Lock(); - - BView *view = w->LastMouseMovedView(); - if(!view) - { - w->Unlock(); - break; - } - - if(is_kind_of(view->Parent(), BTextControl)) - view = view->Parent(); - if(is_kind_of(view->Parent(), Spinner)) - view = view->Parent(); - if(is_kind_of(view->Parent(), CalendarControl)) - view = view->Parent(); - if(is_kind_of(view->Parent(), BColorControl)) - view = view->Parent(); - if(is_kind_of(view->Parent(), YabText)) - view = view->Parent(); - if(is_kind_of(view->Parent(), BColumnListView)) - view = view->Parent(); - if(is_kind_of(view, BBox)) - view = view->Parent(); - if(is_kind_of(view, BMenuBar)) - view = view->Parent(); - - BString name = view->Name(); - BPoint coordinates; - uint32 buttons; - - view->GetMouse(&coordinates, &buttons); - - ts << name << ":" << (int)coordinates.x << ":" << (int)coordinates.y << ":"; - if(buttons & B_PRIMARY_MOUSE_BUTTON) - ts << 1 << ":"; - else - ts << 0 << ":"; - if(buttons & B_TERTIARY_MOUSE_BUTTON) - ts << 1 << ":"; - else - ts << 0 << ":"; - if(buttons & B_SECONDARY_MOUSE_BUTTON) - ts << 1; - else - ts << 0; - - w->Unlock(); - } - } - - strcpy(mousemessagebuffer, ts.String()); - return (char*)mousemessagebuffer; -} - -const char* YabInterface::KeyboardMessages(const char* view) -{ - snooze(20000); - keyboardbuffer[0] = '\0'; - YabView *myView = cast_as((BView*)viewList->GetView(view), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - BString t(""); - w->Lock(); - // if(!myView->IsFocus()) myView->MakeFocus(true); - if(myView->IsFocus()) - t << myView->pressedKeys; - w->Unlock(); - strcpy(keyboardbuffer, t.String()); - } - else - ErrorGen("Unable to lock window"); - } - else - Error(view, "VIEW"); - return (char*)keyboardbuffer; -} - -const char* YabInterface::GetMouseMessages(const char* view) -{ - snooze(20000); - mousemessagebuffer[0] = '\0'; - YabView *myView = cast_as((BView*)viewList->GetView(view), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - BString t(""); - w->Lock(); - t << myView->mouseX; t += ":"; - t << myView->mouseY; t += ":"; - t << myView->mouseLButton; t += ":"; - t << myView->mouseMButton; t += ":"; - t << myView->mouseRButton; - w->Unlock(); - strcpy(mousemessagebuffer, t.String()); - } - else - ErrorGen("Unable to lock window"); - } - else - { - for(int i=0; iCountItems(); i++) - { - YabBitmapView *myView = (YabBitmapView*)yabcanvas->ItemAt(i); - if(!strcmp(myView->Name(), view)) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - BString t(""); - w->Lock(); - t << myView->mouseX; t += ":"; - t << myView->mouseY; t += ":"; - t << myView->mouseLButton; t += ":"; - t << myView->mouseMButton; t += ":"; - t << myView->mouseRButton; - w->Unlock(); - strcpy(mousemessagebuffer, t.String()); - return (char*)mousemessagebuffer; - } - else - ErrorGen("Unable to lock window"); - } - } - Error(view, "VIEW"); - } - return (char*)mousemessagebuffer; -} - -int YabInterface::ThreadKill(const char* option, int id) -{ - int isTeam = -1; - int ret = 0; - BString t(option); - if(t.IFindFirst("teamid")!=B_ERROR) isTeam = 1; - if(t.IFindFirst("threadid")!=B_ERROR) isTeam = 0; - if(isTeam==1) - { - if(kill_team(id)==B_OK) ret = 1; - } - else if(isTeam==0) - { - if(kill_thread(id)==B_OK) ret = 1; - } - else - ErrorGen("Unknown Option"); - - return ret; -} - -int YabInterface::ThreadGet(const char* option, const char* appname) -{ - int isTeam = -1; - int ret = -1; - BString t(option); - if(t.IFindFirst("teamid")!=B_ERROR) isTeam = 1; - if(t.IFindFirst("threadid")!=B_ERROR) isTeam = 0; - if(isTeam==0) - { - ret = find_thread(appname); - if(ret == B_NAME_NOT_FOUND) ret = -1; - } - else if(isTeam==1) - { - int32 cookie=0; - team_info info; - BString t(appname); - while (get_next_team_info(&cookie, &info) == B_OK) - { - if(t.FindFirst(info.args)==B_OK) - { - ret = info.team; - break; - } - } - } - else - ErrorGen("Unknown Option"); - - return ret; -} -//Correction of Subitem by Stephan Aßmus on BeGeistert 2018 -void YabInterface::Bitmap(double w, double h, const char* id) -{ - char *t; - BBitmap *b = new BBitmap(BRect(0,0,w-1,h-1), B_RGBA32, true); - BView *bview = new BView(BRect(0,0,w-1,h-1), id, B_FOLLOW_NONE, 0); - - //bview->SetDrawingMode(B_OP_ALPHA); - //bview->SetViewColor(255,255,255,255); - b->AddChild(bview); - - memset(b->Bits(), 0, b->BitsLength()); -// t = (char*)b->Bits(); -// for(int i=0; iAddItem(b); -} - -int YabInterface::BitmapColor(double x, double y, const char* bitmap, const char* option) -{ - int rgb = 0; - BString tmp(option); - if(tmp.IFindFirst("red")!=B_ERROR) rgb = 1; - else if(tmp.IFindFirst("green")!=B_ERROR) rgb = 2; - else if(tmp.IFindFirst("blue")!=B_ERROR) rgb = 3; - else - ErrorGen("Unknown Option"); - - for(int i=0; iCountItems(); i++) - { - BBitmap *b = (BBitmap*)yabbitmaps->ItemAt(i); - BView *bview = b->FindView(bitmap); - if(bview) - { - int t = b->BytesPerRow()*(int)y + (int)x*4; - unsigned char* bits = (unsigned char*)b->Bits(); - if(t <= b->BitsLength()) - if(rgb == 1) - return (int)bits[t]; - else if(rgb == 2) - return (int)bits[t+1]; - else if(rgb == 3) - return (int)bits[t+2]; - return 0; - } - } - Error(bitmap, "BITMAP"); -} - -void YabInterface::BitmapDraw(double x, double y, const char* bitmap, const char* mode, const char* view) -{ - drawing_mode myMode; - BString tmp(mode); - if(tmp.IFindFirst("copy")!=B_ERROR) - myMode = B_OP_COPY; - else if(tmp.IFindFirst("alpha")!=B_ERROR) - myMode = B_OP_ALPHA; - else - ErrorGen("Unknown option"); - - for(int i=0; iCountItems(); i++) - { - BBitmap *b = (BBitmap*)yabbitmaps->ItemAt(i); - BView *bview = b->FindView(bitmap); - if(bview) - { - YabView *myView = cast_as((BView*)viewList->GetView(view), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - BBitmap *newb = new BBitmap(b->Bounds(), B_RGBA32); - - char* newbits = (char*)newb->Bits(); - char* oldbits = (char*)b->Bits(); - for(int j=0; jBitsLength(); j++) - newbits[j] = oldbits[j]; - - w->Lock(); - YabDrawing *t = new YabDrawing(); - t->command = 10; - t->x1 = x; t->y1 = y; - t->bitmap = newb; - myView->drawList->AddItem(t); - myView->Invalidate(); - w->Unlock(); - return; - } - else - ErrorGen("Unable to lock window"); - } - else - { - for(int i=0; iCountItems(); i++) - { - BBitmap *bb = (BBitmap*)yabbitmaps->ItemAt(i); - BView *bbview = bb->FindView(view); - if(bbview) - { - bb->Lock(); - drawing_mode t = bbview->DrawingMode(); - bbview->SetDrawingMode(myMode); - bbview->DrawBitmap(b, BPoint(x,y)); - bbview->SetDrawingMode(t); - bbview->Sync(); - bb->Unlock(); - return; - } - } - for(int i=0; iCountItems(); i++) - { - YabBitmapView *myView = (YabBitmapView*)yabcanvas->ItemAt(i); - if(!strcmp(myView->Name(), view)) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - BBitmap *bb = myView->GetBitmap(); - BView *bView = myView->GetBitmapView(); - bb->Lock(); - drawing_mode t = bView->DrawingMode(); - bView->SetDrawingMode(myMode); - bView->DrawBitmap(b, BPoint(x,y)); - bView->Sync(); - bView->SetDrawingMode(t); - bb->Unlock(); - - myView->Draw(BRect(x,y,x+b->Bounds().Width(),y+b->Bounds().Height())); - w->Unlock(); - return; - } - else - ErrorGen("Unable to lock window"); - } - } - Error(view, "VIEW, BITMAP or CANVAS"); - } - } - } - Error(bitmap, "BITMAP"); -} - -void YabInterface::BitmapDraw(BRect frame, const char* bitmap, const char* mode, const char* view) -{ - int scaling = 0; - if(frame.right == -1) scaling = 1; - if(frame.bottom == -1) scaling = 2; - if(frame.right == -1 && frame.bottom == -1) scaling = 3; - - drawing_mode myMode; - BString tmp(mode); - if(tmp.IFindFirst("copy")!=B_ERROR) - myMode = B_OP_COPY; - else if(tmp.IFindFirst("alpha")!=B_ERROR) - myMode = B_OP_ALPHA; - else - ErrorGen("Unknown option"); - - for(int i=0; iCountItems(); i++) - { - BBitmap *b = (BBitmap*)yabbitmaps->ItemAt(i); - BView *bview = b->FindView(bitmap); - if(bview) - { - BRect newframe; - switch(scaling) - { - case 1: - { - BRect t(b->Bounds()); - double width; - newframe = frame; - width = (t.right-t.left)*((frame.bottom-frame.top)/(t.bottom-t.top)); - newframe.right = newframe.left+width; - } - break; - case 2: - { - BRect t(b->Bounds()); - double height; - newframe = frame; - height = (t.bottom-t.top)*((frame.right-frame.left)/(t.right-t.left)); - newframe.bottom = newframe.top+height; - } - break; - case 3: newframe = b->Bounds(); - break; - default: newframe = frame; - } - - YabView *myView = cast_as((BView*)viewList->GetView(view), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - BBitmap *newb = new BBitmap(b->Bounds(), B_RGBA32); - char* newbits = (char*)newb->Bits(); - char* oldbits = (char*)b->Bits(); - for(int j=0; jBitsLength(); j++) - newbits[j] = oldbits[j]; - w->Lock(); - YabDrawing *t = new YabDrawing(); - t->command = 11; - t->x1 = newframe.left; t->y1 = newframe.top; - t->x2 = newframe.right; t->y2 = newframe.bottom; - t->bitmap = newb; - myView->drawList->AddItem(t); - myView->Invalidate(); - w->Unlock(); - return; - } - else - ErrorGen("Unable to lock window"); - } - else - { - for(int i=0; iCountItems(); i++) - { - BBitmap *bb = (BBitmap*)yabbitmaps->ItemAt(i); - BView *bbview = bb->FindView(view); - if(bbview) - { - bb->Lock(); - drawing_mode t = bbview->DrawingMode(); - bbview->SetDrawingMode(myMode); - bbview->DrawBitmap(b, newframe); - bbview->SetDrawingMode(t); - bbview->Sync(); - bb->Unlock(); - return; - } - } - for(int i=0; iCountItems(); i++) - { - YabBitmapView *myView = (YabBitmapView*)yabcanvas->ItemAt(i); - if(!strcmp(myView->Name(), view)) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - BBitmap *bb = myView->GetBitmap(); - BView *bView = myView->GetBitmapView(); - bb->Lock(); - drawing_mode t = bView->DrawingMode(); - bView->SetDrawingMode(myMode); - bView->DrawBitmap(b, frame); - bView->Sync(); - bView->SetDrawingMode(t); - bb->Unlock(); - - myView->Draw(newframe); - w->Unlock(); - return; - } - else - ErrorGen("Unable to lock window"); - } - } - Error(view, "VIEW, BITMAP or CANVAS"); - } - } - } - Error(bitmap, "BITMAP"); -} -//Correction added of Width and Height and transparency Pixel of the right and bottom side -void YabInterface::BitmapGet(BRect frame, const char* id, const char* bitmap) -{ - - for(int i=0; iCountItems(); i++) - { - BBitmap *b = (BBitmap*)yabbitmaps->ItemAt(i); - BView *bview = b->FindView(bitmap); - - if(bview) - { - char *oldbits, *newbits; - - BBitmap *newbmp = new BBitmap(BRect(0,0, frame.Width()-1, frame.Height()-1), B_RGBA32, true); //-1 Added, because correction of right and height limit - BView *newbview = new BView(BRect(0,0, frame.Width()-1, frame.Height()-1), id, B_FOLLOW_NONE, 0);//-1 Added, because correction of right and height limit - - newbmp->AddChild(newbview); - newbits = (char*)newbmp->Bits(); - for(int i=0; i<(frame.Width()-1)*(frame.Height()-1)*4; i = i + 4) //-1 Added, because correction of right and height limit - { - newbits[i] = newbits[i+1] = newbits[i+2] = 255; - newbits[i+3] = 0; - } - oldbits = (char*)b->Bits(); - b->Lock(); - BRect tframe = bview->Bounds(); - b->Unlock(); - if(frame.top>tframe.bottom || frame.left>tframe.right || (frame.bottom-1)>tframe.bottom || (frame.right-1)>tframe.right || frame.top<0 || frame.left<0 || frame.right<0 || frame.bottom<0) - ErrorGen("Out of bounds"); - for(int32 j = 0; jBytesPerRow()+k*4+l] = oldbits[(int32)((j+frame.top)*b->BytesPerRow()+(k+frame.left)*4+l)]; - yabbitmaps->AddItem(newbmp); - return; - } - } - for(int i=0; iCountItems(); i++) - { - YabBitmapView *myView = (YabBitmapView*)yabcanvas->ItemAt(i); - - if(!strcmp(myView->Name(), bitmap)) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - BBitmap *b = myView->GetBitmap(); - char *oldbits, *newbits; - BBitmap *newbmp = new BBitmap(BRect(0,0, frame.Width()-1, frame.Height()-1), B_RGBA32, true);//-1 Added, because correction of right and height limit - BView *newbview = new BView(BRect(0,0, frame.Width()-1, frame.Height()-1), id, B_FOLLOW_NONE, 0);//-1 Added, because correction of right and height limit - newbmp->AddChild(newbview); - newbits = (char*)newbmp->Bits(); - - for(int i=0; i<(frame.Width()-1)*(frame.Height()-1)*4; i = i + 4) //-1 Added, because correction of right and height limit - { - newbits[i] = newbits[i+1] = newbits[i+2] = 255; - newbits[i+3] = 0; - } - oldbits = (char*)b->Bits(); - BRect tframe = myView->Bounds(); - if(frame.top>tframe.bottom || frame.left>tframe.right || (frame.bottom-1)>tframe.bottom || (frame.right-1)>tframe.right || frame.top<0 || frame.left<0 || frame.right<0 || frame.bottom<0) - ErrorGen("Out of bounds"); - for(int32 j = 0; jBytesPerRow()+k*4+l] = oldbits[(int32)((j+frame.top)*b->BytesPerRow()+(k+frame.left)*4+l)]; - yabbitmaps->AddItem(newbmp); - w->Unlock(); - return; - } - } - } - Error(bitmap, "BITMAP or CANVAS"); -} - -void YabInterface::BitmapGet(double w, const char* id, const char* path) -{ - double h = w; - BRect iFrame = BRect(0, 0, w-1, h-1); - BBitmap *iBitmap = new BBitmap(iFrame, B_CMAP8, true); - BBitmap *fBitmap = new BBitmap(iFrame, B_RGBA32, true); - BView *bview = new BView(iFrame, id, B_FOLLOW_NONE, 0); - fBitmap->AddChild(bview); - - - //memset(fBitmap->Bits(), 0, fBitmap->BitsLength()); - char *b; - b = (char*)fBitmap->Bits(); - for(int i=0; iLock(); - bview->DrawBitmap( iBitmap, iFrame ); - fBitmap->Unlock(); - - delete fNode; - delete iBitmap; - yabbitmaps->AddItem(fBitmap); -} - -void YabInterface::BitmapGetIcon(const char* id, const char* option, const char* path) -{ - BString fString(option); - if( fString.IFindFirst("Path") != B_ERROR ) - { - int w; - int h = w = 32; - BRect iFrame = BRect(0, 0, w-1, h-1); - BBitmap *iBitmap = new BBitmap(iFrame, B_CMAP8, true); - BBitmap *fBitmap = new BBitmap(iFrame, B_RGBA32, true); - BView *bview = new BView(iFrame, id, B_FOLLOW_NONE, 0); - fBitmap->AddChild(bview); - - char *b; - //memset(fBitmap->Bits(), 0, fBitmap->BitsLength()); - b = (char*)fBitmap->Bits(); - for(int i=0; iLock(); - bview->DrawBitmap( iBitmap, iFrame ); - fBitmap->Unlock(); - - delete fNode; - delete iBitmap; - yabbitmaps->AddItem(fBitmap); - - } - else if( fString.IFindFirst("Mime") != B_ERROR ) - { - int w; - int h = w = 16; - icon_size iType = B_MINI_ICON; - if( fString.IFindFirst("Mime32") != B_ERROR ) - { - h = w = 32; - iType = B_LARGE_ICON; - } - - BRect iFrame = BRect(0, 0, w-1, h-1); - BBitmap *iBitmap = new BBitmap(iFrame, B_CMAP8, true); - BBitmap *fBitmap = new BBitmap(iFrame, B_RGBA32, true); - BView *bview = new BView(iFrame, id, B_FOLLOW_NONE, 0); - fBitmap->AddChild(bview); - - char *b; - memset(fBitmap->Bits(), 0, fBitmap->BitsLength()); - b = (char*)fBitmap->Bits(); - for(int i=0; iLock(); - bview->DrawBitmap(iBitmap, iFrame); - bview->Sync(); - fBitmap->Unlock(); - - delete iBitmap; - yabbitmaps->AddItem(fBitmap); - } - else - ErrorGen("Unknown option"); - -} - -void YabInterface::BitmapDrag(const char* bitmap) -{ -} - -void YabInterface::BitmapRemove(const char* bitmap) -{ - for(int i=0; iCountItems(); i++) - { - BBitmap *b = (BBitmap*)yabbitmaps->ItemAt(i); - BView *bview = b->FindView(bitmap); - if(bview) - { - yabbitmaps->RemoveItem(i); - delete b; - return; - } - } - Error(bitmap, "BITMAP"); -} - -void YabInterface::Screenshot(BRect frame, const char* bitmap) -{ - char *t; - int w = (int)frame.Width()-1; - int h = (int)frame.Height()-1; - - BRect area = BRect(0,0,w,h); - BBitmap *fBitmap = new BBitmap(area, B_RGBA32, true); - BView *bview = new BView(area, bitmap, B_FOLLOW_NONE, 0); - BScreen screen(B_MAIN_SCREEN_ID); - fBitmap->AddChild(bview); - //memset(fBitmap->Bits(), 0, fBitmap->BitsLength()); - t = (char*)fBitmap->Bits(); - for(int i=0; iAddItem(fBitmap); -} - -int YabInterface::BitmapLoad(const char* FileName, const char* id) -{ - BBitmap* myBitmap = NULL; - BFile imageFile; - BPath imagePath; - int ret = 0; - - if(*FileName=='/') - imageFile.SetTo(FileName, B_READ_ONLY); - else - if(!strcmp(ApplicationDirectory,"")) - { - if(imagePath.SetTo((const char*)ApplicationDirectory, FileName)==B_OK) - imageFile.SetTo(imagePath.Path(), B_READ_ONLY); - } - - if(imageFile.InitCheck()!=B_OK) - imageFile.SetTo(FileName, B_READ_ONLY); - - if(imageFile.InitCheck()!=B_OK) - return 1; - - Roster = BTranslatorRoster::Default(); - - if(!Roster) - return 2; - - BBitmapStream Stream; - - if(Roster->Translate(&imageFile, NULL, NULL, &Stream, B_TRANSLATOR_BITMAP)Bounds(), B_RGBA32, true); - BView *bview = new BView(myBitmap->Bounds(), id, B_FOLLOW_NONE, 0); - b->AddChild(bview); - /* - t = (char*)b->Bits(); - for(int i=0; iLock(); - drawing_mode mode = bview->DrawingMode(); - bview->SetDrawingMode(B_OP_ALPHA); - bview->DrawBitmap(myBitmap, myBitmap->Bounds()); - bview->SetDrawingMode(mode); - bview->Sync(); - b->Unlock(); - - delete Roster; - delete myBitmap; - - yabbitmaps->AddItem(b); - - return 0; -} - -int YabInterface::BitmapGet(const char* id, const char* option) -{ - BString t(option); - bool isWidth = false; - if(t.IFindFirst("height") != B_ERROR) - isWidth = false; - else if(t.IFindFirst("width") != B_ERROR) - isWidth = true; - else - ErrorGen("Unknown option"); - - for(int i=0; iCountItems(); i++) - { - BBitmap *b = (BBitmap*)yabbitmaps->ItemAt(i); - BView *bview = b->FindView(id); - if(bview) - { - BRect r = b->Bounds(); - if(isWidth) - return r.IntegerWidth(); //+1; - else - return r.IntegerHeight(); //+1; - } - } - Error(id, "BITMAP"); -} - -int YabInterface::BitmapSave(const char* id, const char* filename, const char* type) -{ - uint32 btype; - BString t(type); - if(t.IFindFirst("png") != B_ERROR) - btype = B_PNG_FORMAT; - else if(t.IFindFirst("jpg") != B_ERROR) - btype = B_JPEG_FORMAT; - else if(t.IFindFirst("tga") != B_ERROR) - btype = B_TGA_FORMAT; - else if(t.IFindFirst("tiff") != B_ERROR) - btype = B_TIFF_FORMAT; - else if(t.IFindFirst("ppm") != B_ERROR) - btype = B_PPM_FORMAT; - else if(t.IFindFirst("bmp") != B_ERROR) - btype = B_BMP_FORMAT; - else - ErrorGen("Unknown type"); - - for(int i=0; iCountItems(); i++) - { - BBitmap *b = (BBitmap*)yabbitmaps->ItemAt(i); - BView *bview = b->FindView(id); - if(bview) - { - BTranslatorRoster *roster = BTranslatorRoster::Default(); - BBitmapStream stream(b); // init with contents of bitmap - BFile file(filename, B_CREATE_FILE | B_WRITE_ONLY | B_ERASE_FILE); - if(roster->Translate(&stream, NULL, NULL, &file, btype) != B_OK) - return 1; - else - return 0; - } - } - Error(id, "BITMAP"); -} - -void YabInterface::Canvas(BRect frame, const char* id, const char* view) -{ - YabView *myView = cast_as((BView*)viewList->GetView(view), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - YabBitmapView *bmpView = new YabBitmapView(frame, id, B_FOLLOW_NONE, B_WILL_DRAW); - if(w->layout == -1) - bmpView->SetResizingMode(B_FOLLOW_RIGHT|B_FOLLOW_BOTTOM); - else - bmpView->SetResizingMode(w->layout); - myView->AddChild(bmpView); - yabcanvas->AddItem(bmpView); - myView->Invalidate(frame); - w->Unlock(); - return; - } - } - Error(view, "VIEW"); -} -int YabInterface::Sound(const char* filename) //Reactivate Sound Lorglas 2020.01.02 -{ - int soundplayer; - entry_ref ref; - BEntry entry(filename, true); - //Check, if filename is ok - if (entry.InitCheck() == B_OK) - if (entry.GetRef(&ref) == B_OK) - //delete playing fplayer, because we get no ID back from fplayer. So if we didn't deleting fplayer, a second sound will be played and the first one can't be stopped - delete fPlayer; - fPlayer = new BFileGameSound(&ref, false); - fPlayer->StartPlaying(); - soundplayer=1; - return soundplayer; -} - -int YabInterface::SoundStop(int32 soundplayer) //Reactivate Sound Lorglas 2020.01.02 -{ - //Check, if fplayer is NULL, then do nothing - if (fPlayer == NULL) { - } - //Check, if fplayer is Playing, then stop playing and delete fplayer - if (fPlayer->IsPlaying()) { - fPlayer->StopPlaying(); - delete fPlayer; - fPlayer = NULL; - soundplayer=0; - //printf("%d\n",finished); - return soundplayer; - } -} - -int YabInterface::SoundWait(int32 soundplayer) //Reactivate Sound Lorglas 2020.01.03 -{ - //Check, if fplayr is in Paused modus, if so Setpaused to false, so play again, if true fplayer paused - if (fPlayer->IsPaused()) { - fPlayer->SetPaused(false, 2); - } - else { - fPlayer->SetPaused(true, 0); - } - soundplayer=2; - return soundplayer; -} -void play_buffer(void *cookie, void * buffer, size_t size, const media_raw_audio_format & format) -{ - int64 frames = 0; - - playTrack->ReadFrames(buffer, &frames); - - if (frames <=0) { - player->SetHasData(false); - - } -} -int YabInterface::MediaSound(const char* filename) //Implementation MediaSound Lorglas 2020.01.02 code used and modified from media_client -{ - BUrl url; - entry_ref ref; - BMediaFile* playFile; - int finished; - if (get_ref_for_path(filename, &ref) != B_OK) - { - url.SetUrlString(filename); - if (url.IsValid()) - { - playFile = new BMediaFile(url); - } - else - { - return 2; - } - } - else - { - playFile = new BMediaFile(&ref); - } - if (playFile->InitCheck() != B_OK) - { - delete playFile; - return 2; - } - - for (int i = 0; i < playFile->CountTracks(); i++) - { - BMediaTrack* track = playFile->TrackAt(i); - if (track != NULL) - { - playFormat.type = B_MEDIA_RAW_AUDIO; - if ((track->DecodedFormat(&playFormat) == B_OK) && (playFormat.type == B_MEDIA_RAW_AUDIO)) - { - playTrack = track; - break; - } - playFile->ReleaseTrack(track); - } - } - - player = new BSoundPlayer(&playFormat.u.raw_audio, "playFile", play_buffer); - player->SetVolume(1.0f); - player->SetHasData(true); - player->Start(); - finished=1; - //printf(" %s is playing \n",filename); - return finished; - -} -int YabInterface::MediaSoundStop(int32 finished) //New Version Sound Lorglas 2020.01.02 -{ - //Check, if fplayer is NULL, then do nothing - if (finished==1) { - player->Stop(); - delete player; - finished=0; - //printf("%d\n",finished); - return finished; - } -} -void YabInterface::SetOption(const char* id, const char* option, double x, double y) -{ - BString tmp(option); - YabView *myView = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - BView *theView = cast_as(myView->FindView(id), BView); - if(theView) - { - if(tmp.IFindFirst("ResizeTo")!=B_ERROR) - theView->ResizeTo(x,y); - else if(tmp.IFindFirst("ResizeBy")!=B_ERROR) - theView->ResizeBy(x,y); - else if(tmp.IFindFirst("MoveTo")!=B_ERROR) - theView->MoveTo(x,y); - else if(tmp.IFindFirst("MoveBy")!=B_ERROR) - theView->MoveBy(x,y); - else - ErrorGen("Unknown option"); - theView->Invalidate(); - w->Unlock(); - return; - } - w->Unlock(); - } - } - } - Error(id, "VIEW"); -} - -void YabInterface::DrawSet(const char* option, const char* color,const char* view) -{ - BString tmp(option); - BString colstr(color); - rgb_color col; - if(colstr.IFindFirst("Panel-Background-Color")!=B_ERROR) - col = ui_color(B_PANEL_BACKGROUND_COLOR); - else if(colstr.IFindFirst("Panel-Text-Color")!=B_ERROR) - { - col = ui_color(B_PANEL_TEXT_COLOR); - } - else if(colstr.IFindFirst("Panel-Link-Color")!=B_ERROR) - { - col.red = 0; col.green = 0; col.blue = 255; - } - else if(colstr.IFindFirst("Menu-Background-Color")!=B_ERROR) - col = ui_color(B_MENU_BACKGROUND_COLOR); - else if(colstr.IFindFirst("Menu-Selection-Background-Color")!=B_ERROR) - col = ui_color(B_MENU_SELECTION_BACKGROUND_COLOR); - else if(colstr.IFindFirst("Menu-Item-Text-Color")!=B_ERROR) - col = ui_color(B_MENU_ITEM_TEXT_COLOR); - else if(colstr.IFindFirst("Menu-Selected-Item-Text-Color")!=B_ERROR) - col = ui_color(B_MENU_SELECTED_ITEM_TEXT_COLOR); - else if(colstr.IFindFirst("Keyboard-Navigation-Color")!=B_ERROR) - col = ui_color(B_KEYBOARD_NAVIGATION_COLOR); - else if(colstr.IFindFirst("Jan-Favorite-Color")!=B_ERROR) - { - col.red = 220; col.green = 220; col.blue = 250; - } - else - ErrorGen("Invalid color"); - if(colstr.IFindFirst("Lighten-1-Tint")!=B_ERROR) - col = tint_color(col, B_LIGHTEN_1_TINT); - else if(colstr.IFindFirst("Lighten-2-Tint")!=B_ERROR) - col = tint_color(col, B_LIGHTEN_2_TINT); - else if(colstr.IFindFirst("Lighten-Max-Tint")!=B_ERROR) - col = tint_color(col, B_LIGHTEN_MAX_TINT); - else if(colstr.IFindFirst("Darken-1-Tint")!=B_ERROR) - col = tint_color(col, B_DARKEN_1_TINT); - else if(colstr.IFindFirst("Darken-2-Tint")!=B_ERROR) - col = tint_color(col, B_DARKEN_2_TINT); - else if(colstr.IFindFirst("Darken-3-Tint")!=B_ERROR) - col = tint_color(col, B_DARKEN_3_TINT); - else if(colstr.IFindFirst("Darken-4-Tint")!=B_ERROR) - col = tint_color(col, B_DARKEN_4_TINT); - else if(colstr.IFindFirst("Darken-Max-Tint")!=B_ERROR) - col = tint_color(col, B_DARKEN_MAX_TINT); - else if(colstr.IFindFirst("Disabled-Label-Tint")!=B_ERROR) - col = tint_color(col, B_DISABLED_LABEL_TINT); - else if(colstr.IFindFirst("Disabled-Mark-Tint")!=B_ERROR) - col = tint_color(col, B_DISABLED_MARK_TINT); - else if(colstr.IFindFirst("Highlight-Background-Tint")!=B_ERROR) - col = tint_color(col, B_HIGHLIGHT_BACKGROUND_TINT); - col.alpha = yabAlpha; - - YabView *myView = cast_as((BView*)viewList->GetView(view), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - if(tmp.IFindFirst("BGColor")!=B_ERROR) - { - myView->SetViewColor(col); - myView->Invalidate(); - } - else if(tmp.IFindFirst("HighColor")!=B_ERROR) - { - if(yabAlpha == 255) - myView->SetDrawingMode(B_OP_COPY); - else - myView->SetDrawingMode(B_OP_ALPHA); - myView->SetHighColor(col); - YabDrawing *t = new YabDrawing(); - t->command = 6; - t->r = col.red; t->g = col.green; - t->b = col.blue; t->alpha = yabAlpha; - myView->drawList->AddItem(t); - } - else if(tmp.IFindFirst("LowColor")!=B_ERROR) - { - if(yabAlpha == 255) - myView->SetDrawingMode(B_OP_COPY); - else - myView->SetDrawingMode(B_OP_ALPHA); - myView->SetLowColor(col); - YabDrawing *t = new YabDrawing(); - t->command = 7; - t->r = col.red; t->g = col.green; - t->b = col.blue; t->alpha = yabAlpha; - myView->drawList->AddItem(t); - } - else - ErrorGen("Unknown option"); - w->Unlock(); - } - else - ErrorGen("Unable to lock window"); - } - else - { - for(int i=0; iCountItems(); i++) - { - BBitmap *bmp = (BBitmap*)yabbitmaps->ItemAt(i); - BView *bView = bmp->FindView(view); - if(bView) - { - if(tmp.IFindFirst("HighColor")!=B_ERROR) - { - bmp->Lock(); - if(yabAlpha == 255) - bView->SetDrawingMode(B_OP_COPY); - else - bView->SetDrawingMode(B_OP_ALPHA); - bView->SetHighColor(col); - bView->Sync(); - bmp->Unlock(); - return; - } - else if(tmp.IFindFirst("LowColor")!=B_ERROR) - { - bmp->Lock(); - if(yabAlpha == 255) - bView->SetDrawingMode(B_OP_COPY); - else - bView->SetDrawingMode(B_OP_ALPHA); - bView->SetLowColor(col); - bView->Sync(); - bmp->Unlock(); - return; - } - else - ErrorGen("Unknown option"); - } - } - for(int i=0; iCountItems(); i++) - { - YabBitmapView *myView = (YabBitmapView*)yabcanvas->ItemAt(i); - if(!strcmp(myView->Name(), view)) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - BBitmap *bmp = myView->GetBitmap(); - BView *bView = myView->GetBitmapView(); - if(tmp.IFindFirst("HighColor")!=B_ERROR) - { - bmp->Lock(); - if(yabAlpha == 255) - bView->SetDrawingMode(B_OP_COPY); - else - bView->SetDrawingMode(B_OP_ALPHA); - bView->SetHighColor(col); - bView->Sync(); - bmp->Unlock(); - w->Unlock(); - return; - } - else if(tmp.IFindFirst("LowColor")!=B_ERROR) - { - bmp->Lock(); - if(yabAlpha == 255) - bView->SetDrawingMode(B_OP_COPY); - else - bView->SetDrawingMode(B_OP_ALPHA); - bView->SetLowColor(col); - bView->Sync(); - bmp->Unlock(); - w->Unlock(); - return; - } - else - ErrorGen("Unknown option"); - } - else - ErrorGen("Unable to lock window"); - } - } - Error(view, "VIEW, BITMAP or CANVAS"); - } -} - -void YabInterface::Treebox13(const char* id,const char* option, int pos) -{ -} - -int YabInterface::TreeboxGetOpt(const char* id, const char* option, int pos) -{ -} - -int YabInterface::ListboxGetNum(const char* id) -{ - YabView *myView = NULL; - BListView *myList = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - myList = cast_as(myView->FindView(id), BListView); - if(myList) - { - int32 t = myList->CurrentSelection(); - w->Unlock(); - return t+1; - } - w->Unlock(); - } - } - } - Error(id, "LISTBOX"); -} - -int YabInterface::DropboxGetNum(const char* id) -{ - YabView *myView = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - BMenuField *myMenuField = cast_as(myView->FindView(id), BMenuField); - if(myMenuField) - { - BMenu *myMenu = (BMenu*)myMenuField->Menu(); - if(myMenu) - { - int32 ret; - ret = myMenu->IndexOf(myMenu->FindMarked()); - w->Unlock(); - return ret; - } - } - w->Unlock(); - } - } - } - Error(id, "DROPBOX"); -} - -int YabInterface::TreeboxGetNum(const char* id) -{ - YabView *myView = NULL; - BOutlineListView *myList = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - myList = cast_as(myView->FindView(id), BOutlineListView); - if(myList) - { - int32 t = myList->FullListCurrentSelection(); - w->Unlock(); - return t+1; - } - w->Unlock(); - } - } - } - Error(id, "TREEBOX"); -} - -int YabInterface::ColumnboxGetNum(const char* id) -{ - YabView *myView = NULL; - BColumnListView *myList = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - myList = cast_as(myView->FindView(id), BColumnListView); - if(myList) - { - int32 t = myList->IndexOf(myList->CurrentSelection()); - w->Unlock(); - return t+1; - } - w->Unlock(); - } - } - } - Error(id, "COLUMNBOX"); -} - -void YabInterface::Attribute1(const char* type, const char* name, const char* value, const char* filename) -{ - - // fix to work properly with string and bool types. - BNode node(filename); - if(node.InitCheck() != B_OK) - ErrorGen("Attribute file not found!"); - BString tempvalue(value); - - - type_code typecode; - BString typeStr(type); - if(typeStr.IFindFirst("string")!=B_ERROR) - { - int32 x = tempvalue.Length(); - typecode = B_STRING_TYPE; - x++; - node.WriteAttr(name, typecode, 0, value, x); - } - else if(typeStr.IFindFirst("mime")!=B_ERROR) - { - int32 x = tempvalue.Length(); - typecode = B_MIME_STRING_TYPE; - x++; - node.WriteAttr(name, typecode, 0, value, x); - } - else if(typeStr.IFindFirst("bool")!=B_ERROR) - { - typecode = B_BOOL_TYPE; - int32 x=1; - char str[1]; - str[0]=1; - const char* tf = str; - if (tempvalue.IFindFirst("false") !=B_ERROR) - tf=""; - node.WriteAttr(name, typecode, 0, tf, x); - } - - - else if(typeStr.IFindFirst("int")!=B_ERROR) - { - int32 x = tempvalue.Length(); - typecode = B_INT32_TYPE; - node.WriteAttr(name, typecode, 0, value, x); - } - - - else if(typeStr.IFindFirst("double")!=B_ERROR) - { - int32 x = tempvalue.Length(); - typecode = B_DOUBLE_TYPE; - node.WriteAttr(name, typecode, 0, value, x); - } - else if(typeStr.IFindFirst("float")!=B_ERROR) - { - int32 x = tempvalue.Length(); - typecode = B_FLOAT_TYPE; - node.WriteAttr(name, typecode, 0, value, x); - } - else if(typeStr.IFindFirst("long")!=B_ERROR) - { - int32 x = tempvalue.Length(); - typecode = B_INT64_TYPE; - node.WriteAttr(name, typecode, 0, value, x); - } - else - ErrorGen("Unknown attribute type!"); - - - -} - -void YabInterface::AttributeClear(const char* name, const char* filename) -{ - BNode node(filename); - if(node.InitCheck() != B_OK) - ErrorGen("Attribute file not found!"); - node.RemoveAttr(name); -} - -const char* YabInterface::AttributeGet1(const char* name, const char* filename) -{ - BString tempname(name); - BNode node(filename); - if(node.InitCheck() != B_OK){ - if (tempname.Length() >0) - ErrorGen("Attribute file not found!"); - BString appdir = mainFileName; - int32 i = appdir.FindLast("/"); - appdir.Truncate(i); - return appdir; - } - - if (tempname.Length() >0) - { - attr_info attr; - if(node.GetAttrInfo(name, &attr) != B_OK) - ErrorGen("Attribute not found!"); - - int size = attr.size; - if(size>32568) - size = 32568; - if(node.ReadAttr(name,attr.type, 0, attrbuffer, size) == 0) - return ""; - - if (attr.type == B_BOOL_TYPE) - { - int x = 0; - if (attrbuffer[0] == x) - { - return "false"; - } - else - { - return "true"; - } - } - - return (char*)attrbuffer; - } - else - { - BString List=""; - BString sp=" | "; - BString Attrtype; - char buf[B_ATTR_NAME_LENGTH]; - while (node.GetNextAttrName(buf) == B_OK) - { - attr_info attr; - if(node.GetAttrInfo(buf, &attr) != B_OK) - ErrorGen("Attribute not found!"); - uint32 attrtype; - attrtype=attr.type; - switch(attrtype) - { - case B_BOOL_TYPE: - Attrtype="Bool"; - break; - case B_STRING_TYPE: - Attrtype = "String"; - break; - case B_MIME_STRING_TYPE: - Attrtype = "Mime"; - break; - case B_INT32_TYPE: - Attrtype = "Int"; - break; - case B_DOUBLE_TYPE: - Attrtype = "Double"; - break; - case B_FLOAT_TYPE: - Attrtype = "Float"; - break; - case B_INT64_TYPE: - Attrtype = "Long"; - break; - default: - Attrtype = "Unsupported"; - break; - } - - - List << buf << sp << Attrtype << sp; - } - - - - return List.String(); - - } -} - -double YabInterface::AttributeGet2(const char* name, const char* filename) -{ - BNode node(filename); - if(node.InitCheck() != B_OK) - ErrorGen("Attribute file not found!"); - - attr_info attr; - if(node.GetAttrInfo(name, &attr) != B_OK) - ErrorGen("Attribute not found!"); - int size = attr.size; - if(size>32568) - size = 32568; - if(node.ReadAttr(name,attr.type, 0, attrbuffer, size) == 0) - return 0.0; - if (attr.type == B_BOOL_TYPE) - { - int x = 0; - if (attrbuffer[0] == x) - { - return 0.0; - } - else - { - return 1.0; - } - } - - - if(node.ReadAttr(name, 0, 0, attrbuffer, size) == 0) - return 0.0; - return atof((char*)attrbuffer); -} -void YabInterface::ShortCut(const char* view, const char* key, const char* msg) -{ - char myShortcut; - int32 modifiers = 0; - BString t(key); - if(t.Length()>1) - { - myShortcut = key[t.Length()-1]; - if(t.IFindFirst("s")!=B_ERROR && t.IFindFirst("s")GetView(view), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - BMessage *mesg = new BMessage(YABSHORTCUT); - mesg->AddString("shortcut", msg); - w->AddShortcut(myShortcut, modifiers, mesg); - w->Unlock(); - return; - } - } - Error(view,"VIEW"); -} - -int YabInterface::IsComputerOn() -{ - return is_computer_on(); -} - -void YabInterface::MouseSet(const char* opt) -{ - BString t(opt); - if(t.IFindFirst("Hide")!=B_ERROR) - HideCursor(); - else if(t.IFindFirst("Show")!=B_ERROR) - ShowCursor(); - else if(t.IFindFirst("Obscure")!=B_ERROR) - ObscureCursor(); - else ErrorGen("Unknown option"); -} - -const char* YabInterface::GetMessageString() -{ - snooze(20000); - BString tmp(""); - if(exiting) - { - tmp += "_QuitRequested|"; - exiting = false; - } - tmp += localMessage; - localMessage = ""; - for(int i=0; iTitle(), "_TOOLTIPWINDOW") && strcmp(WindowAt(i)->Title(), "_CALENDARWINDOW")) - - - YabWindow *w = cast_as(WindowAt(i), YabWindow); - if(w) - { - - w->Sync(); - if(w->Lock()) - { - tmp += w->getMessages(); - if (w->WActivated==1) - { - tmp+=w->idString; - tmp+=":_Activated|"; - w->WActivated=-1; - } - if (w->WActivated==0) - { - tmp+=w->idString; - tmp+=":_Deactivated|"; - w->WActivated=-1; - } -// if (w->WFrameMoved==1) -// { -// w->WFrameMoved=-1; -// tmp+=w->Name(); -// tmp+=":_FrameMoved:"; -// tmp << w->Wpx; -// tmp+=":"; -// tmp << w->Wpy; -// tmp+="|"; -// } -// if (w->WFrameResized==1) -// { -// w->WFrameResized=-1; -// tmp+=w->Name(); -// tmp+=":_FrameResized:"; -// tmp << w->Wpw; -// tmp+=":"; -// tmp << w->Wph; -// tmp+="|"; -// } - w->Unlock(); - } - } - } - - - YabView *myView = NULL; - for(int i=0; iCountItems(); i++) - { - myView = cast_as((BView*)viewList->ItemAt(i), YabView); - if(myView) - { - YabWindow *w = cast_as(myView->Window(), YabWindow); - if(w) - { - w->Lock(); - if (myView->CountChildren()) - { - for (int o=0; oCountChildren(); o++) - { - if (dynamic_cast(myView->ChildAt(o))) - { - YabTabView *target = dynamic_cast(myView->ChildAt(o)); - if (target) - { - if (target->FocusChanged!=target->OldTabView) - { - tmp+=target->Name(); - tmp+=":_TabChanged:"; - tmp+=target->Name(); - tmp << target->FocusChanged; - tmp+="|"; - target->OldTabView=target->FocusChanged; - } - - } - } - - } - } - w->Unlock(); - } - } - } - - if(tmp.Length()>32766) - tmp.Remove(32767, tmp.Length()-32766); - strcpy(messagebuffer, tmp.String()); - return (char*)messagebuffer; -} - -int YabInterface::MessageSend(const char* app, const char* msg) -{ - BMessage message, reply; - status_t result; - - // set the command constant - message.what = B_SET_PROPERTY; - - // construct the specifier stack - message.AddSpecifier("YabSendString", msg); // B_NAME_SPECIFIER - - // send the message and fetch the result - result = BMessenger(app).SendMessage(&message, &reply); - if(result == B_OK) return 0; - if(result == B_BAD_PORT_ID) return 1; - if(result == B_WOULD_BLOCK) return 2; - if(result == B_TIMED_OUT) return 3; - return 4; -} - -void YabInterface::SetLocalize(const char* path) -{ - if(yabCatalog) - delete yabCatalog; - //yabCatalog = new BCatalog(path); -} - -const int YabInterface::GetErrorCode() -{ - return errorCode; -} - -void YabInterface::KillThread(int code) -{ - errorCode = code; - quitting = true; - ExitRequested(); - // BMessenger(be_app).SendMessage(new BMessage(B_QUIT_REQUESTED)); - // while(1){} -} - -void YabInterface::Error(const char* id, const char* type) -{ - fprintf(stderr, "---Error in %s, line %d: \"%s\" is not of type %s\n", currentLib.String(), currentLineNumber, id, type); - fprintf(stderr,"---Error: Program stopped due to an error \n"); - KillThread(-1); - // while(1){} -} - -void YabInterface::ErrorGen(const char* msg) -{ - fprintf(stderr, "---Error in %s, line %d: %s\n", currentLib.String(), currentLineNumber, msg); - fprintf(stderr,"---Error: Program stopped due to an error \n"); - KillThread(-1); - // while(1){} -} - -void YabInterface::SetCurrentLineNumber(int line, const char* libname) -{ - currentLineNumber = line; - if(!strcmp(libname, "main")) - currentLib = mainFileName; - else - currentLib = libname; -} - -void YabInterface::SetMainFileName(const char* name) -{ - mainFileName = strdup(name); -} - -/** - * C interface functions - */ - -const char* yi_GetApplicationDirectory(YabInterface *yab) -{ - return yab->GetApplicationDirectory(); -} - -void yi_OpenWindow(double x1,double y1,double x2,double y2, const char* id, const char* title, YabInterface* yab) -{ - yab->OpenWindow(BRect(x1,y1,x2,y2), id, _L(title)); -} - -int yi_CloseWindow(const char* view, YabInterface* yab) -{ - return yab->CloseWindow(view); -} - -void yi_CreateButton(double x1,double y1,double x2,double y2, const char* id, const char* title, const char* view, YabInterface* yab) -{ - yab->CreateButton(BRect(x1,y1,x2,y2), id, _L(title), view); -} - -int yi_CreateImage(double x,double y,const char* imagefile, const char* window, YabInterface* yab) -{ - return yab->CreateImage(BPoint(x,y),imagefile,window); -} - -int yi_CreateImage2(double x1,double y1,double x2,double y2,const char* imagefile, const char* window, YabInterface* yab) -{ - return yab->CreateImage(BRect(x1,y1,x2,y2),imagefile,window); -} - -int yi_CreateSVG(double x1,double y1,double x2,double y2,const char* imagefile, const char* window, YabInterface* yab) -{ - return yab->CreateSVG(BRect(x1,y1,x2,y2),imagefile,window); -} - -void yi_CreateMenu(const char* menuhead, const char* menuitem, const char *shortcut, const char* window, YabInterface* yab) -{ - yab->CreateMenu(_L(menuhead),_L(menuitem),shortcut,window); -} - -void yi_CreateTextControl(double x1, double y1, double x2, double y2, const char* id, const char* label, const char* text, const char* window, YabInterface *yab) -{ - yab->CreateTextControl(BRect(x1,y1,x2,y2),id,_L(label),_L(text),window); -} - -void yi_CreateCheckBox(double x, double y, const char* id, const char* label, int isActivated, const char* window, YabInterface *yab) -{ - yab->CreateCheckBox(x,y,id,_L(label),isActivated,window); -} - -void yi_CreateRadioButton(double x, double y, const char* groupID, const char* label, int isActivated, const char* window, YabInterface *yab) -{ - yab->CreateRadioButton(x,y,groupID,_L(label),isActivated,window); -} - -void yi_CreateListBox(double x1, double y1, double x2, double y2, const char* title, int scrollbar, const char* window, YabInterface *yab) -{ - yab->CreateListBox(BRect(x1,y1,x2,y2),title,scrollbar,window); -} - -void yi_CreateDropBox(double x1, double y1, double x2, double y2, const char* title, const char* label, const char* window, YabInterface *yab) -{ - yab->CreateDropBox(BRect(x1,y1,x2,y2),title,_L(label), window); -} - -void yi_CreateItem(const char* id,const char* item, YabInterface *yab) -{ - yab->CreateItem(id,_L(item)); -} - -void yi_RemoveItem(const char* title,const char* item, YabInterface *yab) -{ - yab->RemoveItem(title,_L(item)); -} - -void yi_ClearItems(const char* title, YabInterface *yab) -{ - yab->ClearItems(title); -} - -void yi_DrawText(double x, double y, const char* text, const char* window, YabInterface* yab) -{ - yab->DrawText(BPoint(x,y), _L(text), window); -} - -void yi_DrawRect(double x1, double y1, double x2, double y2, const char* window, YabInterface* yab) -{ - yab->DrawRect(BRect(x1,y1,x2,y2),window); -} - -void yi_DrawClear(const char* window, YabInterface* yab) -{ - yab->DrawClear(window, false); -} - -void yi_CreateAlert(const char* text, const char* button1, const char* type, YabInterface* yab) -{ - yab->CreateAlert(_L(text),_L(button1),type); -} - -void yi_CreateText(double x, double y, const char* id, const char* text, const char* window, YabInterface* yab) -{ - yab->CreateText(x,y,id,_L(text),window); -} - -void yi_Text2(double x1, double y1, double x2, double y2, const char* id, const char* text, const char* window, YabInterface* yab) -{ - yab->Text2(BRect(x1,y1,x2,y2),id,_L(text),window); -} - -void yi_TextAlign(const char* txt, const char *option, YabInterface *yab) -{ - yab->TextAlign(txt, option); -} - -void yi_Translate(char* text, char result[]) -{ - if(yabCatalog) - { - result[0] = '\0'; - strcpy(result,yabCatalog->GetString(text, NULL)); - } - else - strcpy(result,text); -} - -void yi_MenuTranslate(char* text, char result[]) -{ - if(yabCatalog) - { - result[0] = '\0'; - const char* token; - const char delimiters[] = ":"; - - token = strtok(text, delimiters); - while(token!=NULL) - { - strcat(result,yabCatalog->GetString(token, NULL)); //B_TRANSLATE_CONTEXT)); - token = strtok(NULL, delimiters); - if(token!=NULL) strcat(result,":"); - } - } - else - strcpy(result,text); -} - -void yi_SetLocalize() -{ - localize = true; -} - -void yi_StopLocalize() -{ - localize = false; -} - -void yi_SetLocalize2(const char* , YabInterface *yab) -{ - localize = true; - //yab->SetLocalize(path); -} - -const char* yi_LoadFilePanel(const char* mode, const char* title, const char* directory, YabInterface *yab) -{ - return yab->LoadFilePanel(mode, _L(title), directory); -} - -const char* yi_SaveFilePanel(const char* mode, const char* title, const char* directory, const char*filename, YabInterface *yab) -{ - return yab->SaveFilePanel(mode, _L(title), directory, filename); -} - -void yi_SetLayout(const char* layout, const char* window, YabInterface *yab) -{ - yab->SetLayout(layout, window); -} - -void yi_WindowSet1(const char* option, const char* value, const char* window, YabInterface *yab) -{ - yab->WindowSet(option, value, window); -} - -void yi_WindowSet2(const char* option, int r, int g, int b, const char* window, YabInterface *yab) -{ - yab->WindowSet(option, r, g, b, window); -} - -void yi_WindowSet3(const char* option, double x, double y, const char* window, YabInterface *yab) -{ - yab->WindowSet(option,x,y, window); -} - -void yi_WindowSet4(const char* option, const char* window, YabInterface *yab) -{ - yab->WindowSet(option, window); -} - -void yi_WindowClear(const char* window, YabInterface *yab) -{ - yab->WindowClear(window); -} - -void yi_TextEdit(double x1, double y1, double x2, double y2, const char* title, int scrollbar, const char* window, YabInterface *yab) -{ - yab->TextEdit(BRect(x1,y1,x2,y2), title, scrollbar, window); -} - -void yi_TextAdd(const char* title, const char* text, YabInterface *yab) -{ - yab->TextAdd(title,text); -} - -void yi_TextSet(const char* title, const char* option, YabInterface *yab) -{ - yab->TextSet(title,option); -} - -void yi_TextSet2(const char* title, const char* option, int value, YabInterface *yab) -{ - yab->TextSet(title,option,value); -} - -void yi_TextSet3(const char* title, const char* option, const char* value, YabInterface *yab) -{ - yab->TextSet(title,option,value); -} - -void yi_TextColor1(const char* title, const char* option, const char* command, YabInterface *yab) -{ - yab->TextColor(title,option,command); -} - -void yi_TextColor2(const char* title, const char* option, int r, int g, int b, YabInterface *yab) -{ - yab->TextColor(title,option,r,g,b); -} - -int yi_TextGet2(const char* title, const char* option, YabInterface *yab) -{ - return yab->TextGet(title,option); -} - -const char* yi_TextGet3(const char* title, int linenum, YabInterface *yab) -{ - return yab->TextGet(title,linenum); -} - -double yi_TextGet4(const char* title, const char* option, int linenum, YabInterface *yab) -{ - return yab->TextGet(title,option,linenum); -} - -int yi_TextGet5(const char* title, const char* option, const char* option2, YabInterface *yab) -{ - return yab->TextGet(title,option,option2); -} - -const char* yi_TextGet6(const char* title, const char* option, YabInterface *yab) -{ - return yab->TextGet6(title, option); -} - -void yi_TextClear(const char* title, YabInterface *yab) -{ - yab->TextClear(title); -} - -const char* yi_TextGet(const char* title, YabInterface *yab) -{ - return yab->TextGet(title); -} - -void yi_DrawSet1(const char* option, const char* window, YabInterface *yab) -{ - return yab->DrawSet1(option, window); -} - -void yi_DrawSet2(int fillorstroke, const char* mypattern, YabInterface *yab) -{ - return yab->DrawSet2(fillorstroke, mypattern); -} - -void yi_View(double x1, double y1, double x2, double y2, const char* id, const char* view, YabInterface *yab) -{ - yab->View(BRect(x1,y1,x2,y2), id, view); -} - -void yi_BoxView(double x1, double y1, double x2, double y2, const char* id, const char* text, int lineType, const char* view, YabInterface *yab) -{ - yab->BoxView(BRect(x1,y1,x2,y2), id, _L(text), lineType, view); -} - -void yi_BoxViewSet(const char* id, const char* option,const char* value, YabInterface *yab) -{ - yab->BoxViewSet(id, option,value); -} - - -void yi_Tab(double x1, double y1, double x2, double y2, const char* id, const char* names, const char* view, YabInterface *yab) -{ - yab->Tab(BRect(x1,y1,x2,y2), id, names, view); -} - -void yi_TabSet(const char* id, int num, YabInterface *yab) -{ - yab->TabSet(id, num); -} - -void yi_TabAdd(const char* id, const char* tabname, YabInterface *yab) -{ - yab->TabAdd(id, _L(tabname)); -} - -void yi_TabDel(const char* id, int num, YabInterface *yab) -{ - yab->TabDel(id, num); -} - -int yi_TabViewGet(const char* id, YabInterface *yab) -{ - return yab->TabViewGet(id); -} - -void yi_DrawDot(double x, double y, const char* window, YabInterface *yab) -{ - yab->DrawDot(x,y, window); -} - -void yi_DrawLine(double x1, double y1, double x2, double y2, const char* window, YabInterface *yab) -{ - yab->DrawLine(x1,y1,x2,y2, window); -} - -void yi_DrawCircle(double x, double y, double r, const char* window, YabInterface *yab) -{ - yab->DrawCircle(x,y,r, window); -} - -void yi_DrawEllipse(double x, double y, double r1, double r2, const char* window, YabInterface *yab) -{ - yab->DrawEllipse(x,y,r1,r2, window); -} - -void yi_DrawCurve(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4, const char* window, YabInterface *yab) -{ - yab->DrawCurve(x1,y1,x2,y2,x3,y3,x4,y4, window); -} - -void yi_Slider1(double x1, double y1, double x2, double y2, const char* id, const char* title, int min, int max, const char* view, YabInterface *yab) -{ - yab->Slider(BRect(x1,y1,x2,y2), id, _L(title), min, max, view); -} - -void yi_Slider2(double x1, double y1, double x2, double y2, const char* id, const char* title, int min, int max, const char* option, const char* view, YabInterface *yab) -{ - yab->Slider(BRect(x1,y1,x2,y2), id, _L(title), min, max, option, view); -} - -void yi_SetSlider1(const char* id, const char* label1, const char* label2, YabInterface *yab) -{ - yab->SetSlider(id, _L(label1), _L(label2)); -} - -void yi_SetSlider2(const char* id, const char* bottomtop, int count, YabInterface *yab) -{ - yab->SetSlider(id, bottomtop, count); -} - -void yi_SetSlider3(const char* id, const char* part, int r, int g, int b, YabInterface *yab) -{ - yab->SetSlider(id, part, r,g,b); -} - -void yi_SetSlider4(const char* id, int value, YabInterface *yab) -{ - yab->SetSlider(id, value); -} - -void yi_SetOption1(const char* id, const char* option, const char* value, YabInterface *yab) -{ - yab->SetOption(id,option,value); -} - -void yi_SetOption2(const char* id, const char* option, int r, int g, int b, YabInterface *yab) -{ - yab->SetOption(id,option,r,g,b); -} - -void yi_SetOption3(const char* id, const char* option, double x, double y, YabInterface *yab) -{ - yab->SetOption(id,option,x,y); -} - -void yi_SetOption4(const char* id, const char* option, YabInterface *yab) -{ - yab->SetOption(id,option); -} - -void yi_SetOption5(const char* id, const char* option, int value, YabInterface *yab) -{ - yab->SetOption(id,option,value); -} - -void yi_DropZone(const char* view, YabInterface *yab) -{ - yab->DropZone(view); -} - -void yi_ColorControl1(double x, double y, const char* id, const char* view, YabInterface* yab) -{ - yab->ColorControl(x,y,id,view); -} - -void yi_ColorControl2(const char* id, int r, int g, int b, YabInterface* yab) -{ - yab->ColorControl(id,r,g,b); -} - -void yi_TextControl2(const char* id, const char* text, YabInterface* yab) -{ - yab->TextControl(id,_L(text)); -} - -void yi_TextControl3(const char* id, int mode, YabInterface* yab) -{ - yab->TextControl(id,mode); -} - -void yi_TextControl5(const char* id, YabInterface* yab) -{ - yab->TextControl(id); -} - -void yi_TextControl4(const char* id, const char* option, const char* value, YabInterface* yab) -{ - yab->TextControl(id,option,value); -} - -void yi_TreeBox1(double x1, double y1, double x2, double y2, const char* id, int scrollbarType, const char* view, YabInterface* yab) -{ - yab->TreeBox1(BRect(x1,y1,x2,y2), id, scrollbarType, view); -} - -void yi_TreeBox2(const char* id, const char* item, YabInterface* yab) -{ - yab->TreeBox2(id,_L(item)); -} - -void yi_TreeBox3(const char* id, const char* head, const char* item, int isExpanded, YabInterface* yab) -{ - yab->TreeBox3(id,_L(head),_L(item),isExpanded); -} - -void yi_TreeBox4(const char* id, YabInterface* yab) -{ - yab->TreeBox4(id); -} - -void yi_TreeBox5(const char* id, const char* item, YabInterface* yab) -{ - yab->TreeBox5(id,_L(item)); -} - -void yi_TreeBox7(const char* id, int pos, YabInterface* yab) -{ - yab->TreeBox7(id,pos); -} - -void yi_TreeBox8(const char* id, int pos, YabInterface* yab) -{ - yab->TreeBox8(id,pos); -} - -void yi_TreeBox9(const char* id, const char* head, const char* item, YabInterface* yab) -{ - yab->TreeBox9(id,_L(head), _L(item)); -} - -void yi_TreeBox10(const char* id, const char* head, YabInterface* yab) -{ - yab->TreeBox10(id,_L(head)); -} - -void yi_TreeBox11(const char* id, const char* head, YabInterface* yab) -{ - yab->TreeBox11(id,_L(head)); -} - -void yi_TreeBox12(const char* id, const char* item, int pos, YabInterface* yab) -{ - yab->TreeBox12(id,_L(item), pos); -} - -const char* yi_TreeboxGet(const char* treebox, int pos, YabInterface *yab) -{ - return yab->TreeboxGet(treebox, pos); -} - -int yi_TreeboxCount(const char* treebox, YabInterface *yab) -{ - return yab->TreeboxCount(treebox); -} - -void yi_ButtonImage(double x,double y,const char* id,const char* enabledon, const char* enabledoff, const char *disabled, const char* view, YabInterface *yab) -{ - yab->ButtonImage(x,y, id, enabledon, enabledoff, disabled, view); -} - -void yi_CheckboxImage(double x,double y,const char* id,const char* enabledon, const char* enabledoff, const char *disabledon, const char *disabledoff, int isActivated, const char* view, YabInterface *yab) -{ - yab->CheckboxImage(x,y, id, enabledon, enabledoff, disabledon, disabledoff, isActivated, view); -} - -void yi_CheckboxSet(const char* id, int isActivated, YabInterface* yab) -{ - yab->CheckboxSet(id, isActivated); -} - -void yi_RadioSet(const char* id, int isActivated, YabInterface* yab) -{ - yab->RadioSet(id, isActivated); -} - -void yi_ToolTip(const char* view, const char* text, YabInterface *yab) -{ - yab->ToolTips(view,_L(text)); -} - -void yi_ToolTipNew(const char* view, const char* text,const char* color, int r, int g, int b, YabInterface *yab) -{ - yab->ToolTipsNew(view, _L(text), color, r, g, b); -} - -void yi_ToolTipColor(const char* color, int r, int g, int b, YabInterface *yab) -{ - yab->ToolTipsColor(color,r,g,b); -} - -void yi_TreeSort(const char* view, YabInterface *yab) -{ - yab->TreeSort(view); -} - -void yi_ListSort(const char* view, YabInterface *yab) -{ - yab->ListSort(view); -} - -void yi_FileBox(double x1, double y1, double x2, double y2, const char* id, int scrollbartype, const char *option, const char* view, YabInterface *yab) -{ - yab->FileBox(BRect(x1,y1,x2,y2), id, scrollbartype, option, view); -} - -void yi_FileBoxAdd2(const char* columnbox, const char* name, int pos, double maxWidth, double minWidth, double width, const char* option, YabInterface *yab) -{ - yab->FileBoxAdd(columnbox, _L(name), pos, maxWidth, minWidth, width, option); -} - -void yi_FileBoxClear(const char* view, YabInterface *yab) -{ - yab->FileBoxClear(view); -} - -void yi_ColumnBoxAdd(const char* id, int column, int position, int height, const char* item, YabInterface *yab) -{ - yab->ColumnBoxAdd(id, column, position, height, _L(item)); -} - -void yi_ColumnBoxSelect(const char *columnbox, int position, YabInterface *yab) -{ - yab->ColumnBoxSelect(columnbox, position); -} - -void yi_ColumnBoxRemove(const char *columnbox, int position, YabInterface *yab) -{ - yab->ColumnBoxRemove(columnbox, position); -} - -void yi_ColumnBoxColor(const char *columnbox, const char* option, int r, int g, int b, YabInterface *yab) -{ - yab->ColumnBoxColor(columnbox, option, r,g,b); -} - -const char* yi_ColumnBoxGet(const char *columnbox, int column, int position, YabInterface *yab) -{ - return yab->ColumnBoxGet(columnbox, column, position); -} - -int yi_ColumnBoxCount(const char *columnbox, YabInterface *yab) -{ - return yab->ColumnBoxCount(columnbox); -} - -const char* yi_TextControlGet(const char* id, YabInterface* yab) -{ - return yab->TextControlGet(id); -} - -int yi_DeskbarPosition(YabInterface *yab) -{ - return yab->DeskbarParam("position"); -} - -int yi_DeskbarExpanded(YabInterface *yab) -{ - return yab->DeskbarParam("expanded"); -} - -int yi_DeskbarWidth(YabInterface *yab) -{ - return yab->DeskbarParam("width"); -} - -int yi_DeskbarHeight(YabInterface *yab) -{ - return yab->DeskbarParam("height"); -} - -int yi_DeskbarX(YabInterface *yab) -{ - return yab->DeskbarParam("x"); -} - -int yi_DeskbarY(YabInterface *yab) -{ - return yab->DeskbarParam("y"); -} - -int yi_DesktopWidth(YabInterface *yab) -{ - return yab->DesktopParam(true); -} - -int yi_DesktopHeight(YabInterface *yab) -{ - return yab->DesktopParam(false); -} - -int yi_WindowGet(const char* view, const char* option, YabInterface *yab) -{ - return yab->WindowGet(view,option); -} - -int yi_ViewGet(const char* view, const char* option, YabInterface *yab) //vasper -{ - return yab->ViewGet(view,option); -} - -void yi_ClipboardCopy(const char* text, YabInterface *yab) -{ - yab->ClipboardCopy(text); -} - -int yi_Printer(const char* docname, const char *view, const char* config, YabInterface *yab) -{ - return yab->Printer(docname, view,config); -} - -void yi_PrinterConfig(const char* config, YabInterface *yab) -{ - yab->PrinterConfig(config); -} - -const char* yi_ClipboardPaste(YabInterface *yab) -{ - return yab->ClipboardPaste(); -} - -int yi_NewAlert(const char* text, const char* button1, const char* button2, const char* button3, const char* option, YabInterface *yab) -{ - return yab->NewAlert(_L(text), _L(button1), _L(button2), _L(button3), option); -} - -void yi_Calendar1(double x, double y, const char* id, const char* format, const char* date, const char* view, YabInterface *yab) -{ - yab->Calendar(x,y, id, format, date, view); -} - -const char* yi_Calendar2(const char* id, YabInterface *yab) -{ - return yab->Calendar(id); -} - -void yi_Calendar3(const char* id, const char* date, YabInterface *yab) -{ - yab->Calendar(id, date); -} - -const char* yi_ListboxGet(const char* listbox, int pos, YabInterface *yab) -{ - return yab->ListboxGet(listbox, pos); -} - -int yi_ListboxCount(const char* listbox, YabInterface *yab) -{ - return yab->ListboxCount(listbox); -} - -void yi_ListboxAdd1(const char* listbox, const char* item, YabInterface *yab) -{ - yab->ListboxAdd(listbox,_L(item)); -} - -void yi_ListboxAdd2(const char* listbox, int pos, const char* item, YabInterface *yab) -{ - yab->ListboxAdd(listbox, pos, _L(item)); -} - -void yi_ListboxSelect(const char* listbox, int pos, YabInterface *yab) -{ - yab->ListboxSelect(listbox,pos); -} - -void yi_ListboxRemove(const char* listbox, int pos, YabInterface *yab) -{ - yab->ListboxRemove(listbox,pos); -} - -void yi_Scrollbar(const char* id, int format, const char* view, YabInterface *yab) -{ - yab->Scrollbar(id, format, view); -} - -void yi_ScrollbarSet1(const char* scrollview, const char* option, double position, YabInterface *yab) -{ - yab->ScrollbarSet(scrollview, option, position); -} - -void yi_ScrollbarSet2(const char* scrollview, const char* option, double opt1, double opt2, YabInterface *yab) -{ - yab->ScrollbarSet(scrollview, option, opt1, opt2); -} - -void yi_ScrollbarSet3(const char* scrollview, const char* option, YabInterface *yab) -{ - yab->ScrollbarSet(scrollview, option); -} - -double yi_ScrollbarGet(const char* scrollview, const char* option, YabInterface *yab) -{ - return yab->ScrollbarGet(scrollview, option); -} - -void yi_SplitView1(double x1,double y1,double x2,double y2, const char* id, int isVertical, int style, const char* view, YabInterface *yab) -{ - yab->SplitView(BRect(x1,y1,x2,y2), id, isVertical, style, view); -} - -void yi_SplitView2(const char* splitView, const char* option, double position, YabInterface *yab) -{ - yab->SplitView(splitView, option, position); -} - -void yi_SplitView3(const char* splitView, const char* option, double left, double right, YabInterface *yab) -{ - yab->SplitView(splitView, option, left, right); -} - -double yi_SplitViewGet(const char* splitView, const char* option, YabInterface *yab) -{ - return yab->SplitViewGet(splitView, option); -} - -void yi_StackView1(double x1,double y1,double x2,double y2, const char* id, int number, const char* view, YabInterface *yab) -{ - yab->StackViews(BRect(x1,y1,x2,y2), id, number, view); -} - -void yi_StackView2(const char* stackView, int num, YabInterface *yab) -{ - yab->StackViews(stackView, num); -} - -int yi_StackViewGet(const char* stackView, YabInterface *yab) -{ - return yab->StackViewGet(stackView); -} - -void yi_DrawSet3(const char* option, int transparency, YabInterface *yab) -{ - yab->DrawSet3(option, transparency); -} - -extern void yi_TextURL1(double x, double y, const char* id, const char* text, const char* url, const char* view, YabInterface *yab) -{ - yab->TextURL(x,y, id, _L(text), url, view); -} - -void yi_TextURL2(const char* id, const char* option, int r, int g, int b, YabInterface *yab) -{ - yab->TextURL(id, option, r,g,b); -} - -void yi_Menu2(const char* menuHead, int isRadio, const char* view, YabInterface *yab) -{ - yab->Menu(_L(menuHead), isRadio, view); -} - -void yi_SubMenu1(const char* menuHead, const char* menuItem, const char* subMenuItem, const char* modifiers, const char* view, YabInterface *yab) -{ - yab->SubMenu(_L(menuHead), _L(menuItem), _L(subMenuItem), modifiers, view); -} - -void yi_SubMenu2(const char* menuHead, const char* menuItem, int isRadio, const char* view, YabInterface *yab) -{ - yab->SubMenu(_L(menuHead), _L(menuItem), isRadio, view); -} - -void yi_SpinControl1(double x, double y, const char* id, const char* label, int min, int max, int step, const char* view, YabInterface *yab) -{ - yab->SpinControl(x,y, id, _L(label), min, max, step, view); -} - -void yi_SpinControl2(const char* spinControl, int value, YabInterface *yab) -{ - yab->SpinControl(spinControl, value); -} - -int yi_SpinControlGet(const char *spinControl, YabInterface *yab) -{ - return yab->SpinControlGet(spinControl); -} - -const char* yi_PopUpMenu(double x, double y, const char* menuItems, const char* view, YabInterface *yab) -{ - return yab->PopUpMenu(x,y,menuItems,view); -} - -void yi_DropBoxSelect(const char* dropbox, int position, YabInterface *yab) -{ - yab->DropBoxSelect(dropbox, position); -} - -void yi_DropBoxClear(const char* dropbox, YabInterface *yab) -{ - yab->DropBoxClear(dropbox); -} - -void yi_DropBoxRemove(const char* dropbox, int position, YabInterface *yab) -{ - yab->DropBoxRemove(dropbox,position); -} - -int yi_DropBoxCount(const char* dropbox, YabInterface *yab) -{ - return yab->DropBoxCount(dropbox); -} - -const char* yi_DropBoxGet(const char* dropbox, int position, YabInterface *yab) -{ - return yab->DropBoxGet(dropbox, position); -} - -int yi_ColorControlGet(const char* colorcontrol, const char* option, YabInterface *yab) -{ - return yab->ColorControlGet(colorcontrol, option); -} - -int yi_SliderGet(const char* slider, YabInterface *yab) -{ - return yab->SliderGet(slider); -} - -double yi_DrawGet1(const char* option, const char* txt, const char* view, YabInterface *yab) -{ - return yab->DrawGet(option, txt, view); -} - -double yi_DrawGet2(const char* option, const char* view, YabInterface *yab) -{ - return yab->DrawGet(option, "", view); -} - -const char* yi_DrawGet3(const char* option, YabInterface *yab) -{ - return yab->DrawGet(option); -} - -void yi_SubMenu3(const char* menuHead, const char* menuItem, const char* subMenuItem, const char* option, const char* view, YabInterface *yab) -{ - yab->SubMenu3(_L(menuHead), _L(menuItem), _L(subMenuItem), option, view); -} - -void yi_Menu3(const char* menuHead, const char* menuItem, const char* option,const char* view, YabInterface *yab) -{ - yab->Menu3(_L(menuHead), _L(menuItem), option, view); -} - -double yi_MenuHeight(YabInterface *yab) -{ - return yab->MenuHeight(); -} - -double yi_TabHeight(YabInterface *yab) -{ - return yab->TabHeight(); -} - -double yi_ScrollbarWidth(YabInterface *yab) -{ - return yab->ScrollbarWidth(); -} - -void yi_exit(int code, YabInterface *yab) -{ - yab->KillThread(code); -} - -const int yi_IsMouseIn(const char* view, YabInterface *yab) -{ - return yab->IsMouseIn(view); -} - -const char* yi_GetMouseIn(YabInterface *yab) -{ - return yab->GetMouseIn(); -} - - -const char* yi_KeyboardMessages(const char* view, YabInterface* yab) -{ - return yab->KeyboardMessages(view); -} - -const char* yi_GetMouseMessages(const char* view, YabInterface* yab) -{ - return yab->GetMouseMessages(view); -} - -const char* yi_CheckMessages(YabInterface* yab) -{ - return yab->GetMessageString(); -} - -int yi_MessageSend(const char* app, const char* msg,YabInterface* yab) -{ - return yab->MessageSend(app,msg); -} - -int yi_ThreadKill(const char* option, int id,YabInterface* yab) -{ - return yab->ThreadKill(option, id); -} - -int yi_ThreadGet(const char* option, const char* appname,YabInterface* yab) -{ - return yab->ThreadGet(option, appname); -} - -void yi_SetCurrentLineNumber(int line, const char* libname, YabInterface* yab) -{ - yab->SetCurrentLineNumber(line, libname); -} - -void yi_SetMainFileName(const char* name, YabInterface* yab) -{ - yab->SetMainFileName(name); -} - -void yi_beep() -{ - beep(); -} - -void yi_Bitmap(double w, double h, const char* id,YabInterface* yab) -{ - yab->Bitmap(w,h,id); -} - -int yi_BitmapColor(double x, double y, const char* id, const char* option, YabInterface *yab) -{ - yab->BitmapColor(x,y, id, option); -} - -void yi_BitmapDraw(double x, double y, const char* bitmap, const char* mode, const char* view,YabInterface* yab) -{ - yab->BitmapDraw(x,y, bitmap, mode, view); -} - -void yi_BitmapDraw2(double x1, double y1, double x2, double y2, const char* bitmap, const char* mode, const char* view,YabInterface* yab) -{ - yab->BitmapDraw(BRect(x1,y1,x2,y2), bitmap, mode, view); -} - -void yi_BitmapGet(double x1, double y1, double x2, double y2, const char* id, const char* bitmap, YabInterface* yab) -{ - yab->BitmapGet(BRect(x1,y1,x2,y2), id, bitmap); -} - -void yi_BitmapGet2(double w, const char* id, const char* path, YabInterface* yab) -{ - yab->BitmapGet(w, id, path); -} - -int yi_BitmapGetNum(const char* id, const char* option, YabInterface* yab) -{ - yab->BitmapGet(id, option); -} - -int yi_BitmapLoad(const char* filename, const char* bitmap, YabInterface* yab) -{ - yab->BitmapLoad(filename, bitmap); -} - -void yi_BitmapGetIcon(const char* id, const char* option, const char* path, YabInterface* yab) -{ - yab->BitmapGetIcon(id, option, path); -} - -void yi_BitmapDrag(const char* bitmap,YabInterface* yab) -{ - yab->BitmapDrag(bitmap); -} - -void yi_BitmapRemove(const char* bitmap,YabInterface* yab) -{ - yab->BitmapRemove(bitmap); -} - -void yi_Screenshot(double x1, double y1, double x2, double y2, const char* bitmap, YabInterface *yab) -{ - return yab->Screenshot(BRect(x1,y1,x2,y2), bitmap); -} - -int yi_BitmapSave(const char* id, const char* filename, const char* type, YabInterface* yab) -{ - return yab->BitmapSave(id, filename, type); //, type); -} - -void yi_Canvas(double x1, double y1, double x2, double y2, const char* id, const char* view, YabInterface *yab) -{ - yab->Canvas(BRect(x1,y1,x2,y2), id,view); -} - -int yi_Sound(const char* filename, YabInterface* yab) //Reactivate Sound Lorglas 2020.01.02 -{ - return yab->Sound(filename); -} - -int yi_SoundStop(int id, YabInterface* yab) //Reactivate Sound Lorglas 2020.01.02 -{ - return yab->SoundStop(id); -} - -int yi_SoundWait(int id, YabInterface* yab) //Reactivate Sound Lorglas 2020.01.03 -{ - return yab->SoundWait(id); -} - -int yi_MediaSound(const char* filename, YabInterface* yab) -{ - return yab->MediaSound(filename); -} - -int yi_MediaSoundStop(int id,YabInterface* yab) -{ - return yab->MediaSoundStop(id); -} -/* -void yi_MediaSoundWait(int id, YabInterface* yab) -{ - yab->MediaSoundWait(id); -} -*/ -void yi_ShortCut(const char* view, const char* key, const char* msg, YabInterface *yab) -{ - yab->ShortCut(view,key,msg); -} - -int yi_IsComputerOn(YabInterface *yab) -{ - return yab->IsComputerOn(); -} - -void yi_DrawSet4(const char* option, const char* color,const char* view, YabInterface* yab) -{ - yab->DrawSet(option, color, view); -} - -void yi_Treebox13(const char* id,const char* option, int pos, YabInterface* yab) -{ - yab->Treebox13(id, option, pos); -} - -int yi_TreeboxGetOpt(const char* id, const char* option, int pos, YabInterface* yab) -{ - return yab->TreeboxGetOpt(id, option, pos); -} - -int yi_ListboxGetNum(const char* id, YabInterface* yab) -{ - return yab->ListboxGetNum(id); -} - -int yi_DropboxGetNum(const char* id, YabInterface* yab) -{ - return yab->DropboxGetNum(id); -} - -int yi_TreeboxGetNum(const char* id, YabInterface* yab) -{ - return yab->TreeboxGetNum(id); -} - -int yi_ColumnboxGetNum(const char* id, YabInterface* yab) -{ - return yab->ColumnboxGetNum(id); -} - -int yi_DrawGet4(double x, double y, const char* option, const char* view, YabInterface* yab) -{ - return yab->DrawGet(BPoint(x,y),option,view); -} - -void yi_MouseSet(const char* opt, YabInterface *yab) -{ - yab->MouseSet(opt); -} - -void yi_StatusBar(double x1, double y1, double x2, double y2, const char* id, const char* label1, const char* label2, const char* view, YabInterface *yab) -{ - yab->StatusBar(BRect(x1, y1, x2, y2), id, label1, label2, view); -} - -void yi_StatusBarSet(const char* id, const char* label1, const char* label2, double state, YabInterface *yab) -{ - yab->StatusBarSet(id, label1, label2, state); -} - -void yi_StatusBarSet2(double x1, double y1, double x2, double y2, const char* id, const char* view, YabInterface *yab) -{ - yab->StatusBarSet(BRect(x1, y1, x2, y2), id, view); -} - -void yi_StatusBarSet3(const char* id, int r, int g, int b, YabInterface *yab) -{ - yab->StatusBarSet(id, r, g, b); -} - -void yi_Launch(const char* strg, YabInterface *yab) -{ - yab->Launch(strg); -} - -void yi_Attribute1(const char* type, const char* name, const char* value, const char* filename, YabInterface* yab) -{ - yab->Attribute1(type, name, value, filename); -} - -void yi_AttributeClear(const char* name, const char* filename, YabInterface* yab) -{ - yab->AttributeClear(name, filename); -} - -const char* yi_AttributeGet1(const char* name, const char* filename, YabInterface* yab) -{ - return yab->AttributeGet1(name, filename); -} - -double yi_AttributeGet2(const char* name, const char* filename, YabInterface* yab) -{ - return yab->AttributeGet2(name, filename); -} diff --git a/src/YabInterface.h b/src/YabInterface.h deleted file mode 100644 index 073706a..0000000 --- a/src/YabInterface.h +++ /dev/null @@ -1,534 +0,0 @@ -#ifndef YABINTERFACE_H -#define YABINTERFACE_H - -#ifdef __cplusplus - #include - #include - #include - #include - #include - #include - #include - #include - #include "YabList.h" - #include "global.h" - #include "config.h" - #include - class YabInterface : public BApplication - { - public: - YabInterface(int argc, char** argv, const char* signature); - ~YabInterface(); - - status_t GetSupportedSuites(BMessage *msg); - BHandler *ResolveSpecifier(BMessage *msg, int32 index, BMessage *spec, int32 form, const char *prop); - const char* GetApplicationDirectory(); - void OpenWindow(const BRect frame, const char* id, const char* title); - int CloseWindow(const char* view); - void MessageReceived(BMessage *message); - bool QuitRequested(); - bool ExitRequested(); - void CreateButton(BRect frame, const char* id, const char* title, const char* window); - int CreateImage(BPoint coordinates, const char* imagefile, const char* window); - int CreateImage(BRect frame, const char* imagefile, const char* window); - int CreateSVG(BRect frame, const char* imagefile, const char* window); - void DrawText(BPoint coordinates, const char* text, const char* window); - void DrawRect(BRect frame, const char* window); - void DrawClear(const char* window, bool isExit); - void CreateAlert(const char* text, const char* button1, const char* option); - void CreateMenu(const char* menuhead, const char* menuitem, const char *shortcut, const char* window); - void CreateTextControl(BRect frame, const char *id, const char* label, const char* text, const char* window); - void CreateCheckBox(double x, double y, const char *id, const char* label, int isActivated, const char* window); - void CreateRadioButton(double x, double y, const char* groupID, const char* label, int isActivated, const char* window); - void CreateListBox(BRect frame, const char* title, int scrollbar, const char* window); - void CreateDropBox(BRect frame, const char* title, const char* label, const char* window); - void CreateItem(const char* id, const char* item); - void RemoveItem(const char* title, const char* item); - void ClearItems(const char* title); - void CreateText(double x, double y, const char *id, const char* text, const char* window); - void Text2(BRect frame, const char *id, const char* text, const char* window); - void TextAlign(const char* txt, const char *option); - const char* LoadFilePanel(const char* mode, const char* title, const char* directory); - const char* SaveFilePanel(const char* mode, const char* title, const char* directory, const char*filename); - void SetLayout(const char* layout, const char* window); - void WindowSet(const char* option, const char* value, const char* window); - void WindowSet(const char* option, int r, int g, int b, const char* window); - void WindowSet(const char* option, double x, double y, const char* window); - void WindowSet(const char* option, const char* window); - void WindowClear(const char* window); - void TextEdit(BRect frame, const char* title, int scrollbar, const char* window); - void TextAdd(const char* title, const char* text); - void TextSet(const char* title, const char* option); - void TextSet(const char* title, const char* option, int value); - void TextSet(const char* title, const char* option, const char* value); - void TextColor(const char* title, const char* option, const char* command); - void TextColor(const char* title, const char* option, int r, int g, int b); - void TextClear(const char* title); - const char* TextGet(const char* title); - const char* TextGet(const char* title, int linenum); - const char* TextGet6(const char* title, const char* option); - int TextGet(const char* title, const char* option); - double TextGet(const char* title, const char* option, int line); - int TextGet(const char* title, const char* option, const char* option2); - void DrawSet1(const char* option, const char* window); - void DrawSet2(int fillorstroke, const char* mypattern); - void View(BRect frame, const char* id, const char* view); - void BoxView(BRect frame, const char* id, const char* text, int lineType, const char* view); - void BoxViewSet(const char* id, const char* option, const char* value); - void Tab(BRect frame, const char* id, const char* names, const char* view); - void TabSet(const char* id, int num); - void TabAdd(const char* id, const char* name); - void TabDel(const char* id, int num); - int TabViewGet(const char* id); - void DrawDot(double x, double y, const char* window); - void DrawLine(double x1, double y1, double x2, double y2, const char* window); - void DrawCircle(double x, double y, double r, const char* window); - void DrawEllipse(double x, double y, double r1, double r2, const char* window); - void DrawCurve(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4, const char* window); - void Slider(BRect frame, const char* id, const char* title, int min, int max, const char* view); - void Slider(BRect frame, const char* id, const char* title, int min, int max, const char* option, const char* view); - void SetSlider(const char* id, const char* label1, const char* label2); - void SetSlider(const char* id, const char* bottomtop, int count); - void SetSlider(const char* id, const char* part, int r, int g, int b); - void SetSlider(const char* id, int value); - void SetOption(const char* id, const char* option, const char* value); - void SetOption(const char* id, const char* option, int r, int g, int b); - void SetOption(const char* id, const char* option, double x, double y); - void SetOption(const char* id, const char* option); - void SetOption(const char* id, const char* option, int value); - void DropZone(const char* view); - void ColorControl(double x, double y, const char* id, const char* view); - void ColorControl(const char* id, int r, int g, int b); - void TextControl(const char* id, const char* text); - void TextControl(const char* id, int mode); - void TextControl(const char* id, const char* option, const char* value); - void TextControl(const char* id); - void TreeBox1(BRect frame, const char* id, int scrollbarType, const char* view); - void TreeBox2(const char* id, const char* item); - void TreeBox3(const char* id, const char* head, const char* item, int isExpanded); - void TreeBox4(const char* id); - void TreeBox5(const char* id, const char* item); - void TreeBox7(const char* id, int pos); - void TreeBox8(const char* id, int pos); - void TreeBox9(const char* id, const char* head, const char* item); - void TreeBox10(const char* id, const char* head); - void TreeBox11(const char* id, const char* head); - void TreeBox12(const char* id, const char* item, int pos); - void Launch(const char* strg); - const char* TreeboxGet(const char* treebox, int pos); - int TreeboxCount(const char* treebox); - void ButtonImage(double x, double y,const char* id,const char* enabledon, const char* enabledoff, const char* disabled, const char* view); - void CheckboxImage(double x, double y,const char* id,const char* enabledon, const char* enabledoff, const char *disabledon, const char *disabledoff, int isActivated, const char* view); - void CheckboxSet(const char* id, int isActivated); - void RadioSet(const char* id, int isActivated); - void ToolTips(const char* view, const char* text); - void ToolTipsNew(const char* view, const char* text, const char* color, int r, int g, int b); - void ToolTipsColor(const char* color, int r, int g, int b); - void TreeSort(const char* view); - void ListSort(const char* view); - void FileBox(BRect frame, const char* id, bool scrollbartype, const char* option, const char* view); - void FileBoxAdd(const char* id, const char* name, int32 pos, double maxWidth, double minWidth, double width, const char* option); - void FileBoxClear(const char* view); - void ColumnBoxAdd(const char* id, int column, int position, int height, const char* item); - void ColumnBoxSelect(const char *columnbox, int position); - void ColumnBoxRemove(const char *columnbox, int position); - void ColumnBoxColor(const char *columnbox, const char* option, int r, int g, int b); - int Printer(const char* docname, const char *view, const char* config); - void PrinterConfig(const char* config); - void Calendar(double x, double y, const char* id, const char* format, const char* date, const char* view); - const char* Calendar(const char* id); - void Calendar(const char* id, const char* date); - void MouseSet(const char* opt); - void Scrollbar(const char* id, int format, const char* view); - void ScrollbarSet(const char* scrollview, const char* option, double position); - void ScrollbarSet(const char* scrollview, const char* option, double opt1, double opt2); - void ScrollbarSet(const char* scrollview, const char* option); - double ScrollbarGet(const char* scrollview, const char* option); - const char* ListboxGet(const char* listbox, int pos); - int ListboxCount(const char* listbox); - void ListboxAdd(const char* listbox, const char* item); - void ListboxAdd(const char* listbox, int pos, const char* item); - void ListboxSelect(const char* listbox, int pos); - void ListboxRemove(const char* listbox, int pos); - void SplitView(BRect frame, const char* id, int isVertical, int style, const char* view); - void SplitView(const char* splitView, const char* option, double position); - void SplitView(const char* splitView, const char* option, double left, double right); - double SplitViewGet(const char* splitView, const char* option); - void StackViews(BRect frame, const char* id, int number, const char* view); - void StackViews(const char* stackView, int num); - int StackViewGet(const char* stackView); - void DrawSet3(const char* option, int transparency); - void TextURL(double x, double y, const char* id, const char* text, const char* url, const char* view); - void TextURL(const char* id, const char* option, int r, int g, int b); - void Menu(const char* menuHead, int isRadio, const char* view); - void SubMenu(const char* menuHead, const char* menuItem, const char* subMenuItem, const char* modifiers, const char* view); - void SubMenu(const char* menuHead, const char* menuItem, int isRadio, const char* view); - void SpinControl(double x, double y, const char* id, const char* label, int min, int max, int step, const char* view); - void SpinControl(const char* spinControl, int value); - int SpinControlGet(const char *spinControl); - const char* PopUpMenu(double x, double y, const char* menuItems, const char* view); - void DropBoxSelect(const char* dropbox, int position); - void DropBoxClear(const char* dropbox); - void DropBoxRemove(const char* dropbox, int position); - int DropBoxCount(const char* dropbox); - const char* DropBoxGet(const char* dropbox, int position); - int ColorControlGet(const char* colorcontrol, const char* option); - int SliderGet(const char* slider); - void SubMenu3(const char* menuHead, const char* menuItem, const char* subMenuItem, const char* option, const char* view); - void Menu3(const char* menuHead, const char* menuItem, const char* option,const char* view); - double ScrollbarWidth(); - double MenuHeight(); - double TabHeight(); - const char* ColumnBoxGet(const char *columnbox, int column, int position); - int ColumnBoxCount(const char *columnbox); - const char* TextControlGet(const char* id); - int WindowGet(const char* view, const char* option); - int ViewGet(const char* view, const char* option); //vasper - double DrawGet(const char* option, const char* txt, const char* view); - int DrawGet(BPoint coord, const char* option, const char* view); - const char* DrawGet(const char* option); - void ClipboardCopy(const char* text); - const char* ClipboardPaste(); - int DeskbarParam(const char* option); - int DesktopParam(bool isWidth); - int NewAlert(const char* text, const char* button1, const char* button2, const char* button3, const char* option); - int ThreadKill(const char* option, int id); - int ThreadGet(const char* option, const char* appname); - const int IsMouseIn(const char* view); - const char* GetMouseIn(); - const char* GetMouseMessages(const char* view); - const char* KeyboardMessages(const char* view); - const char* GetMessageString(); - int MessageSend(const char* app, const char* msg); - void SetLocalize(const char* path); - void Bitmap(double w, double h, const char* id); - int BitmapColor(double x, double y, const char* id, const char* option); - void BitmapDraw(double x, double y, const char* bitmap, const char* mode, const char* view); - void BitmapDraw(BRect frame, const char* bitmap, const char* mode, const char* view); - void BitmapGet(BRect frame, const char* id, const char* bitmap); - void BitmapGet(double w, const char* id, const char* path); - int BitmapGet(const char* id, const char* option); - int BitmapLoad(const char* id, const char* option); - void BitmapGetIcon(const char* id, const char* option, const char* path); - void BitmapDrag(const char* bitmap); - void BitmapRemove(const char* bitmap); - void Screenshot(BRect frame, const char* bitmap); - int BitmapSave(const char* id, const char* filename, const char* type); - void Canvas(BRect frame, const char* id, const char* view); - int Sound(const char* filename); - int SoundStop(int32 id); - int SoundWait(int32 id); - int MediaSound(const char* filename); - int MediaSoundStop(int32 finished); - int IsComputerOn(); - void ShortCut(const char* view, const char* key, const char* msg); - void DrawSet(const char* option, const char* color,const char* view); - void Treebox13(const char* id,const char* option, int pos); - int TreeboxGetOpt(const char* id, const char* option, int pos); - int ListboxGetNum(const char* id); - int DropboxGetNum(const char* id); - int TreeboxGetNum(const char* id); - int ColumnboxGetNum(const char* id); - void Attribute1(const char* type, const char* name, const char* value, const char* filename); - void AttributeClear(const char* name, const char* filename); - const char* AttributeGet1(const char* name, const char* filename); - double AttributeGet2(const char* name, const char* filename); - - const int GetErrorCode(); - void Error(const char* id, const char* type); - void ErrorGen(const char* msg); - void SetCurrentLineNumber(int line, const char* libname); - void SetMainFileName(const char* name); - void KillThread(int code); - void StatusBar(BRect frame, const char* id, const char* label1, const char* label2, const char* view); - void StatusBarSet(const char* id, const char* label1, const char* label2, double state); - void StatusBarSet(BRect frame, const char* id, const char* view); - void StatusBarSet(const char* id, int r, int g, int b); - void RefsReceived(BMessage *message); - - private: - BFileGameSound* fPlayer; - int status; - void RemoveView(BView* myView); - void GetMMsgInfo(BString &t, int mouseStateInfo, int mouseLButton, int mouseMButton, int mouseRButton, int x, int y, const char* name); - BBitmap* loadImage(const char* name); - static int compare(BListItem **firstArg, BListItem **secondArg); - void CleanupYabTabView(BView* view); - void CleanupSubchildView(BView* view); - - BTranslatorRoster *Roster; - char ApplicationDirectory[1024]; - char loadPanel[1280]; - char columntext[4096]; - char mousemessagebuffer[64]; - char keyboardbuffer[27]; - char messagebuffer[32567]; - char attrbuffer[32567]; - char mouseoverbuffer[256]; - BFilePanel *fopen, *fsave; - thread_id myThread; - int errorCode; - bool drawStroking; - int yabAlpha; - pattern yabPattern; - YabList *viewList; - int currentLineNumber; - const char* mainFileName; - bool exiting; - BPropertyInfo *myProps; - BString localMessage; - BString currentLib; - BList *yabbitmaps; - BList *yabcanvas; - BString lastMouseMsg; - - }; -#else - typedef - struct YabInterface - YabInterface; -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -extern int mmain(int argc, char** argv, YabInterface* yab); /* ANSI C prototypes */ -extern const char* yi_GetApplicationDirectory(YabInterface *yab); -extern void yi_OpenWindow(double x1,double y1,double x2,double y2, const char* id, const char* title, YabInterface* yab); -extern int yi_CloseWindow(const char* view, YabInterface* yab); -extern void yi_CreateButton(double x1,double y1,double x2,double y2, const char* id, const char* title, const char* window, YabInterface* yab); -extern int yi_CreateImage(double x,double y,const char* imagefile, const char* window, YabInterface* yab); -extern int yi_CreateImage2(double x1,double y1,double x2, double y2,const char* imagefile, const char* window, YabInterface* yab); -extern int yi_CreateSVG(double x1,double y1,double x2, double y2,const char* imagefile, const char* window, YabInterface* yab); -extern void yi_CreateMenu(const char* menuhead, const char* menuitem, const char *shortcut, const char* window, YabInterface* yab); -extern void yi_CreateTextControl(double x1, double y1, double x2, double y2, const char *id, const char* label, const char* text, const char* window, YabInterface *yab); -extern void yi_CreateCheckBox(double x, double y, const char *id, const char* label, int isActivated, const char* window, YabInterface *yab); -extern void yi_CreateRadioButton(double x, double y, const char* groupID, const char* label, int isActivated, const char* window, YabInterface *yab); -extern void yi_CreateListBox(double x1,double y1,double x2,double y2, const char* title, int scrollbar, const char* window, YabInterface *yab); -extern void yi_CreateDropBox(double x1, double y1,double x2,double y2, const char* title,const char* label, const char* window, YabInterface *yab); -extern void yi_CreateItem(const char* id,const char* item, YabInterface *yab); -extern void yi_RemoveItem(const char* title,const char* item, YabInterface *yab); -extern void yi_ClearItems(const char* title, YabInterface *yab); -extern void yi_DrawText(double x, double y, const char* text, const char* window, YabInterface* yab); -extern void yi_DrawRect(double x1, double y1, double x2, double y2, const char* window, YabInterface* yab); -extern void yi_DrawClear(const char* window, YabInterface* yab); -extern void yi_CreateAlert(const char* text, const char* button1, const char* type, YabInterface* yab); -extern void yi_CreateText(double x, double y, const char *id, const char* text, const char* window, YabInterface *yab); -extern void yi_Text2(double x1, double y1, double x2, double y2, const char *id, const char* text, const char* window, YabInterface *yab); -extern void yi_TextAlign(const char* txt, const char *option, YabInterface *yab); -extern void yi_Translate(char* text, char result[]); -extern void yi_MenuTranslate(char* text, char result[]); -extern void yi_SetLocalize(); -extern void yi_StopLocalize(); -extern const char* yi_LoadFilePanel(const char* mode, const char* title, const char* directory, YabInterface* yab); -extern const char* yi_SaveFilePanel(const char* mode, const char* title, const char* directory, const char*filename, YabInterface* yab); -extern void yi_SetLayout(const char* layout, const char* window, YabInterface *yab); -extern void yi_WindowSet1(const char* option, const char* value, const char* window, YabInterface *yab); -extern void yi_WindowSet2(const char* option, int r, int g, int b, const char* window, YabInterface *yab); -extern void yi_WindowSet3(const char* option, double x, double y, const char* window, YabInterface *yab); -extern void yi_WindowSet4(const char* option, const char* window, YabInterface *yab); -extern void yi_WindowClear(const char* window, YabInterface *yab); -extern void yi_TextEdit(double x1, double y1, double x2, double y2, const char* title, int scrollbar, const char* window, YabInterface *yab); -extern void yi_TextAdd(const char* title, const char* text, YabInterface *yab); -extern void yi_TextSet(const char* title, const char* option, YabInterface *yab); -extern void yi_TextClear(const char* title, YabInterface *yab); -extern const char* yi_TextGet(const char* title, YabInterface *yab); -extern const char* yi_TextGet3(const char* title, int linenum, YabInterface *yab); -extern const char* yi_TextGet6(const char* title, const char* option, YabInterface *yab); -extern double yi_TextGet4(const char* title, const char* option, int line, YabInterface *yab); -extern int yi_TextGet5(const char* title, const char* option, const char* option2, YabInterface *yab); -extern void yi_TextSet2(const char* title, const char* option, int value, YabInterface *yab); -extern void yi_TextSet3(const char* title, const char* option, const char* value, YabInterface *yab); -extern void yi_TextColor1(const char* title, const char* option, const char* command, YabInterface *yab); -extern void yi_TextColor2(const char* title, const char* option, int r, int g, int b, YabInterface *yab); -extern int yi_TextGet2(const char* title, const char* option, YabInterface *yab); -extern void yi_DrawSet1(const char* option, const char* window, YabInterface *yab); -extern void yi_DrawSet2(int fillorstroke, const char* mypattern, YabInterface *yab); -extern void yi_View(double x1, double y1, double x2, double y2, const char* id, const char* view, YabInterface *yab); -extern void yi_BoxView(double x1, double y1, double x2, double y2, const char* id, const char* text, int lineType, const char* view, YabInterface *yab); -extern void yi_BoxViewSet(const char* id, const char* option, const char* value, YabInterface *yab); -extern void yi_Tab(double x1, double y1, double x2, double y2, const char* id, const char* names, const char* view, YabInterface *yab); -extern void yi_TabSet(const char* id, int num, YabInterface *yab); -extern void yi_TabAdd(const char* id, const char* name, YabInterface *yab); -extern void yi_TabDel(const char* id, int num, YabInterface *yab); -extern int yi_TabViewGet(const char* id, YabInterface *yab); -extern void yi_DrawDot(double x, double y, const char* window, YabInterface *yab); -extern void yi_DrawLine(double x1, double y1, double x2, double y2, const char* window, YabInterface *yab); -extern void yi_DrawCircle(double x, double y, double r, const char* window, YabInterface *yab); -extern void yi_DrawEllipse(double x, double y, double r1, double r2, const char* window, YabInterface *yab); -extern void yi_DrawCurve(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4, const char* window, YabInterface *yab); -extern void yi_Slider1(double x1, double y1, double x2, double y2, const char* id, const char* title, int min, int max, const char* view, YabInterface *yab); -extern void yi_Slider2(double x1, double y1, double x2, double y2, const char* id, const char* title, int min, int max, const char* option, const char* view, YabInterface *yab); -extern void yi_SetSlider1(const char* id, const char* label1, const char* label2, YabInterface *yab); -extern void yi_SetSlider2(const char* id, const char* bottomtop, int count, YabInterface *yab); -extern void yi_SetSlider3(const char* id, const char* part, int r, int g, int b, YabInterface *yab); -extern void yi_SetSlider4(const char* id, int value, YabInterface *yab); -extern void yi_SetOption1(const char* id, const char* option, const char* value, YabInterface *yab); -extern void yi_SetOption2(const char* id, const char* option, int r, int g, int b, YabInterface *yab); -extern void yi_SetOption3(const char* id, const char* option, double x, double y, YabInterface *yab); -extern void yi_SetOption4(const char* id, const char* option, YabInterface *yab); -extern void yi_SetOption5(const char* id, const char* option, int value, YabInterface *yab); -extern void yi_DropZone(const char* view, YabInterface *yab); -extern void yi_ColorControl1(double x, double y, const char* id, const char* view, YabInterface* yab); -extern void yi_ColorControl2(const char* id, int r, int g, int b, YabInterface* yab); -extern void yi_TextControl2(const char* id, const char* text, YabInterface* yab); -extern void yi_TextControl3(const char* id, int mode, YabInterface* yab); -extern void yi_TextControl5(const char* id, YabInterface* yab); -extern void yi_TextControl4(const char* id, const char* option, const char* value, YabInterface* yab); -extern void yi_TreeBox1(double x1, double y1, double x2, double y2, const char* id, int scrollbarType, const char* view, YabInterface* yab); -extern void yi_TreeBox2(const char* id, const char* item, YabInterface* yab); -extern void yi_TreeBox3(const char* id, const char* head, const char* item, int isExpanded, YabInterface* yab); -extern void yi_TreeBox4(const char* id, YabInterface* yab); -extern void yi_TreeBox5(const char* id, const char* item, YabInterface* yab); -extern void yi_TreeBox7(const char* id, int pos, YabInterface* yab); -extern void yi_TreeBox8(const char* id, int pos, YabInterface* yab); -extern void yi_TreeBox9(const char* id, const char* head, const char* item, YabInterface* yab); -extern void yi_TreeBox10(const char* id, const char* head, YabInterface* yab); -extern void yi_TreeBox11(const char* id, const char* head, YabInterface* yab); -extern void yi_TreeBox12(const char* id, const char* item, int pos, YabInterface* yab); -extern const char* yi_TreeboxGet(const char* treebox, int pos, YabInterface* yab); -extern int yi_TreeboxCount(const char* treebox, YabInterface* yab); -extern void yi_ButtonImage(double x,double y,const char* id,const char* enabledon, const char* enabledoff, const char* disabled, const char* view, YabInterface *yab); -extern void yi_CheckboxImage(double x,double y,const char* id,const char* enabledon, const char* enabledoff, const char *disabledon, const char *disabledoff, int isActivated, const char* view, YabInterface *yab); -extern void yi_CheckboxSet(const char* id, int isActivated, YabInterface* yab); -extern void yi_RadioSet(const char* id, int isActivated, YabInterface* yab); -extern const char* yi_TextControlGet(const char* id, YabInterface* yab); -extern void yi_ToolTip(const char* view, const char* text, YabInterface *yab); -extern void yi_ToolTipNew(const char* view, const char* text, const char* color, int r, int g, int b, YabInterface *yab); -extern void yi_ToolTipColor(const char* color, int r, int g, int b, YabInterface *yab); -extern void yi_TreeSort(const char* view, YabInterface *yab); -extern void yi_ListSort(const char* view, YabInterface *yab); -extern void yi_FileBox(double x1, double y1, double x2, double y2, const char* id, int scrollbartype, const char* option, const char* view, YabInterface *yab); -extern void yi_FileBoxAdd2(const char* id, const char* name, int pos, double maxWidth, double minWidth, double width, const char* option, YabInterface *yab); -extern void yi_FileBoxClear(const char* view, YabInterface *yab); -extern void yi_ColumnBoxAdd(const char* id, int column, int position, int height, const char* item, YabInterface *yab); -extern void yi_ColumnBoxSelect(const char *columnbox, int position, YabInterface *yab); -extern void yi_ColumnBoxRemove(const char *columnbox, int position, YabInterface *yab); -extern void yi_ColumnBoxColor(const char *columnbox, const char* option, int r, int g, int b, YabInterface *yab); -extern int yi_Printer(const char* docname, const char *view, const char* config, YabInterface *yab); -extern void yi_PrinterConfig(const char* config, YabInterface *yab); -extern const char* yi_ColumnBoxGet(const char *columnbox, int column, int position, YabInterface *yab); -extern int yi_ColumnBoxCount(const char *columnbox, YabInterface *yab); -extern int yi_DeskbarPosition(YabInterface *yab); -extern int yi_DeskbarExpanded(YabInterface *yab); -extern int yi_DeskbarWidth(YabInterface *yab); -extern int yi_DeskbarHeight(YabInterface *yab); -extern int yi_DeskbarX(YabInterface *yab); -extern int yi_DeskbarY(YabInterface *yab); -extern int yi_DesktopWidth(YabInterface *yab); -extern int yi_DesktopHeight(YabInterface *yab); -extern int yi_WindowGet(const char* view, const char* option, YabInterface *yab); -extern int yi_ViewGet(const char* view, const char* option, YabInterface *yab); //vasper -extern void yi_ClipboardCopy(const char* text, YabInterface *yab); -extern const char* yi_ClipboardPaste(YabInterface *yab); -extern int yi_NewAlert(const char* text, const char* button1, const char* button2, const char* button3, const char* option, YabInterface *yab); -extern void yi_Calendar1(double x, double y, const char* id, const char* format, const char* date, const char* view, YabInterface *yab); -extern const char* yi_Calendar2(const char* id, YabInterface *yab); -extern void yi_Calendar3(const char* id, const char* date, YabInterface *yab); -extern void yi_MouseSet(const char* opt, YabInterface *yab); -extern void yi_Scrollbar(const char* id, int format, const char* view, YabInterface *yab); -extern void yi_ScrollbarSet1(const char* scrollview, const char* option, double position, YabInterface *yab); -extern void yi_ScrollbarSet2(const char* scrollview, const char* option, double opt1, double opt2, YabInterface *yab); -extern void yi_ScrollbarSet3(const char* scrollview, const char* option, YabInterface *yab); -extern double yi_ScrollbarGet(const char* scrollview, const char* option, YabInterface *yab); -extern const char* yi_ListboxGet(const char* listbox, int pos, YabInterface *yab); -extern int yi_ListboxCount(const char* listbox, YabInterface *yab); -extern void yi_ListboxAdd1(const char* listbox, const char* item, YabInterface *yab); -extern void yi_ListboxAdd2(const char* listbox, int pos, const char* item, YabInterface *yab); -extern void yi_ListboxSelect(const char* listbox, int pos, YabInterface *yab); -extern void yi_ListboxRemove(const char* listbox, int pos, YabInterface *yab); -extern void yi_SplitView1(double x1,double y1,double x2,double y2, const char* id, int isVertical, int style, const char* view, YabInterface *yab); -extern void yi_SplitView2(const char* splitView, const char* option, double position, YabInterface *yab); -extern void yi_SplitView3(const char* splitView, const char* option, double left, double right, YabInterface *yab); -extern double yi_SplitViewGet(const char* splitView, const char* option, YabInterface *yab); -extern void yi_StackView1(double x1,double y1,double x2,double y2, const char* id, int number, const char* view, YabInterface *yab); -extern void yi_StackView2(const char* stackView, int num, YabInterface *yab); -extern int yi_StackViewGet(const char* stackView, YabInterface *yab); -extern void yi_DrawSet3(const char* option, int transparency, YabInterface *yab); -extern void yi_TextURL1(double x, double y, const char* id, const char* text, const char* url, const char* view, YabInterface *yab); -extern void yi_TextURL2(const char* id, const char* option, int r, int g, int b, YabInterface *yab); -extern void yi_Menu2(const char* menuHead, int isRadio, const char* view, YabInterface *yab); -extern void yi_SubMenu1(const char* menuHead, const char* menuItem, const char* subMenuItem, const char* modifiers, const char* view, YabInterface *yab); -extern void yi_SubMenu2(const char* menuHead, const char* menuItem, int isRadio, const char* view, YabInterface *yab); -extern void yi_SpinControl1(double x, double y, const char* id, const char* label, int min, int max, int step, const char* view, YabInterface *yab); -extern void yi_SpinControl2(const char* spinControl, int value, YabInterface *yab); -extern int yi_SpinControlGet(const char *spinControl, YabInterface *yab); -extern const char* yi_PopUpMenu(double x, double y, const char* menuItems, const char* view, YabInterface *yab); -extern void yi_DropBoxSelect(const char* dropbox, int position, YabInterface *yab); -extern void yi_DropBoxClear(const char* dropbox, YabInterface *yab); -extern void yi_DropBoxRemove(const char* dropbox, int position, YabInterface *yab); -extern int yi_DropBoxCount(const char* dropbox, YabInterface *yab); -extern const char* yi_DropBoxGet(const char* dropbox, int position, YabInterface *yab); -extern int yi_ColorControlGet(const char* colorcontrol, const char* option, YabInterface *yab); -extern int yi_SliderGet(const char* slider, YabInterface *yab); -extern void yi_SubMenu3(const char* menuHead, const char* menuItem, const char* subMenuItem, const char* option, const char* view, YabInterface *yab); -extern void yi_Menu3(const char* menuHead, const char* menuItem, const char* option,const char* view, YabInterface *yab); -extern double yi_MenuHeight(YabInterface *yab); -extern double yi_TabHeight(YabInterface *yab); -extern double yi_ScrollbarWidth(YabInterface *yab); -extern double yi_DrawGet1(const char* option, const char* txt, const char* view, YabInterface* yab); -extern double yi_DrawGet2(const char* option, const char* view, YabInterface* yab); -extern const char* yi_DrawGet3(const char* option, YabInterface* yab); -extern int yi_DrawGet4(double x, double y, const char* option, const char* view, YabInterface* yab); -extern void yi_exit(int code, YabInterface *yab); -extern void yi_Launch(const char* strg, YabInterface *yab); -extern const int yi_IsMouseIn(const char* view, YabInterface* yab); -extern const char* yi_GetMouseIn(YabInterface* yab); -extern const char* yi_GetMouseMessages(const char* view, YabInterface* yab); -extern const char* yi_KeyboardMessages(const char* view, YabInterface* yab); -extern const char* yi_CheckMessages(YabInterface* yab); -extern int yi_MessageSend(const char* app, const char* msg,YabInterface* yab); -extern int yi_ThreadKill(const char* option, int id,YabInterface* yab); -extern int yi_ThreadGet(const char* option, const char* appname,YabInterface* yab); -extern void yi_Bitmap(double w, double h, const char* id,YabInterface* yab); -extern int yi_BitmapColor(double x, double y, const char* id, const char* option, YabInterface *yab); -extern void yi_BitmapDraw(double x, double y, const char* bitmap, const char* mode, const char* view,YabInterface* yab); -extern void yi_BitmapDraw2(double x1, double y1, double x2, double y2, const char* bitmap, const char* mode, const char* view,YabInterface* yab); -extern void yi_BitmapGet(double x1, double y1, double x2, double y2, const char* id, const char* bitmap,YabInterface* yab); -extern void yi_BitmapGet2(double w, const char* id, const char* path, YabInterface* yab); -extern void yi_BitmapGetIcon(const char* id, const char* option, const char* path, YabInterface* yab); -extern int yi_BitmapGetNum(const char* id, const char* option, YabInterface* yab); -extern int yi_BitmapLoad(const char* filename, const char* bitmap, YabInterface* yab); -extern void yi_BitmapDrag(const char* bitmap,YabInterface* yab); -extern void yi_BitmapRemove(const char* bitmap,YabInterface* yab); -extern void yi_Screenshot(double x1, double y1, double x2, double y2, const char* bitmap, YabInterface* yab); -extern int yi_BitmapSave(const char* id, const char* filename, const char* type, YabInterface* yab); -extern void yi_Canvas(double x1, double y1, double x2, double y2, const char* id, const char* view, YabInterface *yab); -extern int yi_Sound(const char* filename, YabInterface* yab); -extern int yi_SoundStop(int id, YabInterface* yab); -extern int yi_SoundWait(int id, YabInterface* yab); -extern int yi_MediaSound(const char* filename, YabInterface* yab); -extern int yi_MediaSoundStop(int id, YabInterface* yab); -extern int yi_IsComputerOn(YabInterface* yab); -extern void yi_ShortCut(const char* view, const char* key, const char* msg, YabInterface* yab); -extern void yi_DrawSet4(const char* option, const char* color,const char* view, YabInterface* yab); -extern void yi_Treebox13(const char* id,const char* option, int pos, YabInterface* yab); -extern int yi_TreeboxGetOpt(const char* id, const char* option, int pos, YabInterface* yab); -extern int yi_ListboxGetNum(const char* id, YabInterface* yab); -extern int yi_DropboxGetNum(const char* id, YabInterface* yab); -extern int yi_TreeboxGetNum(const char* id, YabInterface* yab); -extern int yi_ColumnboxGetNum(const char* id, YabInterface* yab); -extern void yi_SetLocalize2(const char* path, YabInterface* yab); -extern void yi_SetCurrentLineNumber(int line, const char* libname, YabInterface* yab); -extern void yi_SetMainFileName(const char* name, YabInterface* yab); -extern void yi_beep(); -extern void yi_StatusBar(double x1, double y1, double x2, double y2, const char* id, const char* label1, const char* label2, const char* view, YabInterface* yab); -extern void yi_StatusBarSet(const char* id, const char* label1, const char* label2, double state, YabInterface* yab); -extern void yi_StatusBarSet2(double x1, double y1, double x2, double y2, const char* id, const char* view, YabInterface* yab); -extern void yi_StatusBarSet3(const char* id, int r, int g, int b, YabInterface* yab); -extern void yi_Attribute1(const char* type, const char* name, const char* value, const char* filename, YabInterface* yab); -extern void yi_AttributeClear(const char* name, const char* filename, YabInterface* yab); -extern const char* yi_AttributeGet1(const char* name, const char* filename, YabInterface* yab); -extern double yi_AttributeGet2(const char* name, const char* filename, YabInterface* yab); -extern char* refsRec; //refs received - -#ifdef LOCALIZE -const char* _L(const char* text); -#endif - -#ifdef __cplusplus -} -#endif - -#endif /*YABINTERFACE_H*/ diff --git a/src/YabList.cpp b/src/YabList.cpp deleted file mode 100644 index 4216175..0000000 --- a/src/YabList.cpp +++ /dev/null @@ -1,92 +0,0 @@ -#include -#include -#include -#include "YabList.h" -#include - -YabList::YabList() -{ - idList = new BList(1); - viewList = new BList(1); - typeList = new BList(1); -} - -YabList::~YabList() -{ - DelAll(); - delete idList; - delete viewList; - delete typeList; -} - -int YabList::ViewNum(const char* id) -{ - int tmp=-1; - if(id) - { - for(int i=0; iCountItems(); i++) - if(!strcmp(id, ((BString*)(idList->ItemAt(i)))->String() )) - { - tmp = i; - break; - } - } - return tmp; -} - -void YabList::AddView(const char* id, const BView* view, int type) -{ - idList->AddItem((void*)new BString(id)); - viewList->AddItem((void*)view); - typeList->AddItem((void*)(addr_t)type); -} - -void YabList::DelView(const char* id) -{ - int i = ViewNum(id); - if(i!=-1) - { - idList->RemoveItem(i); - viewList->RemoveItem(i); - typeList->RemoveItem(i); - } -} - -void YabList::DelAll() -{ - idList->MakeEmpty(); - viewList->MakeEmpty(); - typeList->MakeEmpty(); -} - -const void* YabList::GetView(const char* id) -{ - int t = ViewNum(id); - if(t>=0) - return viewList->ItemAt(t); - else - return NULL; -} - -const int YabList::GetType(const char* id) -{ - return (int)(addr_t)typeList->ItemAt(ViewNum(id)); -} - -const int YabList::CountItems() -{ - return typeList->CountItems(); -} - -const void* YabList::ItemAt(int i) -{ - return viewList->ItemAt(i); -} - -void YabList::PrintOut() -{ - printf("\n"); - for(int i=0; iCountItems(); i++) - printf("\t View %s and the id %d %d \n", ((BString*)(idList->ItemAt(i)))->String() , idList->ItemAt(i), viewList->ItemAt(i)); - printf("\n"); -} diff --git a/src/YabList.h b/src/YabList.h deleted file mode 100644 index e56cf76..0000000 --- a/src/YabList.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef YABLIST_H -#define YABLIST_H - -#include -#include - -class YabList -{ -public: - YabList(); - ~YabList(); - void AddView(const char* id, const BView* view, int type); - void DelView(const char* id); - void DelAll(); - const void* GetView(const char* id); - const int GetType(const char* id); - const int CountItems(); - const void* ItemAt(int i); - void PrintOut(); - -private: - int ViewNum(const char* id); - BList* idList; - BList* viewList; - BList* typeList; -}; - -#endif diff --git a/src/YabMain.cpp b/src/YabMain.cpp deleted file mode 100644 index a5fc934..0000000 --- a/src/YabMain.cpp +++ /dev/null @@ -1,54 +0,0 @@ -#include -#include -#include -#include "YabInterface.h" - -char t[1024]; -const char* readSignature(int argc, char** argv) -{ - BString tmp("application/x-vnd.yab-app"); - /* Do not make changes above this comment without changing yab-IDE - to compensate for these changes.*/ - for(int i=1; iRun(); - ret = yabInterface->GetErrorCode(); - delete yabInterface; - return ret; -} diff --git a/src/YabMenu.h b/src/YabMenu.h deleted file mode 100644 index 0bdc0d3..0000000 --- a/src/YabMenu.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef YABMENU_H -#define YABMENU_H - -class YabMenu : public BMenu -{ -public: - YabMenu(const char* name) : BMenu(name) - { - } - - void MyHide() - { - Hide(); - } -}; - -#endif diff --git a/src/YabStackView.cpp b/src/YabStackView.cpp deleted file mode 100644 index 6a1f36c..0000000 --- a/src/YabStackView.cpp +++ /dev/null @@ -1,50 +0,0 @@ -// #include -#include "YabStackView.h" - - -YabStackView::YabStackView(BRect frame, const char *name, int32 number_of_views, uint32 resizingMode, uint32 flags, const BFont *labelFont) : BView(frame, name, resizingMode, flags) -{ - myViews = new BView*[number_of_views]; - // init - for(int i=0; i < number_of_views; i++) - { - myViews[i] = NULL; - } - myCurrent = 0; - myBounds = Bounds(); - myNumOfViews = number_of_views; -} - -YabStackView::~YabStackView() -{ - delete[] myViews; -} - -void YabStackView::AddViews(BView** stackedViews) -{ - for(int32 i = 0; i < myNumOfViews; i++) - { - myViews[i] = stackedViews[i]; - if(i != myCurrent) myViews[i]->Hide(); - AddChild(myViews[i]); - } -} - - -void YabStackView::SelectView(int32 index) -{ - if(index != myCurrent && index >= 0 && index < myNumOfViews) - { - Invalidate(myBounds); - myViews[myCurrent]->Hide(); - myCurrent = index; - Invalidate(myBounds); - myViews[myCurrent]->Show(); - } -} - -int32 YabStackView::CurrentView() -{ - return myCurrent; -} - diff --git a/src/YabStackView.h b/src/YabStackView.h deleted file mode 100644 index 531d293..0000000 --- a/src/YabStackView.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef YAB_STACKVIEW_H_ -#define YAB_STACKVIEW_H_ - -#include - -class YabStackView : public BView -{ - public: - YabStackView(BRect frame, const char *name, int32 number_of_views, uint32 resizingMode = B_FOLLOW_LEFT | B_FOLLOW_TOP, uint32 flags = B_NAVIGABLE | B_WILL_DRAW | B_FRAME_EVENTS, const BFont *labelFont = be_plain_font); - ~YabStackView(); - - void AddViews(BView** stackedViews); - int32 CurrentView(); - virtual void SelectView(int32 index); - - private: - BView** myViews; - int32 myCurrent; - BRect myBounds; - int32 myNumOfViews; -}; - -#endif diff --git a/src/YabTabView.cpp b/src/YabTabView.cpp deleted file mode 100644 index 06a5a0d..0000000 --- a/src/YabTabView.cpp +++ /dev/null @@ -1,219 +0,0 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2001-2005, Haiku -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -// DEALINGS IN THE SOFTWARE. -// -// File Name: YabTabView.cpp -// Author: Marc Flerackers (mflerackers@androme.be) -// Modified by Jan Bungeroth (jan@be-logos.org) -// Modified by Kacper Kasper (kacperkasper@gmail.com) -// Description: YabTabView provides the framework for containing and -// managing groups of BView objects. Modified for *sane* -// view handling (they stay connected to the window). -//------------------------------------------------------------------------------ - -#include -#include -#include -#include -#include -#include "YabTabView.h" - - -YabTabView::YabTabView(BRect frame, const char* name, button_width width, uint32 resizingMode, uint32 flags) - : BTabView(frame, name, width, resizingMode, flags) -{ - fTabNames = new BList; - - FocusChanged = 1; - OldTabView = 1; -} - -YabTabView::~YabTabView() -{ - for(int i=0; iRemoveItem(i); - } - - delete fTabNames; -} - -void YabTabView::AddTab(BView *tabView, const char* label) -{ - if(tabView) - { - BTab *tab = new BTab(); - BTabView::AddTab(tabView, tab); - tab->SetLabel(label); - // HACK - // YAB assumes all views have a window, but that's not true for tabs - if(CountTabs() > 1) - AddChild(tabView); - tabView->Hide(); - - fTabNames->AddItem(new BString(label)); - - } -} - - -void YabTabView::Select(int32 index) -{ - if (index < 0 || index >= CountTabs()) - index = Selection(); - - BTab* tab = TabAt(index); - if (tab) - { - FocusChanged = index+1; - } - - // HACK - // YAB assumes all views have a window, but that's not true for tabs - int32 prevSelected = Selection(); - RemoveChild(tab->View()); - tab->View()->Show(); - BTabView::Select(index); - if(prevSelected > -1) { - BTab* prevTab = TabAt(prevSelected); - prevTab->View()->Hide(); - AddChild(prevTab->View()); - } - -} - -void YabTabView::MakeFocus(bool focused) -{ - BView::MakeFocus(focused); - - SetFocusTab(Selection(), focused); -} - -void YabTabView::SetFocusTab(int32 tab, bool focused) -{ - FocusChanged = (FocusTab() != tab) ? 1 : 0; - - BTabView::SetFocusTab(tab, focused); -} - -void YabTabView::RemovingTab(int32 index) -{ - BTabView::RemoveTab(index); -} -/* -void YabTabView::RemovingTab(int32 index, bool focused) -{ - int oldindex=index; - int index_a; - int tab; - if (index < 0 || index >= CountTabs()) - return NULL; - BTab* tab = (BTab*)fTabNames->RemoveItem(index); - if (tab==NULL) - return NULL; - - tab->Deselect(); - BTab::Private(tab).SetTabView(Null); - if (fContainerView->GetLayout()) - fContainerView->GetLayout()->RemoveItem(index); - if (CountTabs()==0) - fFocus = -1; - else if (index <= fSelection) - Select (fSelection-1); - if (fFocus >=0) { - if(fFocus == CountTabs() -1 || CountTabs() == 0) - BTabView::Select(f.Focus, false); - else - BTabView::Select(f.Focus, true); - } - return tab; - BTabView::RemoveTab(oldindex); - BTabView::Select(1); - - - BTab* tab = TabAt(index); - if (tab) - { - FocusChanged = index; - } - - int32 prevSelected = 1; //Selection(); - RemoveChild(tab->View()); - tab->View()->Show(); - BTabView::Select(index); - if(prevSelected > -1) { - BTab* prevTab = TabAt(prevSelected); //prevSelected); - prevTab->View()->Hide(); - AddChild(prevTab->View()); - } -} - */ - - -const char* YabTabView::GetTabName(int32 index) const -{ - if(index < 0 || index >= CountTabs()) - return NULL; - - return ((BString*)fTabNames->ItemAt(index))->String(); -} -void YabTabView::PrintOut() -{ - //printf("\n %d",fTabNames->CountItems()); - if (fTabNames->CountItems()==0) - { - } - else if(fTabNames->CountItems()>0) - { - printf("\n"); - for(int i=0; iCountItems(); i++) - printf("\t View %s and the id %d\n", ((BString*)(fTabNames->ItemAt(i)))->String() , fTabNames->ItemAt(i)); - printf("\n"); - } -} -void YabTabView::FindTabName(const char* tabname ) -{ - BString test = NULL; - //printf("\n %d",fTabNames->CountItems()); - if (fTabNames->CountItems()<=0) - { - //return NULL; - } - else if(fTabNames->CountItems()>0) - { - //printf("%s \n", tabname); - for(int i=0; iCountItems(); i++) - { - printf("%s\n", ((BString*)(fTabNames->ItemAt(i)))->String()); - test=((BString*)(fTabNames->ItemAt(i)))->String(); - - if (test == tabname) - { - //printf("stimmt"); - printf("%s %d",test,i ); - printf("\n"); - //return tabname; - //return true; - } - } - //printf("\n"); - } -} - diff --git a/src/YabTabView.h b/src/YabTabView.h deleted file mode 100644 index 89cfe58..0000000 --- a/src/YabTabView.h +++ /dev/null @@ -1,73 +0,0 @@ -//------------------------------------------------------------------------------ -// Copyright (c) 2001-2002, OpenBeOS -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -// DEALINGS IN THE SOFTWARE. -// -// File Name: YabTabView.h -// Author: Marc Flerackers (mflerackers@androme.be) -// Jan Bungeroth (jan@be-logos.org) -// Kacper Kasper (kacperkasper@gmail.com) -// Description: YabTabView provides the framework for containing and -// managing groups of BView objects. -//------------------------------------------------------------------------------ - -#ifndef YABTAB_VIEW_H -#define YABTAB_VIEW_H - -// Standard Includes ----------------------------------------------------------- - -#include - -// YabTabView class ------------------------------------------------------------------ -class YabTabView : public BTabView -{ -public: - YabTabView(BRect frame, const char *name, - button_width width = B_WIDTH_AS_USUAL, - uint32 resizingMode = B_FOLLOW_ALL, - uint32 flags = B_FULL_UPDATE_ON_RESIZE | - B_WILL_DRAW | B_NAVIGABLE_JUMP | - B_FRAME_EVENTS | B_NAVIGABLE); - ~YabTabView(); - -virtual const char* GetTabName(int32 index) const; - -virtual void AddTab(BView *target, const char* tabname); -virtual void Select(int32 index); -virtual void MakeFocus(bool focused = true); -virtual void RemovingTab(int32 index); -virtual void SetFocusTab(int32 tab, bool focused); - void PrintOut(); - void FindTabName(const char* tabname); - int32 FocusChanged; - int32 OldTabView; - -//void MoveTab(int32 index, int32 newIndex); -private: - BList *fTabNames; - - int32 fSelection; - int32 fInitialSelection; - int32 fFocus; - - -}; -//------------------------------------------------------------------------------ - -#endif diff --git a/src/YabText.cpp b/src/YabText.cpp deleted file mode 100644 index 20a245c..0000000 --- a/src/YabText.cpp +++ /dev/null @@ -1,920 +0,0 @@ -#include -#include "YabText.h" - -const uint32 YABTEXT_ANALYSE = 'YTan'; -const uint32 YABTEXT_FILECHANGED = 'YTfc'; -const uint32 YABTEXT_PARSE_LINE = 'YTpl'; -const uint32 YABTEXT_UNDO_HIGHLIGHTING = 'YTuh'; - -const rgb_color Blue = {0,0,255,255}; -const rgb_color Red = {255,0,0,255}; -const rgb_color Grey = {185,185,185,255}; -const rgb_color Green = {0,200,000,255}; -const rgb_color Magenta = {200,0,255,255}; - -YabText::YabText(BRect frame, const char* name, BRect textRect, uint32 resizeMode, uint32 flags) - : BTextView(frame, name, textRect, resizeMode, flags) -{ - isCaseSensitive = false; - hasChanged = false; - - // Standard definitions - bgcolor.blue = bgcolor.red = bgcolor.green = bgcolor.alpha = 255; // background - textcolor.blue = textcolor.red = textcolor.green = 0; textcolor.alpha = 255; - - generic_cmd_color = Blue; - format_cmd_color = Red; - special_cmd_color = Green; - comment_color = Grey; - punc_symbol_color = Magenta; - - SetStylable(true); - // BFont myFont(be_fixed_font); - // myFontSize = 12; - // f = myFont; - // f.SetSize(myFontSize); - // SetFontAndColor(0,1,&f,B_FONT_ALL,&textcolor); - - SearchOffset = 0; - SetDoesUndo(true); - - hasAutoCompletion = true; - words = new BList(0); - number_of_letters = 3; - isJapanese = false; -} - -YabText::~YabText() -{ - BString *anItem; - for ( int32 i = 0; (anItem = (BString*)words->ItemAt(i)); i++ ) - delete anItem; - delete words; -} - -void YabText::AddWord(BString *word) -{ - words->AddItem((void*)word); -} - -void YabText::HasAutoCompletion(bool flag) -{ - hasAutoCompletion = flag; -} - -void YabText::SetAutoCompleteStart(int num) -{ - number_of_letters = num; -} - -void YabText::AddCommand(const char* command, int colorGroup) -{ - switch(colorGroup) - { - case 0: generic_matches.push_back(command); - break; - case 1: green_matches.push_back(command); - break; - case 2: purple_matches.push_back(command); - break; - case 3: comment_matches.push_back(command); - break; - case 4: punctuation.push_back(command[0]); - break; - default: - break; - } -} - -void YabText::SetColors(int id, int r, int g, int b) -{ - switch(id) - { - case 0: generic_cmd_color.red = r; - generic_cmd_color.green = g; - generic_cmd_color.blue = b; - ParseAll(0,TextLength()-1,true); - break; - case 1: format_cmd_color.red = r; - format_cmd_color.green = g; - format_cmd_color.blue = b; - ParseAll(0,TextLength()-1,true); - break; - case 2: special_cmd_color.red = r; - special_cmd_color.green = g; - special_cmd_color.blue = b; - ParseAll(0,TextLength()-1,true); - break; - case 3: comment_color.red = r; - comment_color.green = g; - comment_color.blue = b; - ParseAll(0,TextLength()-1,true); - break; - case 4: punc_symbol_color.red = r; - punc_symbol_color.green = g; - punc_symbol_color.blue = b; - ParseAll(0,TextLength()-1,true); - break; - case 5: SetViewColor(r,g,b); - Invalidate(); - break; - case 6: { - textcolor.red = r; - textcolor.green = g; - textcolor.blue = b; - BFont default_font; - GetFontAndColor(0, &default_font); - // BFont default_font(be_fixed_font); - // default_font.SetSize(myFontSize); - SetFontAndColor(0,TextLength()-1,&default_font,B_FONT_ALL,&textcolor); - ParseAll(0,TextLength()-1,true); - } - break; - default: - break; - } -} - -void YabText::AttachedToWindow() -{ - SetViewColor(bgcolor); - SetColorSpace(B_RGB32); - BTextView::AttachedToWindow(); -} - -void YabText::Select(int32 start,int32 finish) -{ - BTextView::Select(start,finish); -} - -int32 YabText::CountPhysicalLines() -{ - return BTextView::CountLines(); -} - -void YabText::KeyDown(const char* bytes, int32 numBytes) -{ - isAutoComplete = false; - bool shouldBeChanged = true; - bool passon = true; - switch(bytes[0]) - { - case B_ENTER: - { - //update previous line on enter - BMessage msg(YABTEXT_PARSE_LINE); - int32 start,finish; - GetSelection(&start,&finish); - if(msg.AddInt32("start",start) == B_OK && msg.AddInt32("finish",finish) == B_OK) - { - BMessenger msgr(this); - msgr.SendMessage(&msg); - } - } - break; - case B_LEFT_ARROW: - { - shouldBeChanged = false; - if(modifiers() & B_CONTROL_KEY) - { - passon = false; - int32 startoffset, endoffset; - GetSelection(&startoffset, &endoffset); - bool inloop = true; - while(inloop) - { - startoffset--; - if(startoffset < 0) - { - if(modifiers() & B_SHIFT_KEY) - Select(0,endoffset); - else - Select(0,0); - ScrollToSelection(); - inloop = false; - } - else - { - char tmp = ByteAt(startoffset); - - if(tmp == ' ' || tmp == ':' || tmp == '/' || tmp == '\n' || tmp == '.' || tmp == '(' || tmp == ')' || tmp == '"' || tmp == '\t' || tmp == '-' || tmp == '+' || tmp == '*' || tmp == '^' || tmp == ',' || tmp == ';' || tmp == '=' || tmp == '\r') - { - if(modifiers() & B_SHIFT_KEY) - Select(startoffset,endoffset); - else - Select(startoffset,startoffset); - ScrollToSelection(); - inloop = false; - } - } - - } - - } - } - break; - case B_RIGHT_ARROW: - { - shouldBeChanged = false; - int cur = CurrentLine(); - if(modifiers() & B_CONTROL_KEY) - { - // passon = false; - int32 startoffset, endoffset; - GetSelection(&startoffset, &endoffset); - bool inloop = true; - while(inloop) - { - endoffset++; - if(endoffset > TextLength() ) - { - if(modifiers() & B_SHIFT_KEY) - Select(startoffset,endoffset); - else - Select(endoffset, endoffset); - ScrollToSelection(); - inloop = false; - } - else - { - char tmp = ByteAt(endoffset); - int a = LineAt(endoffset); - - if(tmp == ' ' || tmp == ':' || tmp == '/' || tmp == '\n' || tmp == '.' || tmp == '(' || tmp == ')' || tmp == '"' || tmp == '\t' || tmp == '-' || tmp == '+' || tmp == '*' || tmp == '^' || tmp == ',' || tmp == ';' || tmp == '=' || tmp == '\r' || a!=cur) - { - if(a!=cur) endoffset --; - if(modifiers() & B_SHIFT_KEY) - Select(startoffset,endoffset); - else - Select(endoffset,endoffset); - ScrollToSelection(); - inloop = false; - } - } - - } - - } - } - break; - case B_UP_ARROW: - case B_DOWN_ARROW: - case B_PAGE_UP: - case B_PAGE_DOWN: - case B_HOME: - case B_END: - case B_INSERT: - case B_FUNCTION_KEY: - case B_ESCAPE: - shouldBeChanged = false; - break; - case B_BACKSPACE: - { - int32 a,b; - GetSelection(&a, &b); - if(a == b && a == 0) shouldBeChanged = false; - } - break; - case B_DELETE: - { - int32 a,b; - GetSelection(&a, &b); - if(a == b && a == TextLength()) shouldBeChanged = false; - } - break; - } - - if(shouldBeChanged && !hasChanged) hasChanged = true; - - if(passon) BTextView::KeyDown(bytes,numBytes); - - if(isAutoComplete) - { - Select(autoOffset, autoEnd); - } -} - -int YabText::FindFirstOnLine(char c,int offset,int eol) -{ - for(int i=offset;i sols; - std::vector eols; - FillSolEol(sols,eols,0,TextLength()-1); - - for(int i=0;i= sols[i] && offset <= eols[i]) - return i; - } - return -1; -} - -void YabText::FillSolEol(std::vector& s,std::vector& e,int start,int finish) -{ - int i=start; - int text_length = TextLength(); - for(i=start;i>=0;i--) - { - if(ByteAt(i) == '\n') - { - break; - } - } - start=i+1; - - i = finish; - for(i=finish;i CountLines()) index = CountLines(); - -// if(index < 0 || index > CountLines() || TextLength() <= 0) -// return; - - std::vector eols; - std::vector sols; - - FillSolEol(sols,eols,0,TextLength()-1); - Select(sols[index],eols[index]); -}*/ - -int32 YabText::CountLines() -{ - std::vector eols; - std::vector sols; - FillSolEol(sols,eols,0,TextLength()-1); - return eols.size(); -} - -void YabText::ParseAll(int start,int finish,bool IsInteractive) -{ - // BFont font(be_fixed_font); - // font.SetSize(myFontSize); - BFont default_font; - GetFontAndColor(0, &default_font); - - int text_length = TextLength(); - if(text_length > 0) - { - std::vector eols; - std::vector sols; - FillSolEol(sols,eols,start,finish); - - int i; - int size; - /* - if(!IsInteractive) - { - size = text_length; - std::vector colorVec(size,textcolor); - - for(i=0;i offsets; - offsets.push_back(0); - - for(i=1;icount = offset_size; - for(i=0;iruns[i].color=colorVec[offsets[i]]; - tra->runs[i].font=font; - tra->runs[i].offset=offsets[i]; - } - SetRunArray(0,text_length-1,tra); - } - else - {*/ - for(i=0;i colorVec(size,textcolor); - - for(int k=0;k 0) - if(!isJapanese) SetFontAndColor(plStart,plStart+plLength,&default_font,B_FONT_ALL,&colorVec[i-sol-1]); -} - -void YabText::ParseLine(int sol,int eol,std::vector& colorVec)//,std::vector& colorVec) -{ - int i; - int offset = sol; - int pos; - int text_length = TextLength(); - //assert(sol >=0 && eol >=0 && sol < text_length && eol < text_length); - //Setup some defaults.... - /* - TwoColorPlateau('\'',sol,eol,comment_color,colorVec);//,displaced);//-displaced - TwoColorPlateau('`',sol,eol,comment_color,colorVec);//,displaced); - TwoColorPlateau('\\',sol,eol,comment_color,colorVec);//,displaced);*/ - - for(i=sol;i= 0 && ByteAt(i-1) == '\\') - { - colorVec[i-1] = punc_symbol_color; - } - - colorVec[i] = punc_symbol_color; - - } - else if(ByteAt(i) == '&' || ByteAt(i) == '{' || ByteAt(i) == '}')// - { - if(i-1 >= 0 && ByteAt(i-1) == '\\') - { - colorVec[i-1] = punc_symbol_color; - } - - colorVec[i] = punc_symbol_color; - - } - else if(ByteAt(i) == '$') - { - if(i-1 >= 0 && ByteAt(i-1) == '\\') - { - colorVec[i-1] = textcolor; - colorVec[i] = textcolor; - } - } - else if(ByteAt(i) == '\\' && i+1 < eol) - { - if(ByteAt(i+1) == '#') - { - colorVec[i] = punc_symbol_color; - colorVec[i+1] = punc_symbol_color; - }else if(ByteAt(i+1) == '\'' || ByteAt(i+1) == '`') - { - colorVec[i] = textcolor; - colorVec[i+1] = textcolor; - } - } - /*if(toupper((char)ByteAt(i)) == 'B') - { - if(i+3 < eol && toupper((char)ByteAt(i+1)) == 'E' && - toupper((char)ByteAt(i+2)) == 'O' && toupper((char)ByteAt(i+3)) == 'S') - { - colorVec[i] = Blue; - colorVec[i+1] = Red; - } - else if(i+4 < eol && toupper((char)ByteAt(i+1)) == 'E' && - toupper((char)ByteAt(i+2)) == 'T' && toupper((char)ByteAt(i+3)) == 'E' - && toupper((char)ByteAt(i+3)) == 'X') - { - colorVec[i] = Blue; - colorVec[i+1] = Red; - } - }*/ - } - offset = sol; - while((pos = FindFirstOnLine('%',offset,eol))>= 0 && offset < eol) - { - - if(pos - 1 >= 0 && ByteAt(pos-1) == '\\') - { - colorVec[pos-1] = punc_symbol_color; - colorVec[pos] = punc_symbol_color; - } - else - { - for(i=pos;i& colorVec) -{ - int i; - for(i=sol;i='0' && (char)ByteAt(j)<='9')) - // if(ByteAt(j)>32) - { - match << (char)ByteAt(j); - } - else - break; - } - if((match.Length() > 0) && (i==sol || !isalpha(ByteAt(i-1)))) - { - if(Contains(green_matches,match)) - { - for(int k=i;k=0) - { - if(ByteAt(myOffset) == ' ' || ByteAt(myOffset) == '\n' || ByteAt(myOffset) == '\t') - break; - myOffset --; - } - - if(offset-myOffset>number_of_letters) - { - for(int i=myOffset+1; iItemAt(i)); i++ ) - { - if(anItem->Compare(itext, offset-myOffset+length-1) == 0) - { - autoOffset = offset + 1; - isAutoComplete = true; - BString sleepy(anItem->String()); - sleepy.CopyInto(replace, offset-myOffset-1, anItem->Length()); - length = replace.Length(); - autoEnd = anItem->Length()+myOffset+1; - break; - } - - } - } - } - BTextView::InsertText(replace.String(),length,offset,NULL); - - if(text[0] != B_ENTER) - { - BMessage msg(YABTEXT_ANALYSE); - if(msg.AddInt32("offset",offset)==B_OK && msg.AddInt32("length",length)==B_OK) - //&& msg.AddString("text",text) == B_OK) - { - BMessenger msgr(this); - msgr.SendMessage(&msg); - } - } -} - -void YabText::DeleteText(int32 start, int32 finish) -{ - BMessage msg(YABTEXT_ANALYSE); - if(msg.AddInt32("start",start)==B_OK && msg.AddInt32("finish",finish)==B_OK) - { - BMessenger msgr(this); - msgr.SendMessage(&msg); - } - BTextView::DeleteText(start,finish); - -} - -void YabText::SetText(const char* text,int32 length,const text_run_array* runs ) -{ - hasChanged = true; - BTextView::SetText(text,length,runs); - // ParseAll(0,length-1,false); -} - -void YabText::UpdateColors() -{ - SetFontAndColor(0,TextLength(),&f,B_FONT_ALL,&textcolor); - ParseAll(0,TextLength()-1,true); - //const char* text = Text(); - //Delete(0,TextLength()-1); - //SetText(text,strlen(text));//,TextLength()-1); -} - -void YabText::UpdateFontSize() -{ - f.SetSize(myFontSize); - SetFontAndColor(0,TextLength(),&f,B_FONT_ALL,&textcolor); - ParseAll(0,TextLength()-1,true); -} - -void YabText::SetText(BFile* file,int32 offset,int32 length,const text_run_array* runs ) -{ - hasChanged = true; - BTextView::SetText(file,offset,length,runs); - // ParseAll(offset,length-1,false); -} - -bool YabText::Contains(std::vector& v,BString s) -{ - for(int i=0;iwhat) - { - case B_INPUT_METHOD_EVENT: - { - int32 be_op; - if(msg->FindInt32("be:opcode", &be_op) == B_OK) - { - if(be_op == B_INPUT_METHOD_STARTED) isJapanese = true; - if(be_op == B_INPUT_METHOD_STOPPED) isJapanese = false; - } - BTextView::MessageReceived(msg); - } - break; - case YABTEXT_UNDO_HIGHLIGHTING: - { - int32 start,finish; - if(msg->FindInt32("start",&start)==B_OK && msg->FindInt32("finish",&finish)==B_OK) - { - Select(start,finish); - } - }break; - - case YABTEXT_PARSE_LINE: - { - int32 start,finish; - if(msg->FindInt32("start",&start)==B_OK && msg->FindInt32("finish",&finish)==B_OK) - { - int32 sel_start,sel_finish; - GetSelection(&sel_start,&sel_finish); - ParseAll(min(sel_start,start),max(sel_finish,finish),true); - } - }break; - case YABTEXT_ANALYSE: - { - int32 start,finish; - if(msg->FindInt32("start",&start)==B_OK && msg->FindInt32("finish",&finish)==B_OK) - { - ParseAll(start,finish,true); - } - - int32 offset,length; - if(msg->FindInt32("offset",&offset)==B_OK - && msg->FindInt32("length",&length)==B_OK) - { - GetSelection(&start,&finish); - ParseAll(offset,finish,true); - } - - }break; - /* - case B_CUT: - case B_COPY: - case B_PASTE: - { - BMessage msg(UPDATE_CLIPBOARD_MENU_STATUS); - BMessenger msgr(Window()); - msgr.SendMessage(&msg); - }*/ - default: - BTextView::MessageReceived(msg); - - } -} - -/* -void YabText::LoadFile (entry_ref *ref) -{ - if (ref == NULL) { - return; - } - - BFile file(ref, B_READ_ONLY); - if (file.InitCheck() != B_OK) { - return; - } - - off_t length; - file.GetSize(&length); - if (length == 0) { - return; - } - - SetText (&file, 0, length); -}*/ - -bool YabText::HasChanged() -{ - return hasChanged; -} - -void YabText::SetChanged(bool changed) -{ - hasChanged = changed; -} - -bool YabText::IsCaseSensitive() -{ - return isCaseSensitive; -} - -void YabText::SetCaseSensitive(bool caseSensitive) -{ - isCaseSensitive = caseSensitive; -} diff --git a/src/YabText.h b/src/YabText.h deleted file mode 100644 index 97effac..0000000 --- a/src/YabText.h +++ /dev/null @@ -1,90 +0,0 @@ -#ifndef YABTEXT_H -#define YABTEXT_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -class YabText : public BTextView -{ - public: - YabText(BRect frame, const char* name, BRect textRect, uint32 resizeMode, uint32 flags); - ~YabText(); - void AddCommand(const char* command, int colorGroup); - virtual void AttachedToWindow(); - virtual void Select(int32 start,int32 finish); - void SetColors(int, int, int, int); - int32 CountPhysicalLines(); //? - virtual void KeyDown(const char* bytes, int32 numBytes); - int FindFirstOnLine(char c,int offset,int eol); - int32 OffsetAtIndex(int32 index);// const; - int32 LineAt(int32 offset);// const; - void FillSolEol(std::vector& s,std::vector& e,int start,int finish); - // void GoToLine(int32 index); - int32 CountLines(); - void ParseAll(int start,int finish,bool IsInteractive); - void IParseLine(int sol,int eol); // TODO! - void ParseLine(int sol,int eol,std::vector& colorVec); // TODO! - void ICheckWordLists(int sol,int eol,std::vector& colorVec); - void SetText(const char* text,int32 length,const text_run_array* runs = NULL); - void UpdateColors(); - void UpdateFontSize(); - void SetText(BFile* file,int32 offset,int32 length,const text_run_array* runs = NULL); - bool Contains(std::vector& v,BString s); - // virtual bool CanEndLine(int32 offset); - // void LoadFile(entry_ref *ref); - virtual void MessageReceived(BMessage* msg); - - bool HasChanged(); - void SetChanged(bool changed); - bool IsCaseSensitive(); - void SetCaseSensitive(bool caseSensitive); - - void SetNormalFocus(); - void SetAttachedFocus(); - - void AddWord(BString *word); - void SetAutoCompleteStart(int num); - void HasAutoCompletion(bool flag); - - int SearchOffset; - - private: - bool isCaseSensitive, hasChanged, isJapanese; - int myFontSize; - rgb_color bgcolor; - rgb_color textcolor, punc_symbol_color, comment_color, ignore_color; - rgb_color format_cmd_color, special_cmd_color, generic_cmd_color; - BFont f; - - std::vector green_matches; - std::vector purple_matches; - std::vector generic_matches; - std::vector comment_matches; - std::vector punctuation; - - BList *words; - bool hasAutoCompletion, isAutoComplete; - int32 autoOffset, autoEnd; - int number_of_letters; - - bool min(int32 a, int32 b) - { - return (a<=b?a:b); - }; - bool max(int32 a, int32 b) - { - return (a>=b?a:b); - }; - - protected: - virtual void InsertText(const char* text,int32 length,int32 offset,const text_run_array* runner); - virtual void DeleteText(int32 start, int32 finish); -}; -#endif diff --git a/src/YabToolTip.cpp b/src/YabToolTip.cpp deleted file mode 100644 index d1b9523..0000000 --- a/src/YabToolTip.cpp +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Copyright 2009, Axel Dörfler, axeld@pinc-software.de. - * Distributed under the terms of the MIT License. - */ - - -// #include -#include -#include - -#include "ToolTip.h" - -class MouseToolTip : public BToolTip { -public: - MouseToolTip() - { - fView = new MouseView(); - SetSticky(true); - } - - virtual ~MouseToolTip() - { - delete fView; - } - - virtual BView* View() const - { - return fView; - } - -private: - BStringView* fView; -}; - - -class ImmediateView : public BStringView { -public: - ImmediateView(const char* name, const char* label) - : - BStringView(name, label) - { - SetToolTip("Easy but immediate!"); - ToolTip()->SetSticky(true); - } - - virtual void MouseMoved(BPoint where, uint32 transit, - const BMessage* dragMessage) - { - if (transit == B_ENTERED_VIEW) - ShowToolTip(ToolTip()); - } -}; - - -class Window : public BWindow { -public: - Window(); - - virtual bool QuitRequested(); -}; - - -class Application : public BApplication { -public: - Application(); - - virtual void ReadyToRun(); -}; - - -// #pragma mark - - - -Window::Window() - : - BWindow(BRect(100, 100, 520, 430), "ToolTip-Test", - B_TITLED_WINDOW, B_ASYNCHRONOUS_CONTROLS) -{ - BView* simple = new BStringView("1", "Simple Tool Tip"); - simple->SetToolTip("This is a really\nsimple tool tip!"); - - BView* custom = new BStringView("2", "Custom Tool Tip"); - custom->SetToolTip(new CustomToolTip()); - - BView* changing = new BStringView("3", "Changing Tool Tip"); - changing->SetToolTip(new ChangingToolTip()); - - BView* mouse = new BStringView("3", "Mouse Tool Tip (sticky)"); - mouse->SetToolTip(new MouseToolTip()); - - BView* immediate = new ImmediateView("3", "Immediate Tool Tip (sticky)"); - - BLayoutBuilder::Group<>(this, B_VERTICAL) - .Add(simple) - .Add(custom) - .Add(changing) - .Add(mouse) - .Add(immediate); -} - - -bool -Window::QuitRequested() -{ - be_app->PostMessage(B_QUIT_REQUESTED); - return true; -} - - -// #pragma mark - - - -Application::Application() - : BApplication("application/x-vnd.haiku-tooltiptest") -{ -} - - -void -Application::ReadyToRun() -{ - BWindow *window = new Window(); - window->Show(); -} - - -// #pragma mark - - - -int -main(int argc, char **argv) -{ - Application app; - - app.Run(); - return 0; -} - diff --git a/src/YabView.cpp b/src/YabView.cpp deleted file mode 100644 index cb3393e..0000000 --- a/src/YabView.cpp +++ /dev/null @@ -1,341 +0,0 @@ -#include -#include -#include -#include -#include -#include "YabWindow.h" -#include "YabView.h" - -YabView::YabView(BRect frame, const char *name, uint32 resizingMode, uint32 flags) - : BView(frame, name, resizingMode, flags) -{ -/* - SetViewColor(216,216,216,255); - SetLowColor(216,216,216,255); - SetHighColor(0,0,0,255); - */ - - rgb_color b1 = ui_color(B_PANEL_BACKGROUND_COLOR); - rgb_color b2 = {0,0,0,255}; - - SetViewColor(b1); - SetLowColor(b1); - SetHighColor(b2); - - drawList = new BList(1); - - YabDrawing *t = new YabDrawing(); - t->command = 6; - t->r = 0; t->g = 0; - t->b = 0; t->alpha = 255; - drawList->AddItem(t); - - YabDrawing *t2 = new YabDrawing(); - t2->command = 7; - t2->r = b1.red; t2->g = b1.green; - t2->b = b1.blue; t2->alpha = 255; - drawList->AddItem(t2); - - mouseMovedInfo = 1; - mouseStateInfo = -1; - prevMouseStateInfo = 0; - - mouseX = 0; - mouseY = 0; - mouseLButton = 0; - mouseMButton = 0; - mouseRButton = 0; - dropZone = false; - pressedKeys.SetTo(""); - SetDrawingMode(B_OP_COPY); - - // BTab uses view Name() as displayed label storage, so SetLabel changes it - // this interferes with yab method of referencing views by name - // to be removed - nameWAForTabView = name; -} - -YabView::~YabView() -{ - while(drawList->CountItems()>0) - { - YabDrawing *t = (YabDrawing*)drawList->LastItem(); - drawList->RemoveItem(t); - if(t->command == 0) delete [] t->chardata; - delete t; - } - delete drawList; -} - -void YabView::MessageReceived(BMessage *msg) -{ - entry_ref ref; - switch (msg->what) - { - case B_SIMPLE_DATA: - { - if(dropZone) - { - BString tmp(""); - int32 count; - uint32 type; - const char* name; - int i =0; - - while(msg->FindRef("refs", i, &ref) == B_OK) - { - BEntry dropEntry(&ref); - BPath tmpDirectory; - dropEntry.GetPath(&tmpDirectory); - tmp << Name(); - tmp << ":_Dropped"; - tmp << ":" << tmpDirectory.Path(); - tmp << "|"; - i++; - } - YabWindow *yabWin = (YabWindow*)Window(); - yabWin->dropMsg.SetTo(tmp); - } - else - BView::MessageReceived(msg); - } - break; - default: - BView::MessageReceived(msg); - break; - } -} - -void YabView::Draw(BRect updateRect) -{ - SetFont(be_plain_font); - updateRect = Bounds(); - SetDrawingMode(B_OP_OVER); - for(int i=0; iCountItems(); i++) - { - YabDrawing *e = (YabDrawing*)drawList->ItemAt(i); - switch(e->command) - { - case 0: DrawString(e->chardata, BPoint(e->x1, e->y1)); - break; - case 1: StrokeLine(BPoint(e->x1,e->y1),BPoint(e->x2,e->y2), e->p); - break; - case 2: StrokeEllipse(BPoint(e->x1,e->y1), e->x2, e->y2, e->p); - break; - case 3: FillEllipse(BPoint(e->x1,e->y1), e->x2, e->y2, e->p); - break; - case 4: StrokeRect(BRect(e->x1,e->y1,e->x2,e->y2), e->p); - break; - case 5: FillRect(BRect(e->x1,e->y1,e->x2,e->y2), e->p); - break; - case 6: { - if(e->alpha == 255) - SetDrawingMode(B_OP_OVER); - else - SetDrawingMode(B_OP_ALPHA); - SetHighColor(e->r,e->g,e->b,e->alpha); - } - break; - case 7: { - if(e->alpha == 255) - SetDrawingMode(B_OP_OVER); - else - SetDrawingMode(B_OP_ALPHA); - SetLowColor(e->r,e->g,e->b,e->alpha); - } - break; - case 8: { - BPoint p[4]; - p[0].Set(e->x1,e->y1); - p[1].Set(e->x2,e->y2); - p[2].Set(e->x3,e->y3); - p[3].Set(e->x4,e->y4); - SetPenSize(1.01); - StrokeBezier(p, e->p); - SetPenSize(1.0); - } - break; - case 9: { - BPoint p[4]; - p[0].Set(e->x1,e->y1); - p[1].Set(e->x2,e->y2); - p[2].Set(e->x3,e->y3); - p[3].Set(e->x4,e->y4); - SetPenSize(2.0); - FillBezier(p, e->p); - SetPenSize(1.0); - } - break; - case 10: { - drawing_mode mode = DrawingMode(); - if(IsPrinting()) - SetDrawingMode(B_OP_OVER); - else - SetDrawingMode(B_OP_ALPHA); - DrawBitmap(e->bitmap, BPoint(e->x1, e->y1)); - SetDrawingMode(mode); - } - break; - case 11: { - drawing_mode mode = DrawingMode(); - if(IsPrinting()) - SetDrawingMode(B_OP_OVER); - else - SetDrawingMode(B_OP_ALPHA); - DrawBitmap(e->bitmap, BRect(e->x1, e->y1, e->x2, e->y2)); - SetDrawingMode(mode); - } - break; - case 12: { - // SetFont(&e->font, B_FONT_FAMILY_AND_STYLE); - // SetFont(&e->font, B_FONT_SIZE); - SetFont(&e->font, B_FONT_ALL); - } - break; - } - } -} - -void YabView::MouseDown(BPoint point) -{ - BPoint ptCursor; - uint32 uButtons = 0; - GetMouse(&ptCursor, &uButtons, false); - - mouseX = (int)ptCursor.x; - mouseY = (int)ptCursor.y; - if(uButtons & B_PRIMARY_MOUSE_BUTTON) mouseLButton = 1; else mouseLButton = 0; - if(uButtons & B_SECONDARY_MOUSE_BUTTON) mouseRButton = 1; else mouseRButton = 0; - if(uButtons & B_TERTIARY_MOUSE_BUTTON) mouseMButton = 1; else mouseMButton = 0; - mouseStateInfo = 4; - BView::MouseDown(point); -} - -void YabView::MouseUp(BPoint point) -{ - BPoint ptCursor; - uint32 uButtons = 0; - GetMouse(&ptCursor, &uButtons, false); - - mouseX = (int)ptCursor.x; - mouseY = (int)ptCursor.y; - if(uButtons & B_PRIMARY_MOUSE_BUTTON) mouseLButton = 1; else mouseLButton = 0; - if(uButtons & B_SECONDARY_MOUSE_BUTTON) mouseRButton = 1; else mouseRButton = 0; - if(uButtons & B_TERTIARY_MOUSE_BUTTON) mouseMButton = 1; else mouseMButton = 0; - mouseStateInfo = 5; - BView::MouseUp(point); -} - -void YabView::MouseMoved(BPoint point, uint32 transit, const BMessage *message) -{ - BPoint ptCursor; - uint32 uButtons = 0; - GetMouse(&ptCursor, &uButtons, true); - - mouseX = (int)ptCursor.x; - mouseY = (int)ptCursor.y; - if(uButtons & B_PRIMARY_MOUSE_BUTTON) mouseLButton = 1; else mouseLButton = 0; - if(uButtons & B_SECONDARY_MOUSE_BUTTON) mouseRButton = 1; else mouseRButton = 0; - if(uButtons & B_TERTIARY_MOUSE_BUTTON) mouseMButton = 1; else mouseMButton = 0; - - switch(transit) - { - case B_INSIDE_VIEW: - if(prevMouseStateInfo==1) - mouseStateInfo = 0; - else - { - mouseStateInfo = 1; - prevMouseStateInfo = 1; - } - mouseMovedInfo = 0; - break; - case B_ENTERED_VIEW: - mouseStateInfo = 1; - mouseMovedInfo = 0; - break; - case B_OUTSIDE_VIEW: - mouseStateInfo = 2; - mouseMovedInfo = 1; - break; - case B_EXITED_VIEW: - mouseStateInfo = 3; - mouseMovedInfo = 1; - prevMouseStateInfo = 0; - break; - } - - BView::MouseMoved(point, transit, message); -} - -void YabView::KeyDown(const char *bytes, int32 numBytes) -{ - BMessage *msg = Window()->CurrentMessage(); - if(msg) - { - pressedKeys.SetTo(""); - int32 key, modifiers; - msg->FindInt32("key", &key); - msg->FindInt32("modifiers", &modifiers); - if(modifiers&B_CONTROL_KEY) pressedKeys << "ctrl-"; - if(modifiers&B_COMMAND_KEY) pressedKeys << "command-"; - if(modifiers&B_OPTION_KEY) pressedKeys << "option-"; - if(modifiers&B_SHIFT_KEY) pressedKeys << "shift-"; - switch(bytes[0]) - { - case B_BACKSPACE: pressedKeys << "backspace"; break; - case B_ENTER: pressedKeys << "enter"; break; - case B_TAB: pressedKeys << "tab"; break; - case B_ESCAPE: pressedKeys << "esc"; break; - case B_LEFT_ARROW: pressedKeys << "left"; break; - case B_RIGHT_ARROW: pressedKeys << "right"; break; - case B_UP_ARROW: pressedKeys << "up"; break; - case B_DOWN_ARROW: pressedKeys << "down"; break; - case B_INSERT: pressedKeys << "insert"; break; - case B_DELETE: pressedKeys << "del"; break; - case B_HOME: pressedKeys << "home"; break; - case B_END: pressedKeys << "end"; break; - case B_PAGE_UP: pressedKeys << "pageup"; break; - case B_PAGE_DOWN: pressedKeys << "pagedown"; break; - case B_FUNCTION_KEY: - { - switch(key) - { - case B_F1_KEY: pressedKeys << "f1"; break; - case B_F2_KEY: pressedKeys << "f2"; break; - case B_F3_KEY: pressedKeys << "f3"; break; - case B_F4_KEY: pressedKeys << "f4"; break; - case B_F5_KEY: pressedKeys << "f5"; break; - case B_F6_KEY: pressedKeys << "f6"; break; - case B_F7_KEY: pressedKeys << "f7"; break; - case B_F8_KEY: pressedKeys << "f8"; break; - case B_F9_KEY: pressedKeys << "f9"; break; - case B_F10_KEY: pressedKeys << "f10"; break; - case B_F11_KEY: pressedKeys << "f11"; break; - case B_F12_KEY: pressedKeys << "f12"; break; - case B_PRINT_KEY: pressedKeys << "print"; break; - case B_SCROLL_KEY: pressedKeys << "scroll"; break; - case B_PAUSE_KEY: pressedKeys << "pause"; break; - default: - pressedKeys.SetTo(bytes); - break; - } - } - break; - default: - pressedKeys.SetTo(bytes); - break; - } - } - else - pressedKeys.SetTo(bytes); - - if(bytes[0]!=B_TAB) BView::KeyDown(bytes,numBytes); -} - -void YabView::KeyUp(const char *bytes, int32 numBytes) -{ - pressedKeys.SetTo(""); - BView::KeyUp(bytes,numBytes); -} - diff --git a/src/YabView.h b/src/YabView.h deleted file mode 100644 index 9b40028..0000000 --- a/src/YabView.h +++ /dev/null @@ -1,47 +0,0 @@ -#ifndef YABVIEW_H -#define YABVIEW_H - -#include -#include - -struct YabDrawing -{ - int command; - double x1,y1,x2,y2,x3,y3,x4,y4; - int r,g,b,alpha; - const char* chardata; - pattern p; - BBitmap *bitmap; - BFont font; -}; - -class YabView : public BView -{ - public: - YabView(BRect frame, const char *name, uint32 resizingMode, uint32 flags); - ~YabView(); - virtual void MessageReceived(BMessage *msg); - virtual void Draw(BRect updateRect); - virtual void MouseMoved(BPoint point, uint32 transit, const BMessage *message); - virtual void MouseUp(BPoint point); - virtual void MouseDown(BPoint point); - virtual void KeyUp(const char *bytes, int32 numBytes); - virtual void KeyDown(const char *bytes, int32 numBytes); - const char* NameForTabView() { return nameWAForTabView; } - BList *drawList; - int mouseMovedInfo; - int mouseStateInfo; - int mouseX; - int mouseY; - uint mouseLButton; - uint mouseMButton; - uint mouseRButton; - bool dropZone; - BString pressedKeys; - private: - int prevMouseStateInfo; - // TODO: revisit at a later time, more info in constructor - BString nameWAForTabView; -}; - -#endif diff --git a/src/YabWindow.cpp b/src/YabWindow.cpp deleted file mode 100644 index 8e839be..0000000 --- a/src/YabWindow.cpp +++ /dev/null @@ -1,362 +0,0 @@ -#include "global.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "YabWindow.h" -#include "column/ColumnListView.h" - -const uint32 YABBUTTON = 'YBbu'; -const uint32 YABMENU = 'YBme'; -const uint32 YABSUBMENU = 'YBsu'; -const uint32 YABTEXTCONTROL = 'YBtc'; -const uint32 YABCHECKBOX = 'YBcb'; -const uint32 YABRADIOBUTTON = 'YBrb'; -const uint32 YABLISTBOXSELECT = 'YBls'; -const uint32 YABLISTBOXINVOKE = 'YBli'; -const uint32 YABDROPBOX = 'YBdb'; -const uint32 YABSLIDER = 'YBsl'; -const uint32 YABCOLORCONTROL = 'YBco'; -const uint32 YABTREEBOXSELECT = 'YBts'; -const uint32 YABTREEBOXINVOKE = 'YBti'; -const uint32 YABFILEBOXSELECT = 'YBfs'; -const uint32 YABFILEBOXINVOKE = 'YBfi'; -const uint32 YABSPINCONTROL = 'YBsp'; -const uint32 YABSHORTCUT = 'YBsh'; - - -YabWindow::YabWindow(BRect frame, const char* title, const char* id, window_look winlook, window_feel winfeel, uint32 flags) - : BWindow (frame, title, winlook, winfeel, flags) -{ - messageString.SetTo(""); - idString.SetTo(id); - showing = 1; - dropMsg.SetTo(""); - WActivated=-1; - WFrameMoved=-1; - WFrameResized=-1; -} - -YabWindow::~YabWindow() -{ -} - -void YabWindow::WindowActivated(bool state) -{ - if (state) - WActivated=1; - else - WActivated=0; -} - -void YabWindow::FrameMoved(BPoint new_position) -{ - WFrameMoved=1; - Wpx=(int)new_position.x; - Wpy=(int)new_position.y; -} - -void YabWindow::FrameResized(float new_width, float new_height) -{ - WFrameResized=1; - Wph=(int)new_height; - Wpw=(int)new_width; -} - -void YabWindow::MessageReceived(BMessage *message) -{ - // if(message) message->PrintToStream(); - switch(message->what) - { - case YABBUTTON: - { - BString tmpMessage(""); - BButton *myButtonPressed; - message->FindPointer("source",(void **) &myButtonPressed); - tmpMessage += myButtonPressed->Name(); - tmpMessage += "|"; - messageString += tmpMessage; - } - break; - case YABMENU: - { - BString tmpMessage(""); - BMenuItem *mySelectedMenu; - message->FindPointer("source",(void **) &mySelectedMenu); - BMenu *myMenu = mySelectedMenu->Menu(); - tmpMessage += ((BMenuBar*)myMenu->Supermenu())->Parent()->Name(); - tmpMessage += ":"; - tmpMessage += myMenu->Name(); - tmpMessage += ":"; - tmpMessage += mySelectedMenu->Label(); - tmpMessage += "|"; - messageString += tmpMessage; - } - break; - case YABSUBMENU: - { - BString tmpMessage(""); - BMenuItem *mySelectedMenu; - message->FindPointer("source",(void **) &mySelectedMenu); - BMenu *myMenu = mySelectedMenu->Menu(); - tmpMessage += ((BMenuBar*)myMenu->Supermenu()->Supermenu())->Parent()->Name(); - tmpMessage += ":"; - tmpMessage += myMenu->Supermenu()->Name(); - tmpMessage += ":"; - tmpMessage += myMenu->Name(); - tmpMessage += ":"; - tmpMessage += mySelectedMenu->Label(); - tmpMessage += "|"; - messageString += tmpMessage; - } - break; - case YABTEXTCONTROL: - { - BString tmpMessage(""); - BTextControl *myTextControl; - message->FindPointer("source",(void **) &myTextControl); - tmpMessage += myTextControl->Name(); - tmpMessage += ":"; - tmpMessage += myTextControl->Text(); - tmpMessage += "|"; - messageString += tmpMessage; - } - break; - case YABCHECKBOX: - { - BString tmpMessage(""); - BCheckBox *myCheckBox; - message->FindPointer("source",(void **) &myCheckBox); - tmpMessage += myCheckBox->Name(); - tmpMessage += ":"; - if(myCheckBox->Value()==B_CONTROL_ON) - tmpMessage += "ON|"; - else - tmpMessage += "OFF|"; - messageString += tmpMessage; - } - break; - case YABRADIOBUTTON: - { - BString tmpMessage(""); - BRadioButton *myRadioButton; - message->FindPointer("source",(void **) &myRadioButton); - tmpMessage += myRadioButton->Name(); - tmpMessage += "|"; - messageString += tmpMessage; - } - break; - case YABLISTBOXINVOKE: - { - BListView *myList; - message->FindPointer("source",(void **) &myList); - int i = myList->CurrentSelection(); - if(i>=0) - { - BString tmpMessage(""); - tmpMessage += myList->Name(); - tmpMessage += ":_Invoke:"; - // tmpMessage += ((BStringItem*)(myList->ItemAt(i)))->Text(); - tmpMessage << i+1; - tmpMessage += "|"; - messageString += tmpMessage; - } - } - break; - case YABLISTBOXSELECT: - { - BListView *myList; - message->FindPointer("source",(void **) &myList); - int i = myList->CurrentSelection(); - if(i>=0) - { - BString tmpMessage(""); - tmpMessage += myList->Name(); - tmpMessage += ":_Select:"; - // tmpMessage += ((BStringItem*)(myList->ItemAt(i)))->Text(); - tmpMessage << i+1; - tmpMessage += "|"; - messageString += tmpMessage; - } - } - break; - case YABDROPBOX: - { - BString tmpMessage(""); - BMenuItem *myMenuItem; - message->FindPointer("source",(void **) &myMenuItem); - tmpMessage += (myMenuItem->Menu())->Supermenu()->Parent()->Name(); - tmpMessage += ":"; - tmpMessage += myMenuItem->Label(); - tmpMessage += "|"; - messageString += tmpMessage; - } - break; - case YABSLIDER: - { - BString tmpMessage(""); - BSlider *mySlider; - message->FindPointer("source",(void **) &mySlider); - tmpMessage += mySlider->Name(); - tmpMessage += ":"; - tmpMessage << mySlider->Value(); - tmpMessage += "|"; - messageString += tmpMessage; - } - break; - case YABCOLORCONTROL: - { - rgb_color col; - BString tmpMessage(""); - BColorControl *myCControl; - message->FindPointer("source",(void **) &myCControl); - tmpMessage += myCControl->Name(); - tmpMessage += ":"; - col = myCControl->ValueAsColor(); - tmpMessage << col.red << ":" << col.green << ":" << col.blue; - tmpMessage += "|"; - messageString += tmpMessage; - } - break; - case YABTREEBOXINVOKE: - { - BOutlineListView *myList; - message->FindPointer("source",(void **) &myList); - int i = myList->FullListCurrentSelection(); - if(i>=0) - { - BString tmpMessage(""); - const char* txt = ((BStringItem*)(myList->FullListItemAt(i)))->Text(); - tmpMessage += myList->Name(); - tmpMessage += ":_Invoke:"; - tmpMessage << i+1; - /* - int n = tmpMessage.Length(); - BListItem *superitem = myList->Superitem(myList->FullListItemAt(i)); - while(superitem) - { - BString t(""); - t << ((BStringItem*)superitem)->Text() << ":"; - tmpMessage.Insert(t,n); - superitem = myList->Superitem(superitem); - } - tmpMessage += txt;*/ - tmpMessage += "|"; - messageString += tmpMessage; - } - } - break; - case YABTREEBOXSELECT: - { - BOutlineListView *myList; - message->FindPointer("source",(void **) &myList); - int i = myList->FullListCurrentSelection(); - if(i>=0) - { - BString tmpMessage(""); - const char* txt = ((BStringItem*)(myList->FullListItemAt(i)))->Text(); - tmpMessage += myList->Name(); - tmpMessage += ":_Select:"; - tmpMessage << i+1; - /* - int n = tmpMessage.Length(); - BListItem *superitem = myList->Superitem(myList->FullListItemAt(i)); - while(superitem) - { - BString t(""); - t << ((BStringItem*)superitem)->Text() << ":"; - tmpMessage.Insert(t,n); - superitem = myList->Superitem(superitem); - } - tmpMessage += txt;*/ - tmpMessage += "|"; - messageString += tmpMessage; - } - } - break; - case YABFILEBOXSELECT: - { - BColumnListView *myList; - message->FindPointer("source",(void **) &myList); - BRow *myRow = NULL; - if(myList) myRow = myList->CurrentSelection(); - if(myRow) - { - // if(!myList->IsFocus()) myList->MakeFocus(); - BString tmpMessage(""); - tmpMessage += myList->Name(); - tmpMessage += ":_Select:"; - tmpMessage << myList->IndexOf(myRow)+1; - tmpMessage += "|"; - messageString += tmpMessage; - } - } - break; - case YABFILEBOXINVOKE: - { - BColumnListView *myList; - message->FindPointer("source",(void **) &myList); - BRow *myRow = NULL; - if(myList) myRow = myList->CurrentSelection(); - if(myRow) - { - // if(!myList->IsFocus()) myList->MakeFocus(); - BString tmpMessage(""); - tmpMessage += myList->Name(); - tmpMessage += ":_Invoke:"; - tmpMessage << myList->IndexOf(myRow)+1; - tmpMessage += "|"; - messageString += tmpMessage; - } - } - break; - case YABSHORTCUT: - { - const char* myMsg; - if(message->FindString("shortcut", &myMsg) == B_OK) - { - messageString += myMsg; - messageString += "|"; - } - } - break; - default: - BWindow::MessageReceived(message); - break; - } -} - -const BString YabWindow::getMessages() -{ - BString tmp(messageString); - tmp += dropMsg; - messageString.SetTo(""); - dropMsg.SetTo(""); - return (const BString)tmp; -} - -bool YabWindow::QuitRequested() -{ - messageString += idString; - messageString += ":_QuitRequested|"; - return false; -} - -bool YabWindow::IsPaper(uint8* a) -{ - if(a[32] != 0) return true; - return false; -} - diff --git a/src/YabWindow.h b/src/YabWindow.h deleted file mode 100644 index cb1c360..0000000 --- a/src/YabWindow.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef YABWINDOW_H -#define YABWINDOW_H - -#include -#include -#include -#include -#include -#include - -class YabWindow : public BWindow -{ - public: - YabWindow(BRect frame, const char* title, const char* id, window_look winlook, window_feel winfeel, uint32 flags); - ~YabWindow(); - virtual void MessageReceived(BMessage *message); - virtual bool QuitRequested(); - const BString getMessages(); - virtual void WindowActivated(bool state); - virtual void FrameMoved(BPoint new_position); - virtual void FrameResized(float new_width, float new_height); - int layout; - int showing; - int WActivated; - int WFrameResized; - int Wpx; - int Wpy; - int Wph; - int Wpw; - int WFrameMoved; - BString dropMsg; - BString idString; - private: - bool IsPaper(uint8* a); - BString messageString; -}; - -#endif diff --git a/src/column/ColorTools.cpp b/src/column/ColorTools.cpp deleted file mode 100644 index e4aea31..0000000 --- a/src/column/ColorTools.cpp +++ /dev/null @@ -1,110 +0,0 @@ -/* -Open Tracker License - -Terms and Conditions - -Copyright (c) 1991-2000, Be Incorporated. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice applies to all licensees -and shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF TITLE, MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -BE INCORPORATED BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of Be Incorporated shall not be -used in advertising or otherwise to promote the sale, use or other dealings in -this Software without prior written authorization from Be Incorporated. - -Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered trademarks -of Be Incorporated in the United States and other countries. Other brand product -names are registered trademarks or trademarks of their respective holders. -All rights reserved. -*/ - -/******************************************************************************* -/ -/ File: ColorTools.cpp -/ -/ Description: Additional experimental color manipulation functions. -/ -/ Copyright 2000, Be Incorporated, All Rights Reserved -/ -*******************************************************************************/ - -#include "ColorTools.h" - -#if B_BEOS_VERSION <= B_BEOS_VERSION_MAUI - -namespace BExperimental { - -#if DEBUG -#define DB_INLINE -#else -#define DB_INLINE inline -#endif - -static DB_INLINE void mix_color_func(rgb_color* target, const rgb_color other, uint8 amount) -{ - target->red = (uint8)( ((int16(other.red)-int16(target->red))*amount)/255 - + target->red ); - target->green = (uint8)( ((int16(other.green)-int16(target->green))*amount)/255 - + target->green ); - target->blue = (uint8)( ((int16(other.blue)-int16(target->blue))*amount)/255 - + target->blue ); - target->alpha = (uint8)( ((int16(other.alpha)-int16(target->alpha))*amount)/255 - + target->alpha ); -} - -static DB_INLINE void blend_color_func(rgb_color* target, const rgb_color other, uint8 amount) -{ - const uint8 alphaMix = (uint8)( ((int16(other.alpha)-int16(255-target->alpha))*amount)/255 - + (255-target->alpha) ); - target->red = (uint8)( ((int16(other.red)-int16(target->red))*alphaMix)/255 - + target->red ); - target->green = (uint8)( ((int16(other.green)-int16(target->green))*alphaMix)/255 - + target->green ); - target->blue = (uint8)( ((int16(other.blue)-int16(target->blue))*alphaMix)/255 - + target->blue ); - target->alpha = (uint8)( ((int16(other.alpha)-int16(target->alpha))*amount)/255 - + target->alpha ); -} - -static DB_INLINE void disable_color_func(rgb_color* target, const rgb_color background) -{ - blend_color_func(target, background, 255-70); -} - -// -------------------------------------------------------------------------- - -rgb_color mix_color(rgb_color color1, rgb_color color2, uint8 amount) -{ - mix_color_func(&color1, color2, amount); - return color1; -} - -rgb_color blend_color(rgb_color color1, rgb_color color2, uint8 amount) -{ - blend_color_func(&color1, color2, amount); - return color1; -} - -rgb_color disable_color(rgb_color color, rgb_color background) -{ - disable_color_func(&color, background); - return color; -} - -} - -#endif diff --git a/src/column/ColorTools.h b/src/column/ColorTools.h deleted file mode 100644 index 884d856..0000000 --- a/src/column/ColorTools.h +++ /dev/null @@ -1,107 +0,0 @@ -/* -Open Tracker License - -Terms and Conditions - -Copyright (c) 1991-2000, Be Incorporated. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice applies to all licensees -and shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF TITLE, MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -BE INCORPORATED BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of Be Incorporated shall not be -used in advertising or otherwise to promote the sale, use or other dealings in -this Software without prior written authorization from Be Incorporated. - -Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered trademarks -of Be Incorporated in the United States and other countries. Other brand product -names are registered trademarks or trademarks of their respective holders. -All rights reserved. -*/ - -/******************************************************************************* -/ -/ File: ColorTools.h -/ -/ Description: Additional experimental color manipulation functions. -/ -/ Copyright 2000, Be Incorporated, All Rights Reserved -/ -*******************************************************************************/ - - -#ifndef _COLOR_TOOLS_H -#define _COLOR_TOOLS_H - -#include - -#if B_BEOS_VERSION <= B_BEOS_VERSION_MAUI - -namespace BExperimental { - -// Comparison operators. - -inline bool operator==(const rgb_color c1, const rgb_color c2) -{ - return (*((uint32*)&c1)) == (*((uint32*)&c2)); -} - -inline bool operator!=(const rgb_color c1, const rgb_color c2) -{ - return (*((uint32*)&c1)) != (*((uint32*)&c2)); -} - -// Color creation. - -#ifndef HAIKU - -inline rgb_color make_color(uint8 red, uint8 green, uint8 blue, uint8 alpha=255) -{ - rgb_color c; - c.red = red; - c.green = green; - c.blue = blue; - c.alpha = alpha; - return c; -} - -#endif - -// Mix two colors together, ignoring their relative alpha channels. -// If amount is 0, the result is color1; if 255, the result is color2; -// if another value, it is somewhere in-between. The resulting alpha -// channel is mixed exactly like the other color channels. -//rgb_color mix_color(rgb_color color1, rgb_color color2, uint8 amount); - -// Blend two colors together, weighting by their relative alpha channels. -// The resulting color is the same as mix_color(), except that the amount -// used from color1 and color2's color channels is dependent on that color's -// alpha channel. For example, if color1.alpha is 0 and color2.alpha is -// 255, the resulting red, green, and blue values will be the same as those -// in color2, regardless of 'amount'. -rgb_color blend_color(rgb_color color1, rgb_color color2, uint8 amount); - -// Return a color that is the disabled representation of 'color' when drawn -// on a solid color 'background'. -rgb_color disable_color(rgb_color color, rgb_color background); - -} // namespace BExperimental - -using namespace BExperimental; - -#endif - -#endif diff --git a/src/column/ColumnListView.cpp b/src/column/ColumnListView.cpp deleted file mode 100644 index 2b997ce..0000000 --- a/src/column/ColumnListView.cpp +++ /dev/null @@ -1,4887 +0,0 @@ -/* -Open Tracker License - -Terms and Conditions - -Copyright (c) 1991-2000, Be Incorporated. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice applies to all licensees -and shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF TITLE, MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -BE INCORPORATED BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of Be Incorporated shall not be -used in advertising or otherwise to promote the sale, use or other dealings in -this Software without prior written authorization from Be Incorporated. - -Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered trademarks -of Be Incorporated in the United States and other countries. Other brand product -names are registered trademarks or trademarks of their respective holders. -All rights reserved. -*/ - -/******************************************************************************* -/ -/ File: ColumnListView.cpp -/ -/ Description: Experimental multi-column list view. -/ -/ Copyright 2000+, Be Incorporated, All Rights Reserved -/ By Jeff Bush -/ -*******************************************************************************/ - -#include "ColumnListView.h" - -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "ColorTools.h" -#include "ObjectList.h" - -#define DOUBLE_BUFFERED_COLUMN_RESIZE 1 -#define SMART_REDRAW 1 -#define DRAG_TITLE_OUTLINE 1 -#define CONSTRAIN_CLIPPING_REGION 1 -#define LOWER_SCROLLBAR 0 - -namespace BPrivate { - -static const unsigned char kResizeCursorData[] = { - 16, 1, 8, 8, - 0x03, 0xc0, 0x02, 0x40, 0x02, 0x40, 0x02, 0x40, - 0x1a, 0x58, 0x2a, 0x54, 0x4a, 0x52, 0x8a, 0x51, - 0x8a, 0x51, 0x4a, 0x52, 0x2a, 0x54, 0x1a, 0x58, - 0x02, 0x40, 0x02, 0x40, 0x02, 0x40, 0x03, 0xc0, - - 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xc0, - 0x1b, 0xd8, 0x3b, 0xdc, 0x7b, 0xde, 0xfb, 0xdf, - 0xfb, 0xdf, 0x7b, 0xde, 0x3b, 0xdc, 0x1b, 0xd8, - 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xc0 -}; - -static const unsigned char kMaxResizeCursorData[] = { - 16, 1, 8, 8, - 0x03, 0xc0, 0x02, 0x40, 0x02, 0x40, 0x02, 0x40, - 0x1a, 0x40, 0x2a, 0x40, 0x4a, 0x40, 0x8a, 0x40, - 0x8a, 0x40, 0x4a, 0x40, 0x2a, 0x40, 0x1a, 0x40, - 0x02, 0x40, 0x02, 0x40, 0x02, 0x40, 0x03, 0xc0, - - 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xc0, - 0x1b, 0xc0, 0x3b, 0xc0, 0x7b, 0xc0, 0xfb, 0xc0, - 0xfb, 0xc0, 0x7b, 0xc0, 0x3b, 0xc0, 0x1b, 0xc0, - 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xc0 -}; - -static const unsigned char kMinResizeCursorData[] = { - 16, 1, 8, 8, - 0x03, 0xc0, 0x02, 0x40, 0x02, 0x40, 0x02, 0x40, - 0x02, 0x58, 0x02, 0x54, 0x02, 0x52, 0x02, 0x51, - 0x02, 0x51, 0x02, 0x52, 0x02, 0x54, 0x02, 0x58, - 0x02, 0x40, 0x02, 0x40, 0x02, 0x40, 0x03, 0xc0, - - 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xc0, - 0x03, 0xd8, 0x03, 0xdc, 0x03, 0xde, 0x03, 0xdf, - 0x03, 0xdf, 0x03, 0xde, 0x03, 0xdc, 0x03, 0xd8, - 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xc0 -}; - -static const unsigned char kColumnMoveCursorData[] = { - 16, 1, 8, 8, - 0x01, 0x80, 0x02, 0x40, 0x04, 0x20, 0x08, 0x10, - 0x1e, 0x78, 0x2a, 0x54, 0x4e, 0x72, 0x80, 0x01, - 0x80, 0x01, 0x4e, 0x72, 0x2a, 0x54, 0x1e, 0x78, - 0x08, 0x10, 0x04, 0x20, 0x02, 0x40, 0x01, 0x80, - - 0x01, 0x80, 0x03, 0xc0, 0x07, 0xe0, 0x0f, 0xf0, - 0x1f, 0xf8, 0x3b, 0xdc, 0x7f, 0xfe, 0xff, 0xff, - 0xff, 0xff, 0x7f, 0xfe, 0x3b, 0xdc, 0x1f, 0xf8, - 0x0f, 0xf0, 0x07, 0xe0, 0x03, 0xc0, 0x01, 0x80 -}; - -static const unsigned char kDownSortArrow8x8[] = { - 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0xff -}; - -static const unsigned char kUpSortArrow8x8[] = { - 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, - 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff -}; - -static const unsigned char kDownSortArrow8x8Invert[] = { - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x1f, 0x1f, 0x1f, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0x1f, 0xff, 0xff, 0xff, 0xff -}; - -static const unsigned char kUpSortArrow8x8Invert[] = { - 0xff, 0xff, 0xff, 0x1f, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x1f, 0x1f, 0x1f, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff -}; - -static const float kTintedLineTint = 0.7 * B_NO_TINT + 0.3 * B_DARKEN_1_TINT; - -static const float kTitleHeight = 16.0; -static const float kLatchWidth = 0.0; //5.0; - - -static const rgb_color kColor[B_COLOR_TOTAL] = -{ - {236, 236, 236, 255}, // B_COLOR_BACKGROUND - { 0, 0, 0, 255}, // B_COLOR_TEXT - {148, 148, 148, 255}, // B_COLOR_ROW_DIVIDER - {190, 190, 190, 255}, // B_COLOR_SELECTION - { 0, 0, 0, 255}, // B_COLOR_SELECTION_TEXT - {200, 200, 200, 255}, // B_COLOR_NON_FOCUS_SELECTION - {180, 180, 180, 180}, // B_COLOR_EDIT_BACKGROUND - { 0, 0, 0, 255}, // B_COLOR_EDIT_TEXT - {215, 215, 215, 255}, // B_COLOR_HEADER_BACKGROUND - { 0, 0, 0, 255}, // B_COLOR_HEADER_TEXT - { 0, 0, 0, 255}, // B_COLOR_SEPARATOR_LINE - { 0, 0, 0, 255}, // B_COLOR_SEPARATOR_BORDER -}; - -static const int32 kMaxDepth = 1024; -static const float kLeftMargin = kLatchWidth; -static const float kRightMargin = kLatchWidth; -static const float kOutlineLevelIndent = kLatchWidth; -static const float kColumnResizeAreaWidth = 10.0; -static const float kRowDragSensitivity = 5.0; -static const float kDoubleClickMoveSensitivity = 4.0; -static const float kSortIndicatorWidth = 9.0; -static const float kDropHighlightLineHeight = 2.0; - -static const uint32 kToggleColumn = 'BTCL'; - -class BRowContainer : public BObjectList -{ -}; - -class TitleView : public BView { - typedef BView _inherited; -public: - TitleView(BRect frame, OutlineView* outlineView, - BList* visibleColumns, BList* sortColumns, - BColumnListView* masterView, - uint32 resizingMode); - virtual ~TitleView(); - - void ColumnAdded(BColumn* column); - void ColumnResized(BColumn* column, float oldWidth); - void SetColumnVisible(BColumn* column, bool visible); - - virtual void Draw(BRect updateRect); - virtual void ScrollTo(BPoint where); - virtual void MessageReceived(BMessage* message); - virtual void MouseDown(BPoint where); - virtual void MouseMoved(BPoint where, uint32 transit, - const BMessage* dragMessage); - virtual void MouseUp(BPoint where); - virtual void FrameResized(float width, float height); - - void MoveColumn(BColumn* column, int32 index); - void SetColumnFlags(column_flags flags); - - void SetEditMode(bool state) - { fEditMode = state; } - -private: - void GetTitleRect(BColumn* column, BRect* _rect); - int32 FindColumn(BPoint where, float* _leftEdge); - void FixScrollBar(bool scrollToFit); - void DragSelectedColumn(BPoint where); - void ResizeSelectedColumn(BPoint where, - bool preferred = false); - void ComputeDragBoundries(BColumn* column, - BPoint where); - void DrawTitle(BView* view, BRect frame, - BColumn* column, bool depressed); - - float _VirtualWidth() const; - - OutlineView* fOutlineView; - BList* fColumns; - BList* fSortColumns; -// float fColumnsWidth; - BRect fVisibleRect; - -#if DOUBLE_BUFFERED_COLUMN_RESIZE - BBitmap* fDrawBuffer; - BView* fDrawBufferView; -#endif - - enum { - INACTIVE, - RESIZING_COLUMN, - PRESSING_COLUMN, - DRAG_COLUMN_INSIDE_TITLE, - DRAG_COLUMN_OUTSIDE_TITLE - } fCurrentState; - - BPopUpMenu* fColumnPop; - BColumnListView* fMasterView; - bool fEditMode; - int32 fColumnFlags; - - // State information for resizing/dragging - BColumn* fSelectedColumn; - BRect fSelectedColumnRect; - bool fResizingFirstColumn; - BPoint fClickPoint; // offset within cell - float fLeftDragBoundry; - float fRightDragBoundry; - BPoint fCurrentDragPosition; - - - BBitmap* fUpSortArrow; - BBitmap* fDownSortArrow; - - BCursor* fResizeCursor; - BCursor* fMinResizeCursor; - BCursor* fMaxResizeCursor; - BCursor* fColumnMoveCursor; -}; - -class OutlineView : public BView { - typedef BView _inherited; -public: - OutlineView(BRect, BList* visibleColumns, - BList* sortColumns, - BColumnListView* listView); - virtual ~OutlineView(); - - virtual void Draw(BRect); - const BRect& VisibleRect() const; - - void RedrawColumn(BColumn* column, float leftEdge, - bool isFirstColumn); - void StartSorting(); - float GetColumnPreferredWidth(BColumn* column); - - void AddRow(BRow*, int32 index, BRow* TheRow); - BRow* CurrentSelection(BRow* lastSelected) const; - void ToggleFocusRowSelection(bool selectRange); - void ToggleFocusRowOpen(); - void ChangeFocusRow(bool up, bool updateSelection, - bool addToCurrentSelection); - void MoveFocusToVisibleRect(); - void ExpandOrCollapse(BRow* parent, bool expand); - void RemoveRow(BRow*); - BRowContainer* RowList(); - void UpdateRow(BRow*); - bool FindParent(BRow* row, BRow** _parent, - bool* _isVisible); - int32 IndexOf(BRow* row); - void Deselect(BRow*); - void AddToSelection(BRow*); - void DeselectAll(); - BRow* FocusRow() const; - void SetFocusRow(BRow* row, bool select); - BRow* FindRow(float ypos, int32* _indent, - float* _top); - bool FindRect(const BRow* row, BRect* _rect); - void ScrollTo(const BRow* row); - - void Clear(); - void SetSelectionMode(list_view_type type); - list_view_type SelectionMode() const; - void SetMouseTrackingEnabled(bool); - void FixScrollBar(bool scrollToFit); - void SetEditMode(bool state) - { fEditMode = state; } - - virtual void FrameResized(float width, float height); - virtual void ScrollTo(BPoint where); - virtual void MouseDown(BPoint where); - virtual void MouseMoved(BPoint where, uint32 transit, - const BMessage* dragMessage); - virtual void MouseUp(BPoint where); - virtual void MessageReceived(BMessage* message); - -private: - bool SortList(BRowContainer* list, bool isVisible); - static int32 DeepSortThreadEntry(void* outlineView); - void DeepSort(); - void SelectRange(BRow* start, BRow* end); - int32 CompareRows(BRow* row1, BRow* row2); - void AddSorted(BRowContainer* list, BRow* row); - void RecursiveDeleteRows(BRowContainer* list, - bool owner); - void InvalidateCachedPositions(); - bool FindVisibleRect(BRow* row, BRect* _rect); - - BList* fColumns; - BList* fSortColumns; - float fItemsHeight; - BRowContainer fRows; - BRect fVisibleRect; - -#if DOUBLE_BUFFERED_COLUMN_RESIZE - BBitmap* fDrawBuffer; - BView* fDrawBufferView; -#endif - - BRow* fFocusRow; - BRect fFocusRowRect; - BRow* fRollOverRow; - - BRow fSelectionListDummyHead; - BRow* fLastSelectedItem; - BRow* fFirstSelectedItem; - - thread_id fSortThread; - int32 fNumSorted; - bool fSortCancelled; - - enum CurrentState { - INACTIVE, - LATCH_CLICKED, - ROW_CLICKED, - DRAGGING_ROWS - }; - - CurrentState fCurrentState; - - - BColumnListView* fMasterView; - list_view_type fSelectionMode; - bool fTrackMouse; - BField* fCurrentField; - BRow* fCurrentRow; - BColumn* fCurrentColumn; - bool fMouseDown; - BRect fFieldRect; - int32 fCurrentCode; - bool fEditMode; - - // State information for mouse/keyboard interaction - BPoint fClickPoint; - bool fDragging; - int32 fClickCount; - BRow* fTargetRow; - float fTargetRowTop; - BRect fLatchRect; - float fDropHighlightY; - - friend class RecursiveOutlineIterator; -}; - -class RecursiveOutlineIterator { -public: - RecursiveOutlineIterator( - BRowContainer* container, - bool openBranchesOnly = true); - - BRow* CurrentRow() const; - int32 CurrentLevel() const; - void GoToNext(); - -private: - struct { - BRowContainer* fRowSet; - int32 fIndex; - int32 fDepth; - } fStack[kMaxDepth]; - - int32 fStackIndex; - BRowContainer* fCurrentList; - int32 fCurrentListIndex; - int32 fCurrentListDepth; - bool fOpenBranchesOnly; -}; - -} // namespace BPrivate - - -using namespace BPrivate; - - -BField::BField() -{ -} - - -BField::~BField() -{ -} - - -// #pragma mark - - - -void -BColumn::MouseMoved(BColumnListView* /*parent*/, BRow* /*row*/, - BField* /*field*/, BRect /*field_rect*/, BPoint/*point*/, - uint32 /*buttons*/, int32 /*code*/) -{ -} - - -void -BColumn::MouseDown(BColumnListView* /*parent*/, BRow* /*row*/, - BField* /*field*/, BRect /*field_rect*/, BPoint /*point*/, - uint32 /*buttons*/) -{ -} - - -void -BColumn::MouseUp(BColumnListView* /*parent*/, BRow* /*row*/, BField* /*field*/) -{ -} - - -// #pragma mark - - - -BRow::BRow(float height) - : - fChildList(NULL), - fIsExpanded(false), - fHeight(height), - fNextSelected(NULL), - fPrevSelected(NULL), - fParent(NULL), - fList(NULL) -{ -} - - -BRow::~BRow() -{ - while (true) { - BField* field = (BField*) fFields.RemoveItem((int32)0); - if (field == 0) - break; - - delete field; - } -} - - -bool -BRow::HasLatch() const -{ - return fChildList != 0; -} - - -int32 -BRow::CountFields() const -{ - return fFields.CountItems(); -} - - -BField* -BRow::GetField(int32 index) -{ - return (BField*)fFields.ItemAt(index); -} - - -const BField* -BRow::GetField(int32 index) const -{ - return (const BField*)fFields.ItemAt(index); -} - - -void -BRow::SetField(BField* field, int32 logicalFieldIndex) -{ - if (fFields.ItemAt(logicalFieldIndex) != 0) - delete (BField*)fFields.RemoveItem(logicalFieldIndex); - - if (NULL != fList) { - ValidateField(field, logicalFieldIndex); - BRect inv; - fList->GetRowRect(this, &inv); - fList->Invalidate(inv); - } - - fFields.AddItem(field, logicalFieldIndex); -} - - -float -BRow::Height() const -{ - return fHeight; -} - - -bool -BRow::IsExpanded() const -{ - return fIsExpanded; -} - - -void -BRow::ValidateFields() const -{ - for (int32 i = 0; i < CountFields(); i++) - ValidateField(GetField(i), i); -} - - -void -BRow::ValidateField(const BField* field, int32 logicalFieldIndex) const -{ - // The Fields may be moved by the user, but the logicalFieldIndexes - // do not change, so we need to map them over when checking the - // Field types. - BColumn* col = NULL; - int32 items = fList->CountColumns(); - for (int32 i = 0 ; i < items; ++i) { - col = fList->ColumnAt(i); - if( col->LogicalFieldNum() == logicalFieldIndex ) - break; - } - - if (NULL == col) { - BString dbmessage("\n\n\tThe parent BColumnListView does not have " - "\n\ta BColumn at the logical field index "); - dbmessage << logicalFieldIndex << ".\n\n"; - printf(dbmessage.String()); - } else { - if (!col->AcceptsField(field)) { - BString dbmessage("\n\n\tThe BColumn of type "); - dbmessage << typeid(*col).name() << "\n\tat logical field index " - << logicalFieldIndex << "\n\tdoes not support the " - "field type " - << typeid(*field).name() << ".\n\n"; - debugger(dbmessage.String()); - } - } -} - - -// #pragma mark - - - -BColumn::BColumn(float width, float minWidth, float maxWidth, alignment align) - : - fWidth(width), - fMinWidth(minWidth), - fMaxWidth(maxWidth), - fVisible(true), - fList(0), - fShowHeading(true), - fAlignment(align) -{ -} - - -BColumn::~BColumn() -{ -} - - -float -BColumn::Width() const -{ - return fWidth; -} - - -void -BColumn::SetWidth(float width) -{ - fWidth = width; -} - - -float -BColumn::MinWidth() const -{ - return fMinWidth; -} - - -float -BColumn::MaxWidth() const -{ - return fMaxWidth; -} - - -void -BColumn::DrawTitle(BRect, BView*) -{ -} - - -void -BColumn::DrawField(BField*, BRect, BView*) -{ -} - - -int -BColumn::CompareFields(BField*, BField*) -{ - return 0; -} - - -void -BColumn::GetColumnName(BString* into) const -{ - *into = "(Unnamed)"; -} - - -float -BColumn::GetPreferredWidth(BField* field, BView* parent) const -{ - return fWidth; -} - - -bool -BColumn::IsVisible() const -{ - return fVisible; -} - - -void -BColumn::SetVisible(bool visible) -{ - if (fList && (fVisible != visible)) - fList->SetColumnVisible(this, visible); -} - - -bool -BColumn::ShowHeading() const -{ - return fShowHeading; -} - - -void -BColumn::SetShowHeading(bool state) -{ - fShowHeading = state; -} - - -alignment -BColumn::Alignment() const -{ - return fAlignment; -} - - -void -BColumn::SetAlignment(alignment align) -{ - fAlignment = align; -} - - -bool -BColumn::WantsEvents() const -{ - return fWantsEvents; -} - - -void -BColumn::SetWantsEvents(bool state) -{ - fWantsEvents = state; -} - - -int32 -BColumn::LogicalFieldNum() const -{ - return fFieldID; -} - - -bool -BColumn::AcceptsField(const BField*) const -{ - return true; -} - - -// #pragma mark - - - -BColumnListView::BColumnListView(BRect rect, const char* name, - uint32 resizingMode, uint32 flags, border_style border, - bool showHorizontalScrollbar) - : - BView(rect, name, resizingMode, - flags | B_WILL_DRAW | B_FRAME_EVENTS | B_FULL_UPDATE_ON_RESIZE), - fStatusView(NULL), - fSelectionMessage(NULL), - fSortingEnabled(true), - fLatchWidth(kLatchWidth), - fBorderStyle(border) -{ - _Init(showHorizontalScrollbar); -} - - -BColumnListView::BColumnListView(const char* name, uint32 flags, - border_style border, bool showHorizontalScrollbar) - : - BView(name, flags | B_WILL_DRAW | B_FRAME_EVENTS | B_FULL_UPDATE_ON_RESIZE), - fStatusView(NULL), - fSelectionMessage(NULL), - fSortingEnabled(true), - fLatchWidth(kLatchWidth), - fBorderStyle(border) -{ - _Init(showHorizontalScrollbar); -} - - -BColumnListView::~BColumnListView() -{ - while (BColumn* column = (BColumn*)fColumns.RemoveItem((int32)0)) - delete column; -} - - -bool -BColumnListView::InitiateDrag(BPoint, bool) -{ - return false; -} - - -void -BColumnListView::MessageDropped(BMessage*, BPoint) -{ -} - - -void -BColumnListView::ExpandOrCollapse(BRow* row, bool Open) -{ - fOutlineView->ExpandOrCollapse(row, Open); -} - - -status_t -BColumnListView::Invoke(BMessage* message) -{ - if (message == 0) - message = Message(); - - return BInvoker::Invoke(message); -} - - -void -BColumnListView::ItemInvoked() -{ - Invoke(); -} - - -void -BColumnListView::SetInvocationMessage(BMessage* message) -{ - SetMessage(message); -} - - -BMessage* -BColumnListView::InvocationMessage() const -{ - return Message(); -} - - -uint32 -BColumnListView::InvocationCommand() const -{ - return Command(); -} - - -BRow* -BColumnListView::FocusRow() const -{ - return fOutlineView->FocusRow(); -} - - -void -BColumnListView::SetFocusRow(int32 Index, bool Select) -{ - SetFocusRow(RowAt(Index), Select); -} - - -void -BColumnListView::SetFocusRow(BRow* row, bool Select) -{ - fOutlineView->SetFocusRow(row, Select); -} - - -void -BColumnListView::SetMouseTrackingEnabled(bool Enabled) -{ - fOutlineView->SetMouseTrackingEnabled(Enabled); -} - - -list_view_type -BColumnListView::SelectionMode() const -{ - return fOutlineView->SelectionMode(); -} - - -void -BColumnListView::Deselect(BRow* row) -{ - fOutlineView->Deselect(row); -} - - -void -BColumnListView::AddToSelection(BRow* row) -{ - fOutlineView->AddToSelection(row); -} - - -void -BColumnListView::DeselectAll() -{ - fOutlineView->DeselectAll(); -} - - -BRow* -BColumnListView::CurrentSelection(BRow* lastSelected) const -{ - return fOutlineView->CurrentSelection(lastSelected); -} - - -void -BColumnListView::SelectionChanged() -{ - if (fSelectionMessage) - Invoke(fSelectionMessage); -} - - -void -BColumnListView::SetSelectionMessage(BMessage* message) -{ - if (fSelectionMessage == message) - return; - - delete fSelectionMessage; - fSelectionMessage = message; -} - - -BMessage* -BColumnListView::SelectionMessage() -{ - return fSelectionMessage; -} - - -uint32 -BColumnListView::SelectionCommand() const -{ - if (fSelectionMessage) - return fSelectionMessage->what; - - return 0; -} - - -void -BColumnListView::SetSelectionMode(list_view_type mode) -{ - fOutlineView->SetSelectionMode(mode); -} - - -void -BColumnListView::SetSortingEnabled(bool enabled) -{ - fSortingEnabled = enabled; - fSortColumns.MakeEmpty(); - fTitleView->Invalidate(); // Erase sort indicators -} - - -bool -BColumnListView::SortingEnabled() const -{ - return fSortingEnabled; -} - - -void -BColumnListView::SetSortColumn(BColumn* column, bool add, bool ascending) -{ - if (!SortingEnabled()) - return; - - if (!add) - fSortColumns.MakeEmpty(); - - if (!fSortColumns.HasItem(column)) - fSortColumns.AddItem(column); - - column->fSortAscending = ascending; - fTitleView->Invalidate(); - fOutlineView->StartSorting(); -} - - -void -BColumnListView::ClearSortColumns() -{ - fSortColumns.MakeEmpty(); - fTitleView->Invalidate(); // Erase sort indicators -} - - -void -BColumnListView::AddStatusView(BView* view) -{ - BRect bounds = Bounds(); - float width = view->Bounds().Width(); - if (width > bounds.Width() / 2) - width = bounds.Width() / 2; - - fStatusView = view; - - Window()->BeginViewTransaction(); - fHorizontalScrollBar->ResizeBy(-(width + 1), 0); - fHorizontalScrollBar->MoveBy((width + 1), 0); - AddChild(view); - - BRect viewRect(bounds); - viewRect.right = width; - viewRect.top = viewRect.bottom - B_H_SCROLL_BAR_HEIGHT; - if (fBorderStyle == B_PLAIN_BORDER) - viewRect.OffsetBy(1, -1); - else if (fBorderStyle == B_FANCY_BORDER) - viewRect.OffsetBy(2, -2); - - view->SetResizingMode(B_FOLLOW_LEFT | B_FOLLOW_BOTTOM); - view->ResizeTo(viewRect.Width(), viewRect.Height()); - view->MoveTo(viewRect.left, viewRect.top); - Window()->EndViewTransaction(); -} - - -BView* -BColumnListView::RemoveStatusView() -{ - if (fStatusView) { - float width = fStatusView->Bounds().Width(); - Window()->BeginViewTransaction(); - fStatusView->RemoveSelf(); - fHorizontalScrollBar->MoveBy(-width, 0); - fHorizontalScrollBar->ResizeBy(width, 0); - Window()->EndViewTransaction(); - } - - BView* view = fStatusView; - fStatusView = 0; - return view; -} - - -void -BColumnListView::AddColumn(BColumn* column, int32 logicalFieldIndex) -{ - ASSERT(column != NULL); - - column->fList = this; - column->fFieldID = logicalFieldIndex; - - // sanity check. If there is already a field with this ID, remove it. - for (int32 index = 0; index < fColumns.CountItems(); index++) { - BColumn* existingColumn = (BColumn*) fColumns.ItemAt(index); - if (existingColumn && existingColumn->fFieldID == logicalFieldIndex) { - RemoveColumn(existingColumn); - break; - } - } - - if (column->Width() < column->MinWidth()) - column->SetWidth(column->MinWidth()); - else if (column->Width() > column->MaxWidth()) - column->SetWidth(column->MaxWidth()); - - fColumns.AddItem((void*) column); - fTitleView->ColumnAdded(column); -} - - -void -BColumnListView::MoveColumn(BColumn* column, int32 index) -{ - ASSERT(column != NULL); - fTitleView->MoveColumn(column, index); -} - - -void -BColumnListView::RemoveColumn(BColumn* column) -{ - if (fColumns.HasItem(column)) { - SetColumnVisible(column, false); - if (Window() != NULL) - Window()->UpdateIfNeeded(); - fColumns.RemoveItem(column); - } -} - - -int32 -BColumnListView::CountColumns() const -{ - return fColumns.CountItems(); -} - - -BColumn* -BColumnListView::ColumnAt(int32 field) const -{ - return (BColumn*) fColumns.ItemAt(field); -} - - -BColumn* -BColumnListView::ColumnAt(BPoint point) const -{ - float left = MAX(kLeftMargin, LatchWidth()); - - for (int i = 0; BColumn* column = (BColumn*)fColumns.ItemAt(i); i++) { - if (!column->IsVisible()) - continue; - - float right = left + column->Width(); - if (point.x >= left && point.x <= right) - return column; - - left = right + 1; - } - - return NULL; -} - - -void -BColumnListView::SetColumnVisible(BColumn* column, bool visible) -{ - fTitleView->SetColumnVisible(column, visible); -} - - -void -BColumnListView::SetColumnVisible(int32 index, bool isVisible) -{ - BColumn* column = ColumnAt(index); - if (column) - column->SetVisible(isVisible); -} - - -bool -BColumnListView::IsColumnVisible(int32 index) const -{ - BColumn* column = ColumnAt(index); - if (column) - return column->IsVisible(); - - return false; -} - - -void -BColumnListView::SetColumnFlags(column_flags flags) -{ - fTitleView->SetColumnFlags(flags); -} - - -void -BColumnListView::ResizeColumnToPreferred(int32 index) -{ - BColumn* column = ColumnAt(index); - if (column == NULL) - return; - - // get the preferred column width - float width = fOutlineView->GetColumnPreferredWidth(column); - - // set it - float oldWidth = column->Width(); - column->SetWidth(width); - - fTitleView->ColumnResized(column, oldWidth); - fOutlineView->Invalidate(); -} - - -void -BColumnListView::ResizeAllColumnsToPreferred() -{ - int32 count = CountColumns(); - for (int32 i = 0; i < count; i++) - ResizeColumnToPreferred(i); -} - - -const BRow* -BColumnListView::RowAt(int32 Index, BRow* parentRow) const -{ - if (parentRow == 0) - return fOutlineView->RowList()->ItemAt(Index); - - return parentRow->fChildList ? parentRow->fChildList->ItemAt(Index) : NULL; -} - - -BRow* -BColumnListView::RowAt(int32 Index, BRow* parentRow) -{ - if (parentRow == 0) - return fOutlineView->RowList()->ItemAt(Index); - - return parentRow->fChildList ? parentRow->fChildList->ItemAt(Index) : 0; -} - - -const BRow* -BColumnListView::RowAt(BPoint point) const -{ - float top; - int32 indent; - return fOutlineView->FindRow(point.y, &indent, &top); -} - - -BRow* -BColumnListView::RowAt(BPoint point) -{ - float top; - int32 indent; - return fOutlineView->FindRow(point.y, &indent, &top); -} - - -bool -BColumnListView::GetRowRect(const BRow* row, BRect* outRect) const -{ - return fOutlineView->FindRect(row, outRect); -} - - -bool -BColumnListView::FindParent(BRow* row, BRow** _parent, bool* _isVisible) const -{ - return fOutlineView->FindParent(row, _parent, _isVisible); -} - - -int32 -BColumnListView::IndexOf(BRow* row) -{ - return fOutlineView->IndexOf(row); -} - - -int32 -BColumnListView::CountRows(BRow* parentRow) const -{ - if (parentRow == 0) - return fOutlineView->RowList()->CountItems(); - if (parentRow->fChildList) - return parentRow->fChildList->CountItems(); - else - return 0; -} - - -void -BColumnListView::AddRow(BRow* row, BRow* parentRow) -{ - AddRow(row, -1, parentRow); -} - - -void -BColumnListView::AddRow(BRow* row, int32 index, BRow* parentRow) -{ - row->fChildList = 0; - row->fList = this; - row->ValidateFields(); - fOutlineView->AddRow(row, index, parentRow); -} - - -void -BColumnListView::RemoveRow(BRow* row) -{ - fOutlineView->RemoveRow(row); - row->fList = NULL; -} - - -void -BColumnListView::UpdateRow(BRow* row) -{ - fOutlineView->UpdateRow(row); -} - - -void -BColumnListView::ScrollTo(const BRow* row) -{ - fOutlineView->ScrollTo(row); -} - - -void -BColumnListView::ScrollTo(BPoint point) -{ - fOutlineView->ScrollTo(point); -} - - -void -BColumnListView::Clear() -{ - fOutlineView->Clear(); -} - - -void -BColumnListView::SetFont(const BFont* font, uint32 mask) -{ - // This method is deprecated. - fOutlineView->SetFont(font, mask); - fTitleView->SetFont(font, mask); -} - - -void -BColumnListView::SetFont(ColumnListViewFont font_num, const BFont* font, - uint32 mask) -{ - switch (font_num) { - case B_FONT_ROW: - fOutlineView->SetFont(font, mask); - break; - - case B_FONT_HEADER: - fTitleView->SetFont(font, mask); - break; - - default: - ASSERT(false); - break; - } -} - - -void -BColumnListView::GetFont(ColumnListViewFont font_num, BFont* font) const -{ - switch (font_num) { - case B_FONT_ROW: - fOutlineView->GetFont(font); - break; - - case B_FONT_HEADER: - fTitleView->GetFont(font); - break; - - default: - ASSERT(false); - break; - } -} - - -void -BColumnListView::SetColor(ColumnListViewColor color_num, const rgb_color color) -{ - if ((int)color_num < 0) { - ASSERT(false); - color_num = (ColumnListViewColor) 0; - } - - if ((int)color_num >= (int)B_COLOR_TOTAL) { - ASSERT(false); - color_num = (ColumnListViewColor) (B_COLOR_TOTAL - 1); - } - - fColorList[color_num] = color; -} - - -rgb_color -BColumnListView::Color(ColumnListViewColor color_num) const -{ - if ((int)color_num < 0) { - ASSERT(false); - color_num = (ColumnListViewColor) 0; - } - - if ((int)color_num >= (int)B_COLOR_TOTAL) { - ASSERT(false); - color_num = (ColumnListViewColor) (B_COLOR_TOTAL - 1); - } - - return fColorList[color_num]; -} - - -void -BColumnListView::SetHighColor(rgb_color color) -{ - BView::SetHighColor(color); -// fOutlineView->Invalidate(); // Redraw things with the new color - // Note that this will currently cause - // an infinite loop, refreshing over and over. - // A better solution is needed. -} - - -void -BColumnListView::SetSelectionColor(rgb_color color) -{ - fColorList[B_COLOR_SELECTION] = color; -} - - -void -BColumnListView::SetBackgroundColor(rgb_color color) -{ - fColorList[B_COLOR_BACKGROUND] = color; - fOutlineView->Invalidate(); // Repaint with new color -} - - -void -BColumnListView::SetEditColor(rgb_color color) -{ - fColorList[B_COLOR_EDIT_BACKGROUND] = color; -} - - -const rgb_color -BColumnListView::SelectionColor() const -{ - return fColorList[B_COLOR_SELECTION]; -} - - -const rgb_color -BColumnListView::BackgroundColor() const -{ - return fColorList[B_COLOR_BACKGROUND]; -} - - -const rgb_color -BColumnListView::EditColor() const -{ - return fColorList[B_COLOR_EDIT_BACKGROUND]; -} - - -BPoint -BColumnListView::SuggestTextPosition(const BRow* row, - const BColumn* inColumn) const -{ - BRect rect; - GetRowRect(row, &rect); - if (inColumn) { - float leftEdge = MAX(kLeftMargin, LatchWidth()); - for (int index = 0; index < fColumns.CountItems(); index++) { - BColumn* column = (BColumn*) fColumns.ItemAt(index); - if (!column->IsVisible()) - continue; - - if (column == inColumn) { - rect.left = leftEdge; - rect.right = rect.left + column->Width(); - break; - } - - leftEdge += column->Width() + 1; - } - } - - font_height fh; - fOutlineView->GetFontHeight(&fh); - float baseline = floor(rect.top + fh.ascent - + (rect.Height()+1-(fh.ascent+fh.descent))/2); - return BPoint(rect.left + 8, baseline); -} - - -void -BColumnListView::SetLatchWidth(float width) -{ - fLatchWidth = width; - Invalidate(); -} - - -float -BColumnListView::LatchWidth() const -{ - return fLatchWidth; -} - -void -BColumnListView::DrawLatch(BView* view, BRect rect, LatchType position, BRow*) -{ - const int32 rectInset = 4; - - view->SetHighColor(0, 0, 0); - - // Make Square - int32 sideLen = rect.IntegerWidth(); - if (sideLen > rect.IntegerHeight()) - sideLen = rect.IntegerHeight(); - - // Make Center - int32 halfWidth = rect.IntegerWidth() / 2; - int32 halfHeight = rect.IntegerHeight() / 2; - int32 halfSide = sideLen / 2; - - float left = rect.left + halfWidth - halfSide; - float top = rect.top + halfHeight - halfSide; - - BRect itemRect(left, top, left + sideLen, top + sideLen); - - // Why it is a pixel high? I don't know. - itemRect.OffsetBy(0, -1); - - itemRect.InsetBy(rectInset, rectInset); - - // Make it an odd number of pixels wide, the latch looks better this way - if ((itemRect.IntegerWidth() % 2) == 1) { - itemRect.right += 1; - itemRect.bottom += 1; - } - - switch (position) { - case B_OPEN_LATCH: - view->StrokeRect(itemRect); - view->StrokeLine( - BPoint(itemRect.left + 2, - (itemRect.top + itemRect.bottom) / 2), - BPoint(itemRect.right - 2, - (itemRect.top + itemRect.bottom) / 2)); - break; - - case B_PRESSED_LATCH: - view->StrokeRect(itemRect); - view->StrokeLine( - BPoint(itemRect.left + 2, - (itemRect.top + itemRect.bottom) / 2), - BPoint(itemRect.right - 2, - (itemRect.top + itemRect.bottom) / 2)); - view->StrokeLine( - BPoint((itemRect.left + itemRect.right) / 2, - itemRect.top + 2), - BPoint((itemRect.left + itemRect.right) / 2, - itemRect.bottom - 2)); - view->InvertRect(itemRect); - break; - - case B_CLOSED_LATCH: - view->StrokeRect(itemRect); - view->StrokeLine( - BPoint(itemRect.left + 2, - (itemRect.top + itemRect.bottom) / 2), - BPoint(itemRect.right - 2, - (itemRect.top + itemRect.bottom) / 2)); - view->StrokeLine( - BPoint((itemRect.left + itemRect.right) / 2, - itemRect.top + 2), - BPoint((itemRect.left + itemRect.right) / 2, - itemRect.bottom - 2)); - break; - - case B_NO_LATCH: - // No drawing - break; - } -} - - -void -BColumnListView::MakeFocus(bool isFocus) -{ - if (fBorderStyle != B_NO_BORDER) { - // Redraw focus marks around view - Invalidate(); - fHorizontalScrollBar->SetBorderHighlighted(isFocus); - fVerticalScrollBar->SetBorderHighlighted(isFocus); - } - - BView::MakeFocus(isFocus); -} - - -void -BColumnListView::MessageReceived(BMessage* message) -{ - // Propagate mouse wheel messages down to child, so that it can - // scroll. Note we have done so, so we don't go into infinite - // recursion if this comes back up here. - if (message->what == B_MOUSE_WHEEL_CHANGED) { - bool handled; - if (message->FindBool("be:clvhandled", &handled) != B_OK) { - message->AddBool("be:clvhandled", true); - fOutlineView->MessageReceived(message); - return; - } - } - - BView::MessageReceived(message); -} - - -void -BColumnListView::KeyDown(const char* bytes, int32 numBytes) -{ - char c = bytes[0]; - switch (c) { - case B_RIGHT_ARROW: - case B_LEFT_ARROW: - { - float minVal, maxVal; - fHorizontalScrollBar->GetRange(&minVal, &maxVal); - float smallStep, largeStep; - fHorizontalScrollBar->GetSteps(&smallStep, &largeStep); - float oldVal = fHorizontalScrollBar->Value(); - float newVal = oldVal; - - if (c == B_LEFT_ARROW) - newVal -= smallStep; - else if (c == B_RIGHT_ARROW) - newVal += smallStep; - - if (newVal < minVal) - newVal = minVal; - else if (newVal > maxVal) - newVal = maxVal; - - fHorizontalScrollBar->SetValue(newVal); - break; - } - - case B_DOWN_ARROW: - fOutlineView->ChangeFocusRow(false, - (modifiers() & B_CONTROL_KEY) == 0, - (modifiers() & B_SHIFT_KEY) != 0); - break; - - case B_UP_ARROW: - fOutlineView->ChangeFocusRow(true, - (modifiers() & B_CONTROL_KEY) == 0, - (modifiers() & B_SHIFT_KEY) != 0); - break; - - case B_PAGE_UP: - case B_PAGE_DOWN: - { - float minValue, maxValue; - fVerticalScrollBar->GetRange(&minValue, &maxValue); - float smallStep, largeStep; - fVerticalScrollBar->GetSteps(&smallStep, &largeStep); - float currentValue = fVerticalScrollBar->Value(); - float newValue = currentValue; - - if (c == B_PAGE_UP) - newValue -= largeStep; - else - newValue += largeStep; - - if (newValue > maxValue) - newValue = maxValue; - else if (newValue < minValue) - newValue = minValue; - - fVerticalScrollBar->SetValue(newValue); - - // Option + pgup or pgdn scrolls and changes the selection. - if (modifiers() & B_OPTION_KEY) - fOutlineView->MoveFocusToVisibleRect(); - - break; - } - - case B_ENTER: - Invoke(); - break; - - case B_SPACE: - fOutlineView->ToggleFocusRowSelection( - (modifiers() & B_SHIFT_KEY) != 0); - break; - - case '+': - fOutlineView->ToggleFocusRowOpen(); - break; - - default: - BView::KeyDown(bytes, numBytes); - } -} - - -void -BColumnListView::AttachedToWindow() -{ - if (!Messenger().IsValid()) - SetTarget(Window()); - - if (SortingEnabled()) fOutlineView->StartSorting(); -} - - -void -BColumnListView::WindowActivated(bool active) -{ - fOutlineView->Invalidate(); - // Focus and selection appearance changes with focus - - Invalidate(); // Redraw focus marks around view - BView::WindowActivated(active); -} - - -void -BColumnListView::Draw(BRect updateRect) -{ - BRect rect = Bounds(); - - if (be_control_look != NULL) { - uint32 flags = 0; - if (IsFocus() && Window()->IsActive()) - flags |= BControlLook::B_FOCUSED; - - rgb_color base = ui_color(B_PANEL_BACKGROUND_COLOR); - - BRect verticalScrollBarFrame; - if (!fVerticalScrollBar->IsHidden()) - verticalScrollBarFrame = fVerticalScrollBar->Frame(); - BRect horizontalScrollBarFrame; - if (!fHorizontalScrollBar->IsHidden()) - horizontalScrollBarFrame = fHorizontalScrollBar->Frame(); - - if (fBorderStyle == B_NO_BORDER) { - // We still draw the left/top border, but not focused. - // The scrollbars cannot be displayed without frame and - // it looks bad to have no frame only along the left/top - // side. - rgb_color borderColor = tint_color(base, B_DARKEN_2_TINT); - SetHighColor(borderColor); - StrokeLine(BPoint(rect.left, rect.bottom), - BPoint(rect.left, rect.top)); - StrokeLine(BPoint(rect.left + 1, rect.top), - BPoint(rect.right, rect.top)); - } - - be_control_look->DrawScrollViewFrame(this, rect, updateRect, - verticalScrollBarFrame, horizontalScrollBarFrame, - base, fBorderStyle, flags); - - return; - } - - BRect cornerRect(rect.right - B_V_SCROLL_BAR_WIDTH, - rect.bottom - B_H_SCROLL_BAR_HEIGHT, rect.right, rect.bottom); - if (fBorderStyle == B_PLAIN_BORDER) { - BView::SetHighColor(0, 0, 0); - StrokeRect(rect); - cornerRect.OffsetBy(-1, -1); - } else if (fBorderStyle == B_FANCY_BORDER) { - bool isFocus = IsFocus() && Window()->IsActive(); - - if (isFocus) { - // TODO: Need to find focus color programatically - BView::SetHighColor(0, 0, 190); - } else - BView::SetHighColor(255, 255, 255); - - StrokeRect(rect); - if (!isFocus) - BView::SetHighColor(184, 184, 184); - else - BView::SetHighColor(152, 152, 152); - - rect.InsetBy(1,1); - StrokeRect(rect); - cornerRect.OffsetBy(-2, -2); - } - - BView::SetHighColor(ui_color(B_PANEL_BACKGROUND_COLOR)); - // fills lower right rect between scroll bars - FillRect(cornerRect); -} - - -void -BColumnListView::SaveState(BMessage* msg) -{ - msg->MakeEmpty(); - - for (int32 i = 0; BColumn* col = (BColumn*)fColumns.ItemAt(i); i++) { - msg->AddInt32("ID",col->fFieldID); - msg->AddFloat("width", col->fWidth); - msg->AddBool("visible", col->fVisible); - } - - msg->AddBool("sortingenabled", fSortingEnabled); - - if (fSortingEnabled) { - for (int32 i = 0; BColumn* col = (BColumn*)fSortColumns.ItemAt(i); - i++) { - msg->AddInt32("sortID", col->fFieldID); - msg->AddBool("sortascending", col->fSortAscending); - } - } -} - - -void -BColumnListView::LoadState(BMessage* msg) -{ - int32 id; - for (int i = 0; msg->FindInt32("ID", i, &id) == B_OK; i++) { - for (int j = 0; BColumn* column = (BColumn*)fColumns.ItemAt(j); j++) { - if (column->fFieldID == id) { - // move this column to position 'i' and set its attributes - MoveColumn(column, i); - float width; - if (msg->FindFloat("width", i, &width) == B_OK) - column->SetWidth(width); - bool visible; - if (msg->FindBool("visible", i, &visible) == B_OK) - column->SetVisible(visible); - } - } - } - bool b; - if (msg->FindBool("sortingenabled", &b) == B_OK) { - SetSortingEnabled(b); - for (int k = 0; msg->FindInt32("sortID", k, &id) == B_OK; k++) { - for (int j = 0; BColumn* column = (BColumn*)fColumns.ItemAt(j); - j++) { - if (column->fFieldID == id) { - // add this column to the sort list - bool value; - if (msg->FindBool("sortascending", k, &value) == B_OK) - SetSortColumn(column, true, value); - } - } - } - } -} - - -void -BColumnListView::SetEditMode(bool state) -{ - fOutlineView->SetEditMode(state); - fTitleView->SetEditMode(state); -} - - -void -BColumnListView::Refresh() -{ - if (LockLooper()) { - Invalidate(); - fOutlineView->FixScrollBar (true); - fOutlineView->Invalidate(); - Window()->UpdateIfNeeded(); - UnlockLooper(); - } -} - - -BSize -BColumnListView::MinSize() -{ - BSize size; - size.width = 100; - size.height = kTitleHeight + 4 * B_H_SCROLL_BAR_HEIGHT; - if (!fHorizontalScrollBar->IsHidden()) - size.height += fHorizontalScrollBar->Frame().Height() + 1; - // TODO: Take border size into account - - return BLayoutUtils::ComposeSize(ExplicitMinSize(), size); -} - - -BSize -BColumnListView::PreferredSize() -{ - BSize size = MinSize(); - size.height += ceilf(be_plain_font->Size()) * 20; - - int32 count = CountColumns(); - if (count > 0) { - // return MinSize().width if there are no columns. - size.width = 40.0f; - for (int32 i = 0; i < count; i++) { - BColumn* column = ColumnAt(i); - if (column != NULL) - size.width += fOutlineView->GetColumnPreferredWidth(column); - } - } - - return BLayoutUtils::ComposeSize(ExplicitPreferredSize(), size); -} - - -BSize -BColumnListView::MaxSize() -{ - BSize size(B_SIZE_UNLIMITED, B_SIZE_UNLIMITED); - return BLayoutUtils::ComposeSize(ExplicitMaxSize(), size); -} - - -void -BColumnListView::InvalidateLayout(bool descendants) -{ - BView::InvalidateLayout(descendants); -} - - -void -BColumnListView::DoLayout() -{ - if (!(Flags() & B_SUPPORTS_LAYOUT)) - return; - - BRect titleRect; - BRect outlineRect; - BRect vScrollBarRect; - BRect hScrollBarRect; - _GetChildViewRects(Bounds(), !fHorizontalScrollBar->IsHidden(), - titleRect, outlineRect, vScrollBarRect, hScrollBarRect); - - fTitleView->MoveTo(titleRect.LeftTop()); - fTitleView->ResizeTo(titleRect.Width(), titleRect.Height()); - - fOutlineView->MoveTo(outlineRect.LeftTop()); - fOutlineView->ResizeTo(outlineRect.Width(), outlineRect.Height()); - - fVerticalScrollBar->MoveTo(vScrollBarRect.LeftTop()); - fVerticalScrollBar->ResizeTo(vScrollBarRect.Width(), - vScrollBarRect.Height()); - - fHorizontalScrollBar->MoveTo(hScrollBarRect.LeftTop()); - fHorizontalScrollBar->ResizeTo(hScrollBarRect.Width(), - hScrollBarRect.Height()); - - fOutlineView->FixScrollBar(true); -} - - -void -BColumnListView::_Init(bool showHorizontalScrollbar) -{ - SetViewColor(B_TRANSPARENT_32_BIT); - - BRect bounds(Bounds()); - if (bounds.Width() <= 0) - bounds.right = 100; - if (bounds.Height() <= 0) - bounds.bottom = 100; - - for (int i = 0; i < (int)B_COLOR_TOTAL; i++) - fColorList[i] = kColor[i]; - - BRect titleRect; - BRect outlineRect; - BRect vScrollBarRect; - BRect hScrollBarRect; - _GetChildViewRects(bounds, showHorizontalScrollbar, titleRect, outlineRect, - vScrollBarRect, hScrollBarRect); - - fOutlineView = new OutlineView(outlineRect, &fColumns, &fSortColumns, this); - AddChild(fOutlineView); - - - fTitleView = new TitleView(titleRect, fOutlineView, &fColumns, - &fSortColumns, this, B_FOLLOW_LEFT_RIGHT | B_FOLLOW_TOP); - AddChild(fTitleView); - - fVerticalScrollBar = new BScrollBar(vScrollBarRect, "vertical_scroll_bar", - fOutlineView, 0.0, bounds.Height(), B_VERTICAL); - AddChild(fVerticalScrollBar); - - fHorizontalScrollBar = new BScrollBar(hScrollBarRect, - "horizontal_scroll_bar", fTitleView, 0.0, bounds.Width(), B_HORIZONTAL); - AddChild(fHorizontalScrollBar); - - if (!showHorizontalScrollbar) - fHorizontalScrollBar->Hide(); - - fOutlineView->FixScrollBar(true); -} - - -void -BColumnListView::_GetChildViewRects(const BRect& bounds, - bool showHorizontalScrollbar, BRect& titleRect, BRect& outlineRect, - BRect& vScrollBarRect, BRect& hScrollBarRect) -{ - titleRect = bounds; - titleRect.bottom = titleRect.top + kTitleHeight; -#if !LOWER_SCROLLBAR - titleRect.right -= B_V_SCROLL_BAR_WIDTH; -#endif - - outlineRect = bounds; - outlineRect.top = titleRect.bottom + 1.0; - outlineRect.right -= B_V_SCROLL_BAR_WIDTH; - if (showHorizontalScrollbar) - outlineRect.bottom -= B_H_SCROLL_BAR_HEIGHT; - - vScrollBarRect = bounds; -#if LOWER_SCROLLBAR - vScrollBarRect.top += kTitleHeight; -#endif - - vScrollBarRect.left = vScrollBarRect.right - B_V_SCROLL_BAR_WIDTH; - if (showHorizontalScrollbar) - vScrollBarRect.bottom -= B_H_SCROLL_BAR_HEIGHT; - - hScrollBarRect = bounds; - hScrollBarRect.top = hScrollBarRect.bottom - B_H_SCROLL_BAR_HEIGHT; - hScrollBarRect.right -= B_V_SCROLL_BAR_WIDTH; - - // Adjust stuff so the border will fit. - if (fBorderStyle == B_PLAIN_BORDER || fBorderStyle == B_NO_BORDER) { - titleRect.InsetBy(1, 0); - titleRect.OffsetBy(0, 1); - outlineRect.InsetBy(1, 1); - } else if (fBorderStyle == B_FANCY_BORDER) { - titleRect.InsetBy(2, 0); - titleRect.OffsetBy(0, 2); - outlineRect.InsetBy(2, 2); - - vScrollBarRect.OffsetBy(-1, 0); -#if LOWER_SCROLLBAR - vScrollBarRect.top += 2; - vScrollBarRect.bottom -= 1; -#else - vScrollBarRect.InsetBy(0, 1); -#endif - hScrollBarRect.OffsetBy(0, -1); - hScrollBarRect.InsetBy(1, 0); - } -} - - -// #pragma mark - - - -TitleView::TitleView(BRect rect, OutlineView* horizontalSlave, - BList* visibleColumns, BList* sortColumns, BColumnListView* listView, - uint32 resizingMode) - : - BView(rect, "title_view", resizingMode, B_WILL_DRAW | B_FRAME_EVENTS), - fOutlineView(horizontalSlave), - fColumns(visibleColumns), - fSortColumns(sortColumns), -// fColumnsWidth(0), - fVisibleRect(rect.OffsetToCopy(0, 0)), - fCurrentState(INACTIVE), - fColumnPop(NULL), - fMasterView(listView), - fEditMode(false), - fColumnFlags(B_ALLOW_COLUMN_MOVE | B_ALLOW_COLUMN_RESIZE - | B_ALLOW_COLUMN_POPUP | B_ALLOW_COLUMN_REMOVE) -{ - SetViewColor(B_TRANSPARENT_COLOR); - -#if DOUBLE_BUFFERED_COLUMN_RESIZE - // xxx this needs to be smart about the size of the backbuffer. - BRect doubleBufferRect(0, 0, 600, 35); - fDrawBuffer = new BBitmap(doubleBufferRect, B_RGB32, true); - fDrawBufferView = new BView(doubleBufferRect, "double_buffer_view", - B_FOLLOW_ALL_SIDES, 0); - fDrawBuffer->Lock(); - fDrawBuffer->AddChild(fDrawBufferView); - fDrawBuffer->Unlock(); -#endif - - fUpSortArrow = new BBitmap(BRect(0, 0, 7, 7), B_CMAP8); - fDownSortArrow = new BBitmap(BRect(0, 0, 7, 7), B_CMAP8); - - fUpSortArrow->SetBits((const void*) kUpSortArrow8x8, 64, 0, B_CMAP8); - fDownSortArrow->SetBits((const void*) kDownSortArrow8x8, 64, 0, B_CMAP8); - - fResizeCursor = new BCursor(kResizeCursorData); - fMinResizeCursor = new BCursor(kMinResizeCursorData); - fMaxResizeCursor = new BCursor(kMaxResizeCursorData); - fColumnMoveCursor = new BCursor(kColumnMoveCursorData); - - FixScrollBar(true); -} - - -TitleView::~TitleView() -{ - delete fColumnPop; - fColumnPop = NULL; - -#if DOUBLE_BUFFERED_COLUMN_RESIZE - delete fDrawBuffer; -#endif - delete fUpSortArrow; - delete fDownSortArrow; - - delete fResizeCursor; - delete fMaxResizeCursor; - delete fMinResizeCursor; - delete fColumnMoveCursor; -} - - -void -TitleView::ColumnAdded(BColumn* column) -{ -// fColumnsWidth += column->Width(); - FixScrollBar(false); - Invalidate(); -} - - -void -TitleView::ColumnResized(BColumn* column, float oldWidth) -{ -// fColumnsWidth += column->Width() - oldWidth; - FixScrollBar(false); - Invalidate(); -} - - -void -TitleView::SetColumnVisible(BColumn* column, bool visible) -{ - if (column->fVisible == visible) - return; - - // If setting it visible, do this first so we can find its position - // to invalidate. If hiding it, do it last. - if (visible) - column->fVisible = visible; - - BRect titleInvalid; - GetTitleRect(column, &titleInvalid); - - // Now really set the visibility - column->fVisible = visible; - -// if (visible) -// fColumnsWidth += column->Width(); -// else -// fColumnsWidth -= column->Width(); - - BRect outlineInvalid(fOutlineView->VisibleRect()); - outlineInvalid.left = titleInvalid.left; - titleInvalid.right = outlineInvalid.right; - - Invalidate(titleInvalid); - fOutlineView->Invalidate(outlineInvalid); -} - - -void -TitleView::GetTitleRect(BColumn* findColumn, BRect* _rect) -{ - float leftEdge = MAX(kLeftMargin, fMasterView->LatchWidth()); - int32 numColumns = fColumns->CountItems(); - for (int index = 0; index < numColumns; index++) { - BColumn* column = (BColumn*) fColumns->ItemAt(index); - if (!column->IsVisible()) - continue; - - if (column == findColumn) { - _rect->Set(leftEdge, 0, leftEdge + column->Width(), - fVisibleRect.bottom); - return; - } - - leftEdge += column->Width() + 1; - } - - TRESPASS(); -} - - -int32 -TitleView::FindColumn(BPoint position, float* _leftEdge) -{ - float leftEdge = MAX(kLeftMargin, fMasterView->LatchWidth()); - int32 numColumns = fColumns->CountItems(); - for (int index = 0; index < numColumns; index++) { - BColumn* column = (BColumn*) fColumns->ItemAt(index); - if (!column->IsVisible()) - continue; - - if (leftEdge > position.x) - break; - - if (position.x >= leftEdge - && position.x <= leftEdge + column->Width()) { - *_leftEdge = leftEdge; - return index; - } - - leftEdge += column->Width() + 1; - } - - return 0; -} - - -void -TitleView::FixScrollBar(bool scrollToFit) -{ - BScrollBar* hScrollBar = ScrollBar(B_HORIZONTAL); - if (hScrollBar == NULL) - return; - - float virtualWidth = _VirtualWidth(); - - if (virtualWidth > fVisibleRect.Width()) { - hScrollBar->SetProportion(fVisibleRect.Width() / virtualWidth); - - // Perform the little trick if the user is scrolled over too far. - // See OutlineView::FixScrollBar for a more in depth explanation - float maxScrollBarValue = virtualWidth - fVisibleRect.Width(); - if (scrollToFit || hScrollBar->Value() <= maxScrollBarValue) { - hScrollBar->SetRange(0.0, maxScrollBarValue); - hScrollBar->SetSteps(50, fVisibleRect.Width()); - } - } else if (hScrollBar->Value() == 0.0) { - // disable scroll bar. - hScrollBar->SetRange(0.0, 0.0); - } -} - - -void -TitleView::DragSelectedColumn(BPoint position) -{ - float invalidLeft = fSelectedColumnRect.left; - float invalidRight = fSelectedColumnRect.right; - - float leftEdge; - int32 columnIndex = FindColumn(position, &leftEdge); - fSelectedColumnRect.OffsetTo(leftEdge, 0); - - MoveColumn(fSelectedColumn, columnIndex); - - fSelectedColumn->fVisible = true; - ComputeDragBoundries(fSelectedColumn, position); - - // Redraw the new column position - GetTitleRect(fSelectedColumn, &fSelectedColumnRect); - invalidLeft = MIN(fSelectedColumnRect.left, invalidLeft); - invalidRight = MAX(fSelectedColumnRect.right, invalidRight); - - Invalidate(BRect(invalidLeft, 0, invalidRight, fVisibleRect.bottom)); - fOutlineView->Invalidate(BRect(invalidLeft, 0, invalidRight, - fOutlineView->VisibleRect().bottom)); - - DrawTitle(this, fSelectedColumnRect, fSelectedColumn, true); -} - - -void -TitleView::MoveColumn(BColumn* column, int32 index) -{ - fColumns->RemoveItem((void*) column); - - if (-1 == index) { - // Re-add the column at the end of the list. - fColumns->AddItem((void*) column); - } else { - fColumns->AddItem((void*) column, index); - } -} - - -void -TitleView::SetColumnFlags(column_flags flags) -{ - fColumnFlags = flags; -} - - -void -TitleView::ResizeSelectedColumn(BPoint position, bool preferred) -{ - float minWidth = fSelectedColumn->MinWidth(); - float maxWidth = fSelectedColumn->MaxWidth(); - - float oldWidth = fSelectedColumn->Width(); - float originalEdge = fSelectedColumnRect.left + oldWidth; - if (preferred) { - float width = fOutlineView->GetColumnPreferredWidth(fSelectedColumn); - fSelectedColumn->SetWidth(width); - } else if (position.x > fSelectedColumnRect.left + maxWidth) - fSelectedColumn->SetWidth(maxWidth); - else if (position.x < fSelectedColumnRect.left + minWidth) - fSelectedColumn->SetWidth(minWidth); - else - fSelectedColumn->SetWidth(position.x - fSelectedColumnRect.left - 1); - - float dX = fSelectedColumnRect.left + fSelectedColumn->Width() - - originalEdge; - if (dX != 0) { - float columnHeight = fVisibleRect.Height(); - BRect originalRect(originalEdge, 0, 1000000.0, columnHeight); - BRect movedRect(originalRect); - movedRect.OffsetBy(dX, 0); - - // Update the size of the title column - BRect sourceRect(0, 0, fSelectedColumn->Width(), columnHeight); - BRect destRect(sourceRect); - destRect.OffsetBy(fSelectedColumnRect.left, 0); - -#if DOUBLE_BUFFERED_COLUMN_RESIZE - fDrawBuffer->Lock(); - DrawTitle(fDrawBufferView, sourceRect, fSelectedColumn, false); - fDrawBufferView->Sync(); - fDrawBuffer->Unlock(); - - CopyBits(originalRect, movedRect); - DrawBitmap(fDrawBuffer, sourceRect, destRect); -#else - CopyBits(originalRect, movedRect); - DrawTitle(this, destRect, fSelectedColumn, false); -#endif - - // Update the body view - BRect slaveSize = fOutlineView->VisibleRect(); - BRect slaveSource(originalRect); - slaveSource.bottom = slaveSize.bottom; - BRect slaveDest(movedRect); - slaveDest.bottom = slaveSize.bottom; - fOutlineView->CopyBits(slaveSource, slaveDest); - fOutlineView->RedrawColumn(fSelectedColumn, fSelectedColumnRect.left, - fResizingFirstColumn); - -// fColumnsWidth += dX; - - // Update the cursor - if (fSelectedColumn->Width() == minWidth) - SetViewCursor(fMinResizeCursor, true); - else if (fSelectedColumn->Width() == maxWidth) - SetViewCursor(fMaxResizeCursor, true); - else - SetViewCursor(fResizeCursor, true); - - ColumnResized(fSelectedColumn, oldWidth); - } -} - - -void -TitleView::ComputeDragBoundries(BColumn* findColumn, BPoint) -{ - float previousColumnLeftEdge = -1000000.0; - float nextColumnRightEdge = 1000000.0; - - bool foundColumn = false; - float leftEdge = MAX(kLeftMargin, fMasterView->LatchWidth()); - int32 numColumns = fColumns->CountItems(); - for (int index = 0; index < numColumns; index++) { - BColumn* column = (BColumn*) fColumns->ItemAt(index); - if (!column->IsVisible()) - continue; - - if (column == findColumn) { - foundColumn = true; - continue; - } - - if (foundColumn) { - nextColumnRightEdge = leftEdge + column->Width(); - break; - } else - previousColumnLeftEdge = leftEdge; - - leftEdge += column->Width() + 1; - } - - float rightEdge = leftEdge + findColumn->Width(); - - fLeftDragBoundry = MIN(previousColumnLeftEdge + findColumn->Width(), - leftEdge); - fRightDragBoundry = MAX(nextColumnRightEdge, rightEdge); -} - - -void -TitleView::DrawTitle(BView* view, BRect rect, BColumn* column, bool depressed) -{ - BRect drawRect; - rgb_color borderColor = mix_color( - fMasterView->Color(B_COLOR_HEADER_BACKGROUND), - make_color(0, 0, 0), 128); - rgb_color backgroundColor; - - rgb_color bevelHigh; - rgb_color bevelLow; - // Want exterior borders to overlap. - if (be_control_look == NULL) { - rect.right += 1; - drawRect = rect; - drawRect.InsetBy(2, 2); - if (depressed) { - backgroundColor = mix_color( - fMasterView->Color(B_COLOR_HEADER_BACKGROUND), - make_color(0, 0, 0), 64); - bevelHigh = mix_color(backgroundColor, make_color(0, 0, 0), 64); - bevelLow = mix_color(backgroundColor, make_color(255, 255, 255), - 128); - drawRect.left++; - drawRect.top++; - } else { - backgroundColor = fMasterView->Color(B_COLOR_HEADER_BACKGROUND); - bevelHigh = mix_color(backgroundColor, make_color(255, 255, 255), - 192); - bevelLow = mix_color(backgroundColor, make_color(0, 0, 0), 64); - drawRect.bottom--; - drawRect.right--; - } - } else { - drawRect = rect; - } - - font_height fh; - GetFontHeight(&fh); - - float baseline = floor(drawRect.top + fh.ascent - + (drawRect.Height() + 1 - (fh.ascent + fh.descent)) / 2); - - if (be_control_look != NULL) { - BRect bgRect = rect; - - rgb_color base = ui_color(B_PANEL_BACKGROUND_COLOR); - view->SetHighColor(tint_color(base, B_DARKEN_2_TINT)); - view->StrokeLine(bgRect.LeftBottom(), bgRect.RightBottom()); - - bgRect.bottom--; - bgRect.right--; - - if (depressed) - base = tint_color(base, B_DARKEN_1_TINT); - - be_control_look->DrawButtonBackground(view, bgRect, rect, base, 0, - BControlLook::B_TOP_BORDER | BControlLook::B_BOTTOM_BORDER); - - view->SetHighColor(tint_color(ui_color(B_PANEL_BACKGROUND_COLOR), - B_DARKEN_2_TINT)); - view->StrokeLine(rect.RightTop(), rect.RightBottom()); - - } else { - - view->SetHighColor(borderColor); - view->StrokeRect(rect); - view->BeginLineArray(4); - view->AddLine(BPoint(rect.left + 1, rect.top + 1), - BPoint(rect.right - 1, rect.top + 1), bevelHigh); - view->AddLine(BPoint(rect.left + 1, rect.top + 1), - BPoint(rect.left + 1, rect.bottom - 1), bevelHigh); - view->AddLine(BPoint(rect.right - 1, rect.top + 1), - BPoint(rect.right - 1, rect.bottom - 1), bevelLow); - view->AddLine(BPoint(rect.left + 2, rect.bottom-1), - BPoint(rect.right - 1, rect.bottom - 1), bevelLow); - view->EndLineArray(); - - view->SetHighColor(backgroundColor); - view->SetLowColor(backgroundColor); - - view->FillRect(rect.InsetByCopy(2, 2)); - } - - // If no column given, nothing else to draw. - if (!column) - return; - - view->SetHighColor(fMasterView->Color(B_COLOR_HEADER_TEXT)); - - BFont font; - GetFont(&font); - view->SetFont(&font); - - int sortIndex = fSortColumns->IndexOf(column); - if (sortIndex >= 0) { - // Draw sort notation. - BPoint upperLeft(drawRect.right - kSortIndicatorWidth, baseline); - - if (fSortColumns->CountItems() > 1) { - char str[256]; - sprintf(str, "%d", sortIndex + 1); - const float w = view->StringWidth(str); - upperLeft.x -= w; - - view->SetDrawingMode(B_OP_COPY); - view->MovePenTo(BPoint(upperLeft.x + kSortIndicatorWidth, - baseline)); - view->DrawString(str); - } - - float bmh = fDownSortArrow->Bounds().Height()+1; - - view->SetDrawingMode(B_OP_OVER); - - if (column->fSortAscending) { - BPoint leftTop(upperLeft.x, drawRect.top + (drawRect.IntegerHeight() - - fDownSortArrow->Bounds().IntegerHeight()) / 2); - view->DrawBitmapAsync(fDownSortArrow, leftTop); - } else { - BPoint leftTop(upperLeft.x, drawRect.top + (drawRect.IntegerHeight() - - fUpSortArrow->Bounds().IntegerHeight()) / 2); - view->DrawBitmapAsync(fUpSortArrow, leftTop); - } - - upperLeft.y = baseline - bmh + floor((fh.ascent + fh.descent - bmh) / 2); - if (upperLeft.y < drawRect.top) - upperLeft.y = drawRect.top; - - // Adjust title stuff for sort indicator - drawRect.right = upperLeft.x - 2; - } - - if (drawRect.right > drawRect.left) { -#if CONSTRAIN_CLIPPING_REGION - BRegion clipRegion(drawRect); - view->PushState(); - view->ConstrainClippingRegion(&clipRegion); -#endif - view->MovePenTo(BPoint(drawRect.left + 8, baseline)); - view->SetDrawingMode(B_OP_OVER); - view->SetHighColor(fMasterView->Color(B_COLOR_HEADER_TEXT)); - column->DrawTitle(drawRect, view); - -#if CONSTRAIN_CLIPPING_REGION - view->PopState(); -#endif - } -} - - -float -TitleView::_VirtualWidth() const -{ - float width = 0.0f; - - int32 count = fColumns->CountItems(); - for (int32 i = 0; i < count; i++) { - BColumn* column = reinterpret_cast(fColumns->ItemAt(i)); - width += column->Width(); - } - - return width + MAX(kLeftMargin, - fMasterView->LatchWidth()) + kRightMargin * 2; -} - - -void -TitleView::Draw(BRect invalidRect) -{ - float columnLeftEdge = MAX(kLeftMargin, fMasterView->LatchWidth()); - for (int32 columnIndex = 0; columnIndex < fColumns->CountItems(); - columnIndex++) { - - BColumn* column = (BColumn*) fColumns->ItemAt(columnIndex); - if (!column->IsVisible()) - continue; - - if (columnLeftEdge > invalidRect.right) - break; - - if (columnLeftEdge + column->Width() >= invalidRect.left) { - BRect titleRect(columnLeftEdge, 0, - columnLeftEdge + column->Width(), fVisibleRect.Height()); - DrawTitle(this, titleRect, column, - (fCurrentState == DRAG_COLUMN_INSIDE_TITLE - && fSelectedColumn == column)); - } - - columnLeftEdge += column->Width() + 1; - } - - - // Bevels for right title margin - if (columnLeftEdge <= invalidRect.right) { - BRect titleRect(columnLeftEdge, 0, Bounds().right + 2, - fVisibleRect.Height()); - DrawTitle(this, titleRect, NULL, false); - } - - // Bevels for left title margin - if (invalidRect.left < MAX(kLeftMargin, fMasterView->LatchWidth())) { - BRect titleRect(0, 0, MAX(kLeftMargin, fMasterView->LatchWidth()) - 1, - fVisibleRect.Height()); - DrawTitle(this, titleRect, NULL, false); - } - -#if DRAG_TITLE_OUTLINE - // (Internal) Column Drag Indicator - if (fCurrentState == DRAG_COLUMN_INSIDE_TITLE) { - BRect dragRect(fSelectedColumnRect); - dragRect.OffsetTo(fCurrentDragPosition.x - fClickPoint.x, 0); - if (dragRect.Intersects(invalidRect)) { - SetHighColor(0, 0, 255); - StrokeRect(dragRect); - } - } -#endif -} - - -void -TitleView::ScrollTo(BPoint position) -{ - fOutlineView->ScrollBy(position.x - fVisibleRect.left, 0); - fVisibleRect.OffsetTo(position.x, position.y); - - // Perform the little trick if the user is scrolled over too far. - // See OutlineView::ScrollTo for a more in depth explanation - float maxScrollBarValue = _VirtualWidth() - fVisibleRect.Width(); - BScrollBar* hScrollBar = ScrollBar(B_HORIZONTAL); - float min, max; - hScrollBar->GetRange(&min, &max); - if (max != maxScrollBarValue && position.x > maxScrollBarValue) - FixScrollBar(true); - - _inherited::ScrollTo(position); -} - - -void -TitleView::MessageReceived(BMessage* message) -{ - if (message->what == kToggleColumn) { - int32 num; - if (message->FindInt32("be:field_num", &num) == B_OK) { - for (int index = 0; index < fColumns->CountItems(); index++) { - BColumn* column = (BColumn*) fColumns->ItemAt(index); - if (!column) - continue; - if (column->LogicalFieldNum() == num) - column->SetVisible(!column->IsVisible()); - } - } - return; - } else { - BView::MessageReceived(message); - } -} - - -void -TitleView::MouseDown(BPoint position) -{ - if(fEditMode) - return; - - int32 buttons = 1; - Window()->CurrentMessage()->FindInt32("buttons", &buttons); - if (buttons == B_SECONDARY_MOUSE_BUTTON - && (fColumnFlags & B_ALLOW_COLUMN_POPUP)) { - // Right mouse button -- bring up menu to show/hide columns. - if (!fColumnPop) fColumnPop = new BPopUpMenu("Columns", false, false); - fColumnPop->RemoveItems(0, fColumnPop->CountItems(), true); - BMessenger me(this); - for (int index = 0; index < fColumns->CountItems(); index++) { - BColumn* column = (BColumn*) fColumns->ItemAt(index); - if (!column) continue; - BString name; - column->GetColumnName(&name); - BMessage* msg = new BMessage(kToggleColumn); - msg->AddInt32("be:field_num", column->LogicalFieldNum()); - BMenuItem* it = new BMenuItem(name.String(), msg); - it->SetMarked(column->IsVisible()); - it->SetTarget(me); - fColumnPop->AddItem(it); - } - BPoint screenPosition = ConvertToScreen(position); - BRect sticky(screenPosition, screenPosition); - sticky.InsetBy(-5, -5); - fColumnPop->Go(ConvertToScreen(position), true, false, sticky, true); - return; - } - - fResizingFirstColumn = true; - float leftEdge = MAX(kLeftMargin, fMasterView->LatchWidth()); - for (int index = 0; index < fColumns->CountItems(); index++) { - BColumn* column = (BColumn*) fColumns->ItemAt(index); - if (!column->IsVisible()) - continue; - - if (leftEdge > position.x + kColumnResizeAreaWidth / 2) - break; - - // Check for resizing a column - float rightEdge = leftEdge + column->Width(); - - if (column->ShowHeading()) { - if (position.x > rightEdge - kColumnResizeAreaWidth / 2 - && position.x < rightEdge + kColumnResizeAreaWidth / 2 - && column->MaxWidth() > column->MinWidth() - && (fColumnFlags & B_ALLOW_COLUMN_RESIZE)) { - - int32 clicks = 0; - Window()->CurrentMessage()->FindInt32("clicks", &clicks); - if (clicks == 2) { - ResizeSelectedColumn(position, true); - fCurrentState = INACTIVE; - break; - } - fCurrentState = RESIZING_COLUMN; - fSelectedColumn = column; - fSelectedColumnRect.Set(leftEdge, 0, rightEdge, - fVisibleRect.Height()); - fClickPoint = BPoint(position.x - rightEdge - 1, - position.y - fSelectedColumnRect.top); - SetMouseEventMask(B_POINTER_EVENTS, - B_LOCK_WINDOW_FOCUS | B_NO_POINTER_HISTORY); - break; - } - - fResizingFirstColumn = false; - - // Check for clicking on a column. - if (position.x > leftEdge && position.x < rightEdge) { - fCurrentState = PRESSING_COLUMN; - fSelectedColumn = column; - fSelectedColumnRect.Set(leftEdge, 0, rightEdge, - fVisibleRect.Height()); - DrawTitle(this, fSelectedColumnRect, fSelectedColumn, true); - fClickPoint = BPoint(position.x - fSelectedColumnRect.left, - position.y - fSelectedColumnRect.top); - SetMouseEventMask(B_POINTER_EVENTS, - B_LOCK_WINDOW_FOCUS | B_NO_POINTER_HISTORY); - break; - } - } - leftEdge = rightEdge + 1; - } -} - - -void -TitleView::MouseMoved(BPoint position, uint32 transit, - const BMessage* dragMessage) -{ - if (fEditMode) - return; - - // Handle column manipulation - switch (fCurrentState) { - case RESIZING_COLUMN: - ResizeSelectedColumn(position - BPoint(fClickPoint.x, 0)); - break; - - case PRESSING_COLUMN: { - if (abs((int32)(position.x - (fClickPoint.x - + fSelectedColumnRect.left))) > kColumnResizeAreaWidth - || abs((int32)(position.y - (fClickPoint.y - + fSelectedColumnRect.top))) > kColumnResizeAreaWidth) { - // User has moved the mouse more than the tolerable amount, - // initiate a drag. - if (transit == B_INSIDE_VIEW || transit == B_ENTERED_VIEW) { - if(fColumnFlags & B_ALLOW_COLUMN_MOVE) { - fCurrentState = DRAG_COLUMN_INSIDE_TITLE; - ComputeDragBoundries(fSelectedColumn, position); - SetViewCursor(fColumnMoveCursor, true); -#if DRAG_TITLE_OUTLINE - BRect invalidRect(fSelectedColumnRect); - invalidRect.OffsetTo(position.x - fClickPoint.x, 0); - fCurrentDragPosition = position; - Invalidate(invalidRect); -#endif - } - } else { - if(fColumnFlags & B_ALLOW_COLUMN_REMOVE) { - // Dragged outside view - fCurrentState = DRAG_COLUMN_OUTSIDE_TITLE; - fSelectedColumn->SetVisible(false); - BRect dragRect(fSelectedColumnRect); - - // There is a race condition where the mouse may have - // moved by the time we get to handle this message. - // If the user drags a column very quickly, this - // results in the annoying bug where the cursor is - // outside of the rectangle that is being dragged - // around. Call GetMouse with the checkQueue flag set - // to false so we can get the most recent position of - // the mouse. This minimizes this problem (although - // it is currently not possible to completely eliminate - // it). - uint32 buttons; - GetMouse(&position, &buttons, false); - dragRect.OffsetTo(position.x - fClickPoint.x, - position.y - dragRect.Height() / 2); - BeginRectTracking(dragRect, B_TRACK_WHOLE_RECT); - } - } - } - - break; - } - - case DRAG_COLUMN_INSIDE_TITLE: { - if (transit == B_EXITED_VIEW - && (fColumnFlags & B_ALLOW_COLUMN_REMOVE)) { - // Dragged outside view - fCurrentState = DRAG_COLUMN_OUTSIDE_TITLE; - fSelectedColumn->SetVisible(false); - BRect dragRect(fSelectedColumnRect); - - // See explanation above. - uint32 buttons; - GetMouse(&position, &buttons, false); - - dragRect.OffsetTo(position.x - fClickPoint.x, - position.y - fClickPoint.y); - BeginRectTracking(dragRect, B_TRACK_WHOLE_RECT); - } else if (position.x < fLeftDragBoundry - || position.x > fRightDragBoundry) { - DragSelectedColumn(position - BPoint(fClickPoint.x, 0)); - } - -#if DRAG_TITLE_OUTLINE - // Set up the invalid rect to include the rect for the previous - // position of the drag rect, as well as the new one. - BRect invalidRect(fSelectedColumnRect); - invalidRect.OffsetTo(fCurrentDragPosition.x - fClickPoint.x, 0); - if (position.x < fCurrentDragPosition.x) - invalidRect.left -= fCurrentDragPosition.x - position.x; - else - invalidRect.right += position.x - fCurrentDragPosition.x; - - fCurrentDragPosition = position; - Invalidate(invalidRect); -#endif - break; - } - - case DRAG_COLUMN_OUTSIDE_TITLE: - if (transit == B_ENTERED_VIEW) { - // Drag back into view - EndRectTracking(); - fCurrentState = DRAG_COLUMN_INSIDE_TITLE; - fSelectedColumn->SetVisible(true); - DragSelectedColumn(position - BPoint(fClickPoint.x, 0)); - } - - break; - - case INACTIVE: - // Check for cursor changes if we are over the resize area for - // a column. - BColumn* resizeColumn = 0; - float leftEdge = MAX(kLeftMargin, fMasterView->LatchWidth()); - for (int index = 0; index < fColumns->CountItems(); index++) { - BColumn* column = (BColumn*) fColumns->ItemAt(index); - if (!column->IsVisible()) - continue; - - if (leftEdge > position.x + kColumnResizeAreaWidth / 2) - break; - - float rightEdge = leftEdge + column->Width(); - if (position.x > rightEdge - kColumnResizeAreaWidth / 2 - && position.x < rightEdge + kColumnResizeAreaWidth / 2 - && column->MaxWidth() > column->MinWidth()) { - resizeColumn = column; - break; - } - - leftEdge = rightEdge + 1; - } - - // Update the cursor - if (resizeColumn) { - if (resizeColumn->Width() == resizeColumn->MinWidth()) - SetViewCursor(fMinResizeCursor, true); - else if (resizeColumn->Width() == resizeColumn->MaxWidth()) - SetViewCursor(fMaxResizeCursor, true); - else - SetViewCursor(fResizeCursor, true); - } else - SetViewCursor(B_CURSOR_SYSTEM_DEFAULT, true); - break; - } -} - - -void -TitleView::MouseUp(BPoint position) -{ - if (fEditMode) - return; - - switch (fCurrentState) { - case RESIZING_COLUMN: - ResizeSelectedColumn(position - BPoint(fClickPoint.x, 0)); - fCurrentState = INACTIVE; - FixScrollBar(false); - break; - - case PRESSING_COLUMN: { - if (fMasterView->SortingEnabled()) { - if (fSortColumns->HasItem(fSelectedColumn)) { - if ((modifiers() & B_CONTROL_KEY) == 0 - && fSortColumns->CountItems() > 1) { - fSortColumns->MakeEmpty(); - fSortColumns->AddItem(fSelectedColumn); - } - - fSelectedColumn->fSortAscending - = !fSelectedColumn->fSortAscending; - } else { - if ((modifiers() & B_CONTROL_KEY) == 0) - fSortColumns->MakeEmpty(); - - fSortColumns->AddItem(fSelectedColumn); - fSelectedColumn->fSortAscending = true; - } - - fOutlineView->StartSorting(); - } - - fCurrentState = INACTIVE; - Invalidate(); - break; - } - - case DRAG_COLUMN_INSIDE_TITLE: - fCurrentState = INACTIVE; - -#if DRAG_TITLE_OUTLINE - Invalidate(); // xxx Can make this smaller -#else - Invalidate(fSelectedColumnRect); -#endif - SetViewCursor(B_CURSOR_SYSTEM_DEFAULT, true); - break; - - case DRAG_COLUMN_OUTSIDE_TITLE: - fCurrentState = INACTIVE; - EndRectTracking(); - SetViewCursor(B_CURSOR_SYSTEM_DEFAULT, true); - break; - - default: - ; - } -} - - -void -TitleView::FrameResized(float width, float height) -{ - fVisibleRect.right = fVisibleRect.left + width; - fVisibleRect.bottom = fVisibleRect.top + height; - FixScrollBar(true); -} - - -// #pragma mark - - - -OutlineView::OutlineView(BRect rect, BList* visibleColumns, BList* sortColumns, - BColumnListView* listView) - : - BView(rect, "outline_view", B_FOLLOW_ALL_SIDES, - B_WILL_DRAW | B_FRAME_EVENTS), - fColumns(visibleColumns), - fSortColumns(sortColumns), - fItemsHeight(0.0), - fVisibleRect(rect.OffsetToCopy(0, 0)), - fFocusRow(0), - fRollOverRow(0), - fLastSelectedItem(0), - fFirstSelectedItem(0), - fSortThread(B_BAD_THREAD_ID), - fCurrentState(INACTIVE), - fMasterView(listView), - fSelectionMode(B_MULTIPLE_SELECTION_LIST), - fTrackMouse(false), - fCurrentField(0), - fCurrentRow(0), - fCurrentColumn(0), - fMouseDown(false), - fCurrentCode(B_OUTSIDE_VIEW), - fEditMode(false), - fDragging(false), - fClickCount(0), - fDropHighlightY(-1) -{ - SetViewColor(B_TRANSPARENT_COLOR); - -#if DOUBLE_BUFFERED_COLUMN_RESIZE - // TODO: This needs to be smart about the size of the buffer. - // Also, the buffer can be shared with the title's buffer. - BRect doubleBufferRect(0, 0, 600, 35); - fDrawBuffer = new BBitmap(doubleBufferRect, B_RGB32, true); - fDrawBufferView = new BView(doubleBufferRect, "double_buffer_view", - B_FOLLOW_ALL_SIDES, 0); - fDrawBuffer->Lock(); - fDrawBuffer->AddChild(fDrawBufferView); - fDrawBuffer->Unlock(); -#endif - - FixScrollBar(true); - fSelectionListDummyHead.fNextSelected = &fSelectionListDummyHead; - fSelectionListDummyHead.fPrevSelected = &fSelectionListDummyHead; -} - - -OutlineView::~OutlineView() -{ -#if DOUBLE_BUFFERED_COLUMN_RESIZE - delete fDrawBuffer; -#endif - - Clear(); -} - - -void -OutlineView::Clear() -{ - DeselectAll(); - // Make sure selection list doesn't point to deleted rows! - RecursiveDeleteRows(&fRows, false); - Invalidate(); - fItemsHeight = 0.0; - FixScrollBar(true); -} - - -void -OutlineView::SetSelectionMode(list_view_type mode) -{ - DeselectAll(); - fSelectionMode = mode; -} - - -list_view_type -OutlineView::SelectionMode() const -{ - return fSelectionMode; -} - - -void -OutlineView::Deselect(BRow* row) -{ - if (row == NULL) - return; - - if (row->fNextSelected != 0) { - row->fNextSelected->fPrevSelected = row->fPrevSelected; - row->fPrevSelected->fNextSelected = row->fNextSelected; - row->fNextSelected = 0; - row->fPrevSelected = 0; - Invalidate(); - } -} - - -void -OutlineView::AddToSelection(BRow* row) -{ - if (row == NULL) - return; - - if (row->fNextSelected == 0) { - if (fSelectionMode == B_SINGLE_SELECTION_LIST) - DeselectAll(); - - row->fNextSelected = fSelectionListDummyHead.fNextSelected; - row->fPrevSelected = &fSelectionListDummyHead; - row->fNextSelected->fPrevSelected = row; - row->fPrevSelected->fNextSelected = row; - - BRect invalidRect; - if (FindVisibleRect(row, &invalidRect)) - Invalidate(invalidRect); - } -} - - -void -OutlineView::RecursiveDeleteRows(BRowContainer* list, bool isOwner) -{ - if (list == NULL) - return; - - while (true) { - BRow* row = list->RemoveItemAt(0L); - if (row == 0) - break; - - if (row->fChildList) - RecursiveDeleteRows(row->fChildList, true); - - delete row; - } - - if (isOwner) - delete list; -} - - -void -OutlineView::RedrawColumn(BColumn* column, float leftEdge, bool isFirstColumn) -{ - // TODO: Remove code duplication (private function which takes a view - // pointer, pass "this" in non-double buffered mode)! - // Watch out for sourceRect versus destRect though! - if (!column) - return; - - font_height fh; - GetFontHeight(&fh); - float line = 0.0; - bool tintedLine = true; - for (RecursiveOutlineIterator iterator(&fRows); iterator.CurrentRow(); - line += iterator.CurrentRow()->Height() + 1, iterator.GoToNext()) { - - BRow* row = iterator.CurrentRow(); - float rowHeight = row->Height(); - if (line > fVisibleRect.bottom) - break; - tintedLine = !tintedLine; - - if (line + rowHeight >= fVisibleRect.top) { -#if DOUBLE_BUFFERED_COLUMN_RESIZE - BRect sourceRect(0, 0, column->Width(), rowHeight); -#endif - BRect destRect(leftEdge, line, leftEdge + column->Width(), - line + rowHeight); - - rgb_color highColor; - rgb_color lowColor; - if (row->fNextSelected != 0) { - if (fEditMode) { - highColor = fMasterView->Color(B_COLOR_EDIT_BACKGROUND); - lowColor = fMasterView->Color(B_COLOR_EDIT_BACKGROUND); - } else { - highColor = fMasterView->Color(B_COLOR_SELECTION); - lowColor = fMasterView->Color(B_COLOR_SELECTION); - } - } else { - highColor = fMasterView->Color(B_COLOR_BACKGROUND); - lowColor = fMasterView->Color(B_COLOR_BACKGROUND); - } - if (tintedLine) - lowColor = tint_color(lowColor, kTintedLineTint); - - -#if DOUBLE_BUFFERED_COLUMN_RESIZE - fDrawBuffer->Lock(); - - fDrawBufferView->SetHighColor(highColor); - fDrawBufferView->SetLowColor(lowColor); - - BFont font; - GetFont(&font); - fDrawBufferView->SetFont(&font); - fDrawBufferView->FillRect(sourceRect, B_SOLID_LOW); - - if (isFirstColumn) { - // If this is the first column, double buffer drawing the latch - // too. - destRect.left += iterator.CurrentLevel() * kOutlineLevelIndent - - fMasterView->LatchWidth(); - sourceRect.left += iterator.CurrentLevel() * kOutlineLevelIndent - - fMasterView->LatchWidth(); - - LatchType pos = B_NO_LATCH; - if (row->HasLatch()) - pos = row->fIsExpanded ? B_OPEN_LATCH : B_CLOSED_LATCH; - - BRect latchRect(sourceRect); - latchRect.right = latchRect.left + fMasterView->LatchWidth(); - fMasterView->DrawLatch(fDrawBufferView, latchRect, pos, row); - } - - BField* field = row->GetField(column->fFieldID); - if (field) { - BRect fieldRect(sourceRect); - if (isFirstColumn) - fieldRect.left += fMasterView->LatchWidth(); - - #if CONSTRAIN_CLIPPING_REGION - BRegion clipRegion(fieldRect); - fDrawBufferView->PushState(); - fDrawBufferView->ConstrainClippingRegion(&clipRegion); - #endif - fDrawBufferView->SetHighColor(fMasterView->Color( - row->fNextSelected ? B_COLOR_SELECTION_TEXT - : B_COLOR_TEXT)); - float baseline = floor(fieldRect.top + fh.ascent - + (fieldRect.Height() + 1 - (fh.ascent+fh.descent)) / 2); - fDrawBufferView->MovePenTo(fieldRect.left + 8, baseline); - column->DrawField(field, fieldRect, fDrawBufferView); - #if CONSTRAIN_CLIPPING_REGION - fDrawBufferView->PopState(); - #endif - } - - if (fFocusRow == row && !fEditMode && fMasterView->IsFocus() - && Window()->IsActive()) { - fDrawBufferView->SetHighColor(fMasterView->Color( - B_COLOR_ROW_DIVIDER)); - fDrawBufferView->StrokeRect(BRect(-1, sourceRect.top, - 10000.0, sourceRect.bottom)); - } - - fDrawBufferView->Sync(); - fDrawBuffer->Unlock(); - SetDrawingMode(B_OP_COPY); - DrawBitmap(fDrawBuffer, sourceRect, destRect); - -#else - - SetHighColor(highColor); - SetLowColor(lowColor); - FillRect(destRect, B_SOLID_LOW); - - BField* field = row->GetField(column->fFieldID); - if (field) { - #if CONSTRAIN_CLIPPING_REGION - BRegion clipRegion(destRect); - PushState(); - ConstrainClippingRegion(&clipRegion); - #endif - SetHighColor(fMasterView->Color(row->fNextSelected - ? B_COLOR_SELECTION_TEXT : B_COLOR_TEXT)); - float baseline = floor(destRect.top + fh.ascent - + (destRect.Height() + 1 - (fh.ascent + fh.descent)) / 2); - MovePenTo(destRect.left + 8, baseline); - column->DrawField(field, destRect, this); - #if CONSTRAIN_CLIPPING_REGION - PopState(); - #endif - } - - if (fFocusRow == row && !fEditMode && fMasterView->IsFocus() - && Window()->IsActive()) { - SetHighColor(fMasterView->Color(B_COLOR_ROW_DIVIDER)); - StrokeRect(BRect(0, destRect.top, 10000.0, destRect.bottom)); - } -#endif - } - } -} - - -void -OutlineView::Draw(BRect invalidBounds) -{ -#if SMART_REDRAW - BRegion invalidRegion; - GetClippingRegion(&invalidRegion); -#endif - - font_height fh; - GetFontHeight(&fh); - - float line = 0.0; - bool tintedLine = true; - int32 numColumns = fColumns->CountItems(); - for (RecursiveOutlineIterator iterator(&fRows); iterator.CurrentRow(); - iterator.GoToNext()) { - BRow* row = iterator.CurrentRow(); - if (line > invalidBounds.bottom) - break; - - tintedLine = !tintedLine; - float rowHeight = row->Height(); - - if (line > invalidBounds.top - rowHeight) { - bool isFirstColumn = true; - float fieldLeftEdge = MAX(kLeftMargin, fMasterView->LatchWidth()); - - // setup background color - rgb_color lowColor; - if (row->fNextSelected != 0) { - if (Window()->IsActive()) { - if (fEditMode) - lowColor = fMasterView->Color(B_COLOR_EDIT_BACKGROUND); - else - lowColor = fMasterView->Color(B_COLOR_SELECTION); - } - else - lowColor = fMasterView->Color(B_COLOR_NON_FOCUS_SELECTION); - } else - lowColor = fMasterView->Color(B_COLOR_BACKGROUND); - if (tintedLine) - lowColor = tint_color(lowColor, kTintedLineTint); - - for (int columnIndex = 0; columnIndex < numColumns; columnIndex++) { - BColumn* column = (BColumn*) fColumns->ItemAt(columnIndex); - if (!column->IsVisible()) - continue; - - if (!isFirstColumn && fieldLeftEdge > invalidBounds.right) - break; - - if (fieldLeftEdge + column->Width() >= invalidBounds.left) { - BRect fullRect(fieldLeftEdge, line, - fieldLeftEdge + column->Width(), line + rowHeight); - - bool clippedFirstColumn = false; - // This happens when a column is indented past the - // beginning of the next column. - - SetHighColor(lowColor); - - BRect destRect(fullRect); - if (isFirstColumn) { - fullRect.left -= fMasterView->LatchWidth(); - destRect.left += iterator.CurrentLevel() - * kOutlineLevelIndent; - if (destRect.left >= destRect.right) { - // clipped - FillRect(BRect(0, line, fieldLeftEdge - + column->Width(), line + rowHeight)); - clippedFirstColumn = true; - } - - FillRect(BRect(0, line, MAX(kLeftMargin, - fMasterView->LatchWidth()), line + row->Height())); - } - - -#if SMART_REDRAW - if (!clippedFirstColumn - && invalidRegion.Intersects(fullRect)) { -#else - if (!clippedFirstColumn) { -#endif - FillRect(fullRect); // Using color set above - - // Draw the latch widget if it has one. - if (isFirstColumn) { - if (row == fTargetRow - && fCurrentState == LATCH_CLICKED) { - // Note that this only occurs if the user is - // holding down a latch while items are added - // in the background. - BPoint pos; - uint32 buttons; - GetMouse(&pos, &buttons); - if (fLatchRect.Contains(pos)) { - fMasterView->DrawLatch(this, fLatchRect, - B_PRESSED_LATCH, fTargetRow); - } else { - fMasterView->DrawLatch(this, fLatchRect, - row->fIsExpanded ? B_OPEN_LATCH - : B_CLOSED_LATCH, fTargetRow); - } - } else { - LatchType pos = B_NO_LATCH; - if (row->HasLatch()) - pos = row->fIsExpanded ? B_OPEN_LATCH - : B_CLOSED_LATCH; - - fMasterView->DrawLatch(this, - BRect(destRect.left - - fMasterView->LatchWidth(), - destRect.top, destRect.left, - destRect.bottom), pos, row); - } - } - - SetHighColor(fMasterView->HighColor()); - // The master view just holds the high color for us. - SetLowColor(lowColor); - - BField* field = row->GetField(column->fFieldID); - if (field) { -#if CONSTRAIN_CLIPPING_REGION - BRegion clipRegion(destRect); - PushState(); - ConstrainClippingRegion(&clipRegion); -#endif - SetHighColor(fMasterView->Color( - row->fNextSelected ? B_COLOR_SELECTION_TEXT - : B_COLOR_TEXT)); - float baseline = floor(destRect.top + fh.ascent - + (destRect.Height() + 1 - - (fh.ascent+fh.descent)) / 2); - MovePenTo(destRect.left + 8, baseline); - column->DrawField(field, destRect, this); -#if CONSTRAIN_CLIPPING_REGION - PopState(); -#endif - } - } - } - - isFirstColumn = false; - fieldLeftEdge += column->Width() + 1; - } - - if (fieldLeftEdge <= invalidBounds.right) { - SetHighColor(lowColor); - FillRect(BRect(fieldLeftEdge, line, invalidBounds.right, - line + rowHeight)); - } - } - - // indicate the keyboard focus row - if (fFocusRow == row && !fEditMode && fMasterView->IsFocus() - && Window()->IsActive()) { - SetHighColor(fMasterView->Color(B_COLOR_ROW_DIVIDER)); - StrokeRect(BRect(0, line, 10000.0, line + rowHeight)); - } - - line += rowHeight + 1; - } - - if (line <= invalidBounds.bottom) { - // fill background below last item - SetHighColor(fMasterView->Color(B_COLOR_BACKGROUND)); - FillRect(BRect(invalidBounds.left, line, invalidBounds.right, - invalidBounds.bottom)); - } - - // Draw the drop target line - if (fDropHighlightY != -1) { - InvertRect(BRect(0, fDropHighlightY - kDropHighlightLineHeight / 2, - 1000000, fDropHighlightY + kDropHighlightLineHeight / 2)); - } -} - - -BRow* -OutlineView::FindRow(float ypos, int32* _rowIndent, float* _top) -{ - if (_rowIndent && _top) { - float line = 0.0; - for (RecursiveOutlineIterator iterator(&fRows); iterator.CurrentRow(); - iterator.GoToNext()) { - - BRow* row = iterator.CurrentRow(); - if (line > ypos) - break; - - float rowHeight = row->Height(); - if (ypos <= line + rowHeight) { - *_top = line; - *_rowIndent = iterator.CurrentLevel(); - return row; - } - - line += rowHeight + 1; - } - } - return NULL; -} - -void OutlineView::SetMouseTrackingEnabled(bool enabled) -{ - fTrackMouse = enabled; - if (!enabled && fDropHighlightY != -1) { - // Erase the old target line - InvertRect(BRect(0, fDropHighlightY - kDropHighlightLineHeight / 2, - 1000000, fDropHighlightY + kDropHighlightLineHeight / 2)); - fDropHighlightY = -1; - } -} - - -// -// Note that this interaction is not totally safe. If items are added to -// the list in the background, the widget rect will be incorrect, possibly -// resulting in drawing glitches. The code that adds items needs to be a little smarter -// about invalidating state. -// -void -OutlineView::MouseDown(BPoint position) -{ - if (!fEditMode) - fMasterView->MakeFocus(true); - - // Check to see if the user is clicking on a widget to open a section - // of the list. - bool reset_click_count = false; - int32 indent; - float rowTop; - BRow* row = FindRow(position.y, &indent, &rowTop); - if (row != NULL) { - - // Update fCurrentField - bool handle_field = false; - BField* new_field = 0; - BRow* new_row = 0; - BColumn* new_column = 0; - BRect new_rect; - - if (position.y >= 0) { - if (position.x >= 0) { - float x = 0; - for (int32 c = 0; c < fMasterView->CountColumns(); c++) { - new_column = fMasterView->ColumnAt(c); - if (!new_column->IsVisible()) - continue; - if ((MAX(kLeftMargin, fMasterView->LatchWidth()) + x) - + new_column->Width() >= position.x) { - if (new_column->WantsEvents()) { - new_field = row->GetField(c); - new_row = row; - FindRect(new_row,&new_rect); - new_rect.left = MAX(kLeftMargin, - fMasterView->LatchWidth()) + x; - new_rect.right = new_rect.left - + new_column->Width() - 1; - handle_field = true; - } - break; - } - x += new_column->Width(); - } - } - } - - // Handle mouse down - if (handle_field) { - fMouseDown = true; - fFieldRect = new_rect; - fCurrentColumn = new_column; - fCurrentRow = new_row; - fCurrentField = new_field; - fCurrentCode = B_INSIDE_VIEW; - fCurrentColumn->MouseDown(fMasterView, fCurrentRow, - fCurrentField, fFieldRect, position, 1); - } - - if (!fEditMode) { - - fTargetRow = row; - fTargetRowTop = rowTop; - FindVisibleRect(fFocusRow, &fFocusRowRect); - - float leftWidgetBoundry = indent * kOutlineLevelIndent - + MAX(kLeftMargin, fMasterView->LatchWidth()) - - fMasterView->LatchWidth(); - fLatchRect.Set(leftWidgetBoundry, rowTop, leftWidgetBoundry - + fMasterView->LatchWidth(), rowTop + row->Height()); - if (fLatchRect.Contains(position) && row->HasLatch()) { - fCurrentState = LATCH_CLICKED; - if (fTargetRow->fNextSelected != 0) - SetHighColor(fMasterView->Color(B_COLOR_SELECTION)); - else - SetHighColor(fMasterView->Color(B_COLOR_BACKGROUND)); - - FillRect(fLatchRect); - if (fLatchRect.Contains(position)) { - fMasterView->DrawLatch(this, fLatchRect, B_PRESSED_LATCH, - row); - } else { - fMasterView->DrawLatch(this, fLatchRect, - fTargetRow->fIsExpanded ? B_OPEN_LATCH - : B_CLOSED_LATCH, row); - } - } else { - Invalidate(fFocusRowRect); - fFocusRow = fTargetRow; - FindVisibleRect(fFocusRow, &fFocusRowRect); - - ASSERT(fTargetRow != 0); - - if ((modifiers() & B_CONTROL_KEY) == 0) - DeselectAll(); - - if ((modifiers() & B_SHIFT_KEY) != 0 && fFirstSelectedItem != 0 - && fSelectionMode == B_MULTIPLE_SELECTION_LIST) { - SelectRange(fFirstSelectedItem, fTargetRow); - } - else { - if (fTargetRow->fNextSelected != 0) { - // Unselect row - fTargetRow->fNextSelected->fPrevSelected - = fTargetRow->fPrevSelected; - fTargetRow->fPrevSelected->fNextSelected - = fTargetRow->fNextSelected; - fTargetRow->fPrevSelected = 0; - fTargetRow->fNextSelected = 0; - fFirstSelectedItem = NULL; - } else { - // Select row - if (fSelectionMode == B_SINGLE_SELECTION_LIST) - DeselectAll(); - - fTargetRow->fNextSelected - = fSelectionListDummyHead.fNextSelected; - fTargetRow->fPrevSelected - = &fSelectionListDummyHead; - fTargetRow->fNextSelected->fPrevSelected = fTargetRow; - fTargetRow->fPrevSelected->fNextSelected = fTargetRow; - fFirstSelectedItem = fTargetRow; - } - - Invalidate(BRect(fVisibleRect.left, fTargetRowTop, - fVisibleRect.right, - fTargetRowTop + fTargetRow->Height())); - } - - fCurrentState = ROW_CLICKED; - if (fLastSelectedItem != fTargetRow) - reset_click_count = true; - fLastSelectedItem = fTargetRow; - fMasterView->SelectionChanged(); - - } - } - - SetMouseEventMask(B_POINTER_EVENTS, B_LOCK_WINDOW_FOCUS | - B_NO_POINTER_HISTORY); - - } else if (fFocusRow != 0) { - // User clicked in open space, unhighlight focus row. - FindVisibleRect(fFocusRow, &fFocusRowRect); - fFocusRow = 0; - Invalidate(fFocusRowRect); - } - - // We stash the click counts here because the 'clicks' field - // is not in the CurrentMessage() when MouseUp is called... ;( - if (reset_click_count) - fClickCount = 1; - else - Window()->CurrentMessage()->FindInt32("clicks", &fClickCount); - fClickPoint = position; - -} - - -void -OutlineView::MouseMoved(BPoint position, uint32 /*transit*/, - const BMessage* /*dragMessage*/) -{ - if (!fMouseDown) { - // Update fCurrentField - bool handle_field = false; - BField* new_field = 0; - BRow* new_row = 0; - BColumn* new_column = 0; - BRect new_rect(0,0,0,0); - if (position.y >=0 ) { - float top; - int32 indent; - BRow* row = FindRow(position.y, &indent, &top); - if (row && position.x >=0 ) { - float x=0; - for (int32 c=0;cCountColumns();c++) { - new_column = fMasterView->ColumnAt(c); - if (!new_column->IsVisible()) - continue; - if ((MAX(kLeftMargin, - fMasterView->LatchWidth()) + x) + new_column->Width() - > position.x) { - - if(new_column->WantsEvents()) { - new_field = row->GetField(c); - new_row = row; - FindRect(new_row,&new_rect); - new_rect.left = MAX(kLeftMargin, - fMasterView->LatchWidth()) + x; - new_rect.right = new_rect.left - + new_column->Width() - 1; - handle_field = true; - } - break; - } - x += new_column->Width(); - } - } - } - - // Handle mouse moved - if (handle_field) { - if (new_field != fCurrentField) { - if (fCurrentField) { - fCurrentColumn->MouseMoved(fMasterView, fCurrentRow, - fCurrentField, fFieldRect, position, 0, - fCurrentCode = B_EXITED_VIEW); - } - fCurrentColumn = new_column; - fCurrentRow = new_row; - fCurrentField = new_field; - fFieldRect = new_rect; - if (fCurrentField) { - fCurrentColumn->MouseMoved(fMasterView, fCurrentRow, - fCurrentField, fFieldRect, position, 0, - fCurrentCode = B_ENTERED_VIEW); - } - } else { - if (fCurrentField) { - fCurrentColumn->MouseMoved(fMasterView, fCurrentRow, - fCurrentField, fFieldRect, position, 0, - fCurrentCode = B_INSIDE_VIEW); - } - } - } else { - if (fCurrentField) { - fCurrentColumn->MouseMoved(fMasterView, fCurrentRow, - fCurrentField, fFieldRect, position, 0, - fCurrentCode = B_EXITED_VIEW); - fCurrentField = 0; - fCurrentColumn = 0; - fCurrentRow = 0; - } - } - } else { - if (fCurrentField) { - if (fFieldRect.Contains(position)) { - if (fCurrentCode == B_OUTSIDE_VIEW - || fCurrentCode == B_EXITED_VIEW) { - fCurrentColumn->MouseMoved(fMasterView, fCurrentRow, - fCurrentField, fFieldRect, position, 1, - fCurrentCode = B_ENTERED_VIEW); - } else { - fCurrentColumn->MouseMoved(fMasterView, fCurrentRow, - fCurrentField, fFieldRect, position, 1, - fCurrentCode = B_INSIDE_VIEW); - } - } else { - if (fCurrentCode == B_INSIDE_VIEW - || fCurrentCode == B_ENTERED_VIEW) { - fCurrentColumn->MouseMoved(fMasterView, fCurrentRow, - fCurrentField, fFieldRect, position, 1, - fCurrentCode = B_EXITED_VIEW); - } else { - fCurrentColumn->MouseMoved(fMasterView, fCurrentRow, - fCurrentField, fFieldRect, position, 1, - fCurrentCode = B_OUTSIDE_VIEW); - } - } - } - } - - if (!fEditMode) { - - switch (fCurrentState) { - case LATCH_CLICKED: - if (fTargetRow->fNextSelected != 0) - SetHighColor(fMasterView->Color(B_COLOR_SELECTION)); - else - SetHighColor(fMasterView->Color(B_COLOR_BACKGROUND)); - - FillRect(fLatchRect); - if (fLatchRect.Contains(position)) { - fMasterView->DrawLatch(this, fLatchRect, B_PRESSED_LATCH, - fTargetRow); - } else { - fMasterView->DrawLatch(this, fLatchRect, - fTargetRow->fIsExpanded ? B_OPEN_LATCH : B_CLOSED_LATCH, - fTargetRow); - } - break; - - case ROW_CLICKED: - if (abs((int)(position.x - fClickPoint.x)) > kRowDragSensitivity - || abs((int)(position.y - fClickPoint.y)) - > kRowDragSensitivity) { - fCurrentState = DRAGGING_ROWS; - fMasterView->InitiateDrag(fClickPoint, - fTargetRow->fNextSelected != 0); - } - break; - - case DRAGGING_ROWS: -#if 0 - // falls through... -#else - if (fTrackMouse /*&& message*/) { - if (fVisibleRect.Contains(position)) { - float top; - int32 indent; - BRow* target = FindRow(position.y, &indent, &top); - if (target) - SetFocusRow(target, true); - } - } - break; -#endif - - default: { - - if (fTrackMouse /*&& message*/) { - // Draw a highlight line... - if (fVisibleRect.Contains(position)) { - float top; - int32 indent; - BRow* target = FindRow(position.y, &indent, &top); - if (target == fRollOverRow) - break; - if (fRollOverRow) { - BRect rect; - FindRect(fRollOverRow, &rect); - Invalidate(rect); - } - fRollOverRow = target; -#if 0 - SetFocusRow(fRollOverRow,false); -#else - PushState(); - SetDrawingMode(B_OP_BLEND); - SetHighColor(255, 255, 255, 255); - BRect rect; - FindRect(fRollOverRow, &rect); - rect.bottom -= 1.0; - FillRect(rect); - PopState(); -#endif - } else { - if (fRollOverRow) { - BRect rect; - FindRect(fRollOverRow, &rect); - Invalidate(rect); - fRollOverRow = NULL; - } - } - } - } - } - } -} - - -void -OutlineView::MouseUp(BPoint position) -{ - if (fCurrentField) { - fCurrentColumn->MouseUp(fMasterView, fCurrentRow, fCurrentField); - fMouseDown = false; - } - - if (fEditMode) - return; - - switch (fCurrentState) { - case LATCH_CLICKED: - if (fLatchRect.Contains(position)) { - fMasterView->ExpandOrCollapse(fTargetRow, - !fTargetRow->fIsExpanded); - } - - Invalidate(fLatchRect); - fCurrentState = INACTIVE; - break; - - case ROW_CLICKED: - if (fClickCount > 1 - && abs((int)fClickPoint.x - (int)position.x) - < kDoubleClickMoveSensitivity - && abs((int)fClickPoint.y - (int)position.y) - < kDoubleClickMoveSensitivity) { - fMasterView->ItemInvoked(); - } - fCurrentState = INACTIVE; - break; - - case DRAGGING_ROWS: - fCurrentState = INACTIVE; - // Falls through - - default: - if (fDropHighlightY != -1) { - InvertRect(BRect(0, - fDropHighlightY - kDropHighlightLineHeight / 2, - 1000000, fDropHighlightY + kDropHighlightLineHeight / 2)); - // Erase the old target line - fDropHighlightY = -1; - } - } -} - - -void -OutlineView::MessageReceived(BMessage* message) -{ - if (message->WasDropped()) { - fMasterView->MessageDropped(message, - ConvertFromScreen(message->DropPoint())); - } else { - BView::MessageReceived(message); - } -} - - -void -OutlineView::ChangeFocusRow(bool up, bool updateSelection, - bool addToCurrentSelection) -{ - int32 indent; - float top; - float newRowPos = 0; - float verticalScroll = 0; - - if (fFocusRow) { - // A row currently has the focus, get information about it - newRowPos = fFocusRowRect.top + (up ? -4 : fFocusRow->Height() + 4); - if (newRowPos < fVisibleRect.top + 20) - verticalScroll = newRowPos - 20; - else if (newRowPos > fVisibleRect.bottom - 20) - verticalScroll = newRowPos - fVisibleRect.Height() + 20; - } else - newRowPos = fVisibleRect.top + 2; - // no row is currently focused, set this to the top of the window - // so we will select the first visible item in the list. - - BRow* newRow = FindRow(newRowPos, &indent, &top); - if (newRow) { - if (fFocusRow) { - fFocusRowRect.right = 10000; - Invalidate(fFocusRowRect); - } - fFocusRow = newRow; - fFocusRowRect.top = top; - fFocusRowRect.left = 0; - fFocusRowRect.right = 10000; - fFocusRowRect.bottom = fFocusRowRect.top + fFocusRow->Height(); - Invalidate(fFocusRowRect); - - if (updateSelection) { - if (!addToCurrentSelection - || fSelectionMode == B_SINGLE_SELECTION_LIST) { - DeselectAll(); - } - - if (fFocusRow->fNextSelected == 0) { - fFocusRow->fNextSelected - = fSelectionListDummyHead.fNextSelected; - fFocusRow->fPrevSelected = &fSelectionListDummyHead; - fFocusRow->fNextSelected->fPrevSelected = fFocusRow; - fFocusRow->fPrevSelected->fNextSelected = fFocusRow; - } - - fLastSelectedItem = fFocusRow; - } - } else - Invalidate(fFocusRowRect); - - if (verticalScroll != 0) { - BScrollBar* vScrollBar = ScrollBar(B_VERTICAL); - float min, max; - vScrollBar->GetRange(&min, &max); - if (verticalScroll < min) - verticalScroll = min; - else if (verticalScroll > max) - verticalScroll = max; - - vScrollBar->SetValue(verticalScroll); - } - - if (newRow && updateSelection) - fMasterView->SelectionChanged(); -} - - -void -OutlineView::MoveFocusToVisibleRect() -{ - fFocusRow = 0; - ChangeFocusRow(true, true, false); -} - - -BRow* -OutlineView::CurrentSelection(BRow* lastSelected) const -{ - BRow* row; - if (lastSelected == 0) - row = fSelectionListDummyHead.fNextSelected; - else - row = lastSelected->fNextSelected; - - - if (row == &fSelectionListDummyHead) - row = 0; - - return row; -} - - -void -OutlineView::ToggleFocusRowSelection(bool selectRange) -{ - if (fFocusRow == 0) - return; - - if (selectRange && fSelectionMode == B_MULTIPLE_SELECTION_LIST) - SelectRange(fLastSelectedItem, fFocusRow); - else { - if (fFocusRow->fNextSelected != 0) { - // Unselect row - fFocusRow->fNextSelected->fPrevSelected = fFocusRow->fPrevSelected; - fFocusRow->fPrevSelected->fNextSelected = fFocusRow->fNextSelected; - fFocusRow->fPrevSelected = 0; - fFocusRow->fNextSelected = 0; - } else { - // Select row - if (fSelectionMode == B_SINGLE_SELECTION_LIST) - DeselectAll(); - - fFocusRow->fNextSelected = fSelectionListDummyHead.fNextSelected; - fFocusRow->fPrevSelected = &fSelectionListDummyHead; - fFocusRow->fNextSelected->fPrevSelected = fFocusRow; - fFocusRow->fPrevSelected->fNextSelected = fFocusRow; - } - } - - fLastSelectedItem = fFocusRow; - fMasterView->SelectionChanged(); - Invalidate(fFocusRowRect); -} - - -void -OutlineView::ToggleFocusRowOpen() -{ - if (fFocusRow) - fMasterView->ExpandOrCollapse(fFocusRow, !fFocusRow->fIsExpanded); -} - - -void -OutlineView::ExpandOrCollapse(BRow* parentRow, bool expand) -{ - // TODO: Could use CopyBits here to speed things up. - - if (parentRow == NULL) - return; - - if (parentRow->fIsExpanded == expand) - return; - - parentRow->fIsExpanded = expand; - - BRect parentRect; - if (FindRect(parentRow, &parentRect)) { - // Determine my new height - float subTreeHeight = 0.0; - if (parentRow->fIsExpanded) - for (RecursiveOutlineIterator iterator(parentRow->fChildList); - iterator.CurrentRow(); - iterator.GoToNext() - ) - { - subTreeHeight += iterator.CurrentRow()->Height()+1; - } - else - for (RecursiveOutlineIterator iterator(parentRow->fChildList); - iterator.CurrentRow(); - iterator.GoToNext() - ) - { - subTreeHeight -= iterator.CurrentRow()->Height()+1; - } - fItemsHeight += subTreeHeight; - - // Adjust focus row if necessary. - if (FindRect(fFocusRow, &fFocusRowRect) == false) { - // focus row is in a subtree that has collapsed, - // move it up to the parent. - fFocusRow = parentRow; - FindRect(fFocusRow, &fFocusRowRect); - } - - Invalidate(BRect(0, parentRect.top, fVisibleRect.right, - fVisibleRect.bottom)); - FixScrollBar(false); - } -} - -void -OutlineView::RemoveRow(BRow* row) -{ - if (row == NULL) - return; - - BRow* parentRow; - bool parentIsVisible; - float subTreeHeight = row->Height(); - if (FindParent(row, &parentRow, &parentIsVisible)) { - // adjust height - if (parentIsVisible && (parentRow == 0 || parentRow->fIsExpanded)) { - if (row->fIsExpanded) { - for (RecursiveOutlineIterator iterator(row->fChildList); - iterator.CurrentRow(); iterator.GoToNext()) - subTreeHeight += iterator.CurrentRow()->Height(); - } - } - } - if (parentRow) { - if (parentRow->fIsExpanded) - fItemsHeight -= subTreeHeight + 1; - } else { - fItemsHeight -= subTreeHeight + 1; - } - FixScrollBar(false); - if (parentRow) - parentRow->fChildList->RemoveItem(row); - else - fRows.RemoveItem(row); - - if (parentRow != 0 && parentRow->fChildList->CountItems() == 0) { - delete parentRow->fChildList; - parentRow->fChildList = 0; - if (parentIsVisible) - Invalidate(); // xxx crude way of redrawing latch - } - - if (parentIsVisible && (parentRow == 0 || parentRow->fIsExpanded)) - Invalidate(); // xxx make me smarter. - - - // Adjust focus row if necessary. - if (fFocusRow && FindRect(fFocusRow, &fFocusRowRect) == false) { - // focus row is in a subtree that is gone, move it up to the parent. - fFocusRow = parentRow; - if (fFocusRow) - FindRect(fFocusRow, &fFocusRowRect); - } - - // Remove this from the selection if necessary - if (row->fNextSelected != 0) { - row->fNextSelected->fPrevSelected = row->fPrevSelected; - row->fPrevSelected->fNextSelected = row->fNextSelected; - row->fPrevSelected = 0; - row->fNextSelected = 0; - fMasterView->SelectionChanged(); - } - - fCurrentColumn = 0; - fCurrentRow = 0; - fCurrentField = 0; -} - - -BRowContainer* -OutlineView::RowList() -{ - return &fRows; -} - - -void -OutlineView::UpdateRow(BRow* row) -{ - if (row) { - // Determine if this row has changed its sort order - BRow* parentRow = NULL; - bool parentIsVisible = false; - FindParent(row, &parentRow, &parentIsVisible); - - BRowContainer* list = (parentRow == NULL) ? &fRows : parentRow->fChildList; - - if(list) { - int32 rowIndex = list->IndexOf(row); - ASSERT(rowIndex >= 0); - ASSERT(list->ItemAt(rowIndex) == row); - - bool rowMoved = false; - if (rowIndex > 0 && CompareRows(list->ItemAt(rowIndex - 1), row) > 0) - rowMoved = true; - - if (rowIndex < list->CountItems() - 1 && CompareRows(list->ItemAt(rowIndex + 1), - row) < 0) - rowMoved = true; - - if (rowMoved) { - // Sort location of this row has changed. - // Remove and re-add in the right spot - SortList(list, parentIsVisible && (parentRow == NULL || parentRow->fIsExpanded)); - } else if (parentIsVisible && (parentRow == NULL || parentRow->fIsExpanded)) { - BRect invalidRect; - if (FindVisibleRect(row, &invalidRect)) - Invalidate(invalidRect); - } - } - } -} - - -void -OutlineView::AddRow(BRow* row, int32 Index, BRow* parentRow) -{ - if (!row) - return; - - row->fParent = parentRow; - - if (fMasterView->SortingEnabled()) { - // Ignore index here. - if (parentRow) { - if (parentRow->fChildList == NULL) - parentRow->fChildList = new BRowContainer; - - AddSorted(parentRow->fChildList, row); - } else - AddSorted(&fRows, row); - } else { - // Note, a -1 index implies add to end if sorting is not enabled - if (parentRow) { - if (parentRow->fChildList == 0) - parentRow->fChildList = new BRowContainer; - - if (Index < 0 || Index > parentRow->fChildList->CountItems()) - parentRow->fChildList->AddItem(row); - else - parentRow->fChildList->AddItem(row, Index); - } else { - if (Index < 0 || Index >= fRows.CountItems()) - fRows.AddItem(row); - else - fRows.AddItem(row, Index); - } - } - - if (parentRow == 0 || parentRow->fIsExpanded) - fItemsHeight += row->Height() + 1; - - FixScrollBar(false); - - BRect newRowRect; - bool newRowIsInOpenBranch = FindRect(row, &newRowRect); - - if (fFocusRow && fFocusRowRect.top > newRowRect.bottom) { - // The focus row has moved. - Invalidate(fFocusRowRect); - FindRect(fFocusRow, &fFocusRowRect); - Invalidate(fFocusRowRect); - } - - if (newRowIsInOpenBranch) { - if (fCurrentState == INACTIVE) { - if (newRowRect.bottom < fVisibleRect.top) { - // The new row is totally above the current viewport, move - // everything down and redraw the first line. - BRect source(fVisibleRect); - BRect dest(fVisibleRect); - source.bottom -= row->Height() + 1; - dest.top += row->Height() + 1; - CopyBits(source, dest); - Invalidate(BRect(fVisibleRect.left, fVisibleRect.top, fVisibleRect.right, - fVisibleRect.top + newRowRect.Height())); - } else if (newRowRect.top < fVisibleRect.bottom) { - // New item is somewhere in the current region. Scroll everything - // beneath it down and invalidate just the new row rect. - BRect source(fVisibleRect.left, newRowRect.top, fVisibleRect.right, - fVisibleRect.bottom - newRowRect.Height()); - BRect dest(source); - dest.OffsetBy(0, newRowRect.Height() + 1); - CopyBits(source, dest); - Invalidate(newRowRect); - } // otherwise, this is below the currently visible region - } else { - // Adding the item may have caused the item that the user is currently - // selected to move. This would cause annoying drawing and interaction - // bugs, as the position of that item is cached. If this happens, resize - // the scroll bar, then scroll back so the selected item is in view. - BRect targetRect; - if (FindRect(fTargetRow, &targetRect)) { - float delta = targetRect.top - fTargetRowTop; - if (delta != 0) { - // This causes a jump because ScrollBy will copy a chunk of the view. - // Since the actual contents of the view have been offset, we don't - // want this, we just want to change the virtual origin of the window. - // Constrain the clipping region so everything is clipped out so no - // copy occurs. - // - // xxx this currently doesn't work if the scroll bars aren't enabled. - // everything will still move anyway. A minor annoyance. - BRegion emptyRegion; - ConstrainClippingRegion(&emptyRegion); - PushState(); - ScrollBy(0, delta); - PopState(); - ConstrainClippingRegion(NULL); - - fTargetRowTop += delta; - fClickPoint.y += delta; - fLatchRect.OffsetBy(0, delta); - } - } - } - } - - // If the parent was previously childless, it will need to have a latch - // drawn. - BRect parentRect; - if (parentRow && parentRow->fChildList->CountItems() == 1 - && FindVisibleRect(parentRow, &parentRect)) - Invalidate(parentRect); -} - - -void -OutlineView::FixScrollBar(bool scrollToFit) -{ - BScrollBar* vScrollBar = ScrollBar(B_VERTICAL); - if (vScrollBar) { - if (fItemsHeight > fVisibleRect.Height()) { - float maxScrollBarValue = fItemsHeight - fVisibleRect.Height(); - vScrollBar->SetProportion(fVisibleRect.Height() / fItemsHeight); - - // If the user is scrolled down too far when makes the range smaller, the list - // will jump suddenly, which is undesirable. In this case, don't fix the scroll - // bar here. In ScrollTo, it checks to see if this has occured, and will - // fix the scroll bars sneakily if the user has scrolled up far enough. - if (scrollToFit || vScrollBar->Value() <= maxScrollBarValue) { - vScrollBar->SetRange(0.0, maxScrollBarValue); - vScrollBar->SetSteps(20.0, fVisibleRect.Height()); - } - } else if (vScrollBar->Value() == 0.0) - vScrollBar->SetRange(0.0, 0.0); // disable scroll bar. - } -} - - -void -OutlineView::AddSorted(BRowContainer* list, BRow* row) -{ - if (list && row) { - // Find general vicinity with binary search. - int32 lower = 0; - int32 upper = list->CountItems()-1; - while( lower < upper ) { - int32 middle = lower + (upper-lower+1)/2; - int32 cmp = CompareRows(row, list->ItemAt(middle)); - if( cmp < 0 ) upper = middle-1; - else if( cmp > 0 ) lower = middle+1; - else lower = upper = middle; - } - - // At this point, 'upper' and 'lower' at the last found item. - // Arbitrarily use 'upper' and determine the final insertion - // point -- either before or after this item. - if( upper < 0 ) upper = 0; - else if( upper < list->CountItems() ) { - if( CompareRows(row, list->ItemAt(upper)) > 0 ) upper++; - } - - if (upper >= list->CountItems()) - list->AddItem(row); // Adding to end. - else - list->AddItem(row, upper); // Insert - } -} - - -int32 -OutlineView::CompareRows(BRow* row1, BRow* row2) -{ - int32 itemCount (fSortColumns->CountItems()); - if (row1 && row2) { - for (int32 index = 0; index < itemCount; index++) { - BColumn* column = (BColumn*) fSortColumns->ItemAt(index); - int comp = 0; - BField* field1 = (BField*) row1->GetField(column->fFieldID); - BField* field2 = (BField*) row2->GetField(column->fFieldID); - if (field1 && field2) - comp = column->CompareFields(field1, field2); - - if (!column->fSortAscending) - comp = -comp; - - if (comp != 0) - return comp; - } - } - return 0; -} - - -void -OutlineView::FrameResized(float width, float height) -{ - fVisibleRect.right = fVisibleRect.left + width; - fVisibleRect.bottom = fVisibleRect.top + height; - FixScrollBar(true); - _inherited::FrameResized(width, height); -} - - -void -OutlineView::ScrollTo(BPoint position) -{ - fVisibleRect.OffsetTo(position.x, position.y); - - // In FixScrollBar, we might not have been able to change the size of - // the scroll bar because the user was scrolled down too far. Take - // this opportunity to sneak it in if we can. - BScrollBar* vScrollBar = ScrollBar(B_VERTICAL); - float maxScrollBarValue = fItemsHeight - fVisibleRect.Height(); - float min, max; - vScrollBar->GetRange(&min, &max); - if (max != maxScrollBarValue && position.y > maxScrollBarValue) - FixScrollBar(true); - - _inherited::ScrollTo(position); -} - - -const BRect& -OutlineView::VisibleRect() const -{ - return fVisibleRect; -} - - -bool -OutlineView::FindVisibleRect(BRow* row, BRect* _rect) -{ - if (row && _rect) { - float line = 0.0; - for (RecursiveOutlineIterator iterator(&fRows); iterator.CurrentRow(); - iterator.GoToNext()) { - if (line > fVisibleRect.bottom) - break; - - if (iterator.CurrentRow() == row) { - _rect->Set(fVisibleRect.left, line, fVisibleRect.right, - line + row->Height()); - return true; - } - - line += iterator.CurrentRow()->Height() + 1; - } - } - return false; -} - - -bool -OutlineView::FindRect(const BRow* row, BRect* _rect) -{ - float line = 0.0; - for (RecursiveOutlineIterator iterator(&fRows); iterator.CurrentRow(); - iterator.GoToNext()) { - if (iterator.CurrentRow() == row) { - _rect->Set(fVisibleRect.left, line, fVisibleRect.right, - line + row->Height()); - return true; - } - - line += iterator.CurrentRow()->Height() + 1; - } - - return false; -} - - -void -OutlineView::ScrollTo(const BRow* row) -{ - BRect rect; - if (FindRect(row, &rect)) { - BRect bounds = Bounds(); - if (rect.top < bounds.top) - ScrollTo(BPoint(bounds.left, rect.top)); - else if (rect.bottom > bounds.bottom) - ScrollBy(0, rect.bottom - bounds.bottom); - } -} - - -void -OutlineView::DeselectAll() -{ - // Invalidate all selected rows - float line = 0.0; - for (RecursiveOutlineIterator iterator(&fRows); iterator.CurrentRow(); - iterator.GoToNext()) { - if (line > fVisibleRect.bottom) - break; - - BRow* row = iterator.CurrentRow(); - if (line + row->Height() > fVisibleRect.top) { - if (row->fNextSelected != 0) - Invalidate(BRect(fVisibleRect.left, line, fVisibleRect.right, - line + row->Height())); - } - - line += row->Height() + 1; - } - - // Set items not selected - while (fSelectionListDummyHead.fNextSelected != &fSelectionListDummyHead) { - BRow* row = fSelectionListDummyHead.fNextSelected; - row->fNextSelected->fPrevSelected = row->fPrevSelected; - row->fPrevSelected->fNextSelected = row->fNextSelected; - row->fNextSelected = 0; - row->fPrevSelected = 0; - } -} - - -BRow* -OutlineView::FocusRow() const -{ - return fFocusRow; -} - - -void -OutlineView::SetFocusRow(BRow* row, bool Select) -{ - if (row) { - if (Select) - AddToSelection(row); - - if (fFocusRow == row) - return; - - Invalidate(fFocusRowRect); // invalidate previous - - fTargetRow = fFocusRow = row; - - FindVisibleRect(fFocusRow, &fFocusRowRect); - Invalidate(fFocusRowRect); // invalidate current - - fFocusRowRect.right = 10000; - fMasterView->SelectionChanged(); - } -} - - -bool -OutlineView::SortList(BRowContainer* list, bool isVisible) -{ - if (list) { - // Shellsort - BRow** items = (BRow**) list->AsBList()->Items(); - int32 numItems = list->CountItems(); - int h; - for (h = 1; h < numItems / 9; h = 3 * h + 1) - ; - - for (;h > 0; h /= 3) { - for (int step = h; step < numItems; step++) { - BRow* temp = items[step]; - int i; - for (i = step - h; i >= 0; i -= h) { - if (CompareRows(temp, items[i]) < 0) - items[i + h] = items[i]; - else - break; - } - - items[i + h] = temp; - } - } - - if (isVisible) { - Invalidate(); - - InvalidateCachedPositions(); - int lockCount = Window()->CountLocks(); - for (int i = 0; i < lockCount; i++) - Window()->Unlock(); - - while (lockCount--) - if (!Window()->Lock()) - return false; // Window is gone... - } - } - return true; -} - - -int32 -OutlineView::DeepSortThreadEntry(void* _outlineView) -{ - ((OutlineView*) _outlineView)->DeepSort(); - return 0; -} - - -void -OutlineView::DeepSort() -{ - struct stack_entry { - bool isVisible; - BRowContainer* list; - int32 listIndex; - } stack[kMaxDepth]; - int32 stackTop = 0; - - stack[stackTop].list = &fRows; - stack[stackTop].isVisible = true; - stack[stackTop].listIndex = 0; - fNumSorted = 0; - - if (Window()->Lock() == false) - return; - - bool doneSorting = false; - while (!doneSorting && !fSortCancelled) { - - stack_entry* currentEntry = &stack[stackTop]; - - // xxx Can make the invalidate area smaller by finding the rect for the - // parent item and using that as the top of the invalid rect. - - bool haveLock = SortList(currentEntry->list, currentEntry->isVisible); - if (!haveLock) - return ; // window is gone. - - // Fix focus rect. - InvalidateCachedPositions(); - if (fCurrentState != INACTIVE) - fCurrentState = INACTIVE; // sorry... - - // next list. - bool foundNextList = false; - while (!foundNextList && !fSortCancelled) { - for (int32 index = currentEntry->listIndex; index < currentEntry->list->CountItems(); - index++) { - BRow* parentRow = currentEntry->list->ItemAt(index); - BRowContainer* childList = parentRow->fChildList; - if (childList != 0) { - currentEntry->listIndex = index + 1; - stackTop++; - ASSERT(stackTop < kMaxDepth); - stack[stackTop].listIndex = 0; - stack[stackTop].list = childList; - stack[stackTop].isVisible = (currentEntry->isVisible && parentRow->fIsExpanded); - foundNextList = true; - break; - } - } - - if (!foundNextList) { - // back up - if (--stackTop < 0) { - doneSorting = true; - break; - } - - currentEntry = &stack[stackTop]; - } - } - } - - Window()->Unlock(); -} - - -void -OutlineView::StartSorting() -{ - // If this view is not yet attached to a window, don't start a sort thread! - if (Window() == NULL) - return; - - if (fSortThread != B_BAD_THREAD_ID) { - thread_info tinfo; - if (get_thread_info(fSortThread, &tinfo) == B_OK) { - // Unlock window so this won't deadlock (sort thread is probably - // waiting to lock window). - - int lockCount = Window()->CountLocks(); - for (int i = 0; i < lockCount; i++) - Window()->Unlock(); - - fSortCancelled = true; - int32 status; - wait_for_thread(fSortThread, &status); - - while (lockCount--) - if (!Window()->Lock()) - return ; // Window is gone... - } - } - - fSortCancelled = false; - fSortThread = spawn_thread(DeepSortThreadEntry, "sort_thread", B_NORMAL_PRIORITY, this); - resume_thread(fSortThread); -} - - -void -OutlineView::SelectRange(BRow* start, BRow* end) -{ - if (!start || !end) - return; - - if (start == end) // start is always selected when this is called - return; - - RecursiveOutlineIterator iterator(&fRows, false); - while (iterator.CurrentRow() != 0) { - if (iterator.CurrentRow() == end) { - // reverse selection, swap to fix special case - BRow* temp = start; - start = end; - end = temp; - break; - } else if (iterator.CurrentRow() == start) - break; - - iterator.GoToNext(); - } - - while (true) { - BRow* row = iterator.CurrentRow(); - if (row) { - if (row->fNextSelected == 0) { - row->fNextSelected = fSelectionListDummyHead.fNextSelected; - row->fPrevSelected = &fSelectionListDummyHead; - row->fNextSelected->fPrevSelected = row; - row->fPrevSelected->fNextSelected = row; - } - } else - break; - - if (row == end) - break; - - iterator.GoToNext(); - } - - Invalidate(); // xxx make invalidation smaller -} - - -bool -OutlineView::FindParent(BRow* row, BRow** outParent, bool* out_parentIsVisible) -{ - bool result = false; - if (row && outParent) { - *outParent = row->fParent; - - // Walk up the parent chain to determine if this row is visible - bool isVisible = true; - for (BRow* currentRow = row->fParent; currentRow; currentRow = currentRow->fParent) { - if (!currentRow->fIsExpanded) { - isVisible = false; - break; - } - } - - if (out_parentIsVisible) - *out_parentIsVisible = isVisible; - result = (NULL != *outParent); - } - - return result; -} - - -int32 -OutlineView::IndexOf(BRow* row) -{ - if (row) { - if (row->fParent == 0) - return fRows.IndexOf(row); - - ASSERT(row->fParent->fChildList); - return row->fParent->fChildList->IndexOf(row); - } - - return B_ERROR; -} - - -void -OutlineView::InvalidateCachedPositions() -{ - if (fFocusRow) - FindRect(fFocusRow, &fFocusRowRect); -} - - -float -OutlineView::GetColumnPreferredWidth(BColumn* column) -{ - float preferred = 0.0; - for (RecursiveOutlineIterator iterator(&fRows); iterator.CurrentRow(); - iterator.GoToNext()) { - BRow* row = iterator.CurrentRow(); - BField* field = row->GetField(column->fFieldID); - if (field) { - float width = column->GetPreferredWidth(field, this); - if (preferred < width) - preferred = width; - } - } - // Constrain to preferred width. This makes the method do a little - // more than asked, but it's for convenience. - if (preferred < column->MinWidth()) - preferred = column->MinWidth(); - else if (preferred > column->MaxWidth()) - preferred = column->MaxWidth(); - - return preferred; -} - - -// #pragma mark - - - -RecursiveOutlineIterator::RecursiveOutlineIterator(BRowContainer* list, - bool openBranchesOnly) - : - fStackIndex(0), - fCurrentListIndex(0), - fCurrentListDepth(0), - fOpenBranchesOnly(openBranchesOnly) -{ - if (list == 0 || list->CountItems() == 0) - fCurrentList = 0; - else - fCurrentList = list; -} - - -BRow* -RecursiveOutlineIterator::CurrentRow() const -{ - if (fCurrentList == 0) - return 0; - - return fCurrentList->ItemAt(fCurrentListIndex); -} - - -void -RecursiveOutlineIterator::GoToNext() -{ - if (fCurrentList == 0) - return; - if (fCurrentListIndex < 0 || fCurrentListIndex >= fCurrentList->CountItems()) { - fCurrentList = 0; - return; - } - - BRow* currentRow = fCurrentList->ItemAt(fCurrentListIndex); - if(currentRow) { - if (currentRow->fChildList && (currentRow->fIsExpanded || !fOpenBranchesOnly) - && currentRow->fChildList->CountItems() > 0) { - // Visit child. - // Put current list on the stack if it needs to be revisited. - if (fCurrentListIndex < fCurrentList->CountItems() - 1) { - fStack[fStackIndex].fRowSet = fCurrentList; - fStack[fStackIndex].fIndex = fCurrentListIndex + 1; - fStack[fStackIndex].fDepth = fCurrentListDepth; - fStackIndex++; - } - - fCurrentList = currentRow->fChildList; - fCurrentListIndex = 0; - fCurrentListDepth++; - } else if (fCurrentListIndex < fCurrentList->CountItems() - 1) - fCurrentListIndex++; // next item in current list - else if (--fStackIndex >= 0) { - fCurrentList = fStack[fStackIndex].fRowSet; - fCurrentListIndex = fStack[fStackIndex].fIndex; - fCurrentListDepth = fStack[fStackIndex].fDepth; - } else - fCurrentList = 0; - } -} - - -int32 -RecursiveOutlineIterator::CurrentLevel() const -{ - return fCurrentListDepth; -} - - diff --git a/src/column/ColumnListView.h b/src/column/ColumnListView.h deleted file mode 100644 index 6b9a800..0000000 --- a/src/column/ColumnListView.h +++ /dev/null @@ -1,409 +0,0 @@ -/* -Open Tracker License - -Terms and Conditions - -Copyright (c) 1991-2000, Be Incorporated. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice applies to all licensees -and shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF TITLE, MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -BE INCORPORATED BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of Be Incorporated shall not be -used in advertising or otherwise to promote the sale, use or other dealings in -this Software without prior written authorization from Be Incorporated. - -Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered trademarks -of Be Incorporated in the United States and other countries. Other brand product -names are registered trademarks or trademarks of their respective holders. -All rights reserved. -*/ - -/******************************************************************************* -/ -/ File: ColumnListView.h -/ -/ Description: Experimental multi-column list view. -/ -/ Copyright 2000+, Be Incorporated, All Rights Reserved -/ -*******************************************************************************/ - - -#ifndef _COLUMN_LIST_VIEW_H -#define _COLUMN_LIST_VIEW_H - -#include -#include -#include -#include -#include - -class BScrollBar; - -namespace BPrivate { - -class OutlineView; -class TitleView; -class BRowContainer; -class RecursiveOutlineIterator; - -} // ns BPrivate - -class BField; -class BRow; -class BColumn; -class BColumnListView; - -enum LatchType { - B_NO_LATCH = 0, - B_OPEN_LATCH = 1, - B_PRESSED_LATCH = 2, - B_CLOSED_LATCH = 3 -}; - -typedef enum { - B_ALLOW_COLUMN_NONE = 0, - B_ALLOW_COLUMN_MOVE = 1, - B_ALLOW_COLUMN_RESIZE = 2, - B_ALLOW_COLUMN_POPUP = 4, - B_ALLOW_COLUMN_REMOVE = 8 -} column_flags; - -enum ColumnListViewColor { - B_COLOR_BACKGROUND = 0, - B_COLOR_TEXT = 1, - B_COLOR_ROW_DIVIDER = 2, - B_COLOR_SELECTION = 3, - B_COLOR_SELECTION_TEXT = 4, - B_COLOR_NON_FOCUS_SELECTION = 5, - B_COLOR_EDIT_BACKGROUND = 6, - B_COLOR_EDIT_TEXT = 7, - B_COLOR_HEADER_BACKGROUND = 8, - B_COLOR_HEADER_TEXT = 9, - B_COLOR_SEPARATOR_LINE = 10, - B_COLOR_SEPARATOR_BORDER = 11, - - B_COLOR_TOTAL = 12 -}; - -enum ColumnListViewFont { - B_FONT_ROW = 0, - B_FONT_HEADER = 1, - - B_FONT_TOTAL = 2 -}; - - -// A single row/column intersection in the list. -class BField { -public: - BField(); - virtual ~BField(); -}; - -// A single line in the list. Each line contains a BField object -// for each column in the list, associated by their "logical field" -// index. Hierarchies are formed by adding other BRow objects as -// a parent of a row, using the AddRow() function in BColumnListView(). -class BRow { -public: - BRow(float height = 16.0); - virtual ~BRow(); - virtual bool HasLatch() const; - - int32 CountFields() const; - BField* GetField(int32 logicalFieldIndex); - const BField* GetField(int32 logicalFieldIndex) const; - void SetField(BField* field, - int32 logicalFieldIndex); - - float Height() const; - bool IsExpanded() const; - -private: - // Blows up into the debugger if the validation fails. - void ValidateFields() const; - void ValidateField(const BField* field, - int32 logicalFieldIndex) const; -private: - BList fFields; - BPrivate:: - BRowContainer* fChildList; - bool fIsExpanded; - float fHeight; - BRow* fNextSelected; - BRow* fPrevSelected; - BRow* fParent; - BColumnListView* fList; - - - friend class BColumnListView; - friend class BPrivate::RecursiveOutlineIterator; - friend class BPrivate::OutlineView; -}; - -// Information about a single column in the list. A column knows -// how to display the BField objects that occur at its location in -// each of the list's rows. See ColumnTypes.h for particular -// subclasses of BField and BColumn that handle common data types. -class BColumn { -public: - BColumn(float width, float minWidth, - float maxWidth, - alignment align = B_ALIGN_LEFT); - virtual ~BColumn(); - - float Width() const; - void SetWidth(float width); - float MinWidth() const; - float MaxWidth() const; - - virtual void DrawTitle(BRect rect, BView* targetView); - virtual void DrawField(BField* field, BRect rect, - BView* targetView); - virtual int CompareFields(BField* field1, BField* field2); - - virtual void MouseMoved(BColumnListView* parent, BRow* row, - BField* field, BRect fieldRect, - BPoint point, uint32 buttons, int32 code); - virtual void MouseDown(BColumnListView* parent, BRow* row, - BField* field, BRect fieldRect, - BPoint point, uint32 buttons); - virtual void MouseUp(BColumnListView* parent, BRow* row, - BField* field); - - virtual void GetColumnName(BString* into) const; - virtual float GetPreferredWidth(BField* field, - BView* parent) const; - - bool IsVisible() const; - void SetVisible(bool); - - bool WantsEvents() const; - void SetWantsEvents(bool); - - bool ShowHeading() const; - void SetShowHeading(bool); - - alignment Alignment() const; - void SetAlignment(alignment); - - int32 LogicalFieldNum() const; - - /*! - \param field The BField derivative to validate. - - Implement this function on your BColumn derivatives to validate - BField derivatives that your BColumn will be drawing/manipulating. - - This function will be called when BFields are added to the Column, - use dynamic_cast<> to determine if it is of a kind that your - BColumn know how ot handle. return false if it is not. - - \note The debugger will be called if you return false from here - with information about what type of BField and BColumn and the - logical field index where it occured. - - \note Do not call the inherited version of this, it just returns - true; - */ - virtual bool AcceptsField(const BField* field) const; - -private: - float fWidth; - float fMinWidth; - float fMaxWidth; - bool fVisible; - int32 fFieldID; - BColumnListView* fList; - bool fSortAscending; - bool fWantsEvents; - bool fShowHeading; - alignment fAlignment; - - friend class BPrivate::OutlineView; - friend class BColumnListView; - friend class BPrivate::TitleView; -}; - -// The column list view class. -class BColumnListView : public BView, public BInvoker { -public: - BColumnListView(BRect rect, - const char* name, uint32 resizingMode, - uint32 flags, border_style = B_NO_BORDER, - bool showHorizontalScrollbar = true); - BColumnListView(const char* name, - uint32 flags, border_style = B_NO_BORDER, - bool showHorizontalScrollbar = true); - virtual ~BColumnListView(); - - // Interaction - virtual bool InitiateDrag(BPoint, bool wasSelected); - virtual void MessageDropped(BMessage*, BPoint point); - virtual void ExpandOrCollapse(BRow* row, bool expand); - virtual status_t Invoke(BMessage* message = NULL); - virtual void ItemInvoked(); - virtual void SetInvocationMessage(BMessage* message); - BMessage* InvocationMessage() const; - uint32 InvocationCommand() const; - BRow* FocusRow() const; - void SetFocusRow(int32 index, bool select = false); - void SetFocusRow(BRow* row, bool select = false); - void SetMouseTrackingEnabled(bool); - - // Selection - list_view_type SelectionMode() const; - void Deselect(BRow* row); - void AddToSelection(BRow* row); - void DeselectAll(); - BRow* CurrentSelection(BRow* lastSelected = 0) const; - virtual void SelectionChanged(); - virtual void SetSelectionMessage(BMessage* message); - BMessage* SelectionMessage(); - uint32 SelectionCommand() const; - void SetSelectionMode(list_view_type type); - // list_view_type is defined in ListView.h. - - // Sorting - void SetSortingEnabled(bool); - bool SortingEnabled() const; - void SetSortColumn(BColumn* column, bool add, - bool ascending); - void ClearSortColumns(); - - // The status view is a little area in the lower left hand corner. - void AddStatusView(BView* view); - BView* RemoveStatusView(); - - // Column Manipulation - void AddColumn(BColumn* column, - int32 logicalFieldIndex); - void MoveColumn(BColumn* column, int32 index); - void RemoveColumn(BColumn* column); - int32 CountColumns() const; - BColumn* ColumnAt(int32 index) const; - BColumn* ColumnAt(BPoint point) const; - void SetColumnVisible(BColumn* column, - bool isVisible); - void SetColumnVisible(int32, bool); - bool IsColumnVisible(int32) const; - void SetColumnFlags(column_flags flags); - void ResizeColumnToPreferred(int32 index); - void ResizeAllColumnsToPreferred(); - - // Row manipulation - const BRow* RowAt(int32 index, BRow *parent = 0) const; - BRow* RowAt(int32 index, BRow *parent = 0); - const BRow* RowAt(BPoint) const; - BRow* RowAt(BPoint); - bool GetRowRect(const BRow* row, BRect* _rect) const; - bool FindParent(BRow* row, BRow** _parent, - bool *_isVisible) const; - int32 IndexOf(BRow* row); - int32 CountRows(BRow* parent = 0) const; - void AddRow(BRow* row, BRow* parent = NULL); - void AddRow(BRow* row, int32 index, - BRow* parent = NULL); - - void ScrollTo(const BRow* Row); - void ScrollTo(BPoint point); - - // Does not delete row or children at this time. - // todo: Make delete row and children - void RemoveRow(BRow* row); - - void UpdateRow(BRow* row); - void Clear(); - - // Appearance (DEPRECATED) - void GetFont(BFont* font) const - { BView::GetFont(font); } - virtual void SetFont(const BFont* font, - uint32 mask = B_FONT_ALL); - virtual void SetHighColor(rgb_color); - void SetSelectionColor(rgb_color); - void SetBackgroundColor(rgb_color); - void SetEditColor(rgb_color); - const rgb_color SelectionColor() const; - const rgb_color BackgroundColor() const; - const rgb_color EditColor() const; - - // Appearance (NEW STYLE) - void SetColor(ColumnListViewColor colorIndex, - rgb_color color); - void SetFont(ColumnListViewFont fontIndex, - const BFont* font, - uint32 mask = B_FONT_ALL); - rgb_color Color(ColumnListViewColor colorIndex) const; - void GetFont(ColumnListViewFont fontIndex, - BFont* font) const; - - BPoint SuggestTextPosition(const BRow* row, - const BColumn* column = NULL) const; - - void SetLatchWidth(float width); - float LatchWidth() const; - virtual void DrawLatch(BView* view, BRect frame, - LatchType type, BRow* row); - virtual void MakeFocus(bool isfocus = true); - void SaveState(BMessage* archive); - void LoadState(BMessage* archive); - - BView* ScrollView() const - { return (BView*)fOutlineView; } - void SetEditMode(bool state); - void Refresh(); - - virtual BSize MinSize(); - virtual BSize PreferredSize(); - virtual BSize MaxSize(); - - virtual void InvalidateLayout(bool descendants = false); - -protected: - virtual void MessageReceived(BMessage* message); - virtual void KeyDown(const char* bytes, int32 numBytes); - virtual void AttachedToWindow(); - virtual void WindowActivated(bool active); - virtual void Draw(BRect updateRect); - - virtual void DoLayout(); - -private: - void _Init(bool showHorizontalScrollbar); - void _GetChildViewRects(const BRect& bounds, - bool showHorizontalScrollBar, - BRect& titleRect, BRect& outlineRect, - BRect& vScrollBarRect, - BRect& hScrollBarRect); - - rgb_color fColorList[B_COLOR_TOTAL]; - BPrivate::TitleView* fTitleView; - BPrivate::OutlineView* fOutlineView; - BList fColumns; - BScrollBar* fHorizontalScrollBar; - BScrollBar* fVerticalScrollBar; - BList fSortColumns; - BView* fStatusView; - BMessage* fSelectionMessage; - bool fSortingEnabled; - float fLatchWidth; - border_style fBorderStyle; -}; - -#endif // _COLUMN_LIST_VIEW_H diff --git a/src/column/ColumnTypes.cpp b/src/column/ColumnTypes.cpp deleted file mode 100644 index f5efb23..0000000 --- a/src/column/ColumnTypes.cpp +++ /dev/null @@ -1,704 +0,0 @@ -/* -Open Tracker License - -Terms and Conditions - -Copyright (c) 1991-2000, Be Incorporated. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice applies to all licensees -and shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF TITLE, MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -BE INCORPORATED BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of Be Incorporated shall not be -used in advertising or otherwise to promote the sale, use or other dealings in -this Software without prior written authorization from Be Incorporated. - -Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered trademarks -of Be Incorporated in the United States and other countries. Other brand product -names are registered trademarks or trademarks of their respective holders. -All rights reserved. -*/ - -/******************************************************************************* -/ -/ File: ColumnTypes.h -/ -/ Description: Experimental classes that implement particular column/field -/ data types for use in BColumnListView. -/ -/ Copyright 2000+, Be Incorporated, All Rights Reserved -/ -*******************************************************************************/ - -#include "ColumnTypes.h" -#include -#include -#include - -#define kTEXT_MARGIN 8 - - -//===================================================================== - -BTitledColumn::BTitledColumn(const char* title, float width, float minWidth, - float maxWidth, alignment align) - :BColumn(width, minWidth, maxWidth, align), - fTitle(title) -{ - font_height fh; - - be_plain_font->GetHeight(&fh); - fFontHeight = fh.descent + fh.leading; -} - - -//-------------------------------------------------------------------- - -void BTitledColumn::DrawTitle(BRect rect, BView* parent) -{ - float width = rect.Width() - (2 * kTEXT_MARGIN); - BString out_string(fTitle); - - parent->TruncateString(&out_string, B_TRUNCATE_END, width + 2); - DrawString(out_string.String(), parent, rect); -} - - -//-------------------------------------------------------------------- - -void BTitledColumn::GetColumnName(BString* into) const -{ - *into = fTitle; -} - - -//-------------------------------------------------------------------- - -void BTitledColumn::DrawString(const char* string, BView* parent, BRect rect) -{ - float width = rect.Width() - (2 * kTEXT_MARGIN); - float y; - BFont font; - font_height finfo; - - parent->GetFont(&font); - font.GetHeight(&finfo); - y = rect.top + ((rect.Height() - (finfo.ascent + finfo.descent + finfo.leading)) / 2) + - (finfo.ascent + finfo.descent) - 2; - - switch (Alignment()) - { - case B_ALIGN_LEFT: - parent->MovePenTo(rect.left + kTEXT_MARGIN, y); - break; - - case B_ALIGN_CENTER: - parent->MovePenTo(rect.left + kTEXT_MARGIN + ((width - font.StringWidth(string)) / 2), y); - break; - - case B_ALIGN_RIGHT: - parent->MovePenTo(rect.right - kTEXT_MARGIN - font.StringWidth(string), y); - break; - } - parent->DrawString(string); -} - - -//-------------------------------------------------------------------- - -void BTitledColumn::SetTitle(const char* title) -{ - fTitle.SetTo(title); -} - - -//-------------------------------------------------------------------- - -void BTitledColumn::Title(BString* forTitle) const -{ - if (forTitle) - forTitle->SetTo(fTitle.String()); -} - - -//-------------------------------------------------------------------- - -float BTitledColumn::FontHeight() const -{ - return fFontHeight; -} - -// #pragma mark - - -//===================================================================== - -BStringField::BStringField(const char* string) - :fWidth(0), - fString(string), - fClippedString(string) -{ -} - - -//-------------------------------------------------------------------- - -void BStringField::SetString(const char* val) -{ - fString = val; - fClippedString = ""; - fWidth = 0; -} - - -//-------------------------------------------------------------------- - -const char* BStringField::String() const -{ - return fString.String(); -} - - -//-------------------------------------------------------------------- - -void BStringField::SetWidth(float width) -{ - fWidth = width; -} - -//-------------------------------------------------------------------- - -float BStringField::Width() -{ - return fWidth; -} - - -//-------------------------------------------------------------------- - -void BStringField::SetClippedString(const char* val) -{ - fClippedString = val; -} - - -//-------------------------------------------------------------------- - -const char* BStringField::ClippedString() -{ - return fClippedString.String(); -} - - - -// #pragma mark - - -//===================================================================== - -BStringColumn::BStringColumn(const char* title, float width, float minWidth, - float maxWidth, uint32 truncate, alignment align) - :BTitledColumn(title, width, minWidth, maxWidth, align), - fTruncate(truncate) -{ -} - - -//-------------------------------------------------------------------- - -void BStringColumn::DrawField(BField* _field, BRect rect, BView* parent) -{ - float width = rect.Width() - (2 * kTEXT_MARGIN); - BStringField* field = static_cast(_field); - - if (width != field->Width()) - { - BString out_string(field->String()); - - parent->TruncateString(&out_string, fTruncate, width + 2); - field->SetClippedString(out_string.String()); - field->SetWidth(width); - } - DrawString(field->ClippedString(), parent, rect); -} - - -//-------------------------------------------------------------------- - -int BStringColumn::CompareFields(BField* field1, BField* field2) -{ - return(ICompare(((BStringField*)field1)->String(), - (((BStringField*)field2)->String()))); -} - - -//-------------------------------------------------------------------- - -bool BStringColumn::AcceptsField(const BField *field) const -{ - return static_cast(dynamic_cast(field)); -} - - -// #pragma mark - - -//===================================================================== - -BDateField::BDateField(time_t *t) - :fTime(*localtime(t)), - fUnixTime(*t), - fSeconds(0), - fClippedString(""), - fWidth(0) -{ - fSeconds = mktime(&fTime); -} - - -//-------------------------------------------------------------------- - -void BDateField::SetWidth(float width) -{ - fWidth = width; -} - - -//-------------------------------------------------------------------- - -float BDateField::Width() -{ - return fWidth; -} - - -//-------------------------------------------------------------------- - -void BDateField::SetClippedString(const char* val) -{ - fClippedString = val; -} - - -//-------------------------------------------------------------------- - -const char* BDateField::ClippedString() -{ - return fClippedString.String(); -} - - -//-------------------------------------------------------------------- - -time_t BDateField::Seconds() -{ - return fSeconds; -} - - -//-------------------------------------------------------------------- - -time_t BDateField::UnixTime() -{ - return fUnixTime; -} - -// #pragma mark - - -//===================================================================== - -BDateColumn::BDateColumn(const char* title, float width, float minWidth, - float maxWidth, alignment align) - :BTitledColumn(title, width, minWidth, maxWidth, align), - fTitle(title) -{ -} - - -//-------------------------------------------------------------------- - -const char *kTIME_FORMATS[] = { - "%A, %B %d %Y, %I:%M:%S %p", // Monday, July 09 1997, 05:08:15 PM - "%a, %b %d %Y, %I:%M:%S %p", // Mon, Jul 09 1997, 05:08:15 PM - "%a, %b %d %Y, %I:%M %p", // Mon, Jul 09 1997, 05:08 PM - "%b %d %Y, %I:%M %p", // Jul 09 1997, 05:08 PM - "%m/%d/%y, %I:%M %p", // 07/09/97, 05:08 PM - "%m/%d/%y", // 07/09/97 - NULL -}; - -void BDateColumn::DrawField(BField* _field, BRect rect, BView* parent) -{ - float width = rect.Width() - (2 * kTEXT_MARGIN); - BDateField* field = (BDateField*)_field; - - if (field->Width() != rect.Width()) - { - char dateString[256]; - time_t curtime = field->UnixTime(); - tm time_data; - BFont font; - - parent->GetFont(&font); - localtime_r(&curtime, &time_data); - for (int32 index = 0; ; index++) - { - if (!kTIME_FORMATS[index]) - break; - strftime(dateString, 256, kTIME_FORMATS[index], &time_data); - if (font.StringWidth(dateString) <= width) - break; - } - - if (font.StringWidth(dateString) > width) - { - BString out_string(dateString); - - parent->TruncateString(&out_string, B_TRUNCATE_MIDDLE, width + 2); - strcpy(dateString, out_string.String()); - } - field->SetClippedString(dateString); - field->SetWidth(width); - } - - DrawString(field->ClippedString(), parent, rect); -} - - -//-------------------------------------------------------------------- - -int BDateColumn::CompareFields(BField* field1, BField* field2) -{ - return((BDateField*)field1)->Seconds() - ((BDateField*)field2)->Seconds(); -} - -// #pragma mark - - -//===================================================================== - -BSizeField::BSizeField(off_t size) - :fSize(size) -{ -} - - -//-------------------------------------------------------------------- - -void BSizeField::SetSize(off_t size) -{ - fSize = size; -} - - -//-------------------------------------------------------------------- - -off_t BSizeField::Size() -{ - return fSize; -} - -// #pragma mark - - -//===================================================================== - -BSizeColumn::BSizeColumn(const char* title, float width, float minWidth, - float maxWidth, alignment align) - :BTitledColumn(title, width, minWidth, maxWidth, align) -{ -} - - -//-------------------------------------------------------------------- - -const int64 kKB_SIZE = 1024; -const int64 kMB_SIZE = 1048576; -const int64 kGB_SIZE = 1073741824; -const int64 kTB_SIZE = kGB_SIZE * kKB_SIZE; - -const char *kSIZE_FORMATS[] = { - "%.2f %s", - "%.1f %s", - "%.f %s", - "%.f%s", - 0 -}; - -void BSizeColumn::DrawField(BField* _field, BRect rect, BView* parent) -{ - char str[256]; - float width = rect.Width() - (2 * kTEXT_MARGIN); - BFont font; - BString string; - off_t size = ((BSizeField*)_field)->Size(); - - parent->GetFont(&font); - if (size < kKB_SIZE) - { - sprintf(str, "%Ld bytes", size); - if (font.StringWidth(str) > width) - sprintf(str, "%Ld B", size); - } - else - { - const char* suffix; - float float_value; - if (size >= kTB_SIZE) - { - suffix = "TB"; - float_value = (float)size / kTB_SIZE; - } - else if (size >= kGB_SIZE) - { - suffix = "GB"; - float_value = (float)size / kGB_SIZE; - } - else if (size >= kMB_SIZE) - { - suffix = "MB"; - float_value = (float)size / kMB_SIZE; - } - else - { - suffix = "KB"; - float_value = (float)size / kKB_SIZE; - } - - for (int32 index = 0; ; index++) - { - if (!kSIZE_FORMATS[index]) - break; - - sprintf(str, kSIZE_FORMATS[index], float_value, suffix); - // strip off an insignificant zero so we don't get readings - // such as 1.00 - char *period = 0; - char *tmp (NULL); - for (tmp = str; *tmp; tmp++) - { - if (*tmp == '.') - period = tmp; - } - if (period && period[1] && period[2] == '0') - // move the rest of the string over the insignificant zero - for (tmp = &period[2]; *tmp; tmp++) - *tmp = tmp[1]; - if (font.StringWidth(str) <= width) - break; - } - } - - - string = str; - parent->TruncateString(&string, B_TRUNCATE_MIDDLE, width + 2); - DrawString(string.String(), parent, rect); -} - - -//-------------------------------------------------------------------- - -int BSizeColumn::CompareFields(BField* field1, BField* field2) -{ - return ((BSizeField*)field1)->Size() - ((BSizeField*)field2)->Size(); -} - -// #pragma mark - - -//===================================================================== - -BIntegerField::BIntegerField(int32 number) - :fInteger(number) -{ -} - - -//-------------------------------------------------------------------- - -void BIntegerField::SetValue(int32 value) -{ - fInteger = value; -} - - -//-------------------------------------------------------------------- - -int32 BIntegerField::Value() -{ - return fInteger; -} - -// #pragma mark - - -//===================================================================== - -BIntegerColumn::BIntegerColumn(const char* title, float width, float minWidth, - float maxWidth, alignment align) - :BTitledColumn(title, width, minWidth, maxWidth, align) -{ -} - - -//-------------------------------------------------------------------- - -void BIntegerColumn::DrawField(BField *field, BRect rect, BView* parent) -{ - char formatted[256]; - float width = rect.Width() - (2 * kTEXT_MARGIN); - BString string; - - sprintf(formatted, "%d", (int)((BIntegerField*)field)->Value()); - - string = formatted; - parent->TruncateString(&string, B_TRUNCATE_MIDDLE, width + 2); - DrawString(string.String(), parent, rect); -} - - -//-------------------------------------------------------------------- - -int BIntegerColumn::CompareFields(BField *field1, BField *field2) -{ - return (((BIntegerField*)field1)->Value() - ((BIntegerField*)field2)->Value()); -} - -// #pragma mark - - -//===================================================================== - -GraphColumn::GraphColumn(const char* name, float width, float minWidth, - float maxWidth, alignment align) - :BIntegerColumn(name, width, minWidth, maxWidth, align) -{ -} - - -//-------------------------------------------------------------------- - -void GraphColumn::DrawField(BField* field, BRect rect, BView* parent) -{ - int number = ((BIntegerField*)field)->Value(); - - if (number > 100) - number = 100; - else if (number < 0) - number = 0; - - BRect graphRect(rect); - graphRect.InsetBy(5, 3); - parent->StrokeRect(graphRect); - if (number > 0) { - graphRect.InsetBy(1, 1); - float val = graphRect.Width() * (float) number / 100; - graphRect.right = graphRect.left + val; - parent->SetHighColor(0, 0, 190); - parent->FillRect(graphRect); - } - - parent->SetDrawingMode(B_OP_INVERT); - parent->SetHighColor(128, 128, 128); - char numstr[256]; - sprintf(numstr, "%d%%", number); - - float width = be_plain_font->StringWidth(numstr); - parent->MovePenTo(rect.left + rect.Width() / 2 - width / 2, rect.bottom - FontHeight()); - parent->DrawString(numstr); -} - -// #pragma mark - - -//===================================================================== - -BBitmapField::BBitmapField(BBitmap *bitmap) - :fBitmap(bitmap) -{ -} - - -//-------------------------------------------------------------------- - -const BBitmap* BBitmapField::Bitmap() -{ - return fBitmap; -} - -//-------------------------------------------------------------------- - -void BBitmapField::SetBitmap(BBitmap* bitmap) -{ - fBitmap = bitmap; -} - -// #pragma mark - - -//===================================================================== - -BBitmapColumn::BBitmapColumn(const char* title, float width, float minWidth, - float maxWidth, alignment align) - :BTitledColumn(title, width, minWidth, maxWidth, align) -{ -} - - -//-------------------------------------------------------------------- - -void BBitmapColumn::DrawField(BField* field, BRect rect, BView* parent) -{ - BBitmapField *bitmapField = static_cast(field); - const BBitmap *bitmap = bitmapField->Bitmap(); - - if (bitmap != NULL) - { - float x = 0.0; - float y; - BRect r = bitmap->Bounds(); - - y = rect.top + ((rect.Height() - r.Height()) / 2); - - switch (Alignment()) - { - case B_ALIGN_LEFT: - x = rect.left + kTEXT_MARGIN; - break; - - case B_ALIGN_CENTER: - x = rect.left + ((rect.Width() - r.Width()) / 2); - break; - - case B_ALIGN_RIGHT: - x = rect.right - kTEXT_MARGIN - r.Width(); - break; - } - parent->SetDrawingMode(B_OP_ALPHA); - parent->DrawBitmap(bitmap, BPoint(x, y)); - parent->SetDrawingMode(B_OP_OVER); - } -} - - -//-------------------------------------------------------------------- - -int BBitmapColumn::CompareFields(BField* /*field1*/, BField* /*field2*/) -{ - // Comparing bitmaps doesn't really make sense... - return 0; -} - - -//-------------------------------------------------------------------- - -bool -BBitmapColumn::AcceptsField(const BField *field) const -{ - return static_cast(dynamic_cast(field)); -} - - diff --git a/src/column/ColumnTypes.h b/src/column/ColumnTypes.h deleted file mode 100644 index 9598c10..0000000 --- a/src/column/ColumnTypes.h +++ /dev/null @@ -1,289 +0,0 @@ -/* -Open Tracker License - -Terms and Conditions - -Copyright (c) 1991-2000, Be Incorporated. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice applies to all licensees -and shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF TITLE, MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -BE INCORPORATED BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of Be Incorporated shall not be -used in advertising or otherwise to promote the sale, use or other dealings in -this Software without prior written authorization from Be Incorporated. - -Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered trademarks -of Be Incorporated in the United States and other countries. Other brand product -names are registered trademarks or trademarks of their respective holders. -All rights reserved. -*/ - -/******************************************************************************* -/ -/ File: ColumnTypes.h -/ -/ Description: Experimental classes that implement particular column/field -/ data types for use in BColumnListView. -/ -/ Copyright 2000+, Be Incorporated, All Rights Reserved -/ -*******************************************************************************/ - - -#ifndef _COLUMN_TYPES_H -#define _COLUMN_TYPES_H - -#include "ColumnListView.h" -#include -#include -#include - - -//===================================================================== -// Common base-class: a column that draws a standard title at its top. - -class BTitledColumn : public BColumn -{ - public: - BTitledColumn (const char *title, - float width, - float minWidth, - float maxWidth, - alignment align = B_ALIGN_LEFT); - virtual void DrawTitle (BRect rect, - BView* parent); - virtual void GetColumnName (BString* into) const; - - void DrawString (const char*, - BView*, - BRect); - void SetTitle (const char* title); - void Title (BString* forTitle) const; // sets the BString arg to be the title - float FontHeight () const; - - private: - float fFontHeight; - BString fTitle; -}; - - -//===================================================================== -// Field and column classes for strings. - -class BStringField : public BField -{ - public: - BStringField (const char* string); - - void SetString (const char* string); - const char* String () const; - void SetClippedString (const char* string); - const char* ClippedString (); - void SetWidth (float); - float Width (); - - private: - float fWidth; - BString fString; - BString fClippedString; -}; - - -//-------------------------------------------------------------------- - -class BStringColumn : public BTitledColumn -{ - public: - BStringColumn (const char *title, - float width, - float maxWidth, - float minWidth, - uint32 truncate, - alignment align = B_ALIGN_LEFT); - virtual void DrawField (BField* field, - BRect rect, - BView* parent); - virtual int CompareFields (BField* field1, - BField* field2); - virtual bool AcceptsField (const BField* field) const; - - - private: - uint32 fTruncate; -}; - - -//===================================================================== -// Field and column classes for dates. - -class BDateField : public BField -{ - public: - BDateField (time_t* t); - void SetWidth (float); - float Width (); - void SetClippedString (const char*); - const char* ClippedString (); - time_t Seconds (); - time_t UnixTime (); - - private: - struct tm fTime; - time_t fUnixTime; - time_t fSeconds; - BString fClippedString; - float fWidth; -}; - - -//-------------------------------------------------------------------- - -class BDateColumn : public BTitledColumn -{ - public: - BDateColumn (const char* title, - float width, - float minWidth, - float maxWidth, - alignment align = B_ALIGN_LEFT); - virtual void DrawField (BField* field, - BRect rect, - BView* parent); - virtual int CompareFields (BField* field1, - BField* field2); - private: - BString fTitle; -}; - - -//===================================================================== -// Field and column classes for numeric sizes. - -class BSizeField : public BField -{ - public: - BSizeField (off_t size); - void SetSize (off_t); - off_t Size (); - - private: - off_t fSize; -}; - - -//-------------------------------------------------------------------- - -class BSizeColumn : public BTitledColumn -{ - public: - BSizeColumn (const char* title, - float width, - float minWidth, - float maxWidth, - alignment align = B_ALIGN_LEFT); - virtual void DrawField (BField* field, - BRect rect, - BView* parent); - virtual int CompareFields (BField* field1, - BField* field2); -}; - - -//===================================================================== -// Field and column classes for integers. - -class BIntegerField : public BField -{ - public: - BIntegerField (int32 number); - void SetValue (int32); - int32 Value (); - - private: - int32 fInteger; -}; - - -//-------------------------------------------------------------------- - -class BIntegerColumn : public BTitledColumn -{ - public: - BIntegerColumn (const char* title, - float width, - float minWidth, - float maxWidth, - alignment align = B_ALIGN_LEFT); - virtual void DrawField (BField* field, - BRect rect, - BView* parent); - virtual int CompareFields (BField* field1, - BField* field2); -}; - - -//===================================================================== -// Field and column classes for bitmaps - -class BBitmapField : public BField -{ - public: - BBitmapField (BBitmap* bitmap); - const BBitmap* Bitmap (); - void SetBitmap (BBitmap* bitmap); - - private: - BBitmap* fBitmap; -}; - - -//-------------------------------------------------------------------- - -class BBitmapColumn : public BTitledColumn -{ - public: - BBitmapColumn (const char* title, - float width, - float minWidth, - float maxWidth, - alignment align = B_ALIGN_LEFT); - virtual void DrawField (BField*field, - BRect rect, - BView* parent); - virtual int CompareFields (BField* field1, BField* field2); - virtual bool AcceptsField (const BField* field) const; -}; - - -//===================================================================== -// Column to display BIntegerField objects as a graph. - -class GraphColumn : public BIntegerColumn -{ - public: - GraphColumn (const char* name, - float width, - float minWidth, - float maxWidth, - alignment align = B_ALIGN_LEFT); - virtual void DrawField (BField*field, - BRect rect, - BView* parent); -}; - -#endif - diff --git a/src/column/ObjectList.h b/src/column/ObjectList.h deleted file mode 100644 index afb93d8..0000000 --- a/src/column/ObjectList.h +++ /dev/null @@ -1,800 +0,0 @@ -/* -Open Tracker License - -Terms and Conditions - -Copyright (c) 1991-2000, Be Incorporated. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice applies to all licensees -and shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF TITLE, MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -BE INCORPORATED BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of Be Incorporated shall not be -used in advertising or otherwise to promote the sale, use or other dealings in -this Software without prior written authorization from Be Incorporated. - -Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered trademarks -of Be Incorporated in the United States and other countries. Other brand product -names are registered trademarks or trademarks of their respective holders. -All rights reserved. -*/ - -/**************************************************************************** -** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING ** -** ** -** DANGER, WILL ROBINSON! ** -** ** -** The interfaces contained here are part of BeOS's ** -** ** -** >> PRIVATE NOT FOR PUBLIC USE << ** -** ** -** implementation. ** -** ** -** These interfaces WILL CHANGE in future releases. ** -** If you use them, your app WILL BREAK at some future time. ** -** ** -** (And yes, this does mean that binaries built from OpenTracker will not ** -** be compatible with some future releases of the OS. When that happens, ** -** we will provide an updated version of this file to keep compatibility.) ** -** ** -** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING ** -****************************************************************************/ - -// -// ObjectList is a wrapper around BList that adds type safety, -// optional object ownership, search, insert operations, etc. -// - -#ifndef __OBJECT_LIST__ -#define __OBJECT_LIST__ - -#ifndef _BE_H -#include -#endif - -#include - -template class BObjectList; - -template -struct UnaryPredicate { - - virtual int operator()(const T *) const - // virtual could be avoided here if FindBinaryInsertionIndex, - // etc. were member template functions - { return 0; } - -private: - static int _unary_predicate_glue(const void *item, void *context); - -friend class BObjectList; -}; - -template -int -UnaryPredicate::_unary_predicate_glue(const void *item, void *context) -{ - return ((UnaryPredicate *)context)->operator()((const T *)item); -} - - -class _PointerList_ : public BList { -public: - _PointerList_(const _PointerList_ &list); - _PointerList_(int32 itemsPerBlock = 20, bool owning = false); - ~_PointerList_(); - - typedef void *(* GenericEachFunction)(void *, void *); - typedef int (* GenericCompareFunction)(const void *, const void *); - typedef int (* GenericCompareFunctionWithState)(const void *, const void *, - void *); - typedef int (* UnaryPredicateGlue)(const void *, void *); - - void *EachElement(GenericEachFunction, void *); - void SortItems(GenericCompareFunction); - void SortItems(GenericCompareFunctionWithState, void *state); - void HSortItems(GenericCompareFunction); - void HSortItems(GenericCompareFunctionWithState, void *state); - - void *BinarySearch(const void *, GenericCompareFunction) const; - void *BinarySearch(const void *, GenericCompareFunctionWithState, void *state) const; - - int32 BinarySearchIndex(const void *, GenericCompareFunction) const; - int32 BinarySearchIndex(const void *, GenericCompareFunctionWithState, void *state) const; - int32 BinarySearchIndexByPredicate(const void *, UnaryPredicateGlue) const; - - bool Owning() const; - bool ReplaceItem(int32, void *); - -protected: - bool owning; - -}; - -template -class BObjectList : private _PointerList_ { -public: - - // iteration and sorting - typedef T *(* EachFunction)(T *, void *); - typedef const T *(* ConstEachFunction)(const T *, void *); - typedef int (* CompareFunction)(const T *, const T *); - typedef int (* CompareFunctionWithState)(const T *, const T *, void *state); - - BObjectList(int32 itemsPerBlock = 20, bool owning = false); - BObjectList(const BObjectList &list); - // clones list; if list is owning, makes copies of all - // the items - - virtual ~BObjectList(); - - BObjectList &operator=(const BObjectList &list); - // clones list; if list is owning, makes copies of all - // the items - - // adding and removing - // ToDo: - // change Add calls to return const item - bool AddItem(T *); - bool AddItem(T *, int32); - bool AddList(BObjectList *); - bool AddList(BObjectList *, int32); - - bool RemoveItem(T *, bool deleteIfOwning = true); - // if owning, deletes the removed item - T *RemoveItemAt(int32); - // returns the removed item - - void MakeEmpty(); - - // item access - T *ItemAt(int32) const; - - bool ReplaceItem(int32 index, T *); - // if list is owning, deletes the item at first - T *SwapWithItem(int32 index, T *newItem); - // same as ReplaceItem, except does not delete old item at , - // returns it instead - - T *FirstItem() const; - T *LastItem() const; - - // misc. getters - int32 IndexOf(const T *) const; - bool HasItem(const T *) const; - bool IsEmpty() const; - int32 CountItems() const; - - T *EachElement(EachFunction, void *); - const T *EachElement(ConstEachFunction, void *) const; - - void SortItems(CompareFunction); - void SortItems(CompareFunctionWithState, void *state); - void HSortItems(CompareFunction); - void HSortItems(CompareFunctionWithState, void *state); - - // linear search, returns first item that matches predicate - const T *FindIf(const UnaryPredicate &) const; - T *FindIf(const UnaryPredicate &); - - // list must be sorted with CompareFunction for these to work - const T *BinarySearch(const T &, CompareFunction) const; - const T *BinarySearch(const T &, CompareFunctionWithState, void *state) const; - - // Binary insertion - list must be sorted with CompareFunction for - // these to work - - // simple insert - void BinaryInsert(T *, CompareFunction); - void BinaryInsert(T *, CompareFunctionWithState, void *state); - void BinaryInsert(T *, const UnaryPredicate &); - - // unique insert, returns false if item already in list - bool BinaryInsertUnique(T *, CompareFunction); - bool BinaryInsertUnique(T *, CompareFunctionWithState, void *state); - bool BinaryInsertUnique(T *, const UnaryPredicate &); - - // insert a copy of the item, returns new inserted item - T *BinaryInsertCopy(const T ©This, CompareFunction); - T *BinaryInsertCopy(const T ©This, CompareFunctionWithState, void *state); - - // insert a copy of the item if not in list already - // returns new inserted item or existing item in case of a conflict - T *BinaryInsertCopyUnique(const T ©This, CompareFunction); - T *BinaryInsertCopyUnique(const T ©This, CompareFunctionWithState, void *state); - - - int32 FindBinaryInsertionIndex(const UnaryPredicate &, bool *alreadyInList = 0) const; - // returns either the index into which a new item should be inserted - // or index of an existing item that matches the predicate - - // deprecated API, will go away - BList *AsBList() - { return this; } - const BList *AsBList() const - { return this; } -private: - void SetItem(int32, T *); -}; - -template -Result -WhileEachListItem(BObjectList *list, Result (Item::*func)(Param1), Param1 p1) -{ - Result result = 0; - int32 count = list->CountItems(); - - for (int32 index = 0; index < count; index++) - if ((result = (list->ItemAt(index)->*func)(p1)) != 0) - break; - - return result; -} - -template -Result -WhileEachListItem(BObjectList *list, Result (*func)(Item *, Param1), Param1 p1) -{ - Result result = 0; - int32 count = list->CountItems(); - - for (int32 index = 0; index < count; index++) - if ((result = (*func)(list->ItemAt(index), p1)) != 0) - break; - - return result; -} - -template -Result -WhileEachListItem(BObjectList *list, Result (Item::*func)(Param1, Param2), - Param1 p1, Param2 p2) -{ - Result result = 0; - int32 count = list->CountItems(); - - for (int32 index = 0; index < count; index++) - if ((result = (list->ItemAt(index)->*func)(p1, p2)) != 0) - break; - - return result; -} - -template -Result -WhileEachListItem(BObjectList *list, Result (*func)(Item *, Param1, Param2), - Param1 p1, Param2 p2) -{ - Result result = 0; - int32 count = list->CountItems(); - - for (int32 index = 0; index < count; index++) - if ((result = (*func)(list->ItemAt(index), p1, p2)) != 0) - break; - - return result; -} - -template -Result -WhileEachListItem(BObjectList *list, Result (*func)(Item *, Param1, Param2, - Param3, Param4), Param1 p1, Param2 p2, Param3 p3, Param4 p4) -{ - Result result = 0; - int32 count = list->CountItems(); - - for (int32 index = 0; index < count; index++) - if ((result = (*func)(list->ItemAt(index), p1, p2, p3, p4)) != 0) - break; - - return result; -} - -template -void -EachListItemIgnoreResult(BObjectList *list, Result (Item::*func)()) -{ - int32 count = list->CountItems(); - for (int32 index = 0; index < count; index++) - (list->ItemAt(index)->*func)(); -} - -template -void -EachListItem(BObjectList *list, void (*func)(Item *, Param1), Param1 p1) -{ - int32 count = list->CountItems(); - for (int32 index = 0; index < count; index++) - (func)(list->ItemAt(index), p1); -} - -template -void -EachListItem(BObjectList *list, void (Item::*func)(Param1, Param2), - Param1 p1, Param2 p2) -{ - int32 count = list->CountItems(); - for (int32 index = 0; index < count; index++) - (list->ItemAt(index)->*func)(p1, p2); -} - -template -void -EachListItem(BObjectList *list, void (*func)(Item *,Param1, Param2), - Param1 p1, Param2 p2) -{ - int32 count = list->CountItems(); - for (int32 index = 0; index < count; index++) - (func)(list->ItemAt(index), p1, p2); -} - -template -void -EachListItem(BObjectList *list, void (*func)(Item *,Param1, Param2, - Param3), Param1 p1, Param2 p2, Param3 p3) -{ - int32 count = list->CountItems(); - for (int32 index = 0; index < count; index++) - (func)(list->ItemAt(index), p1, p2, p3); -} - - -template -void -EachListItem(BObjectList *list, void (*func)(Item *,Param1, Param2, - Param3, Param4), Param1 p1, Param2 p2, Param3 p3, Param4 p4) -{ - int32 count = list->CountItems(); - for (int32 index = 0; index < count; index++) - (func)(list->ItemAt(index), p1, p2, p3, p4); -} - -// inline code - -inline bool -_PointerList_::Owning() const -{ - return owning; -} - -template -BObjectList::BObjectList(int32 itemsPerBlock, bool isOwning) - : _PointerList_(itemsPerBlock, isOwning) -{ -} - -template -BObjectList::BObjectList(const BObjectList &list) - : _PointerList_(list) -{ - owning = list.owning; - if (owning) { - // make our own copies in an owning list - int32 count = list.CountItems(); - for (int32 index = 0; index < count; index++) { - T *item = list.ItemAt(index); - if (item) - item = new T(*item); - SetItem(index, item); - } - } -} - -template -BObjectList::~BObjectList() -{ - if (Owning()) - // have to nuke elements first - MakeEmpty(); - -} - -template -BObjectList & -BObjectList::operator=(const BObjectList &list) -{ - owning = list.owning; - BObjectList &result = (BObjectList &)_PointerList_::operator=(list); - if (owning) { - // make our own copies in an owning list - int32 count = list.CountItems(); - for (int32 index = 0; index < count; index++) { - T *item = list.ItemAt(index); - if (item) - item = new T(*item); - SetItem(index, item); - } - } - return result; -} - -template -bool -BObjectList::AddItem(T *item) -{ - // need to cast to void * to make T work for const pointers - return _PointerList_::AddItem((void *)item); -} - -template -bool -BObjectList::AddItem(T *item, int32 atIndex) -{ - return _PointerList_::AddItem((void *)item, atIndex); -} - -template -bool -BObjectList::AddList(BObjectList *newItems) -{ - return _PointerList_::AddList(newItems); -} - -template -bool -BObjectList::AddList(BObjectList *newItems, int32 atIndex) -{ - return _PointerList_::AddList(newItems, atIndex); -} - - -template -bool -BObjectList::RemoveItem(T *item, bool deleteIfOwning) -{ - bool result = _PointerList_::RemoveItem((void *)item); - - if (result && Owning() && deleteIfOwning) - delete item; - - return result; -} - -template -T * -BObjectList::RemoveItemAt(int32 index) -{ - return (T *)_PointerList_::RemoveItem(index); -} - -template -inline T * -BObjectList::ItemAt(int32 index) const -{ - return (T *)_PointerList_::ItemAt(index); -} - -template -bool -BObjectList::ReplaceItem(int32 index, T *item) -{ - if (owning) - delete ItemAt(index); - return _PointerList_::ReplaceItem(index, (void *)item); -} - -template -T * -BObjectList::SwapWithItem(int32 index, T *newItem) -{ - T *result = ItemAt(index); - _PointerList_::ReplaceItem(index, (void *)newItem); - return result; -} - -template -void -BObjectList::SetItem(int32 index, T *newItem) -{ - _PointerList_::ReplaceItem(index, (void *)newItem); -} - -template -int32 -BObjectList::IndexOf(const T *item) const -{ - return _PointerList_::IndexOf((void *)const_cast(item)); -} - -template -T * -BObjectList::FirstItem() const -{ - return (T *)_PointerList_::FirstItem(); -} - -template -T * -BObjectList::LastItem() const -{ - return (T *)_PointerList_::LastItem(); -} - -template -bool -BObjectList::HasItem(const T *item) const -{ - return _PointerList_::HasItem((void *)item); -} - -template -bool -BObjectList::IsEmpty() const -{ - return _PointerList_::IsEmpty(); -} - -template -int32 -BObjectList::CountItems() const -{ - return _PointerList_::CountItems(); -} - -template -void -BObjectList::MakeEmpty() -{ - if (owning) { - int32 count = CountItems(); - for (int32 index = 0; index < count; index++) - delete ItemAt(index); - } - _PointerList_::MakeEmpty(); -} - -template -T * -BObjectList::EachElement(EachFunction func, void *params) -{ - return (T *)_PointerList_::EachElement((GenericEachFunction)func, params); -} - - -template -const T * -BObjectList::EachElement(ConstEachFunction func, void *params) const -{ - return (const T *) - const_cast *>(this)->_PointerList_::EachElement( - (GenericEachFunction)func, params); -} - -template -const T * -BObjectList::FindIf(const UnaryPredicate &predicate) const -{ - int32 count = CountItems(); - for (int32 index = 0; index < count; index++) - if (predicate.operator()(ItemAt(index)) == 0) - return ItemAt(index); - return 0; -} - -template -T * -BObjectList::FindIf(const UnaryPredicate &predicate) -{ - int32 count = CountItems(); - for (int32 index = 0; index < count; index++) - if (predicate.operator()(ItemAt(index)) == 0) - return ItemAt(index); - return 0; -} - - -template -void -BObjectList::SortItems(CompareFunction function) -{ - _PointerList_::SortItems((GenericCompareFunction)function); -} - -template -void -BObjectList::SortItems(CompareFunctionWithState function, void *state) -{ - _PointerList_::SortItems((GenericCompareFunctionWithState)function, state); -} - -template -void -BObjectList::HSortItems(CompareFunction function) -{ - _PointerList_::HSortItems((GenericCompareFunction)function); -} - -template -void -BObjectList::HSortItems(CompareFunctionWithState function, void *state) -{ - _PointerList_::HSortItems((GenericCompareFunctionWithState)function, state); -} - -template -const T * -BObjectList::BinarySearch(const T &key, CompareFunction func) const -{ - return (const T *)_PointerList_::BinarySearch(&key, - (GenericCompareFunction)func); -} - -template -const T * -BObjectList::BinarySearch(const T &key, CompareFunctionWithState func, void *state) const -{ - return (const T *)_PointerList_::BinarySearch(&key, - (GenericCompareFunctionWithState)func, state); -} - -template -void -BObjectList::BinaryInsert(T *item, CompareFunction func) -{ - int32 index = _PointerList_::BinarySearchIndex(item, - (GenericCompareFunction)func); - if (index >= 0) - // already in list, add after existing - AddItem(item, index + 1); - else - AddItem(item, -index - 1); -} - -template -void -BObjectList::BinaryInsert(T *item, CompareFunctionWithState func, void *state) -{ - int32 index = _PointerList_::BinarySearchIndex(item, - (GenericCompareFunctionWithState)func, state); - if (index >= 0) - // already in list, add after existing - AddItem(item, index + 1); - else - AddItem(item, -index - 1); -} - -template -bool -BObjectList::BinaryInsertUnique(T *item, CompareFunction func) -{ - int32 index = _PointerList_::BinarySearchIndex(item, - (GenericCompareFunction)func); - if (index >= 0) - return false; - - AddItem(item, -index - 1); - return true; -} - -template -bool -BObjectList::BinaryInsertUnique(T *item, CompareFunctionWithState func, void *state) -{ - int32 index = _PointerList_::BinarySearchIndex(item, - (GenericCompareFunctionWithState)func, state); - if (index >= 0) - return false; - - AddItem(item, -index - 1); - return true; -} - - -template -T * -BObjectList::BinaryInsertCopy(const T ©This, CompareFunction func) -{ - int32 index = _PointerList_::BinarySearchIndex(©This, - (GenericCompareFunction)func); - - if (index >= 0) - index++; - else - index = -index - 1; - - T *newItem = new T(copyThis); - AddItem(newItem, index); - return newItem; -} - -template -T * -BObjectList::BinaryInsertCopy(const T ©This, CompareFunctionWithState func, void *state) -{ - int32 index = _PointerList_::BinarySearchIndex(©This, - (GenericCompareFunctionWithState)func, state); - - if (index >= 0) - index++; - else - index = -index - 1; - - T *newItem = new T(copyThis); - AddItem(newItem, index); - return newItem; -} - -template -T * -BObjectList::BinaryInsertCopyUnique(const T ©This, CompareFunction func) -{ - int32 index = _PointerList_::BinarySearchIndex(©This, - (GenericCompareFunction)func); - if (index >= 0) - return ItemAt(index); - - index = -index - 1; - T *newItem = new T(copyThis); - AddItem(newItem, index); - return newItem; -} - -template -T * -BObjectList::BinaryInsertCopyUnique(const T ©This, CompareFunctionWithState func, - void *state) -{ - int32 index = _PointerList_::BinarySearchIndex(©This, - (GenericCompareFunctionWithState)func, state); - if (index >= 0) - return ItemAt(index); - - index = -index - 1; - T *newItem = new T(copyThis); - AddItem(newItem, index); - return newItem; -} - -template -int32 -BObjectList::FindBinaryInsertionIndex(const UnaryPredicate &pred, bool *alreadyInList) - const -{ - int32 index = _PointerList_::BinarySearchIndexByPredicate(&pred, - (UnaryPredicateGlue)&UnaryPredicate::_unary_predicate_glue); - - if (alreadyInList) - *alreadyInList = index >= 0; - - if (index < 0) - index = -index - 1; - - return index; -} - -template -void -BObjectList::BinaryInsert(T *item, const UnaryPredicate &pred) -{ - int32 index = FindBinaryInsertionIndex(pred); - AddItem(item, index); -} - -template -bool -BObjectList::BinaryInsertUnique(T *item, const UnaryPredicate &pred) -{ - bool alreadyInList; - int32 index = FindBinaryInsertionIndex(pred, &alreadyInList); - if (alreadyInList) - return false; - - AddItem(item, index); - return true; -} - - -#endif diff --git a/src/column/YabColumnType.cpp b/src/column/YabColumnType.cpp deleted file mode 100644 index 566d94d..0000000 --- a/src/column/YabColumnType.cpp +++ /dev/null @@ -1,444 +0,0 @@ -/* -Open Tracker License - -Terms and Conditions - -Copyright (c) 1991-2000, Be Incorporated. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice applies to all licensees -and shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF TITLE, MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -BE INCORPORATED BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of Be Incorporated shall not be -used in advertising or otherwise to promote the sale, use or other dealings in -this Software without prior written authorization from Be Incorporated. - -Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered trademarks -of Be Incorporated in the United States and other countries. Other brand product -names are registered trademarks or trademarks of their respective holders. -All rights reserved. -*/ - -#include "YabColumnType.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef ZETA - #include -#endif - -#define kTEXT_MARGIN 8 -#define kIMG_MARGIN 2 - - -//===================================================================== - -BTitledColumn::BTitledColumn(const char* title, float width, float minWidth, - float maxWidth, alignment align) - :BColumn(width, minWidth, maxWidth, align), - fTitle(title) -{ - font_height fh; - - be_plain_font->GetHeight(&fh); - fFontHeight = fh.descent + fh.leading; -} - - -//-------------------------------------------------------------------- - -void BTitledColumn::DrawTitle(BRect rect, BView* parent) -{ - float width = rect.Width() - (2 * kTEXT_MARGIN); - BString out_string(fTitle); - - parent->TruncateString(&out_string, B_TRUNCATE_END, width + 2); - DrawString(out_string.String(), parent, rect); -} - - -//-------------------------------------------------------------------- - -void BTitledColumn::GetColumnName(BString* into) const -{ - *into = fTitle; -} - - -//-------------------------------------------------------------------- - -void BTitledColumn::DrawString(const char* string, BView* parent, BRect rect) -{ - float width = rect.Width() - (2 * kTEXT_MARGIN); - float y; - BFont font; - font_height finfo; - - parent->GetFont(&font); - font.GetHeight(&finfo); - y = rect.top + ((rect.Height() - (finfo.ascent + finfo.descent + finfo.leading)) / 2) + - (finfo.ascent + finfo.descent) - 2; - - switch (Alignment()) - { - case B_ALIGN_LEFT: - parent->MovePenTo(rect.left + kTEXT_MARGIN, y); - break; - - case B_ALIGN_CENTER: - parent->MovePenTo(rect.left + kTEXT_MARGIN + ((width - font.StringWidth(string)) / 2), y); - break; - - case B_ALIGN_RIGHT: - parent->MovePenTo(rect.right - kTEXT_MARGIN - font.StringWidth(string), y); - break; - } - parent->DrawString(string); -} - - -//-------------------------------------------------------------------- - -void BTitledColumn::SetTitle(const char* title) -{ - fTitle.SetTo(title); -} - - -//-------------------------------------------------------------------- - -void BTitledColumn::Title(BString* forTitle) const -{ - if (forTitle) - forTitle->SetTo(fTitle.String()); -} - - -//-------------------------------------------------------------------- - -float BTitledColumn::FontHeight() const -{ - return fFontHeight; -} - - -//===================================================================== - -BYabField::BYabField(const char* string) - :fWidth(0), fString(string), fClippedString(string) -{ - int n = fString.FindFirst("__Icon__="); - fBitmap = NULL; - if(n==0) - { - BString myPath; - fString.CopyInto(myPath, 9, fString.Length()-9); - BPath AppDirectory; - - // app directory - BString ApplicationDirectory(""); - app_info appinfo; - - if(be_roster->GetRunningAppInfo(be_app->Team(), &appinfo) == B_OK) - { - BEntry ApplicationEntry( &appinfo.ref); - BEntry ApplicationDirectoryEntry; - - if( ApplicationEntry.GetParent( &ApplicationDirectoryEntry) == B_OK) - { - if( AppDirectory.SetTo( &ApplicationDirectoryEntry) == B_OK) - { - // strcpy(ApplicationDirectory, AppDirectory.Path()); - ApplicationDirectory.SetTo(AppDirectory.Path()); - } - } - } - BFile ImageFile; - BPath ImagePath; - - if(myPath[0] == '/') - ImageFile.SetTo( myPath.String(), B_READ_ONLY); - else - // App directory. - if(ApplicationDirectory != "") - { - if( ImagePath.SetTo(ApplicationDirectory.String(), myPath.String()) == B_OK) - ImageFile.SetTo( ImagePath.Path(), B_READ_ONLY); - } - - if( ImageFile.InitCheck() != B_OK) - ImageFile.SetTo( myPath.String(), B_READ_ONLY); - - if( ImageFile.InitCheck() == B_OK) - { - BTranslatorRoster *Roster = BTranslatorRoster::Default(); - if( Roster) - { - BBitmapStream Stream; - if( Roster->Translate( &ImageFile, NULL, NULL, &Stream, B_TRANSLATOR_BITMAP) == B_OK) - Stream.DetachBitmap( &fBitmap); - delete Roster; - } - } - } -} - - -void BYabField::SetString(const char* val, int height) -{ - fString = val; - fClippedString = ""; - fWidth = 0; - - fBitmap = NULL; - if( ! fString.FindFirst("__Icon__=") ) - { - BString myPath; - fString.CopyInto(myPath, 9, fString.Length()-9); - BPath AppDirectory; - - // app directory - BString ApplicationDirectory(""); - app_info appinfo; - - if(be_roster->GetRunningAppInfo(be_app->Team(), &appinfo) == B_OK) - { - BEntry ApplicationEntry( &appinfo.ref); - BEntry ApplicationDirectoryEntry; - - if( ApplicationEntry.GetParent( &ApplicationDirectoryEntry) == B_OK) - { - if( AppDirectory.SetTo( &ApplicationDirectoryEntry) == B_OK) - { - // strcpy(ApplicationDirectory, AppDirectory.Path()); - ApplicationDirectory.SetTo(AppDirectory.Path()); - } - } - } - BFile ImageFile; - BPath ImagePath; - - if(myPath[0] == '/') - ImageFile.SetTo( myPath.String(), B_READ_ONLY); - else - // App directory. - if(ApplicationDirectory != "") - { - if( ImagePath.SetTo(ApplicationDirectory.String(), myPath.String()) == B_OK) - ImageFile.SetTo( ImagePath.Path(), B_READ_ONLY); - } - - if( ImageFile.InitCheck() != B_OK) - ImageFile.SetTo( myPath.String(), B_READ_ONLY); - - if( ImageFile.InitCheck() == B_OK) - { - BTranslatorRoster *Roster = BTranslatorRoster::Default(); - if( Roster) - { - BBitmapStream Stream; - if( Roster->Translate( &ImageFile, NULL, NULL, &Stream, B_TRANSLATOR_BITMAP) == B_OK) - Stream.DetachBitmap( &fBitmap); - delete Roster; - } - } - } - else if( ! fString.FindFirst("__Mime__=") ) - { - BString myPath; - fString.CopyInto(myPath, 9, fString.Length()-9); - fBitmap = new BBitmap(BRect(0, 0, 15,15), B_CMAP8); - BMimeType mime(myPath.String()); - mime.GetIcon(fBitmap, B_MINI_ICON); - } - else if( ! fString.FindFirst("__Path__=") ) - { - BString myPath; - fString.CopyInto(myPath, 9, fString.Length()-9); -#ifdef ZETA - fBitmap = new BBitmap(BRect(0, 0, 15, 15), B_RGBA32); - BEntry fEntry = BEntry(myPath.String()); - BBitmap icon = &GetTrackerIcon(fEntry, 16); - *fBitmap = icon; -#else - fBitmap = new BBitmap(BRect(0, 0,31, 31), B_RGBA32); - BNode *fNode = new BNode(myPath.String()); - BNodeInfo fInfo(fNode); - int i; - i=32; - icon_size ics; - ics=(icon_size)i; - - fInfo.GetTrackerIcon( fBitmap, ics ); - //fInfo.GetTrackerIcon(fBitmap, B_MINI_ICON); - delete fNode; -#endif - } - - - else if( ! fString.FindFirst("__SmIC__=") ) - { - BString myPath; - fString.CopyInto(myPath, 9, fString.Length()-9); -#ifdef ZETA - fBitmap = new BBitmap(BRect(0, 0, 15, 15), B_RGBA32); - BEntry fEntry = BEntry(myPath.String()); - BBitmap icon = &GetTrackerIcon(fEntry, 16); - *fBitmap = icon; -#else - fBitmap = new BBitmap(BRect(0, 0, 15, 15), B_RGBA32); - BNode *fNode = new BNode(myPath.String()); - BNodeInfo fInfo(fNode); - int i; - i=16; - icon_size ics; - ics=(icon_size)i; - - fInfo.GetTrackerIcon( fBitmap, ics ); - //fInfo.GetTrackerIcon(fBitmap, B_MINI_ICON); - delete fNode; -#endif - } -} - - -const char* BYabField::String() const -{ - return fString.String(); -} - - -void BYabField::SetWidth(float width) -{ - fWidth = width; -} - -float BYabField::Width() -{ - return fWidth; -} - - -void BYabField::SetClippedString(const char* val) -{ - fClippedString = val; -} - - -const char* BYabField::ClippedString() -{ - return fClippedString.String(); -} - -const BBitmap* BYabField::Bitmap() -{ - return fBitmap; -} - -void BYabField::SetBitmap(BBitmap* bitmap) -{ - fBitmap = bitmap; -} - -bool BYabField::HasBitmap() -{ - if(fBitmap) return true; - return false; -} - - -//===================================================================== - -BYabColumn::BYabColumn(const char* title, float width, float minWidth, - float maxWidth, uint32 truncate, alignment align) - :BTitledColumn(title, width, minWidth, maxWidth, align), - fTruncate(truncate) -{ -} - - -void BYabColumn::DrawField(BField* _field, BRect rect, BView* parent) -{ - if(!((BYabField*)_field)->HasBitmap()) - { - float width = rect.Width() - (2 * kTEXT_MARGIN); - BYabField* field = static_cast(_field); - - if (width != field->Width()) - { - BString out_string(field->String()); - - parent->TruncateString(&out_string, fTruncate, width + 2); - field->SetClippedString(out_string.String()); - field->SetWidth(width); - } - DrawString(field->ClippedString(), parent, rect); - } - else - { - BYabField *bitmapField = static_cast(_field); - const BBitmap *bitmap = bitmapField->Bitmap(); - - if (bitmap != NULL) - { - float x = 0.0; - float y; - BRect r = bitmap->Bounds(); - - y = rect.top + ((rect.Height() - r.Height()) / 2); - - switch (Alignment()) - { - case B_ALIGN_LEFT: - x = rect.left + kIMG_MARGIN; - break; - - case B_ALIGN_CENTER: - x = rect.left + ((rect.Width() - r.Width()) / 2); - break; - - case B_ALIGN_RIGHT: - x = rect.right - kIMG_MARGIN - r.Width(); - break; - } - parent->SetDrawingMode(B_OP_ALPHA); - parent->DrawBitmap(bitmap, BPoint(x, y)); - parent->SetDrawingMode(B_OP_OVER); - } - } -} - - -int BYabColumn::CompareFields(BField* field1, BField* field2) -{ - return(ICompare(((BYabField*)field1)->String(), - (((BYabField*)field2)->String()))); -} - - -bool -BYabColumn::AcceptsField(const BField *field) const -{ - return static_cast(dynamic_cast(field)); -} - diff --git a/src/column/YabColumnType.h b/src/column/YabColumnType.h deleted file mode 100644 index e69e4d2..0000000 --- a/src/column/YabColumnType.h +++ /dev/null @@ -1,107 +0,0 @@ -/* -Open Tracker License - -Terms and Conditions - -Copyright (c) 1991-2000, Be Incorporated. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice applies to all licensees -and shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF TITLE, MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -BE INCORPORATED BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of Be Incorporated shall not be -used in advertising or otherwise to promote the sale, use or other dealings in -this Software without prior written authorization from Be Incorporated. - -Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered trademarks -of Be Incorporated in the United States and other countries. Other brand product -names are registered trademarks or trademarks of their respective holders. -All rights reserved. -*/ - -#ifndef YAB_COLUMN_TYPES_H -#define YAB_COLUMN_TYPES_H - -#include "../global.h" -#include -#include -#include -#include "ColumnListView.h" - -//===================================================================== -// Common base-class: a column that draws a standard title at its top. - -class BTitledColumn : public BColumn -{ - public: - BTitledColumn (const char *title, float width, float minWidth, float maxWidth, alignment align = B_ALIGN_LEFT); - - virtual void DrawTitle(BRect rect, BView* parent); - virtual void GetColumnName(BString* into) const; - void DrawString(const char*, BView*, BRect); - void SetTitle(const char* title); - void Title(BString* forTitle) const; // sets the BString arg to be the title - float FontHeight() const; - private: - float fFontHeight; - BString fTitle; -}; - - -//===================================================================== -// Field and column classes for strings. - -class BYabField : public BField -{ - public: - BYabField (const char* string); - BYabField (BBitmap* bitmap); - - void SetString(const char* string, int height); - const char* String() const; - void SetClippedString(const char* string); - const char*ClippedString(); - void SetWidth(float); - float Width(); - - const BBitmap* Bitmap(); - void SetBitmap(BBitmap* bitmap); - bool HasBitmap(); - - private: - BBitmap* fBitmap; - float fWidth; - BString fString; - BString fClippedString; -}; - - -//-------------------------------------------------------------------- - -class BYabColumn: public BTitledColumn -{ - public: - BYabColumn(const char *title, float width, float maxWidth, float minWidth, uint32 truncate, alignment align = B_ALIGN_LEFT); - - virtual void DrawField(BField* field, BRect rect, BView* parent); - virtual int CompareFields(BField* field1, BField* field2); - virtual bool AcceptsField(const BField* field) const; - - private: - uint32 fTruncate; -}; - -#endif diff --git a/src/config.h b/src/config.h deleted file mode 100644 index 19c3c09..0000000 --- a/src/config.h +++ /dev/null @@ -1,216 +0,0 @@ -#ifndef CONFIG_H -#define CONFIG_H - -#define BEOS -// #define LIBBSVG -#define BUILD_TIME __DATE__ -/* Version number of package */ -#define VERSION "1.7.8" -/* architecture of build machine */ -#define UNIX_ARCHITECTURE "BePC-Haiku" - -/* config.h. Generated by configure. */ -/* config.h.in. Generated from configure.in by autoheader. */ - - -/* Define to 1 if you have `alloca', as a function or macro. */ -#define HAVE_ALLOCA 1 - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -#define HAVE_ALLOCA_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_CTYPE_H 1 - -/* defined, if ncurses.h is present */ -#define HAVE_CURSES_HEADER 1 - -/* Define to 1 if you have the `difftime' function. */ -#define HAVE_DIFFTIME 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FLOAT_H 1 - -/* Define to 1 if you have the `floor' function. */ -#define HAVE_FLOOR 1 - -/* Define to 1 if you have the `fork' function. */ -#define HAVE_FORK 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the `ncurses' library (-lncurses). */ -#define HAVE_LIBNCURSES 0 - -/* Define to 1 if you have the header file. */ -#define HAVE_LIMITS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MATH_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* defined, if ncurses.h is present */ -#define HAVE_NCURSES_HEADER 0 - -/* Define to 1 if you have the `pow' function. */ -#define HAVE_POW 1 - -/* Define to 1 if you have the `select' function. */ -#define HAVE_SELECT 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SIGNAL_H 1 - -/* Define to 1 if you have the `sqrt' function. */ -#define HAVE_SQRT 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDDEF_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_STDINT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_STDIO_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the `strchr' function. */ -#define HAVE_STRCHR 1 - -/* Define to 1 if you have the `strerror' function. */ -#define HAVE_STRERROR 1 - -/* Define to 1 if you have the `strftime' function. */ -#define HAVE_STRFTIME 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* defined, if strings.h is present */ -#define HAVE_STRINGS_HEADER 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* defined, if string.h is present */ -#define HAVE_STRING_HEADER 1 - -/* Define to 1 if you have the `strpbrk' function. */ -#define HAVE_STRPBRK 1 - -/* Define to 1 if you have the `strrchr' function. */ -#define HAVE_STRRCHR 1 - -/* Define to 1 if you have the `strstr' function. */ -#define HAVE_STRSTR 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SELECT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SOCKET_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have that is POSIX.1 compatible. */ -#define HAVE_SYS_WAIT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_TIME_H 1 - -/* Define to 1 if you have the `tmpnam' function. */ -#define HAVE_TMPNAM 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if you have the `vfork' function. */ -/* #undef HAVE_VFORK */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_VFORK_H */ - -/* Define to 1 if `fork' works. */ -#define HAVE_WORKING_FORK 1 - -/* Define to 1 if `vfork' works. */ -/* #undef HAVE_WORKING_VFORK */ - -/* Name of package */ -#define PACKAGE "yabasic" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "" - -/* Define as the return type of signal handlers (`int' or `void'). */ -#define RETSIGTYPE void - -/* Define to the type of arg 1 for `select'. */ -#define SELECT_TYPE_ARG1 int - -/* Define to the type of args 2, 3 and 4 for `select'. */ -#define SELECT_TYPE_ARG234 (fd_set *) - -/* Define to the type of arg 5 for `select'. */ -#define SELECT_TYPE_ARG5 (struct timeval *) - -/* If using the C implementation of alloca, define if you know the - direction of stack growth for your system; otherwise it will be - automatically deduced at run-time. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown */ -/* #undef STACK_DIRECTION */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - - - -/* Define to 1 if the X Window System is missing or not being used. */ -#define X_DISPLAY_MISSING 1 - -/* Define to empty if `const' does not conform to ANSI C. */ -/* #undef const */ - -/* Define to `int' if does not define. */ -/* #undef pid_t */ - -/* Define to `unsigned' if does not define. */ -/* #undef size_t */ - -/* Define as `fork' if `vfork' does not work. */ -#define vfork fork - -#endif diff --git a/src/function.c b/src/function.c deleted file mode 100644 index 8b341d5..0000000 --- a/src/function.c +++ /dev/null @@ -1,2061 +0,0 @@ -/* - - YABASIC --- a simple Basic Interpreter - written by Marc-Oliver Ihm 1995-2004 - homepage: www.yabasic.de - - function.c --- code for functions - - This file is part of yabasic and may be copied only - under the terms of either the Artistic License or - the GNU General Public License (GPL), both of which - can be found at www.yabasic.de - -*/ - - -/* ------------- includes ---------------- */ -#include "YabInterface.h" -#ifndef YABASIC_INCLUDED -#include "yabasic.h" /* all prototypes and structures */ -#endif - - -/* ------------- external references ---------------- */ - -extern int mylineno; /* current line number */ -extern int yyparse(); /* call bison parser */ - - -/* ------------- local functions ---------------- */ - -static char *fromto(char *,int,int); /* get portion of string (mid$ et al) */ -static void clear_buff(); /* clear system-input buffers */ -static void store_buff(char *,int); /* store system-input buffer */ -static int do_glob(char *,char *); /* actually do the globbing */ -static double other2dec(char *,int); /* convert hex to decimal */ -static char *dec2other(double,int); /* convert decimal to hex */ -static double peek(char *, YabInterface *); /* peek into internals */ -static char *peek2(char *,struct command *); /* peek into internals */ -static char *peek3(char *,char *); /* peek into internals */ -static int peekfile(int); /* read a byte from stream */ -static char *do_system(char *); /* executes command via command.com */ -static int do_system2(char *); /* execute command as system */ - - -/* ------------- global variables ---------------- */ - -struct command *lastdata=NULL; /* used to associate all data-commands with each others */ -static struct buff_chain *buffroot; /* start of sys-input buffer */ -static struct buff_chain **buffcurr; /* current entry in buff_chain */ -static int buffcount; /* number of filled buffers */ - - -/* ------------- subroutines ---------------- */ - - -void token(struct command *cmd) /* extract token from variable */ -{ - int split; - struct stackentry *s; - struct symbol *sym; - struct array *ar; - int num=0,i; - char *p,*q; - char **pp; - char *del,*line; - int wasdel,isdel; - - - if (cmd->type==cSPLIT2 || cmd->type==cTOKEN2) - del=pop(stSTRING)->pointer; - else - del=" \t"; - split=(cmd->type==cSPLIT || cmd->type==cSPLIT2); - s=pop(stSTRINGARRAYREF); - line=pop(stSTRING)->pointer; - sym=get_sym(s->pointer,syARRAY,amSEARCH); - if (!sym || !sym->pointer) { - sprintf(string,"array '%s()' is not defined",strip(s->pointer)); - error(ERROR,string); - goto token_done; - } - ar=sym->pointer; - if (ar->dimension>1) { - error(ERROR,"only one dimensional arrays allowed"); - goto token_done; - } - - /* count number of tokens */ - isdel=TRUE; - if (split && *line) num=1; - else num=0; - for(p=line;*p;++p) { - wasdel=isdel; - isdel=(strchr(del,*p)!=NULL); - if (split) { - if (isdel) num++; - } else { - if (isdel && isdel!=wasdel) num++; - } - } - if (!split && !isdel) num++; - - /* free previous array content */ - for(i=0;ibounds[0];i++) free(((char **)ar->pointer)[i]); - free(ar->pointer); - ar->pointer=my_malloc((num+1)*sizeof(char *)); - pp=ar->pointer; - pp[0]=my_strdup(""); - - /* extract tokens */ - i=1; - isdel=TRUE; - if (*line) { - for(p=q=line;;p++) { - wasdel=isdel; - isdel=(strchr(del,*p)!=NULL) || !*p; - if ((split && isdel) || (!split && (isdel && isdel!=wasdel))) { - while(strchr(del,*q) && qbounds[0]=num+1; - token_done: - s=push(); - s->type=stNUMBER; - s->value=num; -} - - -void tokenalt(struct command *cmd) /* extract token from variable with alternate semantics */ -{ - char *del; /* delimiter for strings */ - struct stackentry *t; - char *old,*new,*tok; - int split; - - if (cmd->type==cSPLITALT2 || cmd->type==cTOKENALT2) - del=pop(stSTRING)->pointer; - else - del=" \t"; - split=(cmd->type==cSPLITALT || cmd->type==cSPLITALT2); - - t=pop(stSTRING); - old=t->pointer; - t->pointer=NULL; /* prevent push from freeing the memory */ - t=push(); - t->type=stSTRING; - new=old; - tok=NULL; - while(*new) { - if (!tok && (!strchr(del,*new) || split)) tok=new; /* found start of token */ - if (tok && strchr(del,*new)) break; /* found end of token */ - new++; - } - if (*new) { - *new='\0'; /* terminate token */ - new++; - if (!split) { - while(*new) { - if (!strchr(del,*new)) break; /* found start of next token */ - new++; - } - } - } - t->pointer=my_strdup(tok?tok:""); /* copy token */ - /* move rest of string */ - while(*new) { - *old=*new; - old++; - new++; - }; - *old='\0'; -} - - -void glob(void) /* check, if pattern globs string */ -{ - char *str,*pat; - struct stackentry *stack; - int res; - - pat=(char *)pop(stSTRING)->pointer; - str=(char *)pop(stSTRING)->pointer; - - res=do_glob(str,pat); - stack=push(); - stack->value=res; - stack->type=stNUMBER; -} - - -static int do_glob(char *str,char *pat) /* actually do the globbing */ -{ - int res; - - if (infolevel>=DEBUG) { - sprintf(string,"globbing '%s' on '%s'",str,pat); - error(DEBUG,string); - } - if (*pat=='\0' && *str=='\0') return TRUE; - else if (*pat=='\0') return FALSE; - else if (*pat=='?' && *str=='\0') return FALSE; - else if (*pat=='?') { - if (*str=='\0') return FALSE; - pat++; - str++; - } - else if (*pat=='*') { - pat++; - res=FALSE; - while(*str && !(res=do_glob(str,pat))) str++; - if (res) return TRUE; - } - else if (*str=='\0') return FALSE; - else { - while(*pat && *pat!='?' && *pat!='*') { - if (*pat!=*str) return FALSE; - str++; - pat++; - } - } - return do_glob(str,pat); -} - - -void concat() /* concatenates two strings from stack */ -{ - struct stackentry *c; - char *aa,*bb,*cc; - - aa=pop(stSTRING)->pointer; - bb=pop(stSTRING)->pointer; - cc=(char *) my_malloc(sizeof(char)*(strlen(aa)+strlen(bb)+1)); - strcpy(cc,bb); - strcat(cc,aa); - c=push(); - c->type=stSTRING; - c->pointer=cc; -} - - -void create_changestring(int type) /* create command 'changestring' */ -{ - struct command *cmd; - - cmd=add_command(cCHANGESTRING,FALSE); - cmd->args=type; -} - - -void changestring(struct command *current) /* changes a string */ -{ - int type,a2,a3; - char *newpart; - char *oldstring; - int i,len; - struct stackentry *a1; - - type=current->args; - newpart=pop(stSTRING)->pointer; - if (type>fTWOARGS) a3=(int)pop(stNUMBER)->value; - if (type>fONEARGS) a2=(int)pop(stNUMBER)->value; - a1=pop(stSTRING); - oldstring=a1->pointer; - a1->pointer=NULL; /* this prevents push from freeing the memory */ - - if (!oldstring || !*oldstring) return; - switch(type) { - case fMID: - for(i=1;i=a2) { - if (!newpart[i-a2]) break; - oldstring[i-1]=newpart[i-a2]; - } - } - break; - case fMID2: - len=strlen(oldstring); - for(i=1;i<=len;i++) { - if (!oldstring[i-1]) break; - if (i>=a2) { - if (!newpart[i-a2]) break; - oldstring[i-1]=newpart[i-a2]; - } - } - break; - case fLEFT: - for(i=1;i<=a2;i++) { - if (!oldstring[i-1] || !newpart[i-1]) break; - oldstring[i-1]=newpart[i-1]; - } - break; - case fRIGHT: - len=strlen(oldstring); - for(i=1;i<=len;i++) { - if (i>len-a2) { - if (!newpart[i-1-len+a2]) break; - oldstring[i-1]=newpart[i-1-len+a2]; - } - } - break; - } -} - - -void create_function(int type) /* create command 'function' */ -/* type can be sin,cos,mid$ ... */ -{ - struct command *cmd; - - cmd=add_command(cFUNCTION,FALSE); - cmd->args=type; -} - - -void function(struct command *current,YabInterface* yab) /* performs a function */ -{ - struct stackentry *stack,*a1,*a2,*a3,*a4,*a5,*a6; - char *pointer; - double value; - time_t datetime; - int type,result,len,start,i,max, linenum; - char *str,*str2, *str3, *str4, *str5; - - a3=NULL; - a4=NULL; - a5=NULL; - a6=NULL; - type=current->args; - if (type>fFIVEARGS) a6=pop(stSTRING_OR_NUMBER); - if (type>fFOURARGS) a5=pop(stSTRING_OR_NUMBER); - if (type>fTHREEARGS) a4=pop(stSTRING_OR_NUMBER); - if (type>fTWOARGS) a3=pop(stSTRING_OR_NUMBER); - if (type>fONEARGS) a2=pop(stSTRING_OR_NUMBER); - if (type>fZEROARGS) a1=pop(stSTRING_OR_NUMBER); - linenum = current->line; - - switch (type) { - case fSIN: - value=sin(a1->value); - result=stNUMBER; - break; - case fASIN: - value=asin(a1->value); - result=stNUMBER; - break; - case fCOS: - value=cos(a1->value); - result=stNUMBER; - break; - case fACOS: - value=acos(a1->value); - result=stNUMBER; - break; - case fTAN: - value=tan(a1->value); - result=stNUMBER; - break; - case fATAN: - value=atan(a1->value); - result=stNUMBER; - break; - case fEXP: - value=exp(a1->value); - result=stNUMBER; - break; - case fLOG: - value=log(a1->value); - result=stNUMBER; - break; - case fLOG2: - value=log(a1->value)/log(a2->value); - result=stNUMBER; - break; - case fLEN: - value=(double) strlen(a1->pointer); - result=stNUMBER; - break; - case fSTR: - sprintf(string,"%g",a1->value); - pointer=my_strdup(string); - result=stSTRING; - break; - case fSTR2: - case fSTR3: - result=stSTRING; - if (!myformat(string,a1->value,a2->pointer,a3?a3->pointer:NULL)) { - pointer=my_strdup(""); - sprintf(string,"'%s' is not a valid format",(char *)a2->pointer); - error(ERROR,string); - break; - } - pointer=my_strdup(string); - break; - case fSQRT: - value=sqrt(a1->value); - result=stNUMBER; - break; - case fSQR: - value=a1->value*a1->value; - result=stNUMBER; - break; - case fINT: - if (a1->value<0) - value=-floor(-a1->value); - else - value=floor(a1->value); - result=stNUMBER; - break; - case fFRAC: - if (a1->value<0) - value=a1->value+floor(-a1->value); - else - value=a1->value-floor(a1->value); - result=stNUMBER; - break; - case fABS: - value=fabs(a1->value); - result=stNUMBER; - break; - case fSIG: - if (a1->value<0) value=-1.; - else if (a1->value>0) value=1.; - else value=0.; - result=stNUMBER; - break; - case fMOD: - value=a1->value-a2->value*(int)(a1->value/a2->value); - result=stNUMBER; - break; - case fRAN: - value=a1->value*((double)rand()/RAND_MAX); - result=stNUMBER; - break; - case fRAN2: - value=(double)rand()/RAND_MAX; - result=stNUMBER; - break; - case fMIN: - if (a1->value>a2->value) - value=a2->value; - else - value=a1->value; - result=stNUMBER; - break; - case fMAX: - if (a1->value>a2->value) - value=a1->value; - else - value=a2->value; - result=stNUMBER; - break; - case fVAL: - i=sscanf((char *) a1->pointer,"%lf",&value); - if (i!=1) value=0; - result=stNUMBER; - break; - case fATAN2: - value=atan2(a1->value,a2->value); - result=stNUMBER; - break; - case fLEFT: - str=a1->pointer; - len=(int)a2->value; - pointer=fromto(str,0,len-1); - result=stSTRING; - break; - case fRIGHT: - str=a1->pointer; - max=strlen(str); - len=(int)a2->value; - pointer=fromto(str,max-len,max-1); - result=stSTRING; - break; - case fMID: - str=a1->pointer; - start=(int)a2->value; - len=(int)a3->value; - pointer=fromto(str,start-1,start+len-2); - result=stSTRING; - break; - case fMID2: - str=a1->pointer; - start=(int)a2->value; - pointer=fromto(str,start-1,strlen(str)); - result=stSTRING; - break; - case fINKEY: - pointer=inkey(a1->value); - result=stSTRING; - break; - case fAND: - value=(int)a1->value & (int)a2->value; - result=stNUMBER; - break; - case fOR: - value=(int)a1->value | (int)a2->value; - result=stNUMBER; - break; - case fEOR: - value=(int)a1->value ^ (int)a2->value; - result=stNUMBER; - break; -/* - case fMOUSEX: - getmousexybm(a1->pointer,&i,NULL,NULL,NULL); - value=i; - result=stNUMBER; - break; - case fMOUSEY: - getmousexybm(a1->pointer,NULL,&i,NULL,NULL); - value=i; - result=stNUMBER; - break; - case fMOUSEB: - getmousexybm(a1->pointer,NULL,NULL,&i,NULL); - value=i; - result=stNUMBER; - break; - case fMOUSEMOD: - getmousexybm(a1->pointer,NULL,NULL,NULL,&i); - value=i; - result=stNUMBER; - break;*/ - case fCHR: - pointer=my_malloc(2); - i=(int)floor(a1->value); - if (i>255 || i<0) { - sprintf(string,"can't convert %g to character",a1->value); - error(ERROR,string); - return; - } - pointer[1]='\0'; - pointer[0]=(unsigned char)i; - result=stSTRING; - break; - case fASC: - value=((unsigned char *)a1->pointer)[0]; - result=stNUMBER; - break; - case fBIN: - pointer=dec2other(a1->value,2); - result=stSTRING; - break; - case fHEX: - pointer=dec2other(a1->value,16); - result=stSTRING; - break; - case fDEC: - value=other2dec(a1->pointer,16); - result=stNUMBER; - break; - case fDEC2: - value=other2dec(a1->pointer,(int)(a2->value)); - result=stNUMBER; - break; - case fUPPER: - str=a1->pointer; - pointer=my_malloc(strlen(str)+1); - i=-1; - do { - i++; - pointer[i]=toupper((int)str[i]); - } while(pointer[i]); - result=stSTRING; - break; - case fLOWER: - str=a1->pointer; - pointer=my_malloc(strlen(str)+1); - i=-1; - do { - i++; - pointer[i]=tolower((int)str[i]); - } while(pointer[i]); - result=stSTRING; - break; - case fLTRIM: - str=a1->pointer; - while(isspace(*str)) str++; - pointer=my_strdup(str); - result=stSTRING; - break; - case fRTRIM: - str=a1->pointer; - i=strlen(str)-1; - while(isspace(str[i]) && i>=0) i--; - str[i+1]='\0'; - pointer=my_strdup(str); - result=stSTRING; - break; - case fTRIM: - str=a1->pointer; - i=strlen(str)-1; - while(isspace(str[i]) && i>=0) i--; - str[i+1]='\0'; - while(isspace(*str)) str++; - pointer=my_strdup(str); - result=stSTRING; - break; - case fINSTR: - str=a1->pointer; - str2=a2->pointer; - if (*str2) - pointer=strstr(str,str2); - else - pointer=NULL; - if (pointer==NULL) - value=0; - else - value=pointer-str+1; - result=stNUMBER; - break; - case fINSTR2: - str=a1->pointer; - str2=a2->pointer; - start=(int)a3->value; - if (start>strlen(str)) { - value=0; - } else { - if (start<1) start=1; - pointer=strstr(str+start-1,str2); - if (pointer==NULL) - value=0; - else - value=pointer-str+1; - } - result=stNUMBER; - break; - case fRINSTR: - str=a1->pointer; - str2=a2->pointer; - len=strlen(str2); - for(i=strlen(str)-1;i>=0;i--) if (!strncmp(str+i,str2,len)) break; - value=i+1; - result=stNUMBER; - break; - case fRINSTR2: - str=a1->pointer; - str2=a2->pointer; - len=strlen(str2); - start=(int)a3->value; - if (start<1) { - value=0; - } else { - if (start>strlen(str)) start=strlen(str); - for(i=start-1;i;i--) if (!strncmp(str+i,str2,len)) break; - value=i+1; - } - result=stNUMBER; - break; - case fDATE: - pointer=my_malloc(100); - time(&datetime); - strftime(pointer,100,"%w-%m-%d-%Y-%a-%b",localtime(&datetime)); - result=stSTRING; - break; - case fTIME: - pointer=my_malloc(100); - time(&datetime); - strftime(pointer,100,"%H-%M-%S",localtime(&datetime)); - sprintf(pointer+strlen(pointer),"-%d", - (int)(time(NULL)-compilation_start)); - result=stSTRING; - break; - case fSYSTEM: - str=a1->pointer; - pointer=do_system(str); - result=stSTRING; - break; - case fSYSTEM2: - str=a1->pointer; - value=do_system2(str); - result=stNUMBER; - break; - case fPEEK: - str=a1->pointer; - value=peek(str, yab); - result=stNUMBER; - break; - case fPEEK2: - str=a1->pointer; - pointer=peek2(str,current); - result=stSTRING; - break; - case fPEEK3: - str=a1->pointer; - str2=a2->pointer; - pointer=peek3(str,str2); - result=stSTRING; - break; - case fPEEK4: - value=peekfile((int)a1->value); - result=stNUMBER; - break; - case fGETCHAR: - pointer=getchars((int)a1->value,(int)a2->value,(int)a3->value,(int)a4->value); - result=stSTRING; - break; - case fTELL: - i=(int)(a1->value); - if (badstream(i,0)) return; - if (!(stream_modes[i] & (smREAD | smWRITE| smREADWRITE))) { - sprintf(string,"stream %d not opened",i); - error(ERROR,string); - value=0; - } else { - value=ftell(streams[i]); - } - result=stNUMBER; - break; - case fMESSAGE: - pointer = getmessages(yab,linenum, current->lib->s); - result = stSTRING; - break; - case fMOUSE: - str = a1->pointer; - pointer = getmousemessages(str,yab,linenum, current->lib->s); - result = stSTRING; - break; - case fTRANSLATE: - str = a1->pointer; - pointer = gettranslation(str,yab,linenum, current->lib->s); - result = stSTRING; - break; - case fMENUTRANSLATE: - str = a1->pointer; - pointer = getmenutranslation(str,yab,linenum, current->lib->s); - result = stSTRING; - break; - case fTEXTGET: - str = a1->pointer; - pointer = textget(str,yab,linenum, current->lib->s); - result = stSTRING; - break; - case fTEXTGET3: - str = a1->pointer; - pointer = textget3(str,a2->value,yab,linenum, current->lib->s); - result = stSTRING; - break; - case fTEXTGET6: - str = a1->pointer; - str2 = a2->pointer; - pointer = textget6(str,str2,yab,linenum, current->lib->s); - result = stSTRING; - break; - case fTEXTCONTROLGET: - str = a1->pointer; - pointer = textcontrolget(str,yab,linenum, current->lib->s); - result = stSTRING; - break; - case fNUMWINDOWS: - value = numwindows(); - result = stNUMBER; - break; - case fISMOUSEIN: - str = a1->pointer; - value = ismousein(str,yab,linenum, current->lib->s); - result = stNUMBER; - break; - case fMOUSEMOVE: //vasper - pointer = getmousein(yab,linenum, current->lib->s); - result = stSTRING; - break; - case fDRAWIMAGE: - str=a3->pointer; - str2=a4->pointer; - value = createimage(a1->value,a2->value,str,str2,yab,linenum, current->lib->s); - result = stNUMBER; - break; - case fDRAWIMAGE2: - str=a5->pointer; - str2=a6->pointer; - value = createimage2(a1->value,a2->value,a3->value,a4->value,str,str2,yab,linenum, current->lib->s); - result = stNUMBER; - break; - case fDRAWSVG: - str=a5->pointer; - str2=a6->pointer; - value = createsvg(a1->value,a2->value,a3->value,a4->value,str,str2,yab,linenum, current->lib->s); - result = stNUMBER; - break; - case fLOAD: - str=a1->pointer; - str2=a2->pointer; - str3=a3->pointer; - pointer = getloadfilepanel(str,str2,str3,yab,linenum, current->lib->s); - result = stSTRING; - break; - case fSAVE: - str=a1->pointer; - str2=a2->pointer; - str3=a3->pointer; - str4=a4->pointer; - pointer = getsavefilepanel(str,str2,str3,str4,yab,linenum, current->lib->s); - result = stSTRING; - break; - case fKEYBOARD: - str=a1->pointer; - pointer = keyboardmessages(str,yab,linenum, current->lib->s); - result = stSTRING; - break; - case fCLIPBOARDPASTE: - pointer = clipboardpaste(yab,linenum, current->lib->s); - result = stSTRING; - break; - case fCOLUMNBOXGET: - str=a1->pointer; - pointer = columnboxget(str,a2->value,a3->value,yab,linenum, current->lib->s); - result = stSTRING; - break; - case fLISTBOXGET: - str=a1->pointer; - pointer = listboxget(str,a2->value,yab,linenum, current->lib->s); - result = stSTRING; - break; - case fTREEBOXGET: - str=a1->pointer; - pointer = treeboxget(str,a2->value,yab,linenum, current->lib->s); - result = stSTRING; - break; - case fTEXTGET2: - str=a1->pointer; - str2=a2->pointer; - value = textget2(str,str2,yab,linenum, current->lib->s); - result = stNUMBER; - break; - case fTEXTGET4: - str=a1->pointer; - str2=a2->pointer; - value = textget4(str,str2,a3->value,yab,linenum, current->lib->s); - result = stNUMBER; - break; - case fTEXTGET5: - str=a1->pointer; - str2=a2->pointer; - str3=a3->pointer; - value = textget5(str,str2,str3,yab,linenum, current->lib->s); - result = stNUMBER; - break; - case fPOPUPMENU: - str=a3->pointer; - str2=a4->pointer; - pointer = popupmenu(a1->value, a2->value, str, str2,yab,linenum, current->lib->s); - result = stSTRING; - break; - case fSCROLLBARGET: - str=a1->pointer; - str2=a2->pointer; - value = scrollbarget(str,str2,yab,linenum, current->lib->s); - result = stNUMBER; - break; - case fSPLITVIEWGET: - str=a1->pointer; - str2=a2->pointer; - value = splitviewget(str,str2,yab,linenum, current->lib->s); - result = stNUMBER; - break; - case fSTACKVIEWGET: - str=a1->pointer; - value = stackviewget(str,yab,linenum, current->lib->s); - result = stNUMBER; - break; - case fTABVIEWGET: - str=a1->pointer; - value = tabviewget(str,yab,linenum, current->lib->s); - result = stNUMBER; - break; - case fSPINCONTROLGET: - str=a1->pointer; - value = spincontrolget(str,yab,linenum, current->lib->s); - result = stNUMBER; - break; - case fLISTBOXCOUNT: - str=a1->pointer; - value = listboxcount(str,yab,linenum, current->lib->s); - result = stNUMBER; - break; - case fTREEBOXCOUNT: - str=a1->pointer; - value = treeboxcount(str,yab,linenum, current->lib->s); - result = stNUMBER; - break; - case fDROPBOXCOUNT: - str=a1->pointer; - value = dropboxcount(str,yab,linenum, current->lib->s); - result = stNUMBER; - break; - case fDROPBOXGET: - str=a1->pointer; - pointer = dropboxget(str,a2->value,yab,linenum, current->lib->s); - result = stSTRING; - break; - case fDRAWGET3: - str=a1->pointer; - pointer = drawget3(str,yab,linenum, current->lib->s); - result = stSTRING; - break; - case fSLIDERGET: - str=a1->pointer; - value = sliderget(str,yab,linenum, current->lib->s); - result = stNUMBER; - break; - case fCOLORCONTROLGET: - str=a1->pointer; - str2=a2->pointer; - value = colorcontrolget(str,str2,yab,linenum, current->lib->s); - result = stNUMBER; - break; - case fCALENDAR: - str=a1->pointer; - pointer = calendar2(str,yab,linenum, current->lib->s); - result = stSTRING; - break; - case fCOLUMNBOXCOUNT: - str=a1->pointer; - value = columnboxcount(str,yab,linenum, current->lib->s); - result = stNUMBER; - break; - case fWINDOWGET: - str=a1->pointer; - str2=a2->pointer; - value = windowgetnum(str,str2,yab,linenum, current->lib->s); - result = stNUMBER; - break; - case fVIEWGET: //vasper - str=a1->pointer; - str2=a2->pointer; - value = viewgetnum(str,str2,yab,linenum, current->lib->s); - result = stNUMBER; - break; - case fDRAWGET1: - str=a1->pointer; - str2=a2->pointer; - str3=a3->pointer; - value = drawget1(str,str2,str3,yab,linenum, current->lib->s); - result = stNUMBER; - break; - case fDRAWGET2: - str=a1->pointer; - str2=a2->pointer; - value = drawget2(str,str2,yab,linenum, current->lib->s); - result = stNUMBER; - break; - case fDRAWGET4: - str=a3->pointer; - str2=a4->pointer; - value = drawget4(a1->value, a2->value, str,str2,yab,linenum, current->lib->s); - result = stNUMBER; - break; - case fLISTBOXGETNUM: - str=a1->pointer; - value = listboxgetnum(str, yab, linenum, current->lib->s); - result = stNUMBER; - break; - case fDROPBOXGETNUM: - str=a1->pointer; - value = dropboxgetnum(str, yab, linenum, current->lib->s); - result = stNUMBER; - break; - case fTREEBOXGETNUM: - str=a1->pointer; - value = treeboxgetnum(str, yab, linenum, current->lib->s); - result = stNUMBER; - break; - case fCOLUMNBOXGETNUM: - str=a1->pointer; - value = columnboxgetnum(str, yab, linenum, current->lib->s); - result = stNUMBER; - break; - case fBITMAPLOAD: - str=a1->pointer; - str2=a2->pointer; - value = bitmapload(str,str2,yab,linenum, current->lib->s); - result = stNUMBER; - break; - case fBITMAPGET: - str=a1->pointer; - str2=a2->pointer; - value = bitmapgetnum(str,str2,yab,linenum, current->lib->s); - result = stNUMBER; - break; - case fBITMAPCOLOR: - str = a3->pointer; - str2 = a4->pointer; - value = bitmapcolor(a1->value, a2->value, str, str2, yab, linenum, current->lib->s); - result = stNUMBER; - break; - case fBITMAPSAVE: - str=a1->pointer; - str2=a2->pointer; - str3=a3->pointer; - value = bitmapsave(str,str2,str3,yab,linenum, current->lib->s); - result = stNUMBER; - break; - case fSOUND: - str=a1->pointer; - value = sound(str, yab, linenum, current->lib->s); - result = stNUMBER; - break; - case fMEDIASOUND: - str=a1->pointer; - value = mediasound(str, yab, linenum, current->lib->s); - result = stNUMBER; - break; - case fTREEBOXGETOPT: - str=a1->pointer; - str2=a2->pointer; - value = treeboxgetopt(str, str2, a3->value, yab, linenum, current->lib->s); - result = stNUMBER; - break; - case fTHREADKILL: - str=a1->pointer; - value = threadkill(str, a2->value, yab, linenum, current->lib->s); - result = stNUMBER; - break; - case fTHREADGET: - str=a1->pointer; - str2=a2->pointer; - value = threadget(str, str2, yab, linenum, current->lib->s); - result = stNUMBER; - break; - case fALERT: - str=a1->pointer; - str2=a2->pointer; - str3=a3->pointer; - str4=a4->pointer; - str5=a5->pointer; - value = newalert(str,str2,str3,str4,str5,yab,linenum, current->lib->s); - result = stNUMBER; - break; - case fPRINTER: - str=a1->pointer; - str2=a2->pointer; - str3=a3->pointer; - value = printer(str,str2,str3,yab,linenum, current->lib->s); - result = stNUMBER; - break; - case fISCOMPUTERON: - value = iscomputeron(yab,linenum, current->lib->s); - result = stNUMBER; - break; - case fMESSAGESEND: - str=a1->pointer; - str2=a2->pointer; - value = messagesend(str,str2,yab,linenum, current->lib->s); - result = stNUMBER; - break; - case fATTRIBUTEGET1: - str=a1->pointer; - str2=a2->pointer; - pointer = attributeget1(str,str2,yab,linenum, current->lib->s); - result = stSTRING; - break; - case fATTRIBUTEGET2: - str=a1->pointer; - str2=a2->pointer; - value = attributeget2(str,str2,yab,linenum, current->lib->s); - result = stNUMBER; - break; - default: - error(ERROR,"function called but not implemented"); - return; - } - - stack=push(); - /* copy result */ - stack->type=result; - if (result==stSTRING) - stack->pointer=pointer; - else - stack->value=value; -} - - -static int do_system2(char *cmd) /* execute command as system */ -{ -#ifdef UNIX - int ret; - #ifdef BUILD_NCURSES - if (curinized) reset_shell_mode(); - #endif - ret=system(cmd); - #ifdef BUILD_NCURSES - if (curinized) reset_prog_mode(); - #endif - return ret; -#else - STARTUPINFO start; - PROCESS_INFORMATION proc; - DWORD ec; /* exit code */ - SECURITY_ATTRIBUTES prosec; - SECURITY_ATTRIBUTES thrsec; - char *comspec; - - ZeroMemory(&prosec,sizeof(prosec)); - prosec.nLength=sizeof(prosec); - prosec.bInheritHandle=TRUE; - ZeroMemory(&thrsec,sizeof(thrsec)); - thrsec.nLength=sizeof(thrsec); - thrsec.bInheritHandle=TRUE; - ZeroMemory(&start,sizeof(start)); - start.cb=sizeof(STARTUPINFO); - start.dwFlags=STARTF_USESTDHANDLES; - start.hStdOutput=GetStdHandle(STD_OUTPUT_HANDLE); - start.hStdError=GetStdHandle(STD_ERROR_HANDLE); - start.hStdInput=GetStdHandle(STD_INPUT_HANDLE); - comspec=getenv("COMSPEC"); - if (!comspec) comspec="command.com"; - sprintf(string,"%s /C %s",comspec,cmd); - if (!CreateProcess(NULL,string,&prosec,&thrsec,TRUE,0, - NULL,NULL,&start,&proc)) { - sprintf(string,"couldn't execute '%s'",cmd); - error(ERROR,string); - return -1; - } - WaitForSingleObject(proc.hProcess,INFINITE); - if (!GetExitCodeProcess(proc.hProcess,&ec)) ec=-1; - CloseHandle(proc.hProcess); - CloseHandle(proc.hThread); - return ec; -#endif -} - - -static void clear_buff() /* clear system-input buffers */ -{ - buffcurr=&buffroot; - buffcount=0; -} - - -static void store_buff(char *buff,int len) /* store system-input buffer */ -{ - *buffcurr=my_malloc(sizeof(struct buff_chain)); - memcpy((*buffcurr)->buff,buff,SYSBUFFLEN+1); - (*buffcurr)->len=len; - buffcurr=&((*buffcurr)->next); - buffcount++; -} - - -char *recall_buff() /* recall store buffer */ -{ - struct buff_chain *curr,*old; - char *result; - int done,len; - - result=(char *)my_malloc(buffcount*(SYSBUFFLEN+1)); - curr=buffroot; - len=0; - for(done=0;donebuff,SYSBUFFLEN); - len+=curr->len; - old=curr; - curr=curr->next; - my_free(old); - } - return result; -} - - -static char *do_system(char *cmd) /* executes command via command.com */ -{ - static char buff[SYSBUFFLEN+1]; /* buffer to store command */ - int len; /* number of bytes read */ -#ifdef UNIX - FILE *p; /* points to pipe */ - int c; /* char read from pipe */ -#else - int ret; - STARTUPINFO start; - PROCESS_INFORMATION proc; - HANDLE piperead,pipewrite; /* both ends of pipes */ - SECURITY_ATTRIBUTES prosec; - SECURITY_ATTRIBUTES thrsec; - char *comspec; -#endif - - clear_buff(); - -#ifdef UNIX - p=popen(cmd,"r"); - if (p==NULL) { - sprintf(string,"couldn't execute '%s'",cmd); - error(ERROR,string); - return my_strdup(""); - } - do { - len=0; - while(len0) store_buff(buff,len); - } while(ret!=ERROR_BROKEN_PIPE && ret!=ERROR_HANDLE_EOF); - CloseHandle(piperead); - CloseHandle(proc.hProcess); - CloseHandle(proc.hThread); -#endif - return recall_buff(); -} - - -void getmousexybm(char *s,int *px,int *py,int *pb,int *pm) /* get mouse coordinates */ -{ - int x=0,y=0,b=0,m=0; - char c; - - if (*s) { - sscanf(s,"MB%d%c+%d:%04d,%04d",&b,&c,&m,&x,&y); - if (px) *px=x; - if (py) *py=y; - if (pb) { - if (c=='d') - *pb=b; - else - *pb=-b; - } - if (pm) *pm=m; - return; - } -/* - if (px) *px=mousex; - if (py) *py=mousey; - if (pb) *pb=mouseb; - if (pm) *pm=mousemod;*/ -} - - -static char *dec2other(double d,int base) /* convert double to hex or binary number */ -{ - int len; - double dec,dec2; - char *other; - int negative=FALSE; - - if (d<0) { - dec2=floor(-d); - negative=TRUE; - } else { - dec2=floor(d); - } - len=negative?2:1; - for(dec=dec2;dec>=base;dec/=base) len++; - other=my_malloc(len+1); - other[len]='\0'; - dec=dec2; - for(len--;len>=0;len--) { - other[len]="0123456789abcdef"[(int)(floor(dec-base*floor(dec/base)+0.5))]; - dec=floor(dec/base); - } - if (negative) other[0]='-'; - return other; -} - - -static double other2dec(char *hex,int base) /* convert hex or binary to double number */ -{ - double dec; - static char *digits="0123456789abcdef"; - char *found; - int i,len; - - if (base!=2 && base !=16) { - sprintf(string,"Cannot convert base-%d numbers",base); - error(ERROR,string); - return 0.; - } - dec=0; - len=strlen(hex); - for(i=0;i=base) { - sprintf(string,"Not a base-%d number: '%s'",base,hex); - error(ERROR,string); - return 0.; - } - dec+=found-digits; - } - return dec; -} - - -int myformat(char *dest,double num,char *format,char *sep) /* format number according to string */ -{ - int i1,i2; /* dummy */ - char c1; /* dummy */ - static char ctrl[6]; - char *found,*form; - int pre,post,dot,len,i,j,digit,colons,dots; - int neg=FALSE; - double ip,fp,round; - static char *digits="0123456789"; - - form=format; - if (*form=='%') { /* c-style format */ - strcpy(ctrl,"+- #0"); /* allowed control chars for c-format */ - form++; - while((found=strchr(ctrl,*form))!=NULL) { - *found='?'; - form++; - } - if (sscanf(form,"%u.%u%c%n",&i1,&i2,&c1,&i)!=3 && - sscanf(form,"%u.%c%n",&i2,&c1,&i)!=2 && - sscanf(form,".%u%c%n",&i2,&c1,&i)!=2 && - sscanf(form,"%u%c%n",&i2,&c1,&i)!=2) return FALSE; - if (!strchr("feEgG",c1) || form[i]) return FALSE; - /* seems okay, let's print */ - sprintf(dest,format,num); - } else { /* basic-style format */ - if (num<0) { - neg=TRUE; - num=-num; - } - colons=0; - dots=0; - pre=0; - post=0; - for(form=format;*form;form++) { - if (*form==',') { - if (dots) return FALSE; - colons++; - } else if (*form=='.') { - dots++; - } else if (*form=='#') { - if (dots) - post++; - else - pre++; - } else { - return FALSE; - } - } - if (dots>1) return FALSE; - len=strlen(format); - dest[len]='\0'; - round=0.5; - for(i=0;i1 || fp<0) fp=0; - dest[pre+colons]=format[pre+colons]; - if ((int)ip) { - for(i=pre+colons-1;i>=0;i--) { - if (neg && !(int)ip) { - neg=0; - dest[i]='-'; - } else { - if (format[i]=='#') { - digit=((int)ip)%10; - ip/=10; - if (((int)ip) || digit>0) - dest[i]=digits[digit]; - else - dest[i]=' '; - } else { - if ((int)ip) - dest[i]=format[i]; - else - dest[i]=' '; - } - } - } - } else { - i=pre+colons-1; - dest[i--]='0'; - } - if ((neg && i<0) || ((int)ip)) { - strcpy(dest,format); - return TRUE; - } - if (neg) dest[i--]='-'; - for(;i>=0;i--) dest[i]=' '; - for(i=pre+colons+1;ito || to<0 || from>len-1) { - /* give back empty string */ - part=my_malloc(1); - part[0]='\0'; - } - else { - if (from<=0) from=0; - if (to>=len) to=len-1; - part=my_malloc(sizeof(char)*(to-from+2)); /* characters and '/0' */ - for(i=from;i<=to;i++) part[i-from]=str[i]; /* copy */ - part[i-from]='\0'; - } - return part; -} - - - -void mywait() /* wait given number of seconds */ -{ - double delay; - -#ifdef UNIX - struct timeval tv; -#else - MSG msg; - int timerid; -#endif - - delay=pop(stNUMBER)->value; - if (delay<0) delay=0.; -#ifdef UNIX - tv.tv_sec=(int)delay; - tv.tv_usec=(delay-(int)delay)*1000000; - select(0,NULL,NULL,NULL,&tv); -#else /* WINDOWS */ - timerid=SetTimer(NULL,0,(int)(delay*1000),(TIMERPROC) NULL); - GetMessage((LPMSG)&msg,NULL,WM_TIMER,WM_TIMER); - KillTimer(NULL,timerid); -#endif -} - - -void mybell() /* ring ascii bell */ -{ -#ifdef UNIX -#ifdef BEOS - yi_beep(); -#else - printf("\007"); - fflush(stdout); -#endif -#else /* WINDOWS */ - Beep(1000,100); -#endif -} - - - -void create_poke(char flag) /* create Command 'cPOKE' */ -{ - struct command *cmd; - - if (flag=='S' || flag=='D') - cmd=add_command(cPOKEFILE,FALSE); - else - cmd=add_command(cPOKE,FALSE); - cmd->tag=flag; -} - - -void poke(struct command *cmd) /* poke into internals */ -{ - char *dest,*s,c; - char *sarg=NULL; - double darg; - - if (cmd->tag=='s') - sarg=pop(stSTRING)->pointer; - else - darg=pop(stNUMBER)->value; - - dest=pop(stSTRING)->pointer; - for(s=dest;*s;s++) *s=tolower((int)*s); - /* - if (!strcmp(dest,"fontheight") && !sarg) { - fontheight=(int)darg; -#ifdef UNIX - calc_psscale(); -#endif - } - else if (!strcmp(dest,"font") && sarg) { - font=my_strdup(sarg); - } */ - if (!strcmp(dest,"dump") && sarg && !strcmp(sarg,"symbols")) { - dump_sym(); - } - else if (!strcmp(dest,"dump") && sarg && - (!strcmp(sarg,"sub") || !strcmp(sarg,"subs") || !strcmp(sarg,"subroutine") || !strcmp(sarg,"subroutines"))) { - dump_sub(0); - } - /* - else if (!strcmp(dest,"winwidth") && !sarg) { - winwidth=(int)darg; - if (winwidth<1) { - error(ERROR,"winwidth less than 1 pixel"); - return; - } -#ifdef UNIX - calc_psscale(); -#endif - } - else if (!strcmp(dest,"winheight") && !sarg) { - winheight=(int)darg; - if (winheight<1) { - error(ERROR,"winheight less than 1 pixel"); - return; - } -#ifdef UNIX - calc_psscale(); -#endif - } - else if (!strcmp(dest,"textalign") && sarg) { - if (!check_alignement(sarg)) return; - strncpy(text_align,sarg,2); - } - else if (!strcmp(dest,"windoworigin") && sarg) { - moveorigin(sarg); - }*/ - else if (!strcmp(dest,"infolevel") && sarg) { - c=tolower((int)*sarg); - switch(c) { - case 'd': infolevel=DEBUG;break; - case 'n': infolevel=NOTE;break; - case 'w': infolevel=WARNING;break; - case 'e': infolevel=ERROR;break; - case 'f': infolevel=FATAL;break; - default: - error(ERROR,"invalid infolevel"); - return; - } - if (infolevel>=DEBUG) { - sprintf(string,"switching infolevel to '%c'",c); - error(DEBUG,string); - } - } - else if (!strcmp(dest,"stdout") && sarg) { - fputs(sarg,stdout); - } - else if (!strcmp(dest,"read_controls") && !sarg) { - read_controls= darg ? 1:0; - } - else if (dest[0]=='#') { - error(ERROR,"don't use quotes when poking into file"); - } - else { - error(ERROR,"invalid poke"); - } - return; -} - - -void pokefile(struct command *cmd) /* poke into file */ -{ - char *sarg=NULL; - double darg; - int stream; - - if (cmd->tag=='S') - sarg=pop(stSTRING)->pointer; - else - darg=pop(stNUMBER)->value; - stream=(int)(pop(stNUMBER)->value); - - if (badstream(stream,0)) return; - - if (!(stream_modes[stream] & smWRITE)) { - sprintf(string,"Stream %d not open for writing",stream); - error(ERROR,string); - return; - } - if (sarg) { - fputs(sarg,streams[stream]); - } else { - if (darg<0 || darg>255) { - error(ERROR,"stream poke out of byte range (0..255)"); - return; - } - fputc((int)darg,streams[stream]); - } -} - - -static double peek(char *dest, YabInterface *yab) /* peek into internals */ -{ - char *s; - - for(s=dest;*s;s++) *s=tolower((int)*s); - /*if (!strcmp(dest,"winwidth")) return winwidth; - else if (!strcmp(dest,"winheight")) return winheight; - else if (!strcmp(dest,"fontheight")) return fontheight; - else*/ - if (!strcmp(dest,"screenheight")) return LINES; - else if (!strcmp(dest,"screenwidth")) return COLS; - else if (!strcmp(dest, "deskbarposition")) return yi_DeskbarPosition(yab); //deskbarposition; - else if (!strcmp(dest, "deskbarexpanded")) return yi_DeskbarExpanded(yab); //deskbarexpanded; - else if (!strcmp(dest, "deskbarwidth")) return yi_DeskbarWidth(yab); //deskbarwidth; - else if (!strcmp(dest, "deskbarheight")) return yi_DeskbarHeight(yab); //deskbarheight; - else if (!strcmp(dest, "deskbar-x")) return yi_DeskbarX(yab); //deskbar-x; - else if (!strcmp(dest, "deskbar-y")) return yi_DeskbarY(yab); //deskbar-y; - else if (!strcmp(dest, "desktopwidth")) return yi_DesktopWidth(yab); //desktopwidth; - else if (!strcmp(dest, "desktopheight")) return yi_DesktopHeight(yab); //desktopheight; - else if (!strcmp(dest, "scrollbarwidth")) return yi_ScrollbarWidth(yab); // scrollbarwidth - else if (!strcmp(dest, "menuheight")) return yi_MenuHeight(yab); // menuheight - else if (!strcmp(dest, "tabheight")) return yi_TabHeight(yab); // tabheight - else if (!strcmp(dest,"argument") || !strcmp(dest,"arguments") ) return yabargc; // number of arguments - else if (!strcmp(dest,"version")) return strtod(VERSION,NULL); - else if (!strcmp(dest,"error")) return errorcode; - else if (!strcmp(dest,"read_controls")) return read_controls; - else if (!strcmp(dest,"isbound")) return is_bound; - - - else if (dest[0]=='#') { - error(ERROR,"don't use quotes when peeking into a file"); - return 0; - } - - sprintf(stderr, "PEEK is set to %s\n", dest); - error(ERROR,"invalid peek"); - return 0; -} - - -static int peekfile(int stream) /* read a byte from stream */ -{ - if (stream && badstream(stream,0)) return 0; - if (stream && !(stream_modes[stream] & smREAD | smREADWRITE)) { - sprintf(string,"stream %d not open for reading",stream); - error(ERROR,string); - return 0; - } - return fgetc(stream?streams[stream]:stdin); -} - - -static char *peek2(char *dest,struct command *curr) /* peek into internals */ -{ - char *s; - - - for(s=dest;*s;s++) *s=tolower((int)*s); - if (!strcmp(dest,"infolevel")) { - if (infolevel==DEBUG) return my_strdup("debug"); - else if (infolevel==NOTE) return my_strdup("note"); - else if (infolevel==WARNING) return my_strdup("warning"); - else if (infolevel==ERROR) return my_strdup("error"); - else if (infolevel==FATAL) return my_strdup("fatal"); - else return my_strdup("unkown"); - } - /* - else if (!strcmp(dest,"textalign")) return my_strdup(text_align); - else if (!strcmp(dest,"windoworigin")) return my_strdup(winorigin);*/ - else if (!strcmp(dest,"error")) return my_strdup(errorstring); - else if (!strcmp(dest,"library")) return my_strdup(curr->lib->s); - else if (!strcmp(dest,"os")) { -#ifdef HAIKU - return my_strdup("Haiku"); -#else - return my_strdup("BeOS"); -#endif - } - else if (!strcmp(dest,"directory")) return my_strdup(appdirectory); - else if (!strcmp(dest,"refsreceived")) return my_strdup(refsRec); - /* else if (!strcmp(dest,"font")) return my_strdup(font); */ - else if (!strcmp(dest,"argument") || !strcmp(dest,"arguments")) { - if (yabargc>0) { - s=yabargv[0]; - yabargc--; - yabargv++; - } - else { - s=""; - } - return my_strdup(s); - } - else { - error(ERROR,"invalid peek"); - } - return my_strdup(""); -} - - -static char *peek3(char *dest,char *cont) /* peek into internals */ -{ - char *s; - - for(s=dest;*s;s++) *s=tolower((int)*s); - if (!strcmp(dest,"env") || !strcmp(dest,"environment")) { - return my_strdup(getenv(cont)); - } else { - error(ERROR,"invalid peek"); - } - return my_strdup(""); -} - - -void create_exception(int flag) /* create command 'exception' */ -{ - struct command *cmd; - - cmd=add_command(cEXCEPTION,FALSE); - cmd->args=flag; -} - - -void exception(struct command *cmd) /* change handling of exceptions */ -{ - if (cmd->args) { - signal(SIGINT,signal_handler); /* enable keyboard interrupt */ -#ifdef SIGHUP - signal(SIGHUP,signal_handler); -#endif -#ifdef SIGQUIT - signal(SIGQUIT,signal_handler); -#endif -#ifdef SIGABRT - signal(SIGABRT,signal_handler); -#endif -#ifdef SIGTERM - signal(SIGTERM,signal_handler); -#endif - } - else { - signal(SIGINT,SIG_IGN); /* ignore keyboard interrupt */ -#ifdef SIGHUP - signal(SIGHUP,SIG_IGN); -#endif -#ifdef SIGQUIT - signal(SIGQUIT,SIG_IGN); -#endif -#ifdef SIGABRT - signal(SIGABRT,SIG_IGN); -#endif -#ifdef SIGTERM - signal(SIGTERM,SIG_IGN); -#endif - } - return; -} - - -void create_restore(char *label) /* create command 'restore' */ -{ - struct command *c; - - c=add_command(cRESTORE,FALSE); - c->pointer=my_strdup(label); -} - - -void restore(struct command *cmd) /* reset data pointer to given label */ -{ - struct command *label; - struct command **datapointer; - - datapointer=&(cmd->lib->datapointer); - if (cmd->type==cRESTORE) { /* first time; got to search the label */ - if (*((char *)cmd->pointer)=='\0') { - /* no label, restore to first command */ - label=cmd->lib->firstdata; - } else { - label=search_label(cmd->pointer,smLABEL|smGLOBAL); - if (!label) { - /* did not find label */ - sprintf(string,"can't find label '%s'",(char *)cmd->pointer); - error(ERROR,string); - return; - } - } - *datapointer=label; - if (lastdata) { - while((*datapointer)->type!=cDATA && (*datapointer)!=cmdhead) { - *datapointer=(*datapointer)->next; - } - } - cmd->pointer=*datapointer; - cmd->type=cQRESTORE; - } else { - *datapointer=cmd->pointer; - } - return; -} - - -void create_dbldata(double value) /* create command dbldata */ -{ - struct command *c; - - c=add_command(cDATA,FALSE); - c->pointer=my_malloc(sizeof(double)); - if (lastdata) lastdata->nextassoc=c; - lastdata=c; - *((double *)c->pointer)=value; - c->tag='d'; /* double value */ -} - - -void create_strdata(char *value) /* create command strdata */ -{ - struct command *c; - - c=add_command(cDATA,FALSE); - if (lastdata) lastdata->nextassoc=c; - lastdata=c; - c->pointer=my_strdup(value); - c->tag='s'; /* string value */ -} - - -void create_readdata(char type) /* create command readdata */ -{ - struct command *cmd; - - cmd=add_command(cREADDATA,FALSE); - cmd->tag=type; -} - - -void readdata(struct command *cmd) /* read data items */ -{ - struct stackentry *read; - char type; - struct command **datapointer; - - datapointer=&(cmd->lib->datapointer); - type=cmd->tag; - while(*datapointer && ((*datapointer)->type!=cDATA || cmd->lib!=(*datapointer)->lib)) { - *datapointer=(*datapointer)->nextassoc; - } - if (!*datapointer) { - error(ERROR,"run out of data items"); - return; - } - if (type!=(*datapointer)->tag) { - error(ERROR,"type of READ and DATA don't match"); - return; - } - read=push(); - if (type=='d') { /* read a double value */ - read->type=stNUMBER; - read->value= *((double *)(*datapointer)->pointer);} - else { - read->type=stSTRING; - read->pointer=my_strdup((*datapointer)->pointer); - } - *datapointer=(*datapointer)->nextassoc; /* next item */ -} - - -void create_dblrelop(char c) /* create command dblrelop */ -{ - int type; - - switch(c) { - case '=': type=cEQ;break; - case '!': type=cNE;break; - case '<': type=cLT;break; - case '{': type=cLE;break; - case '>': type=cGT;break; - case '}': type=cGE;break; - } - add_command(type,FALSE); -} - - -void dblrelop(struct command *type) /* compare topmost double-values */ -{ - double a,b,c; - struct stackentry *result; - - b=pop(stNUMBER)->value; - a=pop(stNUMBER)->value; - switch(current->type) { - case cEQ:c=(a==b);break; - case cNE:c=(a!=b);break; - case cLE:c=(a<=b);break; - case cLT:c=(a=b);break; - case cGT:c=(a>b);break; - } - result=push(); - result->value=c; - result->type=stNUMBER; -} - - -void create_strrelop(char c) /* create command strrelop */ -{ - int type; - - switch(c) { - case '=': type=cSTREQ;break; - case '!': type=cSTRNE;break; - case '<': type=cSTRLT;break; - case '{': type=cSTRLE;break; - case '>': type=cSTRGT;break; - case '}': type=cSTRGE;break; - } - add_command(type,FALSE); -} - - -void strrelop(struct command *type) /* compare topmost string-values */ -{ - char *a,*b; - double c; - struct stackentry *result; - - b=pop(stSTRING)->pointer; - a=pop(stSTRING)->pointer; - switch(current->type) { - case cSTREQ:c=(strcmp(a,b)==0);break; - case cSTRNE:c=(strcmp(a,b)!=0);break; - case cSTRLT:c=(strcmp(a,b)<0);break; - case cSTRLE:c=(strcmp(a,b)<=0);break; - case cSTRGT:c=(strcmp(a,b)>0);break; - case cSTRGE:c=(strcmp(a,b)>=0);break; - } - result=push(); - result->value=c; - result->type=stNUMBER; -} - -void switch_compare(void) /* compare topmost values for switch statement */ -{ - struct stackentry *result,*first,*second; - double r=0.; - - first=pop(stANY); - second=stackhead->prev; - if ((second->type==stSWITCH_STRING || second->type==stSTRING) && first->type==stSTRING) { - if (second->type==stSWITCH_STRING) - r=1.; - else - r=(strcmp(first->pointer,second->pointer)==0)?1.:0.; - } else if ((second->type==stSWITCH_NUMBER || second->type==stNUMBER) && first->type==stNUMBER) { - if (second->type==stSWITCH_NUMBER) - r=1.; - else - r=(first->value==second->value); - } else { - error(ERROR,"Cannot mix strings and numbers in a single switch statement"); - } - result=push(); - result->type=stNUMBER; - result->value=r; -} - - -void logical_shortcut(struct command *type) /* shortcut and/or if possible */ -{ - struct stackentry *result; - double is; - - is=stackhead->prev->value; - if ((type->type==cORSHORT && is!=0) || (type->type==cANDSHORT && is==0)) { - result=push(); - error(DEBUG,"logical shortcut taken"); - result->type=stNUMBER; - result->value=is; - } else { - current=current->next; - } -} - - -void create_boole(char c) /* create command boole */ -{ - int type; - - switch(c) { - case '|': type=cOR;break; - case '&': type=cAND;break; - case '!': type=cNOT;break; - } - add_command(type,FALSE); -} - - -void boole(struct command *type) /* perform and/or/not */ -{ - int a,b,c; - struct stackentry *result; - - a=(int)pop(stNUMBER)->value; - if (current->type==cNOT) - c=!a; - else { - b=(int)pop(stNUMBER)->value; - if (current->type==cAND) - c=a&&b; - else - c=a||b; - } - result=push(); - result->value=c; - result->type=stNUMBER; -} - diff --git a/src/global.h b/src/global.h deleted file mode 100644 index 746450b..0000000 --- a/src/global.h +++ /dev/null @@ -1,3 +0,0 @@ -//define BUILD_NCURSES -#define BUILD_YABTEXT -#define BUILD_GAMESOUND \ No newline at end of file diff --git a/src/graphic.c b/src/graphic.c deleted file mode 100644 index 70c9215..0000000 --- a/src/graphic.c +++ /dev/null @@ -1,2592 +0,0 @@ -/* - - YABASIC --- a simple Basic Interpreter - written by Marc-Oliver Ihm 1995-2004 - homepage: www.yabasic.de - - graphic.c --- code for windowed graphics, printing and plotting - - This file is part of yabasic and may be copied only - under the terms of either the Artistic License or - the GNU General Public License (GPL), both of which - can be found at www.yabasic.de - -*/ - - -/* ------------- includes ---------------- */ - -//include "YabInterface.h" - -#include "global.h" - -#ifndef YABASIC_INCLUDED -#include "yabasic.h" /* all prototypes and structures */ -#endif -#ifdef UNIX -#ifdef BUILD_NCURSES -#include -#endif -#include -#include -#include -#ifndef KEY_MAX -#define KEY_MAX 0777 -#endif -#endif - - -/* ------------- global variables ---------------- */ - -char translationbuffer[8192]; - -/* mouse and keyboard */ -int mousex=0,mousey=0,mouseb=0,mousemod=0; /* last know mouse coordinates */ -char *ykey[kLASTKEY+1]; /* keys returned by inkey */ - -int winopened = 0; - -/* ------------- functions ---------------- */ - -void create_openwin(int fnt) /* create Command 'openwin' */ -{ - struct command *cmd; - - cmd=add_command(cOPENWIN,FALSE); - cmd->args=fnt; -} - - -void openwin(struct command *cmd, YabInterface* yab) /* open a Window */ -{ - double x1,y1,x2,y2; - char *id, *title; - title = pop(stSTRING)->pointer; - id = pop(stSTRING)->pointer; - y2=pop(stNUMBER)->value; - x2=pop(stNUMBER)->value; - y1=pop(stNUMBER)->value; - x1=pop(stNUMBER)->value; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_OpenWindow(x1,y1,x2,y2, id, title, yab); - - winopened++; -} - -void closewin(struct command *cmd, YabInterface* yab) /* close the window */ -{ - char *id; - id = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - if (yi_CloseWindow(id, yab) == 1) - winopened--; -} - -int numwindows() -{ - return winopened; -} - -void createbutton(struct command *cmd, YabInterface* yab) /* set a button */ -{ - double x1,y1,x2,y2; - char *id, *title, *view; - - view = pop(stSTRING)->pointer; - title = pop(stSTRING)->pointer; - id = pop(stSTRING)->pointer; - y2=pop(stNUMBER)->value; - x2=pop(stNUMBER)->value; - y1=pop(stNUMBER)->value; - x1=pop(stNUMBER)->value; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_CreateButton(x1,y1,x2,y2, id, title, view, yab); -} - -void createmenu(struct command *cmd, YabInterface* yab) /* add a menu */ -{ - char *menuhead, *menuitem, *shortcut, *window; - window = pop(stSTRING)->pointer; - shortcut = pop(stSTRING)->pointer; - menuitem = pop(stSTRING)->pointer; - menuhead = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_CreateMenu(menuhead, menuitem, shortcut, window, yab); -} - -void createcheckbox(struct command *cmd, YabInterface* yab) /* add a checkbox */ -{ - char *label, *window, *id; - double x,y,isActivated; - - window = pop(stSTRING)->pointer; - isActivated = pop(stNUMBER)->value; - label = pop(stSTRING)->pointer; - id = pop(stSTRING)->pointer; - y = pop(stNUMBER)->value; - x = pop(stNUMBER)->value; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_CreateCheckBox(x,y,id, label,isActivated,window, yab); -} - -void createradiobutton(struct command *cmd, YabInterface* yab) /* add a radio button*/ -{ - char *label, *groupid, *window; - double x,y,isActivated; - - - window = pop(stSTRING)->pointer; - isActivated = pop(stNUMBER)->value; - label = pop(stSTRING)->pointer; - groupid = pop(stSTRING)->pointer; - y = pop(stNUMBER)->value; - x = pop(stNUMBER)->value; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_CreateRadioButton(x,y,groupid,label,isActivated,window, yab); -} - -void createtextcontrol(struct command *cmd, YabInterface* yab) /* add a textcontrol */ -{ - char *text, *label, *window, *id; - double x1,y1,x2,y2; - - window = pop(stSTRING)->pointer; - text = pop(stSTRING)->pointer; - label = pop(stSTRING)->pointer; - id = pop(stSTRING)->pointer; - y2=pop(stNUMBER)->value; - x2=pop(stNUMBER)->value; - y1=pop(stNUMBER)->value; - x1=pop(stNUMBER)->value; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_CreateTextControl(x1,y1,x2,y2,id, label, text, window, yab); -} - -void createlistbox(struct command *cmd, YabInterface* yab) /* list box */ -{ - char *title, *window; - double x1,y1,x2,y2,scrollbar; - - window = pop(stSTRING)->pointer; - scrollbar = pop(stNUMBER)->value; - title = pop(stSTRING)->pointer; - y2=pop(stNUMBER)->value; - x2=pop(stNUMBER)->value; - y1=pop(stNUMBER)->value; - x1=pop(stNUMBER)->value; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_CreateListBox(x1,y1,x2,y2, title, scrollbar, window, yab); -} - -void createdropbox(struct command *cmd, YabInterface* yab) /* drop box */ -{ - char *title, *label, *window; - double x1,y1,x2,y2; - - window = pop(stSTRING)->pointer; - label = pop(stSTRING)->pointer; - title = pop(stSTRING)->pointer; - y2=pop(stNUMBER)->value; - x2=pop(stNUMBER)->value; - y1=pop(stNUMBER)->value; - x1=pop(stNUMBER)->value; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_CreateDropBox(x1,y1,x2,y2, title, label, window, yab); -} - -void createitem(struct command *cmd, YabInterface* yab) /* item add */ -{ - char *item, *view; - - item = pop(stSTRING)->pointer; - view = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_CreateItem(view,item,yab); -} - -void removeitem(struct command *cmd, YabInterface* yab) /* item add */ -{ - char *title, *item; - - item = pop(stSTRING)->pointer; - title = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_RemoveItem(title,item,yab); -} - -void clearitems(struct command *cmd, YabInterface* yab) /* clear item list*/ -{ - char *title; - - title = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_ClearItems(title,yab); -} - -int createimage(double x, double y, const char* imagefile, const char* window, YabInterface* yab, int line, const char* libname) /* set an image */ -{ - yi_SetCurrentLineNumber(line, libname, yab); - return yi_CreateImage(x,y, imagefile, window, yab); -} - -int createimage2(double x1, double y1, double x2, double y2, const char* imagefile, const char* window, YabInterface* yab, int line, const char* libname) -{ - yi_SetCurrentLineNumber(line, libname, yab); - return yi_CreateImage2(x1,y1,x2,y2, imagefile, window, yab); -} - -int createsvg(double x1, double y1, double x2, double y2, const char* imagefile, const char* window, YabInterface* yab, int line, const char* libname) -{ - - yi_SetCurrentLineNumber(line, libname, yab); - return yi_CreateSVG(x1,y1,x2,y2, imagefile, window, yab); -} - -void mouseset(struct command *cmd, YabInterface* yab) -{ - char *opt; - opt = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_MouseSet(opt, yab); -} - -void drawtext(struct command *cmd, YabInterface* yab) /* draw text */ -{ - double x,y; - char *text, *window; - - window = pop(stSTRING)->pointer; - text = pop(stSTRING)->pointer; - y=pop(stNUMBER)->value; - x=pop(stNUMBER)->value; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_DrawText(x,y,text, window, yab); -} - -void drawrect(struct command *cmd, YabInterface* yab) /* draw rect */ -{ - double x1,y1,x2,y2; - char *window; - - window = pop(stSTRING)->pointer; - y2=pop(stNUMBER)->value; - x2=pop(stNUMBER)->value; - y1=pop(stNUMBER)->value; - x1=pop(stNUMBER)->value; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_DrawRect(x1,y1,x2,y2,window, yab); -} - -void drawdot(struct command *cmd, YabInterface* yab) /* draw dot */ -{ - double x1,y1; - char *window; - - window = pop(stSTRING)->pointer; - y1=pop(stNUMBER)->value; - x1=pop(stNUMBER)->value; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_DrawDot(x1,y1,window, yab); -} - -void drawline(struct command *cmd, YabInterface* yab) /* draw line */ -{ - double x1,y1,x2,y2; - char *window; - - window = pop(stSTRING)->pointer; - y2=pop(stNUMBER)->value; - x2=pop(stNUMBER)->value; - y1=pop(stNUMBER)->value; - x1=pop(stNUMBER)->value; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_DrawLine(x1,y1,x2,y2,window, yab); -} - -void drawcircle(struct command *cmd, YabInterface* yab) /* draw circle */ -{ - double x1,y1,r; - char *window; - - window = pop(stSTRING)->pointer; - r=pop(stNUMBER)->value; - y1=pop(stNUMBER)->value; - x1=pop(stNUMBER)->value; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_DrawCircle(x1,y1,r,window, yab); -} - -void drawellipse(struct command *cmd, YabInterface* yab) /* draw ellipse */ -{ - double x1,y1,r1,r2; - char *window; - - window = pop(stSTRING)->pointer; - r2=pop(stNUMBER)->value; - r1=pop(stNUMBER)->value; - y1=pop(stNUMBER)->value; - x1=pop(stNUMBER)->value; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_DrawEllipse(x1,y1,r1,r2,window, yab); -} - -void drawcurve(struct command *cmd, YabInterface* yab) /* draw a curve */ -{ - double x1,y1,x2,y2,x3,y3,x4,y4; - char *window; - - window = pop(stSTRING)->pointer; - y4=pop(stNUMBER)->value; - x4=pop(stNUMBER)->value; - y3=pop(stNUMBER)->value; - x3=pop(stNUMBER)->value; - y2=pop(stNUMBER)->value; - x2=pop(stNUMBER)->value; - y1=pop(stNUMBER)->value; - x1=pop(stNUMBER)->value; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_DrawCurve(x1,y1,x2,y2,x3,y3,x4,y4,window, yab); -} - -void drawclear(struct command *cmd, YabInterface* yab) /* clear canvas */ -{ - char *window; - - - window = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_DrawClear(window, yab); -} - -void drawset1(struct command *cmd, YabInterface *yab) -{ - char *option, *window; - - window = pop(stSTRING)->pointer; - option = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_DrawSet1(option,window,yab); -} - -void drawset2(struct command *cmd, YabInterface *yab) -{ - char *pattern; - int mode; - - pattern = pop(stSTRING)->pointer; - mode = pop(stNUMBER)->value; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_DrawSet2(mode,pattern,yab); -} - -void drawset3(struct command *cmd, YabInterface *yab) -{ - char *option; - int transparency; - - transparency = pop(stNUMBER)->value; - option = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_DrawSet3(option, transparency,yab); -} - -void createtext(struct command *cmd, YabInterface* yab) /* text */ -{ - double x,y; - char *text, *window, *id; - - - window = pop(stSTRING)->pointer; - text = pop(stSTRING)->pointer; - id = pop(stSTRING)->pointer; - y=pop(stNUMBER)->value; - x=pop(stNUMBER)->value; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_CreateText(x,y,id,text, window, yab); -} - -void text2(struct command *cmd, YabInterface* yab) /* text */ -{ - double x1,y1,x2,y2; - char *text, *window, *id; - - - window = pop(stSTRING)->pointer; - text = pop(stSTRING)->pointer; - id = pop(stSTRING)->pointer; - y2=pop(stNUMBER)->value; - x2=pop(stNUMBER)->value; - y1=pop(stNUMBER)->value; - x1=pop(stNUMBER)->value; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_Text2(x1,y1,x2,y2,id,text, window, yab); -} - -void textalign(struct command *cmd, YabInterface* yab) /* align text */ -{ - char *option, *id; - - - option = pop(stSTRING)->pointer; - id = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_TextAlign(id, option, yab); -} - -void createalert(struct command *cmd, YabInterface* yab) /* open an alert window (one button only)*/ -{ - char *text, *button1, *type; - - type = pop(stSTRING)->pointer; - button1 = pop(stSTRING)->pointer; - text = pop(stSTRING)->pointer; - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_CreateAlert(text,button1,type, yab); -} - -void setlayout(struct command *cmd, YabInterface *yab) -{ - char *text, *window; - - - window = pop(stSTRING)->pointer; - text = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_SetLayout(text, window, yab); -} - -void winset1(struct command *cmd, YabInterface *yab) -{ - char *option, *value, *window; - - - value = pop(stSTRING)->pointer; - option = pop(stSTRING)->pointer; - window = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_WindowSet1(option,value,window,yab); -} - -void winset2(struct command *cmd, YabInterface *yab) -{ - char *option, *window; - int r, g, b; - - window = pop(stSTRING)->pointer; - b = pop(stNUMBER)->value; - g = pop(stNUMBER)->value; - r = pop(stNUMBER)->value; - option = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_WindowSet2(option,r,g,b,window,yab); -} - -void winset3(struct command *cmd, YabInterface *yab) -{ - char *option, *window; - double x,y; - - - y = pop(stNUMBER)->value; - x = pop(stNUMBER)->value; - option = pop(stSTRING)->pointer; - window = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_WindowSet3(option,x,y,window,yab); -} - -void winset4(struct command *cmd, YabInterface *yab) -{ - char *option, *window; - - - option = pop(stSTRING)->pointer; - window = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_WindowSet4(option,window,yab); -} - -void winclear(struct command *cmd, YabInterface *yab) -{ - char *window; - - - window = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_WindowClear(window,yab); -} - -char* gettranslation(const char* text, YabInterface* yab, int line, const char* libname) /* get translation string */ -{ - yi_SetCurrentLineNumber(line, libname, yab); - yi_Translate((char*)text, translationbuffer); - return my_strdup((char*) translationbuffer); -} - -char* getmenutranslation(const char* text, YabInterface* yab, int line, const char* libname) /* get menu translation string */ -{ - yi_SetCurrentLineNumber(line, libname, yab); - yi_MenuTranslate((char*)text, translationbuffer); - return my_strdup((char*) translationbuffer); -} - -void localize() -{ - yi_SetLocalize(); -} - -void localizestop() -{ - yi_StopLocalize(); -} - -void localize2(struct command *cmd, YabInterface *yab) -{ - char *path; - - path = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_SetLocalize2(path, yab); -} - -char* getloadfilepanel(const char* mode, const char* title, const char* dir, YabInterface *yab, int line, const char* libname) /* load panel */ -{ - yi_SetCurrentLineNumber(line, libname, yab); - return my_strdup((char*)yi_LoadFilePanel(mode, title, dir,yab)); -} - -char* getsavefilepanel(const char* mode, const char* title, const char* dir, const char* filename, YabInterface *yab, int line, const char* libname) /* save panel */ -{ - yi_SetCurrentLineNumber(line, libname, yab); - return my_strdup((char*)yi_SaveFilePanel(mode, title, dir, filename, yab)); -} - -void textedit(struct command *cmd, YabInterface *yab) -{ - char *window, *title; - double x1,y1,x2,y2; - int scrollbar; - - - window = pop(stSTRING)->pointer; - scrollbar = pop(stNUMBER)->value; - title = pop(stSTRING)->pointer; - y2 = pop(stNUMBER)->value; - x2 = pop(stNUMBER)->value; - y1 = pop(stNUMBER)->value; - x1 = pop(stNUMBER)->value; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_TextEdit(x1,y1,x2,y2,title,scrollbar,window,yab); -} - -void textadd(struct command *cmd, YabInterface *yab) -{ - char *title, *text; - - - text = pop(stSTRING)->pointer; - title = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_TextAdd(title,text,yab); -} - -void textset(struct command *cmd, YabInterface *yab) -{ - char *title, *option; - - - option = pop(stSTRING)->pointer; - title = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_TextSet(title,option,yab); -} - -void textset2(struct command *cmd, YabInterface *yab) -{ - char *title, *option; - int value; - - - value = pop(stNUMBER)->value; - option = pop(stSTRING)->pointer; - title = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_TextSet2(title,option,value,yab); -} - -void textset3(struct command *cmd, YabInterface *yab) -{ - char *title, *option, *option2; - - - option2 = pop(stSTRING)->pointer; - option = pop(stSTRING)->pointer; - title = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_TextSet3(title,option,option2,yab); -} - -void textcolor1(struct command *cmd, YabInterface *yab) -{ - char *title, *option, *command; - - - command = pop(stSTRING)->pointer; - option = pop(stSTRING)->pointer; - title = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_TextColor1(title,option,command,yab); -} - -void textcolor2(struct command *cmd, YabInterface *yab) -{ - char *title, *option; - int r,g,b; - - - b = pop(stNUMBER)->value; - g = pop(stNUMBER)->value; - r = pop(stNUMBER)->value; - option = pop(stSTRING)->pointer; - title = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_TextColor2(title,option,r,g,b,yab); -} - -void textclear(struct command *cmd, YabInterface *yab) -{ - char *title; - - - title = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_TextClear(title,yab); -} - -char* textget(const char* title, YabInterface *yab, int line, const char* libname) -{ - yi_SetCurrentLineNumber(line, libname, yab); - return my_strdup((char*)yi_TextGet(title,yab)); -} - -int textget2(const char* title, const char* option, YabInterface *yab, int line, const char* libname) -{ - yi_SetCurrentLineNumber(line, libname, yab); - return yi_TextGet2(title,option,yab); -} - -char* textget3(const char* title, int linenum, YabInterface *yab, int line, const char* libname) -{ - yi_SetCurrentLineNumber(line, libname, yab); - return (char*)yi_TextGet3(title,linenum,yab); -} - -double textget4(const char* title, const char* option, int linenum, YabInterface *yab, int line, const char* libname) -{ - yi_SetCurrentLineNumber(line, libname, yab); - return yi_TextGet4(title,option,linenum,yab); -} - -int textget5(const char* title, const char* option, const char* option2, YabInterface *yab, int line, const char* libname) -{ - yi_SetCurrentLineNumber(line, libname, yab); - return yi_TextGet5(title,option,option2,yab); -} - -char* textget6(const char* title, const char* option, YabInterface *yab, int line, const char* libname) -{ - yi_SetCurrentLineNumber(line, libname, yab); - return (char*)yi_TextGet6(title,option,yab); -} - -void view(struct command *cmd, YabInterface *yab) -{ - char *id, *view; - double x1, y1, x2, y2; - - - view = pop(stSTRING)->pointer; - id = pop(stSTRING)->pointer; - y2 = pop(stNUMBER)->value; - x2 = pop(stNUMBER)->value; - y1 = pop(stNUMBER)->value; - x1 = pop(stNUMBER)->value; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_View(x1,y1,x2,y2, id, view, yab); -} - -void boxview(struct command *cmd, YabInterface *yab) -{ - char *id, *view, *text; - double x1, y1, x2, y2; - int linetype; - - - view = pop(stSTRING)->pointer; - linetype = pop(stNUMBER)->value; - text = pop(stSTRING)->pointer; - id = pop(stSTRING)->pointer; - y2 = pop(stNUMBER)->value; - x2 = pop(stNUMBER)->value; - y1 = pop(stNUMBER)->value; - x1 = pop(stNUMBER)->value; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_BoxView(x1,y1,x2,y2, id, text, linetype, view, yab); -} - -void boxviewset(struct command *cmd, YabInterface *yab) -{ - char *id, *value, *option; - - - - value= pop(stSTRING)->pointer; - option = pop(stSTRING)->pointer; - id = pop(stSTRING)->pointer; - - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_BoxViewSet(id, option, value, yab); -} - - - -void tab(struct command *cmd, YabInterface *yab) -{ - char *id, *names, *view; - double x1, y1, x2, y2; - - - view = pop(stSTRING)->pointer; - names = pop(stSTRING)->pointer; - id = pop(stSTRING)->pointer; - y2 = pop(stNUMBER)->value; - x2 = pop(stNUMBER)->value; - y1 = pop(stNUMBER)->value; - x1 = pop(stNUMBER)->value; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_Tab(x1,y1,x2,y2, id, names, view, yab); -} - -void tabset(struct command *cmd, YabInterface *yab) -{ - char *tabname; - int num; - - - num = pop(stNUMBER)->value; - tabname = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_TabSet(tabname, num, yab); -} - -void tabadd(struct command *cmd, YabInterface *yab) -{ - char *id, *tabname; - - - tabname = pop(stSTRING)->pointer; - id = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_TabAdd(id, tabname, yab); -} - -void tabdel(struct command *cmd, YabInterface *yab) -{ - char *id; - int num; - - - num = pop(stNUMBER)->value; - id = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_TabDel(id, num, yab); -} - -void slider1(struct command *cmd, YabInterface *yab) -{ - char *view, *id, *title; - double x1,y1,x2,y2,min,max; - - - view = pop(stSTRING)->pointer; - max = pop(stNUMBER)->value; - min = pop(stNUMBER)->value; - title = pop(stSTRING)->pointer; - id = pop(stSTRING)->pointer; - y2 = pop(stNUMBER)->value; - x2 = pop(stNUMBER)->value; - y1 = pop(stNUMBER)->value; - x1 = pop(stNUMBER)->value; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_Slider1(x1,y1,x2,y2,id,title,min,max,view,yab); -} - - -void slider2(struct command *cmd, YabInterface *yab) -{ - char *view, *id, *title, *option; - double x1,y1,x2,y2,min,max; - - - view = pop(stSTRING)->pointer; - option = pop(stSTRING)->pointer; - max = pop(stNUMBER)->value; - min = pop(stNUMBER)->value; - title = pop(stSTRING)->pointer; - id = pop(stSTRING)->pointer; - y2 = pop(stNUMBER)->value; - x2 = pop(stNUMBER)->value; - y1 = pop(stNUMBER)->value; - x1 = pop(stNUMBER)->value; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_Slider2(x1,y1,x2,y2,id,title,min,max,option,view,yab); -} - -void slider3(struct command *cmd, YabInterface *yab) -{ - char *id, *label1, *label2; - - - label2 = pop(stSTRING)->pointer; - label1 = pop(stSTRING)->pointer; - id = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_SetSlider1(id,label1,label2,yab); -} - - -void slider4(struct command *cmd, YabInterface *yab) -{ - char *id, *bottomtop; - int count; - - - count = pop(stNUMBER)->value; - bottomtop = pop(stSTRING)->pointer; - id = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_SetSlider2(id,bottomtop,count,yab); -} - -void slider5(struct command *cmd, YabInterface *yab) -{ - char *id, *part; - int r,g,b; - - - b = pop(stNUMBER)->value; - g = pop(stNUMBER)->value; - r = pop(stNUMBER)->value; - part = pop(stSTRING)->pointer; - id = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_SetSlider3(id,part,r,g,b,yab); -} - -void slider6(struct command *cmd, YabInterface *yab) -{ - char *id; - int value; - - - value = pop(stNUMBER)->value; - id = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_SetSlider4(id,value,yab); -} - -void option1(struct command *cmd, YabInterface *yab) -{ - char *id, *option, *value; - - - value = pop(stSTRING)->pointer; - option = pop(stSTRING)->pointer; - id = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_SetOption1(id,option,value,yab); -} - -void option2(struct command *cmd, YabInterface *yab) -{ - char *id, *part; - int r,g,b; - - - b = pop(stNUMBER)->value; - g = pop(stNUMBER)->value; - r = pop(stNUMBER)->value; - part = pop(stSTRING)->pointer; - id = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_SetOption2(id,part,r,g,b,yab); -} - -void option3(struct command *cmd, YabInterface *yab) -{ - char *id, *option; - double x,y; - - - y = pop(stNUMBER)->value; - x = pop(stNUMBER)->value; - option = pop(stSTRING)->pointer; - id = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_SetOption3(id,option,x,y,yab); -} - -void option4(struct command *cmd, YabInterface *yab) -{ - char *id, *option; - - - option = pop(stSTRING)->pointer; - id = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_SetOption4(id,option,yab); -} - -void option5(struct command *cmd, YabInterface *yab) -{ - char *id, *option; - int value; - - - value = pop(stNUMBER)->value; - option = pop(stSTRING)->pointer; - id = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_SetOption5(id,option,value,yab); -} - -void dropzone(struct command *cmd, YabInterface *yab) -{ - char *view; - - - view = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_DropZone(view,yab); -} - -void colorcontrol1(struct command *cmd, YabInterface *yab) -{ - char *view, *id; - double x,y; - - - view = pop(stSTRING)->pointer; - id = pop(stSTRING)->pointer; - y = pop(stNUMBER)->value; - x = pop(stNUMBER)->value; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_ColorControl1(x,y,id,view,yab); -} - -void colorcontrol2(struct command *cmd, YabInterface *yab) -{ - char *id; - double r,g,b; - - - b = pop(stNUMBER)->value; - g = pop(stNUMBER)->value; - r = pop(stNUMBER)->value; - id = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_ColorControl2(id,r,g,b,yab); -} - -void textcontrol2(struct command *cmd, YabInterface *yab) -{ - char *id, *text; - - - text = pop(stSTRING)->pointer; - id = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_TextControl2(id,text,yab); -} - -void textcontrol3(struct command *cmd, YabInterface *yab) -{ - char *id; - int mode; - mode = pop(stNUMBER)->value; - id = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_TextControl3(id,mode,yab); -} - -void textcontrol5(struct command *cmd, YabInterface *yab) -{ - char *id; - - - id = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_TextControl5(id,yab); -} - - -void textcontrol4(struct command *cmd, YabInterface *yab) -{ - char *id, *option, *value; - - - value = pop(stSTRING)->pointer; - option = pop(stSTRING)->pointer; - id = pop(stSTRING)->pointer; - - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_TextControl4(id,option,value,yab); -} - - - - -void treebox1(struct command *cmd, YabInterface *yab) -{ - char *id, *view; - double x1,y1,x2,y2; - int scrollbarType; - - - view = pop(stSTRING)->pointer; - scrollbarType = pop(stNUMBER)->value; - id = pop(stSTRING)->pointer; - y2 = pop(stNUMBER)->value; - x2 = pop(stNUMBER)->value; - y1 = pop(stNUMBER)->value; - x1 = pop(stNUMBER)->value; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_TreeBox1(x1,y1,x2,y2,id,scrollbarType,view,yab); -} - -void treebox2(struct command *cmd, YabInterface *yab) -{ - char *id, *item; - - - item = pop(stSTRING)->pointer; - id = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_TreeBox2(id,item,yab); -} - -void treebox3(struct command *cmd, YabInterface *yab) -{ - char *id, *head, *item; - int isExpanded; - - - isExpanded = pop(stNUMBER)->value; - item = pop(stSTRING)->pointer; - head = pop(stSTRING)->pointer; - id = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_TreeBox3(id,head,item,isExpanded,yab); -} - -void treebox4(struct command *cmd, YabInterface *yab) -{ - char *id; - - - id = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_TreeBox4(id,yab); -} - -void treebox5(struct command *cmd, YabInterface *yab) -{ - char *id,*item; - - - item = pop(stSTRING)->pointer; - id = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_TreeBox5(id,item,yab); -} - -void treebox7(struct command *cmd, YabInterface *yab) -{ - char *id; - int pos; - - - pos = pop(stNUMBER)->value; - id = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_TreeBox7(id,pos,yab); -} - -void treebox8(struct command *cmd, YabInterface *yab) -{ - char *id; - int pos; - - - pos = pop(stNUMBER)->value; - id = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_TreeBox8(id,pos,yab); -} - -void treebox9(struct command *cmd, YabInterface *yab) -{ - char *id, *head, *item; - - - item = pop(stSTRING)->pointer; - head = pop(stSTRING)->pointer; - id = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_TreeBox9(id,head,item,yab); -} - -void treebox10(struct command *cmd, YabInterface *yab) -{ - char *id, *head; - - - head = pop(stSTRING)->pointer; - id = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_TreeBox10(id,head,yab); -} - -void treebox11(struct command *cmd, YabInterface *yab) -{ - char *id, *head; - - - head = pop(stSTRING)->pointer; - id = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_TreeBox11(id,head,yab); -} - -void treebox12(struct command *cmd, YabInterface *yab) -{ - char *id, *item; - int pos; - - - pos = pop(stNUMBER)->value; - item = pop(stSTRING)->pointer; - id = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_TreeBox12(id,item,pos,yab); -} - -void buttonimage(struct command *cmd, YabInterface *yab) -{ - char *id, *enabledon, *enabledoff, *disabled, *view; - double x,y; - - - view = pop(stSTRING)->pointer; - disabled = pop(stSTRING)->pointer; - enabledoff = pop(stSTRING)->pointer; - enabledon = pop(stSTRING)->pointer; - id = pop(stSTRING)->pointer; - y = pop(stNUMBER)->value; - x = pop(stNUMBER)->value; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_ButtonImage(x,y,id,enabledon, enabledoff, disabled, view,yab); -} - -void checkboximage(struct command *cmd, YabInterface *yab) -{ - char *id, *enabledon, *enabledoff, *disabledon, *disabledoff, *view; - double x,y; - int isActivated; - - - view = pop(stSTRING)->pointer; - isActivated = pop(stNUMBER)->value; - disabledoff = pop(stSTRING)->pointer; - disabledon = pop(stSTRING)->pointer; - enabledoff = pop(stSTRING)->pointer; - enabledon = pop(stSTRING)->pointer; - id = pop(stSTRING)->pointer; - y = pop(stNUMBER)->value; - x = pop(stNUMBER)->value; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_CheckboxImage(x,y,id,enabledon, enabledoff, disabledon, disabledoff, isActivated, view,yab); -} - -void checkboxset(struct command *cmd, YabInterface *yab) -{ - char *id; - int isActivated; - - - isActivated = pop(stNUMBER)->value; - id = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_CheckboxSet(id,isActivated,yab); -} - -void radioset(struct command *cmd, YabInterface *yab) -{ - char *id; - int isActivated; - - - isActivated = pop(stNUMBER)->value; - id = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_RadioSet(id,isActivated,yab); -} - -char* textcontrolget(const char* textcontrol, YabInterface *yab, int line, const char* libname) -{ - yi_SetCurrentLineNumber(line, libname, yab); - return my_strdup((char*)yi_TextControlGet(textcontrol,yab)); -} - -void tooltip(struct command *cmd, YabInterface *yab) -{ - char *view,*text; - - - text = pop(stSTRING)->pointer; - view = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_ToolTip(view,text,yab); -} -void tooltipnew(struct command *cmd, YabInterface *yab) -{ - char *view, *text, *color; - int r,g,b; - - b = pop(stNUMBER)->value; - g = pop(stNUMBER)->value; - r = pop(stNUMBER)->value; - - color = pop(stSTRING)->pointer; - text = pop(stSTRING)->pointer; - view = pop(stSTRING)->pointer; - - - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_ToolTipNew(view,text,color,r,g,b,yab); -} -void tooltipcolor(struct command *cmd, YabInterface *yab) -{ - char *color; - int r,g,b; - - - b = pop(stNUMBER)->value; - g = pop(stNUMBER)->value; - r = pop(stNUMBER)->value; - color = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_ToolTipColor(color,r,g,b,yab); -} - -void listsort(struct command *cmd, YabInterface *yab) -{ - char *id; - - - id = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_ListSort(id,yab); -} - -void treesort(struct command *cmd, YabInterface *yab) -{ - char *id; - - - id = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_TreeSort(id,yab); -} - -void filebox(struct command *cmd, YabInterface *yab) -{ - char *id,*view, *option; - int scrollbar; - double x1,y1,x2,y2; - - - view = pop(stSTRING)->pointer; - option = pop(stSTRING)->pointer; - scrollbar = pop(stNUMBER)->value; - id = pop(stSTRING)->pointer; - y2 = pop(stNUMBER)->value; - x2 = pop(stNUMBER)->value; - y1 = pop(stNUMBER)->value; - x1 = pop(stNUMBER)->value; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_FileBox(x1,y1,x2,y2,id,scrollbar,option,view,yab); -} - -void fileboxadd2(struct command *cmd, YabInterface *yab) -{ - char *columnbox, *name, *option; - double width, maxWidth, minWidth; - int pos; - - - option = pop(stSTRING)->pointer; - width = pop(stNUMBER)->value; - minWidth = pop(stNUMBER)->value; - maxWidth = pop(stNUMBER)->value; - pos = pop(stNUMBER)->value; - name = pop(stSTRING)->pointer; - columnbox = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_FileBoxAdd2(columnbox, name, pos, maxWidth, minWidth, width, option, yab); -} - -void fileboxclear(struct command *cmd, YabInterface *yab) -{ - char *id; - - - id = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_FileBoxClear(id,yab); -} - -void columnboxadd(struct command *cmd, YabInterface *yab) -{ - char *id, *item ; - int position, height, column; - - - item = pop(stSTRING)->pointer; - height = pop(stNUMBER)->value; - position = pop(stNUMBER)->value; - column = pop(stNUMBER)->value; - id = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_ColumnBoxAdd(id,column,position,height,item,yab); -} - -void columnboxremove(struct command *cmd, YabInterface *yab) -{ - char *columnbox; - int pos; - - - pos = pop(stNUMBER)->value; - columnbox = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_ColumnBoxRemove(columnbox,pos,yab); -} - -void columnboxselect(struct command *cmd, YabInterface *yab) -{ - char *columnbox; - int pos; - - - pos = pop(stNUMBER)->value; - columnbox = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_ColumnBoxSelect(columnbox,pos,yab); -} - -void columnboxcolor(struct command *cmd, YabInterface *yab) -{ - char *columnbox, *option; - int r,g,b; - - - b = pop(stNUMBER)->value; - g = pop(stNUMBER)->value; - r = pop(stNUMBER)->value; - option = pop(stSTRING)->pointer; - columnbox = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_ColumnBoxColor(columnbox,option,r,g,b,yab); -} - -void dropboxselect(struct command *cmd, YabInterface *yab) -{ - char *dropbox; - int num; - - - num = pop(stNUMBER)->value; - dropbox = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_DropBoxSelect(dropbox,num,yab); -} - -void menu2(struct command *cmd, YabInterface *yab) -{ - char *menuhead, *view; - int radio; - - - view = pop(stSTRING)->pointer; - radio = pop(stNUMBER)->value; - menuhead = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_Menu2(menuhead,radio,view,yab); -} - -void submenu1(struct command *cmd, YabInterface *yab) -{ - char *menuhead, *menuitem, *submenuitem, *modifier, *view; - - - view = pop(stSTRING)->pointer; - modifier = pop(stSTRING)->pointer; - submenuitem = pop(stSTRING)->pointer; - menuitem = pop(stSTRING)->pointer; - menuhead = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_SubMenu1(menuhead,menuitem,submenuitem,modifier,view,yab); -} - -void submenu2(struct command *cmd, YabInterface *yab) -{ - char *menuhead, *menuitem, *view; - int radio; - - - view = pop(stSTRING)->pointer; - radio = pop(stNUMBER)->value; - menuitem = pop(stSTRING)->pointer; - menuhead = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_SubMenu2(menuhead,menuitem,radio,view,yab); -} - -void submenu3(struct command *cmd, YabInterface *yab) -{ - char *menuhead, *menuitem, *submenuitem, *option, *view; - - - view = pop(stSTRING)->pointer; - option = pop(stSTRING)->pointer; - submenuitem = pop(stSTRING)->pointer; - menuitem = pop(stSTRING)->pointer; - menuhead = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_SubMenu3(menuhead,menuitem,submenuitem,option,view,yab); -} - -void menu3(struct command *cmd, YabInterface *yab) -{ - char *menuhead, *menuitem, *option, *view; - - - view = pop(stSTRING)->pointer; - option = pop(stSTRING)->pointer; - menuitem = pop(stSTRING)->pointer; - menuhead = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_Menu3(menuhead,menuitem,option,view,yab); -} - -int sliderget(const char *slider, YabInterface *yab, int line, const char* libname) -{ - - yi_SetCurrentLineNumber(line, libname, yab); - return yi_SliderGet(slider, yab); -} - -int colorcontrolget(const char* colorcontrol, const char* option, YabInterface *yab, int line, const char* libname) -{ - - yi_SetCurrentLineNumber(line, libname, yab); - return yi_ColorControlGet(colorcontrol, option, yab); -} - -void spincontrol1(struct command *cmd, YabInterface *yab) -{ - char *id, *view, *label; - int min, max, step; - double x,y; - - - view = pop(stSTRING)->pointer; - step = pop(stNUMBER)->value; - max = pop(stNUMBER)->value; - min = pop(stNUMBER)->value; - label = pop(stSTRING)->pointer; - id = pop(stSTRING)->pointer; - y = pop(stNUMBER)->value; - x = pop(stNUMBER)->value; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_SpinControl1(x,y,id,label,min,max,step,view,yab); -} - -void spincontrol2(struct command *cmd, YabInterface *yab) -{ - char *spincontrol; - int value; - - - value = pop(stNUMBER)->value; - spincontrol = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_SpinControl2(spincontrol,value,yab); -} - -int spincontrolget(const char* view, YabInterface *yab, int line, const char* libname) -{ - yi_SetCurrentLineNumber(line, libname, yab); - return yi_SpinControlGet(view,yab); -} - -char* popupmenu(double x, double y, const char* menuitems, const char* view, YabInterface *yab, int line, const char* libname) -{ - - yi_SetCurrentLineNumber(line, libname, yab); - return my_strdup((char*)yi_PopUpMenu(x,y,menuitems,view,yab)); -} - -void dropboxremove(struct command *cmd, YabInterface *yab) -{ - char *dropbox; - int value; - - - value = pop(stNUMBER)->value; - dropbox = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_DropBoxRemove(dropbox,value,yab); -} - -void dropboxclear(struct command *cmd, YabInterface *yab) -{ - char *dropbox; - - - dropbox = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_DropBoxClear(dropbox,yab); -} - -int dropboxcount(const char* id, YabInterface *yab, int line, const char* libname) -{ - - yi_SetCurrentLineNumber(line, libname, yab); - return yi_DropBoxCount(id,yab); -} - -char* dropboxget(const char* id, int position, YabInterface *yab, int line, const char* libname) -{ - - yi_SetCurrentLineNumber(line, libname, yab); - return my_strdup((char*)yi_DropBoxGet(id,position,yab)); -} - -void splitview1(struct command *cmd, YabInterface *yab) -{ - char *id, *view; - double x1,y1,x2,y2; - int isVertical, NormalStyle; - - - view = pop(stSTRING)->pointer; - NormalStyle = pop(stNUMBER)->value; - isVertical = pop(stNUMBER)->value; - id = pop(stSTRING)->pointer; - - y2 = pop(stNUMBER)->value; - x2 = pop(stNUMBER)->value; - y1 = pop(stNUMBER)->value; - x1 = pop(stNUMBER)->value; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_SplitView1(x1,y1,x2,y2, id, isVertical, NormalStyle, view, yab); -} - -void splitview2(struct command *cmd, YabInterface *yab) -{ - char *id, *option; - double value; - - - value = pop(stNUMBER)->value; - option = pop(stSTRING)->pointer; - id = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_SplitView2(id, option, value, yab); -} - -void splitview3(struct command *cmd, YabInterface *yab) -{ - char *id, *option; - double left, right; - - - right = pop(stNUMBER)->value; - left = pop(stNUMBER)->value; - option = pop(stSTRING)->pointer; - id = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_SplitView3(id, option, left, right, yab); -} - -double splitviewget(const char* id, const char* option, YabInterface *yab, int line, const char* libname) -{ - yi_SetCurrentLineNumber(line, libname, yab); - return yi_SplitViewGet(id, option, yab); -} - -void stackview1(struct command *cmd, YabInterface *yab) -{ - char *id, *view; - double x1,y1,x2,y2; - int number; - - - view = pop(stSTRING)->pointer; - number = pop(stNUMBER)->value; - id = pop(stSTRING)->pointer; - - y2 = pop(stNUMBER)->value; - x2 = pop(stNUMBER)->value; - y1 = pop(stNUMBER)->value; - x1 = pop(stNUMBER)->value; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_StackView1(x1,y1,x2,y2, id, number, view, yab); -} - -void stackview2(struct command *cmd, YabInterface *yab) -{ - char *id; - int num; - - - num = pop(stNUMBER)->value; - id = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_StackView2(id, num, yab); -} - -int stackviewget(const char* id, YabInterface *yab, int line, const char* libname) -{ - yi_SetCurrentLineNumber(line, libname, yab); - return yi_StackViewGet(id, yab); -} - -int tabviewget(const char* id, YabInterface *yab, int line, const char* libname) -{ - yi_SetCurrentLineNumber(line, libname, yab); - return yi_TabViewGet(id, yab); -} - -void calendar1(struct command *cmd, YabInterface *yab) -{ - char *format, *id, *date, *view; - double x,y; - - - view = pop(stSTRING)->pointer; - date = pop(stSTRING)->pointer; - format = pop(stSTRING)->pointer; - id = pop(stSTRING)->pointer; - - y = pop(stNUMBER)->value; - x = pop(stNUMBER)->value; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_Calendar1(x,y, id, format, date, view, yab); -} - -char* calendar2(const char* id, YabInterface *yab, int line, const char* libname) -{ - - yi_SetCurrentLineNumber(line, libname, yab); - return my_strdup((char*)yi_Calendar2(id, yab)); -} - -void calendar3(struct command *cmd, YabInterface *yab) -{ - char *id, *date; - - - date = pop(stSTRING)->pointer; - id = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_Calendar3(id, date, yab); -} - -void scrollbar(struct command *cmd, YabInterface *yab) -{ - char *view, *id; - int format; - - view = pop(stSTRING)->pointer; - format = pop(stNUMBER)->value; - id = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_Scrollbar(id, format, view, yab); -} - -void scrollbarset1(struct command *cmd, YabInterface *yab) -{ - char *scrollbar, *option; - double position; - - - position = pop(stNUMBER)->value; - option = pop(stSTRING)->pointer; - scrollbar = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_ScrollbarSet1(scrollbar, option, position, yab); -} - -void scrollbarset2(struct command *cmd, YabInterface *yab) -{ - char *scrollbar, *option; - double a,b; - - - b = pop(stNUMBER)->value; - a = pop(stNUMBER)->value; - option = pop(stSTRING)->pointer; - scrollbar = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_ScrollbarSet2(scrollbar, option, a, b, yab); -} - -void scrollbarset3(struct command *cmd, YabInterface *yab) -{ - char *scrollbar, *option; - double a,b; - - - option = pop(stSTRING)->pointer; - scrollbar = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_ScrollbarSet3(scrollbar, option, yab); -} - -void texturl1(struct command *cmd, YabInterface *yab) -{ - char *id, *text, *url, *view; - double x,y; - - - view = pop(stSTRING)->pointer; - url = pop(stSTRING)->pointer; - text = pop(stSTRING)->pointer; - id = pop(stSTRING)->pointer; - - y = pop(stNUMBER)->value; - x = pop(stNUMBER)->value; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_TextURL1(x,y, id, text, url, view, yab); -} - -void texturl2(struct command *cmd, YabInterface *yab) -{ - char *id, *color; - int r,g,b; - - - b = pop(stNUMBER)->value; - g = pop(stNUMBER)->value; - r = pop(stNUMBER)->value; - color = pop(stSTRING)->pointer; - id = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_TextURL2(id, color,r,g,b,yab); -} - -double scrollbarget(const char* scrollbar, const char* option, YabInterface *yab, int line, const char* libname) -{ - yi_SetCurrentLineNumber(line, libname, yab); - return yi_ScrollbarGet(scrollbar, option, yab); -} - -void clipboardcopy(struct command *cmd, YabInterface *yab) -{ - char *text; - text = pop(stSTRING)->pointer; - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_ClipboardCopy(text,yab); -} - -int printer(const char* docname, const char *view, const char* config, YabInterface *yab,int line, const char* libname) -{ - - yi_SetCurrentLineNumber(line, libname, yab); - return yi_Printer(docname, view,config,yab); -} - -void printerconfig(struct command *cmd, YabInterface *yab) -{ - char *config, *docname; - - config = pop(stSTRING)->pointer; - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_PrinterConfig(config,yab); -} - -void listboxadd1(struct command *cmd, YabInterface *yab) -{ - char *listbox, *item; - - - item = pop(stSTRING)->pointer; - listbox = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_ListboxAdd1(listbox, item, yab); -} - -void listboxadd2(struct command *cmd, YabInterface *yab) -{ - char *listbox, *item; - int position; - - - item = pop(stSTRING)->pointer; - position = pop(stNUMBER)->value; - listbox = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_ListboxAdd2(listbox, position, item, yab); -} - -void listboxselect(struct command *cmd, YabInterface *yab) -{ - char *listbox; - int position; - - - position = pop(stNUMBER)->value; - listbox = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_ListboxSelect(listbox, position, yab); -} - -void listboxremove(struct command *cmd, YabInterface *yab) -{ - char *listbox; - int position; - - - position = pop(stNUMBER)->value; - listbox = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_ListboxRemove(listbox, position, yab); -} - -char* clipboardpaste(YabInterface* yab, int line, const char* libname) -{ - yi_SetCurrentLineNumber(line, libname, yab); - return my_strdup((char*)yi_ClipboardPaste(yab)); -} - -char* keyboardmessages(const char* view, YabInterface* yab, int line, const char* libname) -{ - yi_SetCurrentLineNumber(line, libname, yab); - return my_strdup((char*)yi_KeyboardMessages(view,yab)); -} - -char* columnboxget(const char* columnbox, int column, int position, YabInterface* yab, int line, const char* libname) -{ - yi_SetCurrentLineNumber(line, libname, yab); - return my_strdup((char*)yi_ColumnBoxGet(columnbox,column,position,yab)); -} - -int columnboxcount(const char* columnbox, YabInterface* yab, int line, const char* libname) -{ - yi_SetCurrentLineNumber(line, libname, yab); - return yi_ColumnBoxCount(columnbox, yab); -} - -int windowgetnum(const char* view, const char *option, YabInterface* yab, int line, const char* libname) -{ - - yi_SetCurrentLineNumber(line, libname, yab); - return yi_WindowGet(view,option,yab); -} - -int viewgetnum(const char* view, const char *option, YabInterface* yab, int line, const char* libname) //vasper -{ - - yi_SetCurrentLineNumber(line, libname, yab); - return yi_ViewGet(view,option,yab); -} - -double drawget1(const char* option, const char* txt, const char* view, YabInterface* yab, int line, const char* libname) -{ - - yi_SetCurrentLineNumber(line, libname, yab); - return yi_DrawGet1(option, txt, view, yab); -} - -double drawget2(const char* option, const char* view, YabInterface* yab, int line, const char* libname) -{ - - yi_SetCurrentLineNumber(line, libname, yab); - return yi_DrawGet2(option, view, yab); -} - -char* drawget3(const char* option, YabInterface* yab, int line, const char* libname) -{ - yi_SetCurrentLineNumber(line, libname, yab); - return my_strdup((char*)yi_DrawGet3(option, yab)); -} - -int drawget4(double x, double y, const char* rgb, const char* view, YabInterface* yab, int line, const char* libname) -{ - yi_SetCurrentLineNumber(line, libname, yab); - return yi_DrawGet4(x,y,rgb, view, yab); -} - -int newalert(const char* text, const char* button1, const char* button2, const char* button3, const char* option, YabInterface* yab, int line, const char* libname) -{ - yi_SetCurrentLineNumber(line, libname, yab); - return yi_NewAlert(text,button1,button2,button3,option,yab); -} - -char* listboxget(const char* listbox, int position, YabInterface *yab, int line, const char* libname) -{ - yi_SetCurrentLineNumber(line, libname, yab); - return my_strdup((char*)yi_ListboxGet(listbox,position,yab)); -} - -int listboxcount(const char* listbox, YabInterface *yab, int line, const char* libname) -{ - yi_SetCurrentLineNumber(line, libname, yab); - return yi_ListboxCount(listbox, yab); -} - -char* treeboxget(const char* treebox, int position, YabInterface *yab, int line, const char* libname) -{ - yi_SetCurrentLineNumber(line, libname, yab); - return my_strdup((char*)yi_TreeboxGet(treebox,position,yab)); -} - -int treeboxcount(const char* treebox, YabInterface *yab, int line, const char* libname) -{ - yi_SetCurrentLineNumber(line, libname, yab); - return yi_TreeboxCount(treebox, yab); -} - -int ismousein(const char* view, YabInterface *yab, int line, const char* libname) -{ - yi_SetCurrentLineNumber(line, libname, yab); - return yi_IsMouseIn(view,yab); -} - -char* getmousein(YabInterface *yab, int line, const char* libname) -{ - yi_SetCurrentLineNumber(line, libname, yab); - return my_strdup((char*)yi_GetMouseIn(yab)); -} - -char* getmousemessages(const char* view, YabInterface* yab, int line, const char* libname) /* get a mouse message string */ -{ - yi_SetCurrentLineNumber(line, libname, yab); - return my_strdup((char*)yi_GetMouseMessages(view, yab)); -} - -char* getmessages(YabInterface* yab, int line, const char* libname) /* get message string */ -{ - // char tmp[1024]; - //strcpy(tmp, yi_CheckMessages(yab)); - yi_SetCurrentLineNumber(line, libname, yab); - return my_strdup((char*)yi_CheckMessages(yab)); -} - -int messagesend(const char* app, const char *msg, YabInterface *yab, int line, const char* libname) -{ - yi_SetCurrentLineNumber(line, libname, yab); - return yi_MessageSend(app, msg, yab); -} - -int threadkill(const char* option, int id, YabInterface *yab, int line, const char* libname) -{ - yi_SetCurrentLineNumber(line, libname, yab); - return yi_ThreadKill(option, id, yab); -} - -int threadget(const char* option, const char* appname, YabInterface *yab, int line, const char* libname) -{ - yi_SetCurrentLineNumber(line, libname, yab); - return yi_ThreadGet(option, appname, yab); -} - -void bitmap(struct command *cmd, YabInterface *yab) -{ - char *id; - double w,h; - - id = pop(stSTRING)->pointer; - h = pop(stNUMBER)->value; - w = pop(stNUMBER)->value; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_Bitmap(w, h, id, yab); -} - -void bitmapdraw(struct command *cmd, YabInterface *yab) -{ - char *id, *mask, *view; - double x,y; - - view = pop(stSTRING)->pointer; - mask = pop(stSTRING)->pointer; - id = pop(stSTRING)->pointer; - y = pop(stNUMBER)->value; - x = pop(stNUMBER)->value; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_BitmapDraw(x,y, id, mask, view, yab); -} - -void bitmapdraw2(struct command *cmd, YabInterface *yab) -{ - char *id, *mask, *view; - double x1,y1,x2,y2; - - view = pop(stSTRING)->pointer; - mask = pop(stSTRING)->pointer; - id = pop(stSTRING)->pointer; - y2 = pop(stNUMBER)->value; - x2 = pop(stNUMBER)->value; - y1 = pop(stNUMBER)->value; - x1 = pop(stNUMBER)->value; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_BitmapDraw2(x1,y1,x2,y2, id, mask, view, yab); -} - -void bitmapget(struct command *cmd, YabInterface *yab) -{ - char *id, *bitmap; - double x1,y1,x2,y2; - - bitmap = pop(stSTRING)->pointer; - id = pop(stSTRING)->pointer; - y2 = pop(stNUMBER)->value; - x2 = pop(stNUMBER)->value; - y1 = pop(stNUMBER)->value; - x1 = pop(stNUMBER)->value; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_BitmapGet(x1,y1, x2,y2, id, bitmap, yab); -} - -void bitmapget2(struct command *cmd, YabInterface *yab) -{ - char *id, *path; - double w; - - path = pop(stSTRING)->pointer; - id = pop(stSTRING)->pointer; - w = pop(stNUMBER)->value; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_BitmapGet2(w, id, path, yab); -} - -void bitmapgeticon(struct command *cmd, YabInterface *yab) -{ - char *id, *option, *path; - - path = pop(stSTRING)->pointer; - option = pop(stSTRING)->pointer; - id = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_BitmapGetIcon(id, option, path, yab); -} - -void bitmapdrag(struct command *cmd, YabInterface *yab) -{ - char *id; - - id = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_BitmapDrag(id, yab); -} - -void screenshot(struct command *cmd, YabInterface *yab) -{ - char *bitmap; - double x1,y1,x2,y2; - - bitmap = pop(stSTRING)->pointer; - y2 = pop(stNUMBER)->value; - x2 = pop(stNUMBER)->value; - y1 = pop(stNUMBER)->value; - x1 = pop(stNUMBER)->value; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_Screenshot(x1,y1,x2,y2, bitmap, yab); -} - -void statusbar(struct command *cmd, YabInterface *yab) -{ - char *view, *label2, *label1, *id; - double x1, y1, x2, y2; - - view = pop(stSTRING)->pointer; - label2 = pop(stSTRING)->pointer; - label1 = pop(stSTRING)->pointer; - id = pop(stSTRING)->pointer; - y2 = pop(stNUMBER)->value; - x2 = pop(stNUMBER)->value; - y1 = pop(stNUMBER)->value; - x1 = pop(stNUMBER)->value; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_StatusBar(x1,y1,x2,y2, id, label1, label2, view, yab); -} - -void statusbarset(struct command *cmd, YabInterface *yab) -{ - double state; - char *label2, *label1, *id; - - state = pop(stNUMBER)->value; - label2 = pop(stSTRING)->pointer; - label1 = pop(stSTRING)->pointer; - id = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_StatusBarSet(id, label1, label2, state, yab); -} - -void statusbarset2(struct command *cmd, YabInterface *yab) -{ - double x1, y1, x2, y2; - char *id, *view; - - view = pop(stSTRING)->pointer; - id = pop(stSTRING)->pointer; - y2 = pop(stNUMBER)->value; - x2 = pop(stNUMBER)->value; - y1 = pop(stNUMBER)->value; - x1 = pop(stNUMBER)->value; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_StatusBarSet2(x1,y1,x2,y2, id, view, yab); -} - -void statusbarset3(struct command *cmd, YabInterface *yab) -{ - int r,g,b; - char *id; - - b = pop(stNUMBER)->value; - g = pop(stNUMBER)->value; - r = pop(stNUMBER)->value; - id = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_StatusBarSet3(id, r, g, b, yab); -} - -void bitmapremove(struct command *cmd, YabInterface *yab) -{ - char *id; - - id = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_BitmapRemove(id, yab); -} - -int bitmapsave(const char* id, const char* filename, const char* type, YabInterface *yab, int line, const char* libname) -{ - yi_SetCurrentLineNumber(line, libname, yab); - return yi_BitmapSave(id, filename, type, yab); -} - -int bitmapload(const char* filename, const char* id, YabInterface *yab, int line, const char* libname) -{ - yi_SetCurrentLineNumber(line, libname, yab); - return yi_BitmapLoad(filename, id, yab); -} - -int bitmapgetnum(const char* id, const char* option, YabInterface *yab, int line, const char* libname) -{ - yi_SetCurrentLineNumber(line, libname, yab); - return yi_BitmapGetNum(id, option, yab); -} - -int bitmapcolor(double x, double y, const char* id, const char* option, YabInterface *yab, int line, const char* libname) -{ - yi_SetCurrentLineNumber(line, libname, yab); - return yi_BitmapColor(x,y,id,option,yab); -} - -void canvas(struct command *cmd, YabInterface *yab) -{ - char *id, *view; - double x1,y1,x2,y2; - - - view = pop(stSTRING)->pointer; - id = pop(stSTRING)->pointer; - y2 = pop(stNUMBER)->value; - x2 = pop(stNUMBER)->value; - y1 = pop(stNUMBER)->value; - x1 = pop(stNUMBER)->value; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_Canvas(x1,y1,x2,y2,id,view, yab); -} - -int listboxgetnum(const char* id, YabInterface *yab, int line, const char* libname) -{ - yi_SetCurrentLineNumber(line, libname, yab); - return yi_ListboxGetNum(id, yab); -} - -int dropboxgetnum(const char* id, YabInterface *yab, int line, const char* libname) -{ - yi_SetCurrentLineNumber(line, libname, yab); - return yi_DropboxGetNum(id, yab); -} - -int columnboxgetnum(const char* id, YabInterface *yab, int line, const char* libname) -{ - yi_SetCurrentLineNumber(line, libname, yab); - return yi_ColumnboxGetNum(id, yab); -} - -int treeboxgetnum(const char* id, YabInterface *yab, int line, const char* libname) -{ - yi_SetCurrentLineNumber(line, libname, yab); - return yi_TreeboxGetNum(id, yab); -} - -int treeboxgetopt(const char* id, const char* option, int pos, YabInterface *yab, int line, const char* libname) -{ - yi_SetCurrentLineNumber(line, libname, yab); - return yi_TreeboxGetOpt(id, option, pos, yab); -} - -void treebox13(struct command *cmd, YabInterface *yab) -{ - char *id, *option; - int pos; - - pos = pop(stNUMBER)->value; - option = pop(stSTRING)->pointer; - id = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_Treebox13(id,option,pos, yab); -} - -void drawset4(struct command *cmd, YabInterface *yab) -{ - char *option, *color, *view; - - view = pop(stSTRING)->pointer; - color = pop(stSTRING)->pointer; - option = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_DrawSet4(option, color, view, yab); -} - -void launch(struct command *cmd, YabInterface *yab) -{ - char *strg; - strg = pop(stSTRING)->pointer; - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_Launch(strg, yab); -} - -int sound(const char* filename, YabInterface *yab, int line, const char* libname) -{ - yi_SetCurrentLineNumber(line, libname, yab); - return yi_Sound(filename, yab); -} - -void soundstop(struct command *cmd, YabInterface *yab) -{ - int id; - - id = pop(stNUMBER)->value; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_SoundStop(id, yab); -} - -void soundwait(struct command *cmd, YabInterface *yab) -{ - int id; - - id = pop(stNUMBER)->value; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_SoundWait(id, yab); -} - -int mediasound(const char* filename, YabInterface *yab, int line, const char* libname) -{ - yi_SetCurrentLineNumber(line, libname, yab); - return yi_MediaSound(filename, yab); -} - -void mediasoundstop(struct command *cmd, YabInterface *yab) -{ - int id; - - id = pop(stNUMBER)->value; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_MediaSoundStop(id, yab); -} -int iscomputeron(YabInterface *yab, int line, const char* libname) -{ - yi_SetCurrentLineNumber(line, libname, yab); - return yi_IsComputerOn(yab); -} - -void attribute1(struct command *cmd, YabInterface *yab) -{ - char *type, *name, *value, *filename; - - filename = pop(stSTRING)->pointer; - value = pop(stSTRING)->pointer; - name = pop(stSTRING)->pointer; - type = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_Attribute1(type, name, value, filename, yab); -} - -void attributeclear(struct command *cmd, YabInterface *yab) -{ - char *name, *filename; - - filename = pop(stSTRING)->pointer; - name = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_AttributeClear(name, filename, yab); -} - - -char* attributeget1(const char* name, const char* filename, YabInterface *yab, int line, const char* libname) -{ - yi_SetCurrentLineNumber(line, libname, yab); - return my_strdup((char*)yi_AttributeGet1(name, filename, yab)); -} - -double attributeget2(const char* name, const char* filename, YabInterface *yab, int line, const char* libname) -{ - yi_SetCurrentLineNumber(line, libname, yab); - return yi_AttributeGet2(name, filename, yab); -} - -void shortcut(struct command *cmd, YabInterface *yab) -{ - char *view, *key, *msg; - - msg = pop(stSTRING)->pointer; - key = pop(stSTRING)->pointer; - view = pop(stSTRING)->pointer; - - yi_SetCurrentLineNumber(cmd->line, (const char*)cmd->lib->s, yab); - yi_ShortCut(view, key, msg, yab); -} - -void gettermkey(char *keybuff) /* read a key from terminal */ -{ -#ifdef BUILD_NCURSES - char *skey=NULL; - int key; /* returned key */ - - do key=getch(); while(key==ERR); - switch(key) { - case KEY_UP: skey=ykey[kUP];break; - case KEY_DOWN: skey=ykey[kDOWN];break; - case KEY_LEFT: skey=ykey[kLEFT];break; - case KEY_RIGHT: skey=ykey[kRIGHT];break; - case KEY_DC: skey=ykey[kDEL];break; - case KEY_IC: skey=ykey[kINS];break; - case KEY_IL: skey=ykey[kINS];break; - case KEY_CLEAR: skey=ykey[kCLEAR];break; - case KEY_HOME: skey=ykey[kHOME];break; -#ifdef KEY_END - case KEY_END: skey=ykey[kEND];break; -#endif - case KEY_F0: skey=ykey[kF0];break; - case KEY_F(1): skey=ykey[kF1];break; - case KEY_F(2): skey=ykey[kF2];break; - case KEY_F(3): skey=ykey[kF3];break; - case KEY_F(4): skey=ykey[kF4];break; - case KEY_F(5): skey=ykey[kF5];break; - case KEY_F(6): skey=ykey[kF6];break; - case KEY_F(7): skey=ykey[kF7];break; - case KEY_F(8): skey=ykey[kF8];break; - case KEY_F(9): skey=ykey[kF9];break; - case KEY_F(10): skey=ykey[kF10];break; - case KEY_F(11): skey=ykey[kF11];break; - case KEY_F(12): skey=ykey[kF12];break; - case KEY_F(13): skey=ykey[kF13];break; - case KEY_F(14): skey=ykey[kF14];break; - case KEY_F(15): skey=ykey[kF15];break; - case KEY_F(16): skey=ykey[kF16];break; - case KEY_F(17): skey=ykey[kF17];break; - case KEY_F(18): skey=ykey[kF18];break; - case KEY_F(19): skey=ykey[kF19];break; - case KEY_F(20): skey=ykey[kF20];break; - case KEY_F(21): skey=ykey[kF21];break; - case KEY_F(22): skey=ykey[kF22];break; - case KEY_F(23): skey=ykey[kF23];break; - case KEY_F(24): skey=ykey[kF24];break; - case KEY_BACKSPACE: skey=ykey[kBACKSPACE];break; - case KEY_NPAGE: skey=ykey[kSCRNDOWN];break; - case KEY_PPAGE: skey=ykey[kSCRNUP];break; - case KEY_ENTER: skey=ykey[kENTER];break; - default: - if (isprint(key)) { - keybuff[0]=key; - keybuff[1]='\0'; - } else if (key<0 || key>=KEY_MAX) { - keybuff[0]='\0'; - } else { - switch(key) { - case 0x1b:skey=ykey[kESC];break; - case 0x7f:skey=ykey[kDEL];break; - case 0xa:skey=ykey[kENTER];break; - case 0x9:skey=ykey[kTAB];break; - default: - sprintf(keybuff,"key%x",key); - } - } - break; - } - if (skey) strcpy(keybuff,skey); - snooze(20000); -#endif -} - diff --git a/src/io.c b/src/io.c deleted file mode 100644 index 93015d8..0000000 --- a/src/io.c +++ /dev/null @@ -1,1598 +0,0 @@ -/* - - YABASIC --- a simple Basic Interpreter - written by Marc-Oliver Ihm 1995-2004 - homepage: www.yabasic.de - - io.c --- code for screen and file i/o - - This file is part of yabasic and may be copied only - under the terms of either the Artistic License or - the GNU General Public License (GPL), both of which - can be found at www.yabasic.de - -*/ - - -/* ------------- defines ---------------- */ - -#ifdef WINDOWS -#define WM_WANTKEY (WM_APP+7) -#endif - -/* ------------- includes ---------------- */ - -#ifndef YABASIC_INCLUDED -#include "yabasic.h" /* all prototypes and structures */ -#endif - - -/* ------------- local defines ----------------- */ - -#define YC_BLACK 0 -#define YC_WHITE 1 -#define YC_RED 2 -#define YC_BLUE 3 -#define YC_GREEN 4 -#define YC_YELLOW 5 -#define YC_CYAN 6 -#define YC_MAGENTA 7 - -#ifndef COLOR_BLACK -#define COLOR_BLACK 0 -#define COLOR_RED 1 -#define COLOR_GREEN 2 -#define COLOR_YELLOW 3 -#define COLOR_BLUE 4 -#define COLOR_MAGENTA 5 -#define COLOR_CYAN 6 -#define COLOR_WHITE 7 -#endif -#ifndef A_COLOR -#define A_COLOR 0xff00 -#endif - -/* ------------- external references ---------------- */ - -extern int mylineno; /* current line number */ -extern int yyparse(); /* call bison parser */ - - -/* ------------- local functions ---------------- */ - -static int onechar(void); /* read one char from currentinstream */ -static void backchar(int); /* put char back into stream */ -static void readline(void); /* read one line from current stream */ -static void curinit(void); /* initialize curses */ -static void initcol(void); /* initialize curses colors */ -void myswitch(int); /* switch to specified stream */ -int checkstream(void); /* test if currst is still valid */ -#ifdef WINDOWS -static DWORD keythread(LPWORD); /* wait for key input from console */ -static int is_valid_key(INPUT_RECORD *); /* check if input rec is valid key */ -#endif -int name2yc(char *); /* convert a color name to an integer */ -int yc2oc(int,int); /* convert a yabasic color to operating system color */ -char *yc2short(int); /* convert yabasic colours to short colour name */ -#ifdef UNIX -int oc2yc(int); /* convert an operating system color to yabasic color */ -#endif - -/* ------------- global variables ---------------- */ - -static int prompted; /* TRUE, if prompt is fresh */ -int read_controls; /* TRUE, if input should read control characters */ -FILE *streams[FOPEN_MAX]; /* file streams */ -int stream_modes[FOPEN_MAX]; /* modes for streams */ -int lprstream=-1; /* stream associated with lineprinter */ -static int currstr=STDIO_STREAM; /* currently switched stream */ -static FILE *cinstr; /* current stream for input */ -static FILE *coutstr; /* current stream for output */ -static char linebuffer[INBUFFLEN]; /* buffer for one line of input */ -int curinized=FALSE; /* true, if curses has been initialized */ -static char *currchar; /* current char to read */ -static short stdfc; /* standard foreground color of window */ -static short stdbc; /* standard background color of window */ -#ifdef UNIX -int winpid=-1; /* pid of process waiting for window keys */ -int termpid=-1; /* pid of process waiting for terminal keys */ -FILE *lineprinter=NULL; /* handle for line printer */ -#ifndef BUILD_NCURSES -int COLS = 80; -int LINES = 25; -#endif -#else -HANDLE wantkey=INVALID_HANDLE_VALUE; /* mutex to signal key desire */ -HANDLE gotkey=INVALID_HANDLE_VALUE; /* mutex to signal key reception */ -HANDLE wthandle=INVALID_HANDLE_VALUE; /* handle of win thread */ -HANDLE kthandle=INVALID_HANDLE_VALUE; /* handle of inkey thread */ -DWORD ktid; /* id of inkey thread */ -int LINES=0; /* number of lines on screen */ -int COLS=0; /* number of columns on screen */ -HANDLE ConsoleInput; /* handle for console input */ -HANDLE ConsoleOutput; /* handle for console output */ -HANDLE lineprinter=INVALID_HANDLE_VALUE; /* handle for line printer */ -#endif - - -/* ------------- functions ---------------- */ - -void create_print(char type) /* create command 'print' */ -{ - struct command *cmd; - - cmd=add_command(cPRINT,NULL); - cmd->pointer=my_malloc(sizeof(int)); - /* store type of print */ - cmd->tag=type; -} - - -void print(struct command *cmd) /* print on screen */ -{ - int type; - struct stackentry *p,*q,*r; - static int last='n'; - char *s; - int x,y; - long int n; - double d; -#ifdef WINDOWS - CONSOLE_SCREEN_BUFFER_INFO csbi; - SMALL_RECT screen; - COORD to; - CHAR_INFO ci; -#endif - - r=NULL; - type=cmd->tag; - if (!checkstream()) return; - switch(type) { - case 'n': /* print newline */ - if (curinized && coutstr==stdout) { -#ifdef WINDOWS - GetConsoleScreenBufferInfo(ConsoleOutput,&csbi); - x=csbi.dwCursorPosition.X; - y=csbi.dwCursorPosition.Y; - if (y>=LINES-1) { - screen.Left=0; - screen.Right=COLS; - screen.Top=1; - screen.Bottom=LINES; - to.X=0; - to.Y=0; - ci.Char.AsciiChar=' '; - ci.Attributes=FOREGROUND_BLUE|FOREGROUND_GREEN|FOREGROUND_RED; - ScrollConsoleScreenBuffer(ConsoleOutput,&screen,NULL,to,&ci); - to.X=0; - to.Y=y; - } else { - to.X=0; - to.Y=y+1; - } - SetConsoleCursorPosition(ConsoleOutput,to); - break; -#else -#ifdef BUILD_NCURSES - getyx(stdscr,y,x); - if (y>=LINES-1) { - scrl(1); - y=y-1; - } - move(y+1,0); - refresh(); -#endif - break; -#endif - } else { - string[0]='\n'; - if (abs(currstr)==lprstream) { - string[1]='\r'; - string[2]='\0'; - } else { - string[1]='\0'; - } - } - onestring(string); - break; - case 't': /* print tab */ - string[0]='\t'; - string[1]='\0'; - onestring(string); - break; - case 'd': /* print double value */ - p=pop(stNUMBER); - d=p->value; - n=(int)d; - if (n==d && dLONG_MIN) - sprintf(string,"%s%ld",(last=='d')?" ":"",n); - else - sprintf(string,"%s%g",(last=='d')?" ":"",d); - onestring(string); - break; - case 'U': - r=pop(stSTRING); - case 'u': /* print using */ - p=pop(stSTRING); - q=pop(stNUMBER); - type='d'; - s=string; - if (last=='d') { - *s=' '; - s++; - } - if (!myformat(s,q->value,p->pointer,r?r->pointer:NULL)) { - sprintf(string,"'%s' is not a valid format",(char *)p->pointer); - error(ERROR,string); - break; - } - onestring(string); - break; - case 's': - p=pop(stSTRING); - onestring((char *)p->pointer); - break; - } - last=type; -} - - -void mymove() /* move to specific position on screen */ -{ -#ifdef BUILD_NCURSES - int x,y; -#ifdef WINDOWS - COORD coord; -#endif - - y=(int)pop(stNUMBER)->value; - if (y<0) y=0; - if (y>LINES-1) y=LINES-1; - x=(int)pop(stNUMBER)->value; - if (x<0) x=0; - if (x>COLS-1) x=COLS-1; - if (!curinized) { - error(ERROR,"need to call 'clear screen' first"); - return; - } -#ifdef UNIX - move(y,x); - refresh(); -#else - coord.X=x; - coord.Y=y; - SetConsoleCursorPosition(ConsoleOutput,coord); -#endif -#endif -} - - -void clearscreen() /* clear entire screen */ -{ -#ifdef WINDOWS - DWORD written; /* number of chars actually written */ - COORD coord; /* coordinates to start writing */ -#endif - - if (!curinized) curinit(); -#ifdef UNIX -#ifdef BUILD_NCURSES - clear(); - refresh(); -#else - error(ERROR,"ncurses support was not compiled!"); -#endif -#else - coord.X=0; - coord.Y=0; - FillConsoleOutputCharacter(ConsoleOutput,' ',LINES*COLS,coord,&written); - FillConsoleOutputAttribute(ConsoleOutput, - FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE, - LINES*COLS, - coord,&written); - SetConsoleCursorPosition(ConsoleOutput,coord); -#endif -} - - -static void curinit(void) /* initialize curses */ -{ -#ifdef WINDOWS - CONSOLE_SCREEN_BUFFER_INFO coninfo; /* receives console size */ -#endif - -#ifdef UNIX -#ifdef BUILD_NCURSES - initscr(); - initcol(); - setscrreg(0,LINES); - scrollok(stdscr,TRUE); - leaveok(stdscr,TRUE); - keypad(stdscr,TRUE); - intrflush(stdscr,FALSE); - curs_set(0); - def_prog_mode(); -#endif -#else - GetConsoleScreenBufferInfo(ConsoleOutput,&coninfo); - COLS=coninfo.dwSize.X; - LINES=coninfo.dwSize.Y; -#endif - curinized=TRUE; -} - - -char *inkey(double maxtime) /* get char from keyboard */ -{ - char *skey; -#ifdef WINDOWS - int ms; /* number of milliseconds to wait*/ - DWORD oflags; /* saves normal state of console input buffer */ - DWORD flags; /* new input mode for console input buffer */ - static char conkeybuff[100],winkeybuff[100]; -#else - fd_set readfds; - struct timeval tv; - int maxfd; - int winfd[2],termfd[2]; - char retkey[100]; - int status,ret; -#endif - - - if (maxtime>=0.0 && maxtime<0.01) maxtime=0.01; - if (!curinized) { - error(ERROR,"need to call 'clear screen' first"); - return my_strdup(""); - } -#ifdef UNIX -#ifdef BUILD_NCURSES - retkey[0]='\0'; - winfd[0]=winfd[1]=termfd[0]=termfd[1]=-1; - winpid=termpid=-1; - if (pipe(winfd) || pipe(termfd)) { - error(ERROR,"Couldn't open pipes"); - goto sane_state; - } - - winpid=fork(); - if (winpid==0) { - /* this is the child */ - signal(SIGINT,SIG_DFL); - signal(SIGFPE,SIG_DFL); - signal(SIGSEGV,SIG_DFL); - retkey[0]='\0'; -#ifndef BEOS - if (winopened) getwinkey(retkey); -#endif - if (*retkey) write(winfd[1],retkey,strlen(retkey)); - wait(&status); - exit(0); - } else if (winpid==-1) { - error(ERROR,"couldn't fork child"); - goto sane_state; - } - - termpid=fork(); - if (termpid==0) { - /* this is the child */ - signal(SIGINT,SIG_DFL); - signal(SIGFPE,SIG_DFL); - signal(SIGSEGV,SIG_DFL); - retkey[0]='\0'; - noecho(); - cbreak(); - timeout(-1); - gettermkey(retkey); - if (*retkey) write(termfd[1],retkey,strlen(retkey)); - wait(&status); - exit(0); - } else if (termpid==-1) { - error(ERROR,"Couldn't fork child"); - goto sane_state; - } - - FD_ZERO(&readfds); - FD_SET(termfd[0],&readfds); - FD_SET(winfd[0],&readfds); - fflush(stdout); - maxfd=(termfd[0]>winfd[0])?termfd[0]:winfd[0]; - if (maxtime>=0) { - tv.tv_sec=(int)maxtime; - tv.tv_usec=(maxtime-(int)maxtime)*1000000.; - ret=select(maxfd+1,&readfds,NULL,NULL,&tv); - } else { - ret=select(maxfd+1,&readfds,NULL,NULL,NULL); - } - if (ret==-1) { - error(ERROR,"select failed"); - goto sane_state; - } - - if (FD_ISSET(termfd[0],&readfds)) { - ret=read(termfd[0],retkey,100); - } else if (FD_ISSET(winfd[0],&readfds)) { - ret=read(winfd[0],retkey,100); - // if (!strncmp("MB",retkey,2)) getmousexybm(retkey,&mousex,&mousey,&mouseb,&mousemod); - } - else ret=0; - retkey[ret]='\0'; - sane_state: - skey=retkey; - if (winfd[0]>0) close(winfd[0]); - if (winfd[1]>0) close(winfd[1]); - if (termfd[0]>0) close(termfd[0]); - if (termfd[1]>0) close(termfd[1]); - if (termpid>0) { - kill(termpid,SIGTERM); - waitpid(termpid,&status,0); - termpid=-1; - } - if (winpid>0) { - kill(winpid,SIGTERM); - waitpid(winpid,&status,0); - winpid=-1; - } - reset_prog_mode(); /* prepare for input afterwards */ -#endif -#elif WINDOWS - /* create event to signal key */ - if (gotkey==INVALID_HANDLE_VALUE) gotkey=CreateEvent(NULL,FALSE,FALSE,NULL); - if (wantkey==INVALID_HANDLE_VALUE) wantkey=CreateEvent(NULL,TRUE,FALSE,NULL); - - conkeybuff[0]=winkeybuff[0]='\0'; - - GetConsoleMode(ConsoleInput,&oflags); - flags=oflags&~(ENABLE_LINE_INPUT|ENABLE_ECHO_INPUT); - SetConsoleMode(ConsoleInput,flags); - - /* create thread to observe console */ - if (kthandle==INVALID_HANDLE_VALUE) { - kthandle=CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)keythread, - (LPVOID)conkeybuff,0,(LPDWORD)&ktid); - } - /* signal, that we want a key */ - if (winopened) { - SendMessage(window,WM_WANTKEY,0,(LPARAM)winkeybuff); - } - SetEvent(wantkey); - ms=(int)(1000*maxtime); - if (ms<0) - WaitForSingleObject(gotkey,INFINITE); - else - WaitForSingleObject(gotkey,ms); - - ResetEvent(wantkey); - SetConsoleMode(ConsoleInput,oflags); - if (*winkeybuff) - skey=winkeybuff; - else - skey=conkeybuff; -#endif - return my_strdup(skey); -} - - -#ifdef WINDOWS -static DWORD keythread(LPWORD lparam) /* wait for key input from console */ -{ - INPUT_RECORD inrec; /* for reading key-event */ - int key,skey; - int num; - char *keybuff; - HANDLE evn[2]; - - keybuff=(char *)lparam; - keybuff[0]='\0'; - evn[0]=wantkey; - evn[1]=ConsoleInput; - do { - do { - do { - WaitForMultipleObjects(2,evn,TRUE,INFINITE); - ReadConsoleInput(ConsoleInput,&inrec,1,&num); - } while(!is_valid_key(&inrec)); - if (isprint(inrec.Event.KeyEvent.uChar.AsciiChar)) { - keybuff[0]=inrec.Event.KeyEvent.uChar.AsciiChar; - keybuff[1]='\0'; - } else { - key=inrec.Event.KeyEvent.wVirtualKeyCode; - skey=-1; - switch(key) { - case 0x1b: skey=kESC;break; - case 0x0d: skey=kENTER;break; - case 0x09: skey=kTAB;break; - case 0x21: skey=kSCRNUP;break; - case 0x22: skey=kSCRNDOWN;break; - case 0x70: skey=kF1;break; - case 0x71: skey=kF2;break; - case 0x72: skey=kF3;break; - case 0x73: skey=kF4;break; - case 0x74: skey=kF5;break; - case 0x75: skey=kF6;break; - case 0x76: skey=kF7;break; - case 0x77: skey=kF8;break; - case 0x78: skey=kF9;break; - case 0x79: skey=kF10;break; - case 0x7a: skey=kF11;break; - case 0x7b: skey=kF12;break; - case 0x24: skey=kHOME;break; - case 0x23: skey=kEND;break; - case 0x2d: skey=kINS;break; - case 0x2e: skey=kDEL;break; - case 0x08: skey=kBACKSPACE;break; - case 0x27: skey=kRIGHT;break; - case 0x25: skey=kLEFT;break; - case 0x28: skey=kDOWN;break; - case 0x26: skey=kUP;break; - default: - sprintf(keybuff,"key%x",key); - } - if (skey>0) strcpy(keybuff,ykey[skey]); - } - if (!keybuff[0]) printf("Loop !\n"); - } while(!keybuff[0]); - ResetEvent(wantkey); - SetEvent(gotkey); - }while(TRUE); - - return 0; -} - - -static int is_valid_key(INPUT_RECORD *rec) /* check if input rec contains valid key */ -{ - if (rec->EventType!=KEY_EVENT || - !rec->Event.KeyEvent.bKeyDown || - rec->Event.KeyEvent.wVirtualKeyCode==VK_SHIFT || - rec->Event.KeyEvent.wVirtualKeyCode==VK_CONTROL) { - return FALSE; - } - return TRUE; -} -#endif - - -char *replace(char *string) /* replace \n,\a, etc. */ -{ - char *from,*to; - char *p; - int val; - static char *hexdigits="0123456789abcdef"; - - from=to=string; - while(*from) { - if (*from=='\\') { - from++; - switch(*from) { - case 'n': *to='\n';break; - case 't': *to='\t';break; - case 'v': *to='\v';break; - case 'b': *to='\b';break; - case 'r': *to='\r';break; - case 'f': *to='\f';break; - case 'a': *to='\a';break; - case '\\': *to='\\';break; - case '\?': *to='\?';break; - case '\'': *to='\'';break; - case '\"': *to='\"';break; - case 'x': - val=0; - if ((p=strchr(hexdigits,tolower(*(from+1)))) && p-hexdigits<16) { - from++; - val=p-hexdigits; - if ((p=strchr(hexdigits,tolower(*(from+1)))) && p-hexdigits<16) { - from++; - val*=16; - val+=p-hexdigits; - } - } - *to=(char)val; - break; - default: - *to='\\'; - to++; - *to=*from; - } - } - else - *to=*from; - from++; - to++; - } - *to='\0'; - return string; -} - - -void create_myopen(int num) /* create command 'myopen' */ -{ - struct command *cmd; - - cmd=add_command(cOPEN,NULL); - cmd->tag=num; -} - - -void myopen(struct command *cmd) /* open specified file for given name */ -{ -#ifdef WINDOWS - char PrinterName[200]; /* Name of default Printer */ - char *n; /* points into PrinterName */ - DOC_INFO_1 di; -#endif - FILE *handle=NULL; - int stream,i; - char *name=NULL; - char *mode=NULL; - char **pmode; - static char *valid_modes[]={"r+","r","w","a","rb","wb","ab",""}; - static int smodes[]={smREADWRITE,smREAD,smWRITE,smWRITE,smREAD,smWRITE,smWRITE,smREAD}; - int smode; - - struct stackentry *p; - int has_mode,has_stream,printer=0; - /* decode cmd->tag */ - has_stream=cmd->tag&OPEN_HAS_STREAM; - has_mode=cmd->tag&OPEN_HAS_MODE; - /* printer=cmd->tag&OPEN_PRINTER;*/ - - if (has_mode) - mode=my_strdup(pop(stSTRING)->pointer); - else - mode=printer ? my_strdup("w") : my_strdup("r"); - if (printer) - name=my_strdup("/usr/bin/lpr"); - else - name=my_strdup(pop(stSTRING)->pointer); - - if (has_stream) { - stream=(int)pop(stNUMBER)->value; - } else { - stream=0; - for(i=1;ivalue=0.; - p->type=stNUMBER; - -/* - if (printer && print_to_file) { - sprintf(errorstring,"cannot open printer: already printing grafics"); - errorcode=6; - goto open_done; - }*/ - - if (badstream(stream,1)) { - sprintf(errorstring,"invalid stream number %d",stream); - errorcode=9; - goto open_done; - } - if (stream_modes[stream]!=smCLOSED) { - sprintf(errorstring,"stream already in use"); - errorcode=2; - goto open_done; - } - - smode=0; - for(pmode=valid_modes;**pmode;pmode++) { - if (!strcmp(*pmode,mode)) break; - smode++; - } - if (!**pmode) { - sprintf(errorstring,"\'%s\' is not a valid filemode",mode); - errorcode=3; - goto open_done; - } - - if (printer) { -#ifdef UNIX - lineprinter=popen(name,"w"); - if (!lineprinter) { - sprintf(errorstring,"could not open line printer"); - errorcode=7; - goto open_done; - } -#else - /* query win.ini for default printer */ - GetProfileString("windows","device",",,,",PrinterName,200); - - /* truncate printer name */ - n=PrinterName; - while(*n && *n!=',') n++; - *n='\0'; - - OpenPrinter(PrinterName,&lineprinter,NULL); - di.pDocName="yabasic text"; - di.pOutputFile=(LPTSTR)NULL; - di.pDatatype="RAW"; - if (!StartDocPrinter(lineprinter,1,(LPBYTE)&di)) { - sprintf(errorstring,"could not open line printer"); - errorcode=7; - goto open_done; - } - StartPagePrinter(lineprinter); -#endif - lprstream=stream; - } else { - handle=fopen(name,mode); - if (handle==NULL) { - sprintf(errorstring,"could not open '%s': %s",name,my_strerror(errno)); - errorcode=4; - goto open_done; - } - streams[stream]=handle; - } - stream_modes[stream]=smodes[smode]; - errorcode=0; - p->value=stream; - open_done: - if (name) my_free(name); - if (mode) my_free(mode); -} - - -void checkopen(void) /* check, if open has been sucessfull */ -{ - double result; - - result=pop(stNUMBER)->value; - if (result<=0) { - error(ERROR,errorstring); - } -} - - -void myclose(void) /* close the specified stream */ -{ - int s; -#ifdef WINDOWS - DWORD written; -#endif - - s=(int)pop(stNUMBER)->value; - if (s == -2){ - for(s=1;stype==cSEEK2) - mode=(char *)my_strdup(pop(stSTRING)->pointer); - else - mode=my_strdup("begin"); - p=(int)pop(stNUMBER)->value; - s=(int)pop(stNUMBER)->value; - pp=push(); - pp->value=0.; - pp->type=stNUMBER; - for(i=0;mode[i];i++) mode[i]=tolower(mode[i]); - if (!strcmp(mode,"begin")) { - m=SEEK_SET; - } else if (!strcmp(mode,"end")) { - m=SEEK_END; - } else if (!strcmp(mode,"here")) { - m=SEEK_CUR; - } else { - sprintf(errorstring,"seek mode '%s' is none of begin,end,here",mode); - errorcode=12; - my_free(mode); - return; - } - my_free(mode); - if (abs(s)==STDIO_STREAM || badstream(s,0)) return; - if (!(stream_modes[s] & (smREAD | smWRITE | smREADWRITE))) { - sprintf(errorstring,"stream %d not open",s); - errorcode=11; - return; - } - if (fseek(streams[s],(long)p,m)) { - sprintf(errorstring,"could not position stream %d to byte %d",s,p); - errorcode=10; - return; - } - pp->value=1.0; -} - - -void create_pps(int type,int input) /* create command pushswitch or popswitch */ -{ - struct command *cmd; - - cmd=add_command(type,NULL); - cmd->args=input; -} - - -void push_switch(struct command *cmd) /* push current stream on stack and switch to new one */ -{ - static int oldstream=STDIO_STREAM; - struct stackentry *s; - int stream; - - stream=(int)pop(stNUMBER)->value; - if (badstream(stream,0)) return; - if (!cmd->args) stream=-stream; - - s=push(); - s->type=stNUMBER; - s->value=oldstream; - if (infolevel>=DEBUG) { - sprintf(string,"pushing %d on stack, switching to %d",oldstream,stream); - error(DEBUG,string); - } - oldstream=stream; - myswitch(stream); -} - - -void pop_switch(void) /* pop current stream from stack and switch to it */ -{ - int stream; - - stream=(int)pop(stNUMBER)->value; - if (infolevel>=DEBUG) { - sprintf(string,"popping %d from stack, switching to it",stream); - error(DEBUG,string); - } - myswitch(stream); -} - - -void myswitch(int stream) /* switch to specified stream */ -{ - int stdio,input; - - stdio=(abs(stream)==STDIO_STREAM); - input=(stream>0); - currstr=stream; - if (stream<0) stream=-stream; - if (badstream(stream,0)) return; - - if (stdio) { - cinstr=stdin; - coutstr=stdout; - } else { - cinstr=coutstr=NULL; - if (input) - cinstr=streams[stream]; - else - coutstr=streams[stream]; - } -} - - -int checkstream(void) /* test if currst is still valid */ -{ - int stdio,input; - - stdio=(abs(currstr)==STDIO_STREAM); - input=(currstr>0); - - if (!stdio) { - if (input && !(stream_modes[abs(currstr)] & smREAD| smREADWRITE)) { - sprintf(string,"stream %d not open for reading",abs(currstr)); - error(ERROR,string); - return FALSE; - } - if (!input && !(stream_modes[abs(currstr)] & (smWRITE | smPRINT))) { - sprintf(string,"stream %d not open for writing or printing",abs(currstr)); - error(ERROR,string); - return FALSE; - } - } - return TRUE; -} - - -void testeof(struct command *cmd) /* close the specified stream */ -{ - int s,c; - struct stackentry *result; - - s=(int)pop(stNUMBER)->value; - if (s!=STDIO_STREAM && badstream(s,0)) return; - result=push(); - result->type=stNUMBER; - if (s && !(stream_modes[s] & smREAD)) { - result->value=1.; - return; - } - if (!s) { - result->value=0.; - return; - } - c=getc(streams[s]); - if (c==EOF) { - result->value=1.; - return; - } - - result->value=0.; - ungetc(c,streams[s]); - return; -} - - -int badstream(int stream,int errcode) /* test for valid stream id */ -{ - if (stream!=STDIO_STREAM && (stream>FOPEN_MAX-4 || stream<=0)) { - sprintf(errcode?errorstring:string,"invalid stream: %d (can handle only streams from 1 to %d)",stream,FOPEN_MAX-4); - if (errcode) - errorcode=errcode; - else - error(ERROR,string); - return TRUE; - } - return FALSE; -} - - -void create_myread(char type,int tileol) /* create command 'read' */ -{ - struct command *cmd; - - cmd=add_command(cREAD,NULL); - cmd->args=tileol; /* true, if read should go til eol */ - cmd->tag=type; /* can be 'd' or 's' */ -} - - -void myread(struct command *cmd) /* read string or double */ -{ - double d; - static char buffer[INBUFFLEN]; /* buffer with current input */ - int numread; /* number of bytes read */ - int tileol; /* true, if read should go til end of line */ - struct stackentry *s; - int currch; /* current character */ - - numread=0; /* no chars read'til now */ - buffer[0]='\0'; - tileol=cmd->args; - - /* skip leading whitespace */ - if (!tileol) { - do { - currch=onechar(); - } while(currch==' ' || currch=='\t'); - /* put back last char */ - if (currch!=EOF && currch!='\0') backchar(currch); - if (currch=='\0' || currch==EOF) goto done; - } - - /* read chars */ - do { - currch=onechar(); - buffer[numread]=currch; - numread++; - } while(((tileol && currch!='\0') || - (!tileol && currch!=' ' && - currch!='\t' && currch!='\0')) && - currch!=EOF && numreadtag=='s') { /* read string */ - s=push(); - s->type=stSTRING; - s->pointer=my_strdup(buffer);} - else { /* read double */ - s=push(); - s->type=stNUMBER; - s->value=0.0; - if (buffer[0] && (sscanf(buffer,"%lf",&d)==1)) s->value=d; - } -} - - -static void readline(void) /* read one line from current stream */ -{ -#ifdef UNIX - char *nl; /* position of newline */ - int x,y; -#else - int read; -#endif - - if (!checkstream()) return; - linebuffer[0]='\0'; -#ifdef UNIX - if (curinized && cinstr==stdin) { - ; - #ifdef BUILD_NCURSES - getyx(stdscr,y,x); -#ifdef HAVE_GETNSTR - getnstr(linebuffer,INBUFFLEN); -#else - getstr(linebuffer); -#endif - if ((nl=strchr(linebuffer,'\0'))) { - *nl='\n'; - *(nl+1)='\0'; - } - if (y>=LINES-1) scrl(1); - refresh(); - #endif - } -#else - if (curinized && cinstr==stdin) { - ; - #ifdef BUILD_NCURSES - FlushConsoleInputBuffer(ConsoleInput); - ReadConsole(ConsoleInput,linebuffer,INBUFFLEN,&read,NULL); - if (read>=2) { - linebuffer[read-2]='\n'; - linebuffer[read-1]='\0'; - } - #endif - } -#endif - else { - fgets(linebuffer,INBUFFLEN,cinstr); - } - currchar=linebuffer; - prompted=FALSE; -} - - -static int onechar() /* read one char from cinstr */ -{ - int ch; - - if (!checkstream()) return '\0'; - if (cinstr==stdin) { - if (!currchar || !*currchar) { - readline(); - } - do { - ch=*currchar; - currchar++; - } while(! (!iscntrl(ch) || strchr(" \t\n",ch) || read_controls || ch=='\0')); - } else { - do { - ch=fgetc(cinstr); - } while(! (!iscntrl(ch) || strchr(" \t\n",ch) || read_controls || ch=='\0' || ch==EOF)); - } - - if (ch=='\n' || ch==EOF) - return '\0'; - else - return ch; -} - - -static void backchar(int ch) /* put char back into stream */ -{ - if (!checkstream()) return; - if (cinstr==stdin) { - if (currchar>linebuffer) currchar--; - } - else { - ungetc(ch,cinstr); - } -} - - -void chkprompt() /* print an intermediate prompt if necessary */ -{ - if (cinstr==stdin && (!currchar || !*currchar) && !prompted) onestring("?"); -} - - -void create_onestring(char *str) /* create command 'onestring' */ -{ - struct command *cmd; - - cmd=add_command(cONESTRING,NULL); - cmd->pointer=my_strdup(str); -} - - -void onestring(char *s) /* write string to file */ -{ -#ifdef WINDOWS - DWORD len,written; -#endif - - if (!checkstream()) return; - if (curinized && abs(currstr)==STDIO_STREAM) { - ; - #ifdef BUILD_NCURSES -#ifdef UNIX - addstr(s); - refresh(); -#else - len=strlen(s); - WriteConsole(ConsoleOutput,s,len,&written,NULL); -#endif -#endif - } else if (abs(currstr)==lprstream) { -#ifdef UNIX - fprintf(lineprinter,"%s",s); - fflush(lineprinter); -#else - len=strlen(s); - WritePrinter(lineprinter,s,len,&written); -#endif - } else { - fprintf(coutstr,"%s",s); - fflush(coutstr); - } - prompted=TRUE; -} - - -void create_colour(int flag) /* create command 'colour' */ -{ - struct command *c; - - c=add_command(cCOLOUR,NULL); - c->args=flag; -} - - -void colour(struct command *cmd) /* switch on colour */ -{ - char *fore=NULL,*back=NULL,*p; - int fc,bc; - - if (cmd->args && !curinized) { - error(ERROR,"need to call 'clear screen' first"); - return; - } - if (cmd->args==0) { - if (!curinized) return; -#ifdef UNIX - ; - #ifdef BUILD_NCURSES - if (has_colors()) - attrset(A_NORMAL|COLOR_PAIR(stdfc*8+stdbc)); - else - attrset(A_NORMAL); - return; - #endif -#else - SetConsoleTextAttribute(ConsoleOutput,FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE); - return; -#endif - } else if (cmd->args==1) { -#ifdef UNIX - ; - #ifdef BUILD_NCURSES - if (has_colors()) - attrset(A_NORMAL|COLOR_PAIR(stdbc*8+stdfc)); - else { - attrset(A_REVERSE); - return; - } - #endif -#else - SetConsoleTextAttribute(ConsoleOutput,BACKGROUND_RED|BACKGROUND_GREEN|BACKGROUND_BLUE); - return; -#endif - } else { /* decode colours */ -#ifdef UNIX - ; - #ifdef BUILD_NCURSES - if (!has_colors()) { - pop(stSTRING); - if (cmd->args==3) pop(stSTRING); - attrset(A_REVERSE); - return; - } - #endif -#endif - if (cmd->args==2) { - back=NULL; - fore=pop(stSTRING)->pointer; - for(p=fore;*p;p++) *p=tolower(*p); - } else { - back=pop(stSTRING)->pointer; - for(p=back;*p;p++) *p=tolower(*p); - fore=pop(stSTRING)->pointer; - for(p=fore;*p;p++) *p=tolower(*p); - } - fc=name2yc(fore); - if (fc<0) { - sprintf(string,"unknown foreground colour: '%s'",fore); - error(ERROR,string); - } - bc=stdbc; - if (back) { - bc=name2yc(back); - if (fc<0) { - sprintf(string,"unknown background colour: '%s'",back); - error(ERROR,string); - } - } -#ifdef UNIX - #ifdef BUILD_NCURSES - attrset(COLOR_PAIR(fc*8+bc)); - #endif -#else - SetConsoleTextAttribute(ConsoleOutput,(WORD)(yc2oc(fc,TRUE)|yc2oc(bc,FALSE))); -#endif - } -} - - -static void initcol(void) /* initialize curses colors */ -{ - static int first=TRUE; -#ifdef UNIX - int i,j,col; - short f,b; -#else - CONSOLE_SCREEN_BUFFER_INFO csbi; -#endif - - if (!first) return; - first=FALSE; -#ifdef UNIX - #ifdef BUILD_NCURSES - if (!has_colors()) return; - start_color(); - - for(i=0;i<8;i++) { - for(j=0;j<8;j++) { - if (!i && !j) continue; - init_pair(i*8+j,yc2oc(i,TRUE),yc2oc(j,FALSE)); - } - } - init_color(COLOR_YELLOW,1000,1000,0); - - col=inch()&A_COLOR; - pair_content(col,&f,&b); - stdfc=oc2yc(f); - stdbc=oc2yc(b); - bkgdset(COLOR_PAIR(stdfc*8+stdbc)); -#endif -#else - GetConsoleScreenBufferInfo(ConsoleOutput,&csbi); - stdfc=csbi.wAttributes & (FOREGROUND_BLUE|FOREGROUND_GREEN|FOREGROUND_RED); - stdbc=csbi.wAttributes & (BACKGROUND_BLUE|BACKGROUND_GREEN|BACKGROUND_RED); -#endif -} - - -int name2yc(char *name) /* convert a color name to an integer */ -{ - char *c; - - for(c=name;*c;c++) *c=tolower(*c); - if (!strcmp(name,"black") || !strcmp(name,"bla")) return YC_BLACK; - if (!strcmp(name,"white") || !strcmp(name,"whi")) return YC_WHITE; - if (!strcmp(name,"red") || !strcmp(name,"red")) return YC_RED; - if (!strcmp(name,"blue") || !strcmp(name,"blu")) return YC_BLUE; - if (!strcmp(name,"green") || !strcmp(name,"gre")) return YC_GREEN; - if (!strcmp(name,"yellow") || !strcmp(name,"yel")) return YC_YELLOW; - if (!strcmp(name,"cyan") || !strcmp(name,"cya")) return YC_CYAN; - if (!strcmp(name,"magenta") || !strcmp(name,"mag")) return YC_MAGENTA; - return -1; -} - - -int yc2oc(int yc,int fore) /* convert a yabasic color to operating system color */ -{ -#ifdef UNIX - fore=0; /* stop gcc from complaining */ - if (yc==YC_BLACK) return COLOR_BLACK; - if (yc==YC_WHITE) return COLOR_WHITE; - if (yc==YC_RED) return COLOR_RED; - if (yc==YC_BLUE) return COLOR_BLUE; - if (yc==YC_GREEN) return COLOR_GREEN; - if (yc==YC_YELLOW) return COLOR_YELLOW; - if (yc==YC_CYAN) return COLOR_CYAN; - if (yc==YC_MAGENTA) return COLOR_MAGENTA; -#else - if (fore) { - if (yc==YC_BLACK) return 0; - if (yc==YC_WHITE) return FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE; - if (yc==YC_RED) return FOREGROUND_RED; - if (yc==YC_BLUE) return FOREGROUND_BLUE; - if (yc==YC_GREEN) return FOREGROUND_GREEN; - if (yc==YC_YELLOW) return FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_INTENSITY; - if (yc==YC_CYAN) return FOREGROUND_GREEN | FOREGROUND_BLUE; - if (yc==YC_MAGENTA) return FOREGROUND_BLUE | FOREGROUND_RED; - } else { - if (yc==YC_BLACK) return 0; - if (yc==YC_WHITE) return BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_BLUE; - if (yc==YC_RED) return BACKGROUND_RED; - if (yc==YC_BLUE) return BACKGROUND_BLUE; - if (yc==YC_GREEN) return BACKGROUND_GREEN; - if (yc==YC_YELLOW) return BACKGROUND_GREEN | BACKGROUND_RED | BACKGROUND_INTENSITY; - if (yc==YC_CYAN) return BACKGROUND_GREEN | BACKGROUND_BLUE; - if (yc==YC_MAGENTA) return BACKGROUND_BLUE | BACKGROUND_RED; - } -#endif - return -1; -} - - -int oc2yc(int oc) /* convert an operating system color to yabasic color */ -{ -#ifdef UNIX - if (oc==COLOR_BLACK) return YC_BLACK; - if (oc==COLOR_WHITE) return YC_WHITE; - if (oc==COLOR_RED) return YC_RED; - if (oc==COLOR_BLUE) return YC_BLUE; - if (oc==COLOR_GREEN) return YC_GREEN; - if (oc==COLOR_YELLOW) return YC_YELLOW; - if (oc==COLOR_CYAN) return YC_CYAN; - if (oc==COLOR_MAGENTA) return YC_MAGENTA; -#else - if (oc==0) return YC_BLACK; - if (oc==(FOREGROUND_RED|FOREGROUND_BLUE|FOREGROUND_GREEN) || - oc==(BACKGROUND_RED|BACKGROUND_BLUE|BACKGROUND_GREEN)) return YC_WHITE; - if (oc==(FOREGROUND_RED) || - oc==(BACKGROUND_RED)) return YC_RED; - if (oc==(FOREGROUND_BLUE) || - oc==(BACKGROUND_BLUE)) return YC_BLUE; - if (oc==(FOREGROUND_GREEN) || - oc==(BACKGROUND_GREEN)) return YC_GREEN; - if (oc==(FOREGROUND_RED|FOREGROUND_GREEN) || - oc==(BACKGROUND_RED|BACKGROUND_GREEN) || - oc==(FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_INTENSITY) || - oc==(BACKGROUND_RED|BACKGROUND_GREEN|BACKGROUND_INTENSITY)) return YC_YELLOW; - if (oc==(FOREGROUND_BLUE|FOREGROUND_GREEN) || - oc==(BACKGROUND_BLUE|BACKGROUND_GREEN)) return YC_CYAN; - if (oc==(FOREGROUND_RED|FOREGROUND_BLUE) || - oc==(BACKGROUND_RED|BACKGROUND_BLUE)) return YC_MAGENTA; -#endif - return -1; -} - - -void putchars(void) /* put rect onto screen */ -{ - char *ch,text,fore[4],back[4]; - int n,sx,sy,x,y,f,b; - int tox,toy; - int oldx,oldy; -#ifdef WINDOWS - CONSOLE_SCREEN_BUFFER_INFO csbi; - COORD cp; - char buff[2]; - int written; -#endif - - toy=(int)(pop(stNUMBER)->value); - tox=(int)(pop(stNUMBER)->value); - ch=pop(stSTRING)->pointer; -#ifdef UNIX -#ifdef BUILD_NCURSES - getyx(stdscr,oldy,oldx); -#endif -#else - GetConsoleScreenBufferInfo(ConsoleOutput,&csbi); - oldx=csbi.dwCursorPosition.X; - oldy=csbi.dwCursorPosition.Y; -#endif - if (sscanf(ch,"%d,%d:%n",&sx,&sy,&n)!=2) { - error(ERROR,"illegal screen string"); - return; - } - ch+=n; - for(x=tox;x=COLS) continue; - for(y=toy;y=COLS || y<0 || y>=LINES) { - for(n=0;n<10;n++) if (*ch) ch++; - continue; - } - if (!*ch) { - text=' '; - f=YC_BLACK; - b=YC_BLACK; - } else { - text=*ch; - strncpy(fore,ch+2,3); - fore[3]='\0'; - strncpy(back,ch+6,3); - back[3]='\0'; - for(n=0;n<10;n++) if (*ch) ch++; - f=name2yc(fore); - if (f<0) f=YC_WHITE; - b=name2yc(back); - if (b<0) b=YC_WHITE; - } -#ifdef UNIX - #ifdef BUILD_NCURSES - if (has_colors()) attrset(COLOR_PAIR(f*8+b)); - mvaddch(y,x,text); - #endif -#else - cp.X=x; - cp.Y=y; - SetConsoleCursorPosition(ConsoleOutput,cp); - SetConsoleTextAttribute(ConsoleOutput,(WORD)(yc2oc(f,TRUE)|yc2oc(b,FALSE))); - buff[0]=text; - buff[1]='\0'; - WriteConsole(ConsoleOutput,buff,1,&written,NULL); -#endif - } - } -#ifdef UNIX - #ifdef BUILD_NCURSES - if (has_colors()) - attrset(A_NORMAL|COLOR_PAIR(stdfc*8+stdbc)); - else - attrset(A_NORMAL); - move(y,x); - refresh(); - #endif -#else - cp.X=oldx; - cp.Y=oldy; - SetConsoleCursorPosition(ConsoleOutput,cp); - SetConsoleTextAttribute(ConsoleOutput,(WORD)(stdfc|stdbc)); -#endif - - return; -} - - -char *getchars(int xf,int yf,int xt,int yt) /* get rect from screen */ -{ - int x,y; -#ifdef UNIX - int c,ct,cc; -#endif - int cf,cb; - int oldx,oldy; - char *res; - char cols[20]; -#ifdef WINDOWS - CONSOLE_SCREEN_BUFFER_INFO csbi; - COORD cp; - char charbuff[2]; - WORD attrbuff[2]; - int read; -#endif - - if (xf>xt) {x=xf;xf=xt;xt=x;} - if (yf>yt) {y=yf;yf=yt;yt=y;} - - res=my_malloc(12+(xt-xf+1)*(yt-yf+1)*12); - sprintf(res,"%d,%d:",xt-xf+1,yt-yf+1); -#ifdef UNIX -#ifdef BUILD_NCURSES - getyx(stdscr,oldy,oldx); -#endif -#else - GetConsoleScreenBufferInfo(ConsoleOutput,&csbi); - oldx=csbi.dwCursorPosition.X; - oldy=csbi.dwCursorPosition.Y; -#endif - - for(x=xf;x<=xt;x++) { - for(y=yf;y<=yt;y++) { - if (y<0 || y>=LINES || x<0 || x>=COLS) { - strcat(res," blbl"); - } else { -#ifdef UNIX -#ifdef BUILD_NCURSES - c=mvinch(y,x); - ct=c&A_CHARTEXT; - if (!isprint(ct)) ct=' '; - cc=PAIR_NUMBER(c&A_COLOR); - cb=cc&7; - cf=(cc-cb)/8; - if (has_colors()) { - sprintf(cols,"%c:%s:%s,",ct,yc2short(cf),yc2short(cb)); - } else - { - - sprintf(cols,"%c:???:???,",ct); - } -#endif -#else - cp.X=x; - cp.Y=y; - ReadConsoleOutputCharacter(ConsoleOutput,charbuff,1,cp,&read); - charbuff[1]='\0'; - ReadConsoleOutputAttribute(ConsoleOutput,attrbuff,1,cp,&read); - cf=oc2yc(attrbuff[0]&(FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE)); - cb=oc2yc(attrbuff[0]&(BACKGROUND_RED|BACKGROUND_GREEN|BACKGROUND_BLUE)); - sprintf(cols,"%c:%s:%s,",charbuff[0],yc2short(cf),yc2short(cb)); -#endif - strcat(res,cols); - } - } - } -#ifdef UNIX -#ifdef BUILD_NCURSES - move(oldy,oldx); -#endif -#endif - res[strlen(res)-1]='\0'; - return res; -} - - -char *yc2short(int col) /* convert yabasic colours to short colour name */ -{ - static char r1[4],r2[4]; - static char *pr=r1; - - if (pr==r1) - pr=r2; - else - pr=r1; - - strcpy(pr,"***"); - if (col==YC_BLACK) strcpy(pr,"Bla"); - if (col==YC_WHITE) strcpy(pr,"Whi"); - if (col==YC_RED) strcpy(pr,"Red"); - if (col==YC_BLUE) strcpy(pr,"Blu"); - if (col==YC_GREEN) strcpy(pr,"Gre"); - if (col==YC_YELLOW) strcpy(pr,"Yel"); - if (col==YC_CYAN) strcpy(pr,"Cya"); - if (col==YC_MAGENTA) strcpy(pr,"Mag"); - - return pr; -} - diff --git a/src/libyab1.so b/src/libyab1.so deleted file mode 100755 index 7539119a2319c7b4aff3856080e7131b2910b4cd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 942286 zcmeFaceGW-vhX`$hqV?#aumrqXUTCBCFjg0gJc9G=bWP=ppqpCNKz0H5EKy*2@(WE zK(c~}hzk1ss=MZz^X$vH_q;pC`^Nj@)!4net1E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Fsk@_>s2jRhQU!AmU z{%Lv*53jy($PtsGT81|&CxyB?d8-P?kIzj=b9V=P$ej14)zZ%P2g27>eN8S`8Zf(u zJje5t)H4Ah{&bWr4E?>eJgPD&Ybju4A+T+#$R!qprE?wxpUZiwf}uqJo7WV@VvN>6 zwkgJ>a?IdB#K)-i!It&FHB*yRF4zH}AGi~}Ye%2!JW>>=JWWX*TxuXc1m(FJU5H`+ z6PUM2wD>&hxVwLRA>!V2wz_F3mIAIszbs3WKRWS$394w%PS*(${x69~k-t5SLY(d) z#~&SlG>Kznz8HF_F;Y*8{5Ovr_BFZ*F;o(*7Qh;gS-v($HG8GSS(LGaL^Egi=lCJ5 m{F$0VdeN^4fD*7we=<|9_Ip{W!p!0g#&!}QJbU)u)&B#kl6<59 diff --git a/src/main.c b/src/main.c deleted file mode 100644 index 0d54a7f..0000000 --- a/src/main.c +++ /dev/null @@ -1,2252 +0,0 @@ -/* - -YABASIC --- a simple Basic Interpreter -written by Marc-Oliver Ihm 1995-2004 -homepage: www.yabasic.de - -main.c --- main() and auxilliary functions - -This file is part of yabasic and may be copied only -under the terms of either the Artistic License or -the GNU General Public License (GPL), both of which -can be found at www.yabasic.de - -*/ - - -/* ------------- includes ---------------- */ - -// include "YabInterface.h" - -#ifndef YABASIC_INCLUDED -#include "yabasic.h" /* all prototypes and structures */ -#endif - - -/* ------------- defines ---------------- */ - -#define DONE {current=current->next;break;} /* reduces type-work */ -#define COPYRIGHT " Original yabasic Copyright 1995-2006 by Marc-Oliver Ihm\n\tyab Copyright 2006-2014 by Jan Bungeroth\n\tyab improvements Copyright 2013-2020 by Jim Saxton\n\tyab improvements Copyright 2018-2020 by BeSly Software Solutions\n\t\t(Thanks to Stephan Aßmus for Correction of Code)\n" -#define BANNER \ -"\n yab is yabasic, a BASIC programming language for Haiku.\n This is version " VERSION ", built on "\ -ARCHITECTURE " on " BUILD_TIME "\n\n " COPYRIGHT "\n\n" -#define BANNER_VERSION \ -"yab " VERSION ", built on " ARCHITECTURE "\n" COPYRIGHT -#define YABFORHELP "(type 'yab -help' for help)" -#define YABMAGIC "__YaBaSiC_MaGiC_CoOkIe__" - -/* ------------- external references ---------------- */ - -extern int mylineno; /* current line number */ -extern int yyparse(); /* call bison parser */ - - -/* ------------- local functions ---------------- */ - -static void std_diag(char *,int,char *); /* produce standard diagnostic */ -static void parse_arguments(int,char *argv[]); /* parse cmd line arguments */ -static void initialize(void); /* give correct values to pointers etc ... */ -static void run_it(YabInterface* yab); /* execute the compiled code */ -static void end_it(void); /* perform shutdown operations */ -#ifdef WINDOWS -static void chop_command(char *,int *,char ***); /* chops WIN95-commandline */ -#endif -void create_docu_array(void); /* create array with documentation */ -int equal(char *,char *,int); /* helper for processing options */ -void do_help(char *); /* process help option */ -static int mybind(char *); /* bind a program to the interpreter and save it */ -char *find_interpreter(char *); /* find interpreter with full path */ - -/* ------------- global variables ---------------- */ - -struct command *cmdroot; /* first command */ -struct command *cmdhead; /* next command */ -struct command *lastcmd; /* last command */ -struct command *current; /* currently executed command */ -int infolevel; /* controls issuing of error messages */ -int errorlevel; /* highest level of error message seen til now */ -static int debug_count; /* number of debug messages */ -static int note_count; /* number of notes */ -static int warning_count; /* number of warning messages */ -static int error_count; /* number of error messages */ -int interactive; /* true, if commands come from stdin */ -int is_bound; /* true, if this executable is bound */ -char* appdirectory; -static char *to_bind=NULL; /* name bound program to be written */ -FILE *bound_program=NULL; /* points to embedded yabasic program (if any) */ -char *string; /* for trash-strings */ -char *errorstring; /* for error-strings */ -int errorcode; /* error-codes */ -int enterkeyflag = 0; /* press enter to end program */ -static int commandcount; /* total number of commands */ -int program_state; /* state of program */ -char *progname=NULL; /* name of yabasic-program */ -int print_docu=FALSE; /* TRUE, if only docu should be printed */ -int hold_docu=FALSE; /* TRUE, if docu should be printed in portions */ -#ifdef WINDOWS -DWORD InitialConsole; /* initial state of console window */ -#endif -char *explanation[cLAST_COMMAND-cFIRST_COMMAND+1]; /* explanations of commands */ -char *explicit=NULL; /* yabasic commands given on the command line */ -char **yabargv; /* arguments for yabasic */ -int yabargc; /* number of arguments in yabargv */ -static int endreason=erNONE; /* reason for termination */ -static int exitcode=0; -static int signal_arrived=0; -/* timing */ -time_t compilation_start,compilation_end,execution_end; -char library_path[200]; /* full path to search libraries */ -char library_default[200]; /* default full path to search libraries */ -static struct command *docuhead=NULL; /* first docu in main */ -static int docucount=0; /* number of docu-lines in array */ -int check_compat=0; /* true, if compatibility should be checked */ -static char *interpreter_path=NULL; /* name of interpreter executing; i.e. ARGV[0] */ -static char *main_file_name=NULL; /* name of program to be executed */ - -YabInterface *yab; - -/* ------------- main program ---------------- */ - -int mmain(int argc,char **argv, YabInterface* y) -{ -#ifdef WINDOWS - CONSOLE_SCREEN_BUFFER_INFO csbi; - char *lp; - int fromlibpath; -#endif - int len; - - yab = y; - appdirectory = yi_GetApplicationDirectory(yab); - - // appdirectory=(char *)my_malloc(sizeof(argv[0])); - // strcpy(appdirectory, argv[0]); - - string=(char *)my_malloc(sizeof(char)*INBUFFLEN); - errorstring=(char *)my_malloc(sizeof(char)*INBUFFLEN); - *errorstring='\0'; - errorcode=0; - - program_state=HATCHED; - infolevel=WARNING; /* set the initial Infolevel */ - -#ifdef WINDOWS - /* get handle for current thread */ - DuplicateHandle(GetCurrentProcess(),GetCurrentThread(), - GetCurrentProcess(),&mainthread,THREAD_ALL_ACCESS,FALSE,0); - - /* get handle of instance */ - this_instance=GetModuleHandle(NULL); - - /* define my window class */ - myclass.style=0; - myclass.lpfnWndProc=(LPVOID)mywindowproc; - myclass.cbClsExtra=0; /* no extra bytes */ - myclass.cbWndExtra=0; - myclass.hInstance=this_instance; - myclass.hIcon=LoadIcon(this_instance,"yabasicIcon"); - myclass.hCursor=LoadCursor(NULL,IDC_ARROW); /* standard cursor */ - myclass.hbrBackground=(HBRUSH)COLOR_WINDOW; /* default-background */ - myclass.lpszMenuName=NULL; - myclass.lpszClassName=my_class; - - RegisterClass(&myclass); - - /* get console handles */ - ConsoleInput=GetStdHandle(STD_INPUT_HANDLE); - ConsoleOutput=GetStdHandle(STD_OUTPUT_HANDLE); - GetConsoleMode(ConsoleInput,&InitialConsole); - - /* find out, if launched from commandline */ - GetConsoleScreenBufferInfo(ConsoleOutput,&csbi); - Commandline=!((csbi.dwCursorPosition.X==0) && (csbi.dwCursorPosition.Y==0)); - if ((csbi.dwSize.X<=0) || (csbi.dwSize.Y <= 0)) Commandline=TRUE; - -#endif - /* get library path */ - library_path[0]='\0'; - library_default[0]='\0'; -#ifdef UNIX - strcpy(library_default,LIBRARY_PATH); -#else - fromlibpath=TRUE; - if (lp=getreg("librarypath")) { - strcpy(library_default,lp); - fromlibpath=TRUE; - } else if (lp=getreg("path")) { - strcpy(library_default,lp); - fromlibpath=FALSE; - } else { - library_default[0]='\0'; - fromlibpath=FALSE; - } -#endif - - /* find out, if this executable is bound to a yabasic program */ - interpreter_path=find_interpreter(argv[0]); - is_bound=isbound(); - - /* parse arguments */ - parse_arguments(argc,argv); - - /* brush up library path */ - if (!library_path[0]) strcpy(library_path,library_default); - len=strlen(library_path); -#ifdef UNIX - if (library_path[len-1]=='/' || library_path[len-1]=='\\') library_path[len-1]='\0'; -#else - if (library_path[0]) { - if (library_path[len-1]!='/' && library_path[len-1]!='\\') strcat(library_path,"\\"); - if (!fromlibpath) strcat(library_path,"lib\\"); - } -#endif - - time(&compilation_start); - error(DEBUG,"this is yab " VERSION); - initialize(); - program_state=INITIALIZED; - - error(NOTE,"calling parser/compiler"); - - if (interactive) { - printf("%s",BANNER); - printf("Enter your program and type RETURN twice when done.\n\n"); - printf("Your program will execute immediately and CANNOT BE SAVED;\n"); - printf("create your program with an EXTERNAL EDITOR, if you want to keep it.\n"); -#ifdef UNIX -#ifndef BEOS - printf("Type 'man yabasic' or see the file yabasic.htm for more information.\n\n"); -#else - printf("See the documentation for more information.\n\n"); -#endif -#else - printf("See the documentation within the start-menu for more information.\n\n"); -#endif - } - program_state=COMPILING; - if (yyparse() && errorlevel>ERROR) error(ERROR,"Couldn't parse program"); - - if (errorlevel>ERROR) create_docu_array(); - - add_command(cEND,NULL); - sprintf(string,"read %d line(s) and generated %d command(s)",mylineno,commandcount); - error(NOTE,string); - - time(&compilation_end); - - if (to_bind) { - struct libfile_name *lib; - if (mybind(to_bind)) { - sprintf(string,"Successfully bound '%s' and '%s' into '%s'",interpreter_path,main_file_name,to_bind); - error(INFO,string); - end_it(); - } else { - sprintf(string,"could not bind '%s' and '%s' into '%s'",interpreter_path,main_file_name,to_bind); - error(ERROR,string); - end_it(); - } - } - - if (errorlevel>ERROR && !check_compat) { - program_state=RUNNING; - run_it(yab); - } else { - program_state=FINISHED; - if (check_compat) - printf("Check for possible compatibility problems done\nProgram will not be executed, %d possible problem(s) reported\n",warning_count); - else - error(ERROR,"Program not executed"); - } - - program_state=FINISHED; - sprintf(string,"%d debug(s), %d note(s), %d warning(s), %d error(s)", - debug_count,note_count,warning_count,error_count); - error(NOTE,string); - time(&execution_end); - sprintf(string,"compilation time %g second(s), execution %g", - (double)(compilation_end-compilation_start),(double)(execution_end-compilation_end)); - error(NOTE,string); - end_it(); - return !(errorlevel>ERROR); -} - - - -/* ------------- subroutines ---------------- */ - - -static void std_diag(char *head,int type,char *name) /* produce standard diagnostic */ -{ - int n,i; - char *s; - struct stackentry *sp; - - if (infolevel>=DEBUG) { - s=string; - if (type>cLAST_COMMAND || typeprev!=stackroot) { - sprintf(s,"t["); - s+=2; - sp=stackhead; - for(i=0;TRUE;i++) { - sp=sp->prev; - if (sp==stackroot) break; - if (i>=5) continue; - if (i>0) { - sprintf(s,","); - s++; - } - switch(sp->type) { - case stGOTO: - sprintf(s,"goto%n",&n); - break; - case stSTRINGARRAYREF: - case stNUMBERARRAYREF: - if (sp->pointer) - sprintf(s,"%s()%n",(char *)sp->pointer,&n); - else - sprintf(s,"ARRAY()%n",&n); - break; - case stSTRING: - sprintf(s,"'%s'%n",(char *)sp->pointer,&n); - break; - case stNUMBER: - sprintf(s,"%g%n",sp->value,&n); - break; - case stLABEL: - sprintf(s,"label%n",&n); - break; - case stRETADD: - sprintf(s,"retadd%n",&n); - break; - case stRETADDCALL: - sprintf(s,"retaddcall%n",&n); - break; - case stSWITCH_MARK: - sprintf(s,"switch_mark%n",&n); - break; - case stFREE: - sprintf(s,"free%n",&n); - break; - case stROOT: - sprintf(s,"root%n",&n); - break; - case stSWITCH_STRING: - sprintf(s,"switch_string%n",&n); - break; - case stSWITCH_NUMBER: - sprintf(s,"switch_number%n",&n); - break; - default: - sprintf(s,"unknown%n",&n); - break; - } - s+=n; - } - if (i>5) { - sprintf(s,";+%d%n",i-5,&n); - s+=n; - } - strcat(s,"]b"); - } - error(DEBUG,string); - } -} - - -struct command *add_command(int type,char *name) - /* get room for new command, and make a link from old one */ -{ - struct command *new; - - if (infolevel>=DEBUG) std_diag("creating",type,name); - cmdhead->type=type; /* store command */ - cmdhead->line=mylineno; - cmdhead->lib=currlib; - cmdhead->cnt=commandcount; - if (!name || !*name) - cmdhead->name=NULL; - else - cmdhead->name=my_strdup(name); - commandcount++; - cmdhead->pointer=NULL; /* no data yet */ - cmdhead->jump=NULL; - cmdhead->nextassoc=NULL; - cmdhead->switch_id=get_switch_id(); - if (!currlib->datapointer && cmdhead->type==cDATA) currlib->firstdata=currlib->datapointer=cmdhead; - - /* link into chain of commands referencing a symbol */ - if (name) { - if (lastref) lastref->nextref=cmdhead; - lastref=cmdhead; - } - - /* create new command */ - new=(struct command *)my_malloc(sizeof(struct command)); - /* and initialize */ - new->next=NULL; - new->prev=cmdhead; - new->pointer=NULL; - new->symbol=NULL; - new->nextref=NULL; - new->nextassoc=NULL; - new->name=NULL; - - cmdhead->next=new; - lastcmd=cmdhead; - cmdhead=cmdhead->next; - return lastcmd; -} - - -static void parse_arguments(int cargc,char *cargv[]) - /* parse arguments from the command line */ -{ - char **argv; - int argc,larg; -#ifdef UNIX - char *parg; - int i; -#endif - int ar; - FILE *inputfile=NULL; - char *option; - char *info; - int options_done=FALSE; - - if (cargc>1) larg=strlen(cargv[1]); - else larg=0; -#ifdef UNIX - if (cargc>0) { - /* get room for arguments */ - argv=(char **)my_malloc((larg+cargc+1)*sizeof(char *)); - /* copy zero argument */ - argv[0]=cargv[0]; - argc=0; - /* chop first argument into pieces */ - if (cargc>=2) { - parg=strtok(my_strdup(cargv[1])," \t"); - for(argc=1;parg;argc++) { - argv[argc]=parg; - parg=strtok(NULL," \t"); - } - } - /* copy other arguments */ - for(i=2;i=argc) { - error(ERROR,"no infolevel specified " YABFORHELP); - end_it(); - } - info=argv[ar]; - if (!strncmp(info,"debug",strlen(info))) infolevel=DEBUG; - else if (!strncmp(info,"note",strlen(info))) infolevel=NOTE; - else if (!strncmp(info,"warning",strlen(info))) infolevel=WARNING; - else if (!strncmp(info,"error",strlen(info))) infolevel=ERROR; - else if (!strncmp(info,"fatal",strlen(info))) infolevel=FATAL; - else if (!strncmp(info,"bison",strlen(info))) {yydebug=1;infolevel=DEBUG;} - else { - sprintf(string,"there's no infolevel '%s' " YABFORHELP,argv[ar]); - error(ERROR,string); - end_it(); - } - } - /*else if (equal("-fg",option,3) || equal("-foreground",option,4)) { - ar++; - if (ar>=argc) { - error(ERROR,"no foreground colour specified " YABFORHELP); - end_it(); - } - foreground=my_strdup(argv[ar]); - } - else if (equal("-bg",option,2) || equal("-background",option,2)) { - ar++; - if (ar>=argc) { - error(ERROR,"no background colour specified (-h for help)"); - end_it(); - } - background=my_strdup(argv[ar]); - } - else if (equal("-geometry",option,2)) { - ar++; - if (ar>=argc) { - error(ERROR,"no geometry string specified (-h for help)"); - end_it(); - } - geometry=my_strdup(argv[ar]); - }*/ - else if (equal("-bind",option,3)) { - ar++; - if (ar>=argc) { - error(ERROR,"name of bound program to be written is missing"); - end_it(); - } - to_bind=my_strdup(argv[ar]); - } - else if (equal("-execute",option,2)) { - ar++; - if (ar>=argc) { - error(ERROR,"no commands specified (-h for help)"); - end_it(); - } - explicit=my_strdup(argv[ar]); - } - else if (equal("-librarypath",option,4)) { - ar++; - if (ar>=argc) { - error(ERROR,"no library path specified (-h for help)"); - end_it(); - } - strcpy(library_path,argv[ar]); - }/* - else if (equal("-display",option,3)) { - ar++; - if (ar>=argc) { - error(ERROR,"no display name specified (-h for help)"); - end_it(); - } - displayname=my_strdup(argv[ar]); - } - else if (equal("-font",option,4)) { - ar++; - if (ar>=argc) { - error(ERROR,"no font specified (-h for help)"); - end_it(); - } - font=my_strdup(argv[ar]); - }*/ else if (!print_docu && - (!strcmp("-doc",option) || !strncmp("-doc_",option,5) || - !strcmp("-docu",option) || !strncmp("-docu_",option,6))) { - print_docu=TRUE; - if (!strncmp("-doc_",option,5)) { - ar--; - hold_docu=TRUE; - main_file_name=my_strdup(option+5); - } else if (!strncmp("-docu_",option,6)) { - ar--; - hold_docu=TRUE; - main_file_name=my_strdup(option+6); - } else { - if (ar>=argc-1) { - error(ERROR,"no filename specified (-h for help)"); - end_it(); - } - hold_docu=FALSE; - main_file_name=my_strdup(argv[ar+1]); - } - } else if (!print_docu && *option=='-') { - sprintf(string,"unknown or ambigous option '%s' " YABFORHELP,option); - error(ERROR,string); - end_it(); - } else if (!is_bound && !inputfile && !explicit) { /* not an option */ - if (!main_file_name) main_file_name=my_strdup(argv[ar]); - inputfile=fopen(main_file_name,"r"); - if (inputfile==NULL) { - sprintf(string,"could not open '%s': %s",main_file_name,my_strerror(errno)); - error(ERROR,string); - endreason=erERROR; - exitcode=1; - end_it(); - } else { - progname=strrchr(main_file_name,'\\'); - if (!progname) progname=strrchr(main_file_name,'/'); - if (progname) - progname++; - else - progname=main_file_name; - if (!progname) progname="yab"; - } - } else { /* option for yabasic program */ - yabargv[yabargc]=my_strdup(argv[ar]); - yabargc++; - } - } else { - yabargv[yabargc]=my_strdup(argv[ar]); - yabargc++; - } - } - - interactive=FALSE; - -#ifdef WINDOWS - if (is_bound || !progname) { - SetConsoleTitle(""); - } else { - SetConsoleTitle(progname); - } -#endif - - if (is_bound) { - inputfile=bound_program; - main_file_name=my_strdup(interpreter_path); - } else if (!inputfile && !explicit) { - interactive=TRUE; - inputfile=stdin; - main_file_name="standard input"; - } - if (explicit) main_file_name="command line"; - - yi_SetMainFileName(main_file_name, yab); - - /* open a flex buffer for the initial file */ - open_main(inputfile,explicit,main_file_name); - return; - -} - -void do_help(char *op) /* process help option */ -{ - char *ooop=op; - char *oop=op; - if (op[0]=='-' && op[1]=='-') op++; - oop=op; - op=strchr(++op,'-'); - if (!op) { - if (equal("-version",oop,2)) { - fprintf(stderr,"%s\n",BANNER_VERSION); - } else if (equal("-license",oop,2) || equal("-licence",oop,2)) { - fprintf(stderr,"\n%s\n",YABLICENSE); - } else { - fprintf(stderr,"%s",BANNER); - fprintf(stderr,"For more help try one of these options:\n"); - fprintf(stderr," -help-license : show license and conditions of copying\n"); - fprintf(stderr," -help-usage : invoking yabasic and commandline options\n\n"); -#ifdef UNIX -#ifndef BEOS - fprintf(stderr,"Type 'man yabasic' or see the file yabasic.htm for a description\n"); -#else - fprintf(stderr,"Read the documentation for a description of the language.\n\n"); -#endif -#else - fprintf(stderr,"See the file yabasic.htm (accessible from the start-menu) for a\ndescription"); -#endif -// fprintf(stderr,"of the language, or go to www.yabasic.de for the latest\n"); -// fprintf(stderr,"information and other yabasic resources.\n\n"); - } - } else if (equal("-license",op,2) || equal("-licence",op,2)) { - fprintf(stderr,"\n%s\n",YABLICENSE); - } else if (equal("-usage",op,2)) { - fprintf(stderr,"\nUsage: yab [OPTIONS] [FILENAME [ARGUMENTS]]\n\n"); - fprintf(stderr,"FILENAME : file, which contains the yab program; omit it to type\n"); - fprintf(stderr," in your program on the fly (terminated by a double newline)\n"); - fprintf(stderr,"ARGUMENTS : strings, that are available from within the yab program\n\n"); - fprintf(stderr,"available OPTIONS:\n"); - fprintf(stderr," -help : print help message and other help options\n"); - fprintf(stderr," -version : show version of yab\n"); - fprintf(stderr," -infolevel [dnwefb] : set infolevel to debug,note,warning,error or fatal\n"); - fprintf(stderr," -execute COMMANDS : execute yab COMMANDS right away\n"); - fprintf(stderr," -bind BOUND : bind interpreter with FILENAME into BOUND\n"); -// fprintf(stderr," -geometry x+y : position graphic window at x,y\n"); -#ifdef UNIX -// fprintf(stderr," -fg,-bg COL : specify fore/background color of graphic window\n"); -// fprintf(stderr," -display DISP : display, where window will show up\n"); -// fprintf(stderr," -font FONT : font for graphic window\n"); -#else -// fprintf(stderr," -font FONT : font for graphic, supply style (decorative,dontcare,\n"); -// fprintf(stderr," modern,roman,script or swiss) and size, e.g. swiss10\n"); -#endif - fprintf(stderr," -docu NAME : print embedded docu of program or library\n"); - fprintf(stderr," -check : check for possible compatibility problems\n"); - fprintf(stderr," -- : pass any subsequent words as arguments to yab\n"); - fprintf(stderr," -librarypath PATH : directory to search libraries not found in\n"); - fprintf(stderr," current dir (default %s)\n",library_default); - fprintf(stderr," -enter : waits for the user to press the return key after\n"); - fprintf(stderr," the program finished\n"); - fprintf(stderr,"\n"); - } else { - sprintf(string,"unknown or ambigous option '%s' " YABFORHELP,ooop); - error(ERROR,string); - } -} - - -int equal(char *a,char *b,int min) /* helper for processing options */ -{ - int len; - if (b[0]=='-' && b[1]=='-' && b[2]) b++; - if (min<0) { - min=-min; - len=min; - } else { - len=strlen(b); - } - - return (!strncmp(a,b,len) && len>=min); -} - - -#ifdef WINDOWS -static void chop_command(char *command,int *argc,char ***argv) - /* chop the WIN95-commandline into seperate strings */ -{ - int i,j,count; - int quote; - char c,last; - char *curr; - char **list; - - /* count, how many arguments */ - count=i=0; - last=' '; - quote=FALSE; - while((c=*(command+i))!='\0') { - if (!quote && c!=' ' && last==' ') count++; - if (c=='\"') quote=!quote; - last=c; - i++; - } - - /* fill yabasic into argv[0] */ - *argv=my_malloc((count+1)*sizeof(char *)); - list=*argv; - *argc=count+1; - *list=my_strdup("yabasic"); - - /* fill in other strings */ - i=0; - count=1; - last=' '; - quote=FALSE; - do { - c=*(command+i); - if (!quote && c!=' ' && last==' ') j=i; - if (c=='\"') { - quote=!quote; - if (quote) j++; - } - if (((c==' ' && !quote) || c=='\0') && last!=' ') { - *(list+count)=my_malloc((i-j+1)*sizeof(char)); - strncpy(*(list+count),command+j,i-j); - curr=*(list+count)+i-j; - *curr='\0'; - if (*(curr-1)=='\"') *(curr-1)='\0'; - count++; - } - last=c; - i++; - } while(c!='\0'); -} -#endif - - -static void end_it(void) /* perform shutdown-operations */ -{ - char l[2]; -#ifdef UNIX - int status; -#ifndef BEOS - if (winpid==0 || termpid==0 || backpid==0) - yi_exit(1,yab); - if (backpid>0) { - kill(backpid,SIGTERM); - waitpid(backpid,&status,0); - backpid=-1; - } -#else - if(enterkeyflag) - { - printf("---Press RETURN to continue "); - getchar(); - // fgets(1,2,stdin); - } - if (winpid==0 || termpid==0) yi_exit(1,yab); -#endif - if ((curinized || winopened) && endreason!=erREQUEST) { -#else - if (!Commandline && endreason!=erREQUEST) { -#endif - myswitch(STDIO_STREAM); - onestring("---Program done, press RETURN---\n"); -#ifdef WINDOWS - SetConsoleMode(ConsoleInput,InitialConsole & (~ENABLE_ECHO_INPUT)); - FlushConsoleInputBuffer(ConsoleInput); -#endif - fgets(l,2,stdin); -#ifdef WINDOWS - if (wthandle!=INVALID_HANDLE_VALUE) TerminateThread(wthandle,0); -#endif -#ifdef UNIX - } -#else - } -#endif - -#ifdef UNIX -#ifdef BUILD_NCURSES - if (curinized) endwin(); -#endif -#else - if (printerfont) DeleteObject(printerfont); - if (myfont) DeleteObject(myfont); - if (printer) DeleteDC(printer); -#endif - yi_exit(exitcode,yab); -} - - -static void initialize(void) - /* give correct values to pointers etc ... */ -{ - struct symbol *s; - struct stackentry *base; - int i; - - /* install exception handler */ - /*signal(SIGFPE,signal_handler); - signal(SIGSEGV,signal_handler); - signal(SIGINT,signal_handler); -#ifdef SIGHUP - signal(SIGHUP,signal_handler); -#endif -#ifdef SIGQUIT - signal(SIGQUIT,signal_handler); -#endif -#ifdef SIGABRT - signal(SIGABRT,signal_handler); -#endif */ - - /* initialize error handling: no errors seen 'til now */ - errorlevel=DEBUG; - debug_count=0; - note_count=0; - warning_count=0; - error_count=0; - - /* initialize stack of symbol lists */ - pushsymlist(); - - /* initialize random number generator */ - srand((unsigned)time(NULL)); - - /* initialize numeric stack */ - /* create first : */ - stackroot=(struct stackentry *)my_malloc(sizeof(struct stackentry)); - stackroot->next=NULL; - stackroot->prev=NULL; - stackhead=stackroot; /* stack of double values */ - - /* initialize command stack */ - /* create first: */ - cmdroot=(struct command *)my_malloc(sizeof(struct command)); - cmdroot->next=cmdroot->prev=NULL; - - /* initialize random number generator */ - //srand((unsigned int)time(NULL)); - - /* specify default text-alignement and window origin */ - /* - text_align=my_strdup("lb"); - winorigin=my_strdup("lt");*/ - - /* initialize stack */ - base=push(); - base->type=stROOT; /* push nil, so that pop will not crash */ - cmdhead=cmdroot; /* list of commands */; - commandcount=0; - - /* add internal string variables */ - s=get_sym("yabos$",sySTRING,amADD_GLOBAL); - if (s->pointer) my_free(s->pointer); -#ifdef UNIX -#ifndef BEOS - s->pointer=my_strdup("unix"); -#elseifdef HAIKU - s->pointer=my_strdup("Haiku"); -#else - s->pointer=my_strdup("BeOS"); -#endif -#else - s->pointer=my_strdup("windows"); -#endif - - /* set default-scales for grafics */ - /* - fontheight=10; - winheight=100; - winwidth=100; -#ifdef UNIX - calc_psscale(); -#endif*/ - - - /* file stuff */ - for(i=1;i<=9;i++) { - streams[i]=NULL; - stream_modes[i]=smCLOSED; - } - streams[0]=stdin; - stream_modes[0]=smREAD | smWRITE | smREADWRITE; -#ifdef UNIX - /* printerfile=NULL; /* no ps-file yet */ -#endif - - /* array with explanation */ - for(i=cFIRST_COMMAND;i<=cLAST_COMMAND;i++) explanation[i]="???"; - explanation[cFIRST_COMMAND]="FIRST_COMMAND"; - explanation[cFINDNOP]="FINDNOP"; - explanation[cEXCEPTION]="EXCEPTION"; - explanation[cLABEL]="LABEL"; - explanation[cSUBLINK]="cSUBLINK"; - explanation[cTOKEN]="TOKEN"; - explanation[cTOKEN2]="TOKEN2"; - explanation[cTOKENALT]="TOKENALT"; - explanation[cTOKENALT2]="TOKENALT2"; - explanation[cSPLIT]="SPLIT"; - explanation[cSPLIT2]="SPLIT2"; - explanation[cSPLITALT]="SPLITALT"; - explanation[cSPLITALT2]="SPLITALT2"; - explanation[cGOTO]="GOTO"; - explanation[cQGOTO]="QGOTO"; - explanation[cGOSUB]="GOSUB"; - explanation[cQGOSUB]="QGOSUB"; - explanation[cCALL]="CALL"; - explanation[cQCALL]="QCALL"; - explanation[cRETURN]="RETURN"; - explanation[cRET_FROM_FUN]="RET_FROM_FUN"; - explanation[cRETVAL]="RETVAL"; - explanation[cSWAP]="SWAP"; - explanation[cDECIDE]="DECIDE"; - explanation[cANDSHORT]="ANDSHORT"; - explanation[cORSHORT]="ORSHORT"; - explanation[cSKIPPER]="SKIPPER"; - explanation[cSKIPONCE]="SKIPONCE"; - explanation[cRESETSKIPONCE]="RESETSKIPONCE"; - explanation[cNOP]="NOP"; - explanation[cEND_FUNCTION]="END_FUNCTION"; - explanation[cDIM]="DIM"; - explanation[cFUNCTION]="FUNCTION"; - explanation[cDOARRAY]="DOARRAY"; - explanation[cDBLADD]="DBLADD"; - explanation[cDBLMIN]="DBLMIN"; - explanation[cDBLMUL]="DBLMUL"; - explanation[cDBLDIV]="DBLDIV"; - explanation[cDBLPOW]="DBLPOW"; - explanation[cNEGATE]="NEGATE"; - explanation[cPUSHDBLSYM]="PUSHDBLSYM"; - explanation[cREQUIRE]="REQUIRE"; - explanation[cCLEARREFS]="CLEARREFS"; - explanation[cPUSHSYMLIST]="PUSHSYMLIST"; - explanation[cPOPSYMLIST]="POPSYMLIST"; - explanation[cMAKELOCAL]="MAKELOCAL"; - explanation[cNUMPARAM]="NUMPARAM"; - explanation[cMAKESTATIC]="MAKESTATIC"; - explanation[cARRAYLINK]="ARRAYLINK"; - explanation[cPUSHARRAYREF]="PUSHARRAYREF"; - explanation[cARDIM]="ARRAYDIMENSION"; - explanation[cARSIZE]="ARRAYSIZE"; - explanation[cUSER_FUNCTION]="USER_FUNCTION"; - explanation[cFUNCTION_OR_ARRAY]="FUNCTION_OR_ARRAY"; - explanation[cSTRINGFUNCTION_OR_ARRAY]="STRINGFUNCTION_OR_ARRAY"; - explanation[cPUSHFREE]="PUSHFREE"; - explanation[cPOPDBLSYM]="POPDBLSYM"; - explanation[cPOP]="POP"; - explanation[cPUSHDBL]="PUSHDBL"; - explanation[cPOKE]="POKE"; - explanation[cPOKEFILE]="POKEFILE"; - explanation[cAND]="AND"; - explanation[cOR]="OR"; - explanation[cNOT]="NOT"; - explanation[cLT]="LT"; - explanation[cGT]="GT"; - explanation[cLE]="LE"; - explanation[cGE]="GE"; - explanation[cEQ]="EQ"; - explanation[cNE]="NE"; - explanation[cSTREQ]="STREQ"; - explanation[cSTRNE]="STRNE"; - explanation[cPUSHSTRSYM]="PUSHSTRSYM"; - explanation[cPOPSTRSYM]="POPSTRSYM"; - explanation[cPUSHSTR]="PUSHSTR"; - explanation[cCONCAT]="CONCAT"; - explanation[cPUSHSTRPTR]="PUSHSTRPTR"; - explanation[cCHANGESTRING]="CHANGESTRING"; - explanation[cGLOB]="GLOB"; - explanation[cPRINT]="PRINT"; - explanation[cREAD]="READ"; - explanation[cRESTORE]="RESTORE"; - explanation[cQRESTORE]="QRESTORE"; - explanation[cREADDATA]="READDATA"; - explanation[cONESTRING]="ONESTRING"; - explanation[cDATA]="DATA"; - explanation[cOPEN]="OPEN"; - explanation[cCHECKOPEN]="CHECKOPEN"; - explanation[cCHECKSEEK]="CHECKSEEK"; - explanation[cCOMPILE]="COMPILE"; - explanation[cEXECUTE]="EXECUTE"; - explanation[cEXECUTE2]="EXECUTE$"; - explanation[cCLOSE]="CLOSE"; - explanation[cSEEK]="SEEK"; - explanation[cSEEK2]="SEEK2"; - explanation[cPUSHSTREAM]="cPUSHSTREAM"; - explanation[cPOPSTREAM]="cPOPSTREAM"; - explanation[cWAIT]="WAIT"; - explanation[cBELL]="BELL"; - explanation[cMOVE]="MOVE"; - explanation[cCLEARSCR]="CLEARSCR"; - explanation[cOPENWIN]="OPENWIN"; - explanation[cDOT]="DOT"; - explanation[cPUTCHAR]="PUTCHAR"; - explanation[cLINE]="LINE"; - explanation[cCIRCLE]="CIRCLE"; - explanation[cTEXT]="TEXT"; - explanation[cCLOSEWIN]="CLOSEWIN"; - explanation[cTESTEOF]="TESTEOF"; - explanation[cCOLOUR]="COLOUR"; - explanation[cDUPLICATE]="DUPLICATE"; - explanation[cDOCU]="DOCU"; - explanation[cEND]="END"; - explanation[cEXIT]="EXIT"; - explanation[cBIND]="BIND"; - explanation[cERROR]="ERROR"; - explanation[cSTARTFOR]="STARTFOR"; - explanation[cFORCHECK]="FORCHECK"; - explanation[cFORINCREMENT]="FORINCREMENT"; - explanation[cBREAK_MARK]="BREAK_MARK"; - explanation[cPUSH_SWITCH_MARK]="PUSH_SWITCH_MARK"; - explanation[cCLEAN_SWITCH_MARK]="CLEAN_SWITCH_MARK"; - explanation[cSWITCH_COMPARE]="SWITCH_COMPARE"; - explanation[cNEXT_CASE]="NEXT_CASE"; - explanation[cBREAK]="BREAK"; - explanation[cMINOR_BREAK]="MINOR_BREAK"; - explanation[cCONTINUE]="CONTINUE"; - explanation[cBREAK_HERE]="BREAK_HERE"; - explanation[cCONTINUE_HERE]="CONTINUE_HERE"; - explanation[cBREAK_MARK]="BREAK_MARK"; - explanation[cCONTINUE_CORRECTION]="CONTINUE_CORRECTION"; - explanation[cLAST_COMMAND]="???"; - - ykey[kERR]="error"; - ykey[kUP]="up"; - ykey[kDOWN]="down"; - ykey[kLEFT]="left"; - ykey[kRIGHT]="right"; - ykey[kDEL]="del"; - ykey[kINS]="ins"; - ykey[kCLEAR]="clear"; - ykey[kHOME]="home"; - ykey[kEND]="end"; - ykey[kF0]="f0"; - ykey[kF1]="f1"; - ykey[kF2]="f2"; - ykey[kF3]="f3"; - ykey[kF4]="f4"; - ykey[kF5]="f5"; - ykey[kF6]="f6"; - ykey[kF7]="f7"; - ykey[kF8]="f8"; - ykey[kF9]="f9"; - ykey[kF10]="f10"; - ykey[kF11]="f11"; - ykey[kF12]="f12"; - ykey[kF13]="f13"; - ykey[kF14]="f14"; - ykey[kF15]="f15"; - ykey[kF16]="f16"; - ykey[kF17]="f17"; - ykey[kF18]="f18"; - ykey[kF19]="f19"; - ykey[kF20]="f20"; - ykey[kF21]="f21"; - ykey[kF22]="f22"; - ykey[kF23]="f23"; - ykey[kF24]="f24"; - ykey[kBACKSPACE]="backspace"; - ykey[kSCRNDOWN]="scrndown"; - ykey[kSCRNUP]="scrnup"; - ykey[kENTER]="enter"; - ykey[kESC]="esc"; - ykey[kTAB]="tab"; - ykey[kLASTKEY]=""; -} - -void signal_handler(int sig) /* handle signals */ -{ - signal(sig,SIG_DFL); - if (program_state==FINISHED) { - yi_exit(1,yab); - } - signal_arrived=sig; - -#ifdef WINDOWS - if (signal_arrived) { - SuspendThread(mainthread); - if (wthandle!=INVALID_HANDLE_VALUE) SuspendThread(wthandle); - if (kthandle!=INVALID_HANDLE_VALUE) TerminateThread(kthandle,0); - } -#endif - - switch(sig) { - case SIGFPE: - error(FATAL,"floating point exception, cannot proceed."); - case SIGSEGV: - error(FATAL,"segmentation fault, cannot proceed."); - case SIGINT: -#ifdef UNIX -#ifndef BEOS - if (winpid==0 || termpid==0 || backpid==0) yi_exit(1,yab); -#endif -#endif - error(FATAL,"keyboard interrupt, cannot proceed."); -#ifdef SIGHUP - case SIGHUP: - error(FATAL,"received signal HANGUP, cannot proceed."); -#endif -#ifdef SIGQUIT - case SIGQUIT: - error(FATAL,"received signal QUIT, cannot proceed."); -#endif -#ifdef SIGABRT - case SIGABRT: - error(FATAL,"received signal ABORT, cannot proceed."); -#endif - default: - break; - } -} - - -static void run_it(YabInterface* yab) - /* execute the compiled code */ -{ - int l=0; - - current=cmdroot; /* start with first comand */ - if (print_docu) { /* don't execute program, just print docu */ - while(current!=cmdhead) { - if (current->type==cDOCU) { - if (infolevel>=DEBUG) std_diag("executing",current->type,current->name); - printf("%s\n",(char *)current->pointer); - l++; - if (hold_docu && !(l%24)) { - printf("---Press RETURN to continue "); - fgets(string,20,stdin); - } - } else { - if (infolevel>=DEBUG) std_diag("skipping",current->type,current->name); - } - current=current->next; - } - if (!l) printf("---No embbeded documentation\n"); - if (hold_docu) { - printf("---End of embbedded documentation, press RETURN "); - fgets(string,20,stdin); - } - } else { - while(current!=cmdhead && endreason==erNONE) { - if (infolevel>=DEBUG) std_diag("executing",current->type,current->name); - switch(current->type) { - case cGOTO:case cQGOTO:case cGOSUB:case cQGOSUB:case cCALL:case cQCALL: - jump(current); DONE; - case cEXCEPTION: - exception(current); DONE; - case cSKIPPER: - skipper(); break; - case cSKIPONCE: - skiponce(current); DONE; - case cRESETSKIPONCE: - resetskiponce(current); DONE; - case cNEXT_CASE: - next_case(); DONE; - case cBREAK:case cMINOR_BREAK: - mybreak(current); DONE; - case cSWITCH_COMPARE: - switch_compare(); DONE; - case cPUSH_SWITCH_MARK: - push_switch_mark(); DONE; - case cCLEAN_SWITCH_MARK: - clean_switch_mark(current); DONE; - case cCONTINUE: - mycontinue(current); DONE; - case cFINDNOP: - findnop(); DONE; - case cFUNCTION_OR_ARRAY: case cSTRINGFUNCTION_OR_ARRAY: - function_or_array(current); - break; /* NOT 'DONE' ! */ - case cLABEL:case cDATA:case cNOP:case cUSER_FUNCTION: - case cSUBLINK:case cEND_FUNCTION: case cDOCU: case cBREAK_HERE: - case cCONTINUE_HERE:case cBREAK_MARK:case cCONTINUE_CORRECTION: - DONE; - case cERROR: - do_error(current); DONE; - case cCOMPILE: - compile(); DONE; - case cEXECUTE: case cEXECUTE2: - execute(current); DONE; - case cRETURN:case cRET_FROM_FUN: - myreturn(current); DONE; - case cRETVAL: - retval(current); DONE; - case cPUSHDBLSYM: - pushdblsym(current); DONE; - case cPUSHDBL: - pushdbl(current); DONE; - case cPOPDBLSYM: - popdblsym(current); DONE; - case cPOP: - pop(stANY); DONE; - case cPOPSTRSYM: - popstrsym(current); DONE; - case cPUSHSTRSYM: - pushstrsym(current); DONE; - case cPUSHSTR: - pushstr(current); DONE; - case cCLEARREFS: - clearrefs(current); DONE; - case cPUSHSYMLIST: - pushsymlist(); DONE; - case cPOPSYMLIST: - popsymlist(); DONE; - case cREQUIRE: - require(current); DONE; - case cMAKELOCAL: - makelocal(current); DONE; - case cNUMPARAM: - numparam(current); DONE; - case cMAKESTATIC: - makestatic(current); DONE; - case cARRAYLINK: - arraylink(current); DONE; - case cPUSHARRAYREF: - pusharrayref(current); DONE; - case cTOKEN: case cTOKEN2: case cSPLIT: case cSPLIT2: - token(current); DONE; - case cTOKENALT: case cTOKENALT2: case cSPLITALT: case cSPLITALT2: - tokenalt(current); DONE; - case cARDIM: case cARSIZE: - query_array(current); DONE; - case cPUSHFREE: - push()->type=stFREE; DONE; - case cCONCAT: - concat(); DONE; - case cPRINT: - print(current); DONE; - case cMOVE: - mymove(); DONE; - case cCOLOUR: - colour(current); DONE; - case cCLEARSCR: - clearscreen(); DONE; - case cONESTRING: - onestring(current->pointer); DONE; - case cTESTEOF: - testeof(current); DONE; - case cOPEN: - myopen(current); DONE; - case cCHECKOPEN:case cCHECKSEEK: - checkopen(); DONE; - case cCLOSE: - myclose(); DONE; - case cSEEK:case cSEEK2: - myseek(current); DONE; - case cPUSHSTREAM: - push_switch(current); DONE; - case cPOPSTREAM: - pop_switch(); DONE; - case cCHKPROMPT: - chkprompt(); DONE; - case cREAD: - myread(current); DONE; - case cRESTORE:case cQRESTORE: - restore(current); DONE; - case cREADDATA: - readdata(current); DONE; - case cDBLADD:case cDBLMIN:case cDBLMUL:case cDBLDIV:case cDBLPOW: - dblbin(current); DONE; - case cNEGATE: - negate(); DONE; - case cEQ:case cNE:case cGT:case cGE:case cLT:case cLE: - dblrelop(current); DONE; - case cSTREQ:case cSTRNE:case cSTRLT:case cSTRLE:case cSTRGT:case cSTRGE: - strrelop(current); DONE; - case cAND:case cOR:case cNOT: - boole(current); DONE; - case cFUNCTION: - function(current, yab); DONE; - case cGLOB: - glob(); DONE; - case cDOARRAY: - doarray(current); DONE; - case cCHANGESTRING: - changestring(current); DONE; - case cPUSHSTRPTR: - pushstrptr(current); DONE; - case cDIM: - dim(current); DONE; - case cDECIDE: - decide(); DONE; - case cANDSHORT:case cORSHORT: - logical_shortcut(current); DONE; - case cOPENWIN: - openwin(current, yab); DONE; - case cBUTTON: - createbutton(current, yab); DONE; - case cALERT: - createalert(current, yab); DONE; - case cWINSET1: - winset1(current, yab); DONE; - case cWINSET2: - winset2(current, yab); DONE; - case cWINSET3: - winset3(current, yab); DONE; - case cWINSET4: - winset4(current, yab); DONE; - case cWINCLEAR: - winclear(current, yab); DONE; - case cLAYOUT: - setlayout(current,yab); DONE; - case cTEXTEDIT: - textedit(current,yab); DONE; - case cTEXTADD: - textadd(current,yab); DONE; - case cTEXTSET: - textset(current,yab); DONE; - case cTEXTSET2: - textset2(current,yab); DONE; - case cTEXTSET3: - textset3(current,yab); DONE; - case cTEXTCOLOR1: - textcolor1(current,yab); DONE; - case cTEXTCOLOR2: - textcolor2(current,yab); DONE; - case cTEXTCLEAR: - textclear(current,yab); DONE; - case cDRAWSET1: - drawset1(current,yab); DONE; - case cDRAWSET2: - drawset2(current,yab); DONE; - case cDRAWSET3: - drawset3(current,yab); DONE; - case cTEXT: - createtext(current, yab); DONE; - case cTEXT2: - text2(current, yab); DONE; - case cTEXTALIGN: - textalign(current, yab); DONE; - case cTEXTURL1: - texturl1(current, yab); DONE; - case cTEXTURL2: - texturl2(current, yab); DONE; - case cLOCALIZE: - localize(); DONE; - case cLOCALIZESTOP: - localizestop(); DONE; - case cLOCALIZE2: - localize2(current, yab); DONE; - case cMENU: - createmenu(current, yab); DONE; - case cCHECKBOX: - createcheckbox(current, yab); DONE; - case cRADIOBUTTON: - createradiobutton(current, yab); DONE; - case cTEXTCONTROL: - createtextcontrol(current, yab); DONE; - case cLAUNCH: - launch(current, yab); DONE; - case cLISTBOX: - createlistbox(current, yab); DONE; - case cDROPBOX: - createdropbox(current, yab); DONE; - case cITEMADD: - createitem(current, yab); DONE; - case cITEMDEL: - removeitem(current, yab); DONE; - case cITEMCLEAR: - clearitems(current, yab); DONE; - case cDRAWRECT: - drawrect(current, yab); DONE; - case cDRAWTEXT: - drawtext(current, yab); DONE; - case cDRAWCLEAR: - drawclear(current, yab); DONE; - case cDOT: - drawdot(current,yab); DONE; - case cPUTCHAR: - putchars(); DONE; - case cLINE: - drawline(current,yab); DONE; - case cCIRCLE: - drawcircle(current,yab); DONE; - case cCURVE: - drawcurve(current,yab); DONE; - case cELLIPSE: - drawellipse(current,yab); DONE; -/* case cTEXT: - text(current); DONE;*/ - case cCLOSEWIN: - closewin(current,yab); DONE; - case cVIEW: - view(current, yab); DONE; - case cBOXVIEW: - boxview(current, yab); DONE; - case cBOXVIEWSET: - boxviewset(current, yab); DONE; - case cTAB: - tab(current, yab); DONE; - case cTABSET: - tabset(current, yab); DONE; - case cTABADD: - tabadd(current, yab); DONE; - case cTABDEL: - tabdel(current, yab); DONE; - case cSLIDER1: - slider1(current, yab); DONE; - case cSLIDER2: - slider2(current, yab); DONE; - case cSLIDER3: - slider3(current, yab); DONE; - case cSLIDER4: - slider4(current, yab); DONE; - case cSLIDER5: - slider5(current, yab); DONE; - case cSLIDER6: - slider6(current, yab); DONE; - case cOPTION1: - option1(current, yab); DONE; - case cOPTION2: - option2(current, yab); DONE; - case cOPTION3: - option3(current, yab); DONE; - case cOPTION4: - option4(current, yab); DONE; - case cOPTION5: - option5(current, yab); DONE; - case cDROPZONE: - dropzone(current, yab); DONE; - case cCOLORCONTROL1: - colorcontrol1(current, yab); DONE; - case cCOLORCONTROL2: - colorcontrol2(current, yab); DONE; - case cTEXTCONTROL2: - textcontrol2(current, yab); DONE; - case cTEXTCONTROL3: - textcontrol3(current, yab); DONE; - case cTEXTCONTROL4: - textcontrol4(current, yab); DONE; - case cTEXTCONTROL5: - textcontrol5(current, yab); DONE; - case cTREEBOX1: - treebox1(current, yab); DONE; - case cTREEBOX2: - treebox2(current, yab); DONE; - case cTREEBOX3: - treebox3(current, yab); DONE; - case cTREEBOX4: - treebox4(current, yab); DONE; - case cTREEBOX5: - treebox5(current, yab); DONE; - case cTREEBOX7: - treebox7(current, yab); DONE; - case cTREEBOX8: - treebox8(current, yab); DONE; - case cTREEBOX9: - treebox9(current, yab); DONE; - case cTREEBOX10: - treebox10(current, yab); DONE; - case cTREEBOX11: - treebox11(current, yab); DONE; - case cTREEBOX12: - treebox12(current, yab); DONE; - case cBUTTONIMAGE: - buttonimage(current, yab); DONE; - case cCHECKBOXIMAGE: - checkboximage(current, yab); DONE; - case cCHECKBOXSET: - checkboxset(current, yab); DONE; - case cRADIOSET: - radioset(current, yab); DONE; - case cTOOLTIP: - tooltip(current, yab); DONE; - case cTOOLTIPNEW: - tooltipnew(current, yab); DONE; - case cTOOLTIPCOLOR: - tooltipcolor(current, yab); DONE; - case cFILEBOX: - filebox(current, yab); DONE; - case cFILEBOXADD2: - fileboxadd2(current, yab); DONE; - case cFILEBOXCLEAR: - fileboxclear(current, yab); DONE; - case cCOLUMNBOXADD: - columnboxadd(current, yab); DONE; - case cCOLUMNBOXREMOVE: - columnboxremove(current, yab); DONE; - case cCOLUMNBOXSELECT: - columnboxselect(current, yab); DONE; - case cCOLUMNBOXCOLOR: - columnboxcolor(current, yab); DONE; - case cDROPBOXSELECT: - dropboxselect(current, yab); DONE; - case cDROPBOXREMOVE: - dropboxremove(current, yab); DONE; - case cDROPBOXCLEAR: - dropboxclear(current, yab); DONE; - case cPRINTERCONFIG: - printerconfig(current, yab); DONE; - case cMENU2: - menu2(current, yab); DONE; - case cMENU3: - menu3(current, yab); DONE; - case cSUBMENU1: - submenu1(current, yab); DONE; - case cSUBMENU2: - submenu2(current, yab); DONE; - case cSUBMENU3: - submenu3(current, yab); DONE; - case cCLIPBOARDCOPY: - clipboardcopy(current, yab); DONE; - case cLISTSORT: - listsort(current, yab); DONE; - case cTREESORT: - treesort(current, yab); DONE; - case cCALENDAR: - calendar1(current, yab); DONE; - case cCALENDARSET: - calendar3(current, yab); DONE; - case cSCROLLBAR: - scrollbar(current, yab); DONE; - case cSCROLLBARSET1: - scrollbarset1(current, yab); DONE; - case cSCROLLBARSET2: - scrollbarset2(current, yab); DONE; - case cSCROLLBARSET3: - scrollbarset3(current, yab); DONE; - case cLISTBOXADD1: - listboxadd1(current, yab); DONE; - case cLISTBOXADD2: - listboxadd2(current, yab); DONE; - case cLISTBOXSELECT: - listboxselect(current, yab); DONE; - case cLISTBOXDEL2: - listboxremove(current, yab); DONE; - case cSOUNDSTOP: - soundstop(current, yab); DONE; - case cSOUNDWAIT: - soundwait(current, yab); DONE; - case cMEDIASOUNDSTOP: - mediasoundstop(current, yab); DONE; - case cSHORTCUT: - shortcut(current, yab); DONE; - case cTREEBOX13: - treebox13(current, yab); DONE; - case cDRAWSET4: - drawset4(current, yab); DONE; - case cSPLITVIEW1: - splitview1(current, yab); DONE; - case cSPLITVIEW2: - splitview2(current, yab); DONE; - case cSPLITVIEW3: - splitview3(current, yab); DONE; - case cSTACKVIEW1: - stackview1(current, yab); DONE; - case cSTACKVIEW2: - stackview2(current, yab); DONE; - case cSPINCONTROL1: - spincontrol1(current, yab); DONE; - case cSPINCONTROL2: - spincontrol2(current, yab); DONE; - case cBITMAP: - bitmap(current, yab); DONE; - case cBITMAPDRAW: - bitmapdraw(current, yab); DONE; - case cBITMAPDRAW2: - bitmapdraw2(current, yab); DONE; - case cBITMAPGET: - bitmapget(current, yab); DONE; - case cBITMAPGET2: - bitmapget2(current, yab); DONE; - case cBITMAPGETICON: - bitmapgeticon(current, yab); DONE; - case cBITMAPDRAG: - bitmapdrag(current, yab); DONE; - case cSCREENSHOT: - screenshot(current, yab); DONE; - case cBITMAPREMOVE: - bitmapremove(current, yab); DONE; - case cSTATUSBAR: - statusbar(current, yab); DONE; - case cSTATUSBARSET: - statusbarset(current, yab); DONE; - case cSTATUSBARSET2: - statusbarset2(current, yab); DONE; - case cSTATUSBARSET3: - statusbarset3(current, yab); DONE; - case cCANVAS: - canvas(current, yab); DONE; - case cMOUSESET: - mouseset(current, yab); DONE; - case cATTRIBUTE1: - attribute1(current, yab); DONE; - case cATTRIBUTECLEAR: - attributeclear(current, yab); DONE; - case cWAIT: - mywait(); DONE; - case cRESTORE2: { - struct command *c; - char *s; - c = add_command(cRESTORE, FALSE); - s = pop(stSTRING)->pointer; - if(!strcmp(s, "")) - c->pointer=my_strdup(s); - else - c->pointer=my_strdup(dotify(s, TRUE)); - restore(c); - } DONE; - case cBELL: - mybell(); DONE; - case cPOKE: - poke(current); DONE; - case cPOKEFILE: - pokefile(current); DONE; - case cSWAP: - swap(); DONE; - case cDUPLICATE: - duplicate(); DONE; - case cFORCHECK: - forcheck(); DONE; - case cFORINCREMENT: - forincrement(); DONE; - case cSTARTFOR: - startfor(); DONE; - case cBIND: - mybind(pop(stSTRING)->pointer); DONE; - case cEND: - endreason=erEOF; break; - case cEXIT: - exitcode=(int)pop(stNUMBER)->value;endreason=erREQUEST; break; - default: - sprintf(string,"Command %s (%d, right before '%s') not implemented", - explanation[current->type],current->type,explanation[current->type+1]); - error(ERROR,string); - } - } - } - program_state=FINISHED; - switch(errorlevel) { - case NOTE:case DEBUG: - error(NOTE,"Program ended normally."); break; - case WARNING: - error(WARNING,"Program ended with a warning"); break; - case ERROR: - error(ERROR,"Program stopped due to an error"); break; - case FATAL: /* should not come here ... */ - error(FATAL,"Program terminated due to FATAL error"); - break; - } -} - - -void error(int severity, char *messageline) - /* reports an basic error to the user and possibly exits */ -{ - if (program_state==COMPILING) - error_with_line(severity,messageline,mylineno); - else if (program_state==RUNNING && current->line>0) - error_with_line(severity,messageline,current->line); - else - error_with_line(severity,messageline,-1); -} - - -void error_with_line(int severity, char *message,int line) - /* reports an basic error to the user and possibly exits */ -{ - char *callstack; - char *stext; - char *f=NULL; - int l; - static int lastline; - static int first=TRUE; - - if (severity<=infolevel) { -#ifdef UNIX -#ifdef BUILD_NCURSES - if (curinized) reset_shell_mode(); -#endif -#endif - - switch(severity) { - case(INFO): - stext="---Info"; - break; - case(DUMP): - stext="---Dump"; - break; - case(DEBUG): - stext="---Debug"; - debug_count++; - break; - case(NOTE): - stext="---Note"; - note_count++; - break; - case(WARNING): - stext="---Warning"; - warning_count++; - break; - case(ERROR): - stext="---Error"; - error_count++; - break; - case(FATAL): - stext="---Fatal"; - break; - } - fprintf(stderr,"%s",stext); - if (line>=0) { - if (program_state==COMPILING) { - f=currlib->l; - l=mylineno; - } else if (program_state==RUNNING && current->line>0) { - f=current->lib->l; - l=current->line; - } - if (f) { - if (first || lastline!=l) { - fprintf(stderr," in %s, line %d",f,l); - } - lastline=l; - first=FALSE; - } - } - fprintf(stderr,": %s\n",message); - if (program_state==RUNNING && severity<=ERROR && severity!=DUMP) dump_sub(1); - } - if (severitynext) { - if (!strcmp(curr->l,l)) { - if (is_bound) - return curr; - else - return NULL; - } - } - - new=my_malloc(sizeof(struct libfile_name)); - new->next=NULL; - new->lineno=1; - if (last) last->next=new; - last=new; - - new->l=my_strdup(l); - new->llen=strlen(new->l); - - if (s) { - new->s=my_strdup(s); - } else { - /* no short name supplied get piece from l */ - end=strlen(l); - for(start=end;start>0;start--) { - if (l[start-1]=='\\' || l[start-1]=='/') break; - if (l[start]=='.') end=start; - } - end--; - new->s=my_malloc(end-start+2); - strncpy(new->s,new->l+start,end-start+1); - new->s[end-start+1]='\0'; - } - new->slen=strlen(new->s); - new->datapointer=new->firstdata=NULL; - - return new; -} - - -char *dotify(char *name,int addfun) /* add library name, if not already present */ -{ - static char buff[200]; - if (!strchr(name,'.')) { - strcpy(buff,currlib->s); - strcat(buff,"."); - strcat(buff,name); - } else { - strcpy(buff,name); - } - if (addfun && !strchr(name,'@')) { - strcat(buff,"@"); - strcat(buff,current_function); - } - return buff; -} - - -char *strip(char *name) /* strip down to minimal name */ -{ - static char buff[300]; - char *at,*dot; - - if (infolevel>=DEBUG) return name; - dot=strchr(name,'.'); - if (dot) - strcpy(buff,dot+1); - else - strcpy(buff,name); - at=strchr(buff,'@'); - if (at) *at='\0'; - - return buff; -} - - -void do_error(struct command *cmd) /* issue user defined error */ -{ - struct stackentry *s; - struct command *r; - - s=stackhead; - while(s!=stackroot) { - if (s->type==stRETADDCALL) { - r=s->pointer; - cmd->line=r->line; - cmd->lib=r->lib; - break; - } - s=s->prev; - } - error(ERROR,pop(stSTRING)->pointer); -} - - -void compile() /* create s subroutine at runtime */ -{ - open_string(pop(stSTRING)->pointer); - yyparse(); - add_command(cEND,NULL); -} - - -void create_execute(int string) /* create command 'cEXECUTESUB' */ -{ - struct command *cmd; - - cmd=add_command(string?cEXECUTE2:cEXECUTE,NULL); - cmd->pointer=my_strdup(dotify("",FALSE)); -} - - -void execute(struct command *cmd) /* execute a subroutine */ -{ - struct stackentry *st,*ret; - char *fullname,*shortname; - struct command *newcurr; - - st=stackhead; - do {st=st->prev;} while(st->type!=stFREE); - st=st->next; - if (st->type!=stSTRING) { - error(ERROR,"need a string as a function name"); - return; - } - shortname=st->pointer; - if ((shortname[strlen(shortname)-1]=='$')!=(cmd->type==cEXECUTE2)) { - if (cmd->type==cEXECUTE2) - sprintf(string,"expecting the name of a string function (not '%s')",shortname); - else - sprintf(string,"expecting the name of a numeric function (not '%s')",shortname); - error(ERROR,string); - return; - } - fullname=my_malloc(strlen(cmd->pointer)+strlen(shortname)+2); - strcpy(fullname,cmd->pointer); - strcat(fullname,shortname); - free(st->pointer); - st->type=stFREE; - newcurr=search_label(fullname,smSUB); - if (!newcurr) { - sprintf(string,"subroutine '%s' not defined",fullname); - error(ERROR,string); - return; - } - ret=push(); - ret->pointer=current; - ret->type=stRETADDCALL; - reshufflestack(ret); - current=newcurr; - free(fullname); -} - - -void create_docu(char *doc) /* create command 'docu' */ -{ - struct command *cmd; - static struct command *previous=NULL; - - if (inlib) return; - cmd=add_command(cDOCU,NULL); - cmd->pointer=doc; - if (previous) - previous->nextassoc=cmd; - else - docuhead=cmd; - previous=cmd; - docucount++; -} - - -void create_docu_array(void) /* create array with documentation */ -{ - struct array *ar; - struct command *doc; - int i; - - /* create and prepare docu-array */ - ar=create_array('s',1); - ar->bounds[0]=docucount+1; - ar->pointer=my_malloc((docucount+1)*sizeof(char *)); - ((char **)ar->pointer)[0]=my_strdup(""); - doc=docuhead; - i=1; - while(doc) { - ((char **)ar->pointer)[i]=doc->pointer; - doc=doc->nextassoc; - i++; - } - get_sym("main.docu$",syARRAY,amADD_GLOBAL)->pointer=ar; -} - - -int isbound(void) /* check if this interpreter is bound to a program */ -{ -/* - if (!interpreter_path || !interpreter_path[0]) { - error(FATAL,"interpreter_path is not set !"); - return 0; - } - if (!(interpreter=fopen(interpreter_path,"r"))) { - sprintf(string,"Couldn't open '%s' to check, if it is bound: %s",interpreter_path,my_strerror(errno)); - error(WARNING,string); - return 0; - } - - if(sizeof(myProg)>1) - return 1; - else - return 0; - */ - FILE *interpreter; - int i; - int c; - int proglen=0; - int bound=1; - - if (!interpreter_path || !interpreter_path[0]) { - error(FATAL,"interpreter_path is not set !"); - return 0; - } - if (!(interpreter=fopen(interpreter_path,"r"))) { - sprintf(string,"Couldn't open '%s' to check, if it is bound: %s",interpreter_path,my_strerror(errno)); - error(WARNING,string); - return 0; - } - - if (fseek(interpreter,0-strlen(YABMAGIC)-1,SEEK_END)) { - sprintf(string,"Couldn't seek within '%s': %s",interpreter_path,my_strerror(errno)); - error(WARNING,string); - return 0; - } - for(i=0;i=NOTE) { - error(NOTE,"Dumping the embedded program, that will be executed:"); - fprintf(stderr," "); - for(i=0;i=DEBUG) { - sprintf(string,"binding %s and %s into %s",interpreter_path,main_file_name,bound); - error(NOTE,string); - } - - while((c=fgetc(fyab))!=EOF) { - fputc(c,fbound); - } - for (i=1;il,"rb"))) { - sprintf(string,"could not open '%s' for reading: %s",libfile_chain[i]->l,my_strerror(errno)); - error(ERROR,string); - fclose(flib); - return 0; - } - sprintf(string,"\nimport %s\n",libfile_chain[i]->s); - for (pc=string;*pc;pc++) { - fputc(*pc,fbound); - proglen++; - } - while((c=fgetc(flib))!=EOF) { - fputc(c,fbound); - proglen++; - } - } - - for (pc="\nimport main\n";*pc;pc++) { - fputc(*pc,fbound); - proglen++; - } - for (pc="\nimport __END_OF_IMPORT\n";*pc;pc++) { - fputc(*pc,fbound); - proglen++; - } - while((c=fgetc(fprog))!=EOF) { - fputc(c,fbound); - proglen++; - } - fprintf(fbound,"\nend\n"); - fprintf(fbound,"rem %08d\n",proglen); - fprintf(fbound,"rem %s\n",YABMAGIC); - fclose(fyab); - fclose(fprog); - fclose(fbound); - - return 1; -} - -char *find_interpreter(char *name) /* find interpreter with full path */ -{ - FILE *f; - char *path=NULL; - -#ifdef WINDOWS - path=my_malloc(1000); - GetModuleFileName(NULL,path,1000); - if (f=fopen(path,"r")) { - fclose(f); - return path; - } else { - my_free(path); - return my_strdup(name); - } - -#else - if (f=fopen(name,"r")) { - fclose(f); - path=my_strdup(name); - return path; - } else { - char *from,*to,*try; - from=to=path=getenv("PATH"); - try=my_malloc(strlen(path)+strlen(name)+2); - to=strchr(to+1,':'); - while(to) { - strncpy(try,from,to-from); - try[to-from]=0; - if (try[to-from-1]!='/') strcat(try,"/"); - strcat(try,name); - if (f=fopen(try,"r")) { - fclose(f); - return try; - } - from=to+1; - to=strchr(to+1,':'); - } - return name; - } -#endif -} - - -char *my_strerror(int err) { /* return description of error */ -#ifdef WINDOWS - return strerror(err); -#else -#ifdef HAVE_STRERROR - return strerror(err); -#else - char buff[100]; - sprintf(buff,"errno=%d",err); - return buff; -#endif -#endif -} diff --git a/src/resattr.cpp b/src/resattr.cpp deleted file mode 100644 index ec02f48..0000000 --- a/src/resattr.cpp +++ /dev/null @@ -1,313 +0,0 @@ -// resattr.cpp - -#include -#include -#include - -#include -#include -#include -#include - -// usage -static const char *kUsage = -"Usage: %s [ ] -o [ ... ]\n" -"\n" -"Reads resources from zero or more input files and adds them as attributes\n" -"to the specified output file, or (in reverse mode) reads attributes from\n" -"zero or more input files and adds them as resources to the specified output\n" -"file. If not existent the output file is created as an empty file.\n" -"\n" -"Options:\n" -" -h, --help - Print this text.\n" -" -o - Specifies the output file.\n" -" -O, --overwrite - Overwrite existing attributes. regardless of whether\n" -" an attribute does already exist, it is always written\n" -" when a respective resource is encountered in an input\n" -" file. The last input file specifying the attribute\n" -" wins. If the options is not given, already existing\n" -" attributes remain untouched. Otherwise the first input\n" -" file specifying an attribute wins.\n" -" -r, --reverse - Reverse mode: Reads attributes from input files and\n" -" writes resources. A unique resource ID is assigned to\n" -" each attribute, so there will be no conflicts if two\n" -" input files feature the same attribute.\n" -; - -// command line args -static int sArgc; -static const char *const *sArgv; - -// print_usage -void -print_usage(bool error) -{ - // get nice program name - const char *programName = (sArgc > 0 ? sArgv[0] : "resattr"); - if (const char *lastSlash = strrchr(programName, '/')) - programName = lastSlash + 1; - - // print usage - fprintf((error ? stderr : stdout), kUsage, programName); -} - -// print_usage_and_exit -static -void -print_usage_and_exit(bool error) -{ - print_usage(error); - exit(error ? 1 : 0); -} - -// next_arg -static -const char* -next_arg(int argc, const char* const* argv, int& argi, bool dontFail = false) -{ - if (argi + 1 >= argc) { - if (dontFail) - return NULL; - print_usage_and_exit(true); - } - - return argv[++argi]; -} - -// write_attributes -static -void -write_attributes(BNode &out, const char *inFileName, BResources &resources, - bool overwrite) -{ - // iterate through the resources - type_code type; - int32 id; - const char *name; - size_t size; - for (int resIndex = 0; - resources.GetResourceInfo(resIndex, &type, &id, &name, &size); - resIndex++) { - // if we shall not overwrite attributes, we skip the attribute, if it - // already exists - attr_info attrInfo; - if (!overwrite && out.GetAttrInfo(name, &attrInfo) == B_OK) - continue; - - // get the resource - const void *data = resources.LoadResource(type, id, &size); - if (!data && size > 0) { - // should not happen - fprintf(stderr, "Failed to get resource `%s', type: %" B_PRIx32 - ", id: %" B_PRId32 " from input file `%s'\n", name, type, id, - inFileName); - exit(1); - } - - // construct a name, if the resource doesn't have one - char nameBuffer[32]; - if (!name) { - sprintf(nameBuffer, "unnamed_%d\n", resIndex); - name = nameBuffer; - } - - // write the attribute - ssize_t bytesWritten = out.WriteAttr(name, type, 0LL, data, size); - if (bytesWritten < 0) { - fprintf(stderr, "Failed to write attribute `%s' to output file: " - "%s\n", name, strerror(bytesWritten)); - } - } -} - -// write_resources -static -void -write_resources(BResources &resources, const char *inFileName, BNode &in, - int32 &resID) -{ - // iterate through the attributes - char name[B_ATTR_NAME_LENGTH]; - while (in.GetNextAttrName(name) == B_OK) { - // get attribute info - attr_info attrInfo; - status_t error = in.GetAttrInfo(name, &attrInfo); - if (error != B_OK) { - fprintf(stderr, "Failed to get info for attribute `%s' of input " - "file `%s': %s\n", name, inFileName, strerror(error)); - exit(1); - } - - // read attribute - char *data = new char[attrInfo.size]; - ssize_t bytesRead = in.ReadAttr(name, attrInfo.type, 0LL, data, - attrInfo.size); - if (bytesRead < 0) { - fprintf(stderr, "Failed to read attribute `%s' of input " - "file `%s': %s\n", name, inFileName, strerror(bytesRead)); - delete[] data; - exit(1); - } - - // find unique ID - const char *existingName; - size_t existingSize; - while (resources.GetResourceInfo(attrInfo.type, resID, &existingName, - &existingSize)) { - resID++; - } - - // write resource - error = resources.AddResource(attrInfo.type, resID++, data, - attrInfo.size, name); - if (error != B_OK) { - fprintf(stderr, "Failed to write resource `%s' to output " - "file: %s\n", name, strerror(error)); - } - delete[] data; - } -} - -// resources_to_attributes -static -void -resources_to_attributes(const char *outputFile, const char **inputFiles, - int inputFileCount, bool overwrite) -{ - // create output file, if it doesn't exist - if (!BEntry(outputFile).Exists()) { - BFile createdOut; - status_t error = createdOut.SetTo(outputFile, - B_READ_WRITE | B_CREATE_FILE); - if (error != B_OK) { - fprintf(stderr, "Failed to create output file `%s': %s\n", - outputFile, strerror(error)); - exit(1); - } - } - - // open output file - BNode out; - status_t error = out.SetTo(outputFile); - if (error != B_OK) { - fprintf(stderr, "Failed to open output file `%s': %s\n", outputFile, - strerror(error)); - exit(1); - } - - // iterate through the input files - for (int i = 0; i < inputFileCount; i++) { - // open input file - BFile in; - error = in.SetTo(inputFiles[i], B_READ_ONLY); - if (error != B_OK) { - fprintf(stderr, "Failed to open input file `%s': %s\n", - inputFiles[i], strerror(error)); - exit(1); - } - - // open resources - BResources resources; - error = resources.SetTo(&in, false); - if (error != B_OK) { - fprintf(stderr, "Failed to read resources of input file `%s': %s\n", - inputFiles[i], strerror(error)); - exit(1); - } - - // add the attributes - write_attributes(out, inputFiles[i], resources, overwrite); - } -} - -// resources_to_attributes -static -void -attributes_to_resources(const char *outputFile, const char **inputFiles, - int inputFileCount) -{ - // open output file - BFile out; - status_t error = out.SetTo(outputFile, B_READ_WRITE | B_CREATE_FILE); - if (error != B_OK) { - fprintf(stderr, "Failed to open output file `%s': %s\n", outputFile, - strerror(error)); - exit(1); - } - - // init output resources - BResources resources; - error = resources.SetTo(&out, false); - if (error != B_OK) { - fprintf(stderr, "Failed to init resources of output file `%s': %s\n", - outputFile, strerror(error)); - exit(1); - } - - int32 resID = 0; - - // iterate through the input files - for (int i = 0; i < inputFileCount; i++) { - // open input file - BNode in; - error = in.SetTo(inputFiles[i]); - if (error != B_OK) { - fprintf(stderr, "Failed to open input file `%s': %s\n", - inputFiles[i], strerror(error)); - exit(1); - } - - // add the resources - - write_resources(resources, inputFiles[i], in, resID); - } -} - -// main -int -main(int argc, const char *const *argv) -{ - sArgc = argc; - sArgv = argv; - - // parameters - const char *outputFile = NULL; - bool overwrite = false; - bool reverse = false; - const char **inputFiles = new const char*[argc]; - int inputFileCount = 0; - - // parse arguments - for (int argi = 1; argi < argc; argi++) { - const char *arg = argv[argi]; - if (arg[0] == '-') { - if (strcmp(arg, "-h") == 0 || strcmp(arg, "--help") == 0) { - print_usage_and_exit(false); - } else if (strcmp(arg, "-o") == 0) { - outputFile = next_arg(argc, argv, argi); - } else if (strcmp(arg, "-O") == 0) { - overwrite = true; - } else if (strcmp(arg, "-r") == 0 - || strcmp(arg, "--reverse") == 0) { - reverse = true; - } else { - print_usage_and_exit(true); - } - } else { - inputFiles[inputFileCount++] = arg; - } - } - - // check parameters - if (!outputFile) - print_usage_and_exit(true); - - if (reverse) { - attributes_to_resources(outputFile, inputFiles, inputFileCount); - } else { - resources_to_attributes(outputFile, inputFiles, inputFileCount, - overwrite); - } - - return 0; -} diff --git a/src/resattrMakefile b/src/resattrMakefile deleted file mode 100644 index 9c9320d..0000000 --- a/src/resattrMakefile +++ /dev/null @@ -1,27 +0,0 @@ -NAME= resattr -TYPE= APP -SRCS= resattr.cpp -RSRCS= -LIBS= /boot/develop/lib/x86/libroot.so /boot/develop/lib/x86/libbe.so -LIBPATHS= -SYSTEM_INCLUDE_PATHS= /boot/develop/headers/be /boot/develop/headers/cpp /boot/develop/headers/posix /boot/home/config/include -LOCAL_INCLUDE_PATHS= -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= -# specify special warning levels -# if unspecified default warnings will be used -# NONE = supress all warnings -# ALL = enable all warnings -WARNINGS = -# Build with debugging symbols if set to TRUE -SYMBOLS= -COMPILER_FLAGS= -LINKER_FLAGS= - -## include the makefile-engine -include $(BUILDHOME)/etc/makefile-engine diff --git a/src/symbol.c b/src/symbol.c deleted file mode 100644 index e582a07..0000000 --- a/src/symbol.c +++ /dev/null @@ -1,1775 +0,0 @@ -/* - - YABASIC --- a simple Basic Interpreter - written by Marc-Oliver Ihm 1995-2004 - homepage: www.yabasic.de - - symbol.c --- code for control structures, symbol and stack management - - This file is part of yabasic and may be copied only - under the terms of either the Artistic License or - the GNU General Public License (GPL), both of which - can be found at www.yabasic.de - -*/ - -/* ------------- includes ---------------- */ - -#ifndef YABASIC_INCLUDED -#include "yabasic.h" /* all prototypes and structures */ -#endif - - -/* ------------- external references ---------------- */ - -extern int mylineno; /* current line number */ -extern int yyparse(); /* call bison parser */ - - -/* ------------- local defines ---------------- */ -struct switch_id { - int id; - int depth; - struct switch_id *next; - struct switch_id *prev; -}; - - -/* ------------- local functions ---------------- */ - -static struct symbol *create_symbol(int,char *); /* create a new symbol */ -static void link_label(struct command *); /* link label into list of labels */ -static int count_args(int); /* count number of arguments on stack */ -static void stackdesc(int,char *); /* give back string describing stackentry */ -static void freesym(struct symbol *); /* free contents of symbol */ -static int ind_to_off(int *,int *); /* convert array of indices to single offset */ -static void off_to_ind(int,int *,int *); /* convert a single offset to an array of indices */ - - -/* ------------- global variables ---------------- */ - -static struct symstack *symroot=NULL; /* first element in symbol list */ -static struct symstack *symhead=NULL; /* last element ind symbol list */ -struct stackentry *stackroot; /* lowest element in stack */ -struct stackentry *stackhead; /* topmost element in stack */ -static struct command *labelroot=NULL; /* first label among commands */ -static struct command *labelhead=NULL; /* last label seen so far */ -extern char *current_function; /* name of currently defined function */ -struct command *lastref; /* last command in UDS referencing a symbol */ -struct command *firstref; /* first command in UDS referencing a symbol */ -int labelcount=0; /* count self-generated labels */ -int in_switch=0; /* true, if in switch (at compile-time) */ -struct switch_id *switch_id_stackhead=NULL; /* topmost (and valid) element of switch_id stack */ -struct switch_id *switch_id_stackroot=NULL; /* bottommost element of switch_id stack */ - - -/* ------------- subroutines ---------------- */ - - -void pushsymlist(void) /* push a new list of symbols on symbol stack */ -{ - struct symstack *new; - - new=my_malloc(sizeof(struct symstack)); - if (symhead) - symhead->next_in_stack=new; - else - symroot=new; /* first time called */ - new->prev_in_stack=symhead; - new->next_in_stack=NULL; - new->next_in_list=NULL; - symhead=new; -} - - -void popsymlist(void) /* pop list of symbols and free symbol contents */ -{ - struct symstack *prevstack; - struct symbol *currsym,*nextsym; - int count=0; - - currsym=symhead->next_in_list; - while(currsym) { /* loop through symbol list */ - freesym(currsym); - count++; - nextsym=currsym->next_in_list; - my_free(currsym); - currsym=nextsym; - } - if (infolevel>=DEBUG) { - sprintf(string,"removed symbol list with %d symbols",count); - error(DEBUG,string); - } - prevstack=symhead->prev_in_stack; - my_free(symhead); - prevstack->next_in_stack=NULL; - symhead=prevstack; -} - - -static void freesym(struct symbol *s) /* free contents of symbol */ -{ - int i; - int total; - - struct array *ar; - if (s->link) { /* it's a link, don't remove memory */ - sprintf(string,"removing linked symbol '%s'",s->name); - error(DEBUG,string); - my_free(s->name); - return; - } - if (s->type==sySTRING) { - if (infolevel>=DEBUG) { - sprintf(string,"removing string symbol '%s'",s->name); - error(DEBUG,string); - } - my_free(s->pointer); - } else if (s->type==syARRAY) { - if (infolevel>=DEBUG) { - sprintf(string,"removing array symbol '%s()'",s->name); - error(DEBUG,string); - } - ar=s->pointer; - if (ar->dimension>0) { - /* count total amount of memory */ - total=1; - for(i=0;idimension;i++) total*=(ar->bounds)[i]; - if (ar->type=='s') { /* string array */ - for(i=0;ipointer+i)); - } - my_free(ar->pointer); - } - my_free(ar); - } else if (s->type==syNUMBER) { - if (infolevel>=DEBUG) { - sprintf(string,"removing numeric symbol '%s'",s->name); - error(DEBUG,string); - } - } - my_free(s->name); - return; -} - - -void clearrefs(struct command *cmd) /* clear references for commands within function */ -{ - struct command *curr; - int n=0; - - curr=cmd->nextref; - while(curr) { - n++; - curr->symbol=NULL; - curr=curr->nextref; - } - sprintf(string,"removed references from %d symbols",n); - error(DEBUG,string); -} - - -struct symbol *get_sym(char *name,int type,int add) -/* get the value of a symbol, or create it with given type */ -{ - struct symstack *currstack; - struct symbol **currsym; - struct symbol *prelink; - struct symbol *new; - int stackcount=0; - int symbolcount=0; - int linked=FALSE; - - if (!name) return NULL; - /* go through all lists */ - currstack=symhead; /* start with symhead */ - if (add==amSEARCH_PRE && symhead->prev_in_stack) currstack=symhead->prev_in_stack; - while(TRUE) { - stackcount++; - currsym=&(currstack->next_in_list); - while(*currsym) { - prelink=*currsym; - symbolcount++; - if ((*currsym)->type==type && !strcmp(name,(*currsym)->name)) { /* do the types and names match ? */ - if ((*currsym)->link) { - currsym=&((*currsym)->link); - linked=TRUE; - } - if (infolevel>=DEBUG) { - if (linked) - sprintf(string,"found symbol '%s%s', linked to %s after searching %d symbol(s) in %d stack(s)", - name,(type==syARRAY)?"()":"",(*currsym)->name,symbolcount,stackcount); - else - sprintf(string,"found symbol '%s%s' after searching %d symbol(s) in %d stack(s)", - name,(type==syARRAY)?"()":"",symbolcount,stackcount); - error(DEBUG,string); - } - return *currsym; /* give back address */ - } - currsym=&((*currsym)->next_in_list); /* try next entry */ - } - /* not found in first list */ - if (add==amSEARCH_VERY_LOCAL) return NULL; - if (add==amADD_LOCAL) { - new=create_symbol(type,name); - (*currsym)=new; - if (infolevel>=DEBUG) { - sprintf(string,"created local symbol %s%s",name,(type==syARRAY)?"()":""); - error(DEBUG,string); - } - return new; - } - if (currstack!=symroot) - currstack=symroot; - else - break; - } - if (add==amADD_GLOBAL) { - new=create_symbol(type,name); - (*currsym)=new; - if (infolevel>=DEBUG) { - sprintf(string,"created global symbol %s%s",name,(type==syARRAY)?"()":""); - error(DEBUG,string); - } - return new; - } - return NULL; -} - - -void link_symbols(struct symbol *from,struct symbol *to) { /* link one symbol to the other */ - from->link=to; - if (infolevel>=DEBUG) { - sprintf(string,"linking symbol '%s' to '%s'",from->name,to->name); - error(DEBUG,string); - } -} - - -void create_retval(int is,int should) /* create command 'cRETVAL' */ -{ - struct command *cmd; - - cmd=add_command(cRETVAL,NULL); - cmd->args=is; - cmd->tag=should; -} - - -void retval(struct command *cmd) /* check return value of function */ -{ - int is,should; - struct stackentry *s; - - is=cmd->args; - should=cmd->tag; - if (is==should) { - /* okay, function returns expected type */ - } else if (is==ftNONE) { /* no element on stack, create one */ - s=push(); - if (should==ftNUMBER) { - s->type=stNUMBER; - s->value=0.0; - } else { - s->type=stSTRING; - s->pointer=my_strdup(""); - } - } else { - sprintf(string,"subroutine returns %s but should return %s", - (is==ftSTRING)?"a string":"a number",(should==ftSTRING)?"a string":"a number"); - error(ERROR,string); - } - if (infolevel>=DEBUG) { - s=stackhead->prev; - if (s->type==stNUMBER) - sprintf(string,"subroutine returns number %g",s->value); - else if (s->type==stSTRING) - sprintf(string,"subroutine returns string '%s'",(char *)s->pointer); - else - sprintf(string,"subroutine returns something strange (%d)",s->type); - error(DEBUG,string); - } - swap(); -} - - -void create_endfunction(void) /* create command cEND_FUNCTION */ -{ - struct command *cmd; - - cmd=add_command(cEND_FUNCTION,NULL); - link_label(cmd); -} - - -void dump_sym(void) /* dump the stack of lists of symbols */ -{ - struct symstack *currstack; - struct symbol **currsym; - - /* go through all lists */ - error(DUMP,"head of symbol stack"); - currstack=symhead; - while(currstack) { /* search 'til last element of stack */ - currsym=&(currstack->next_in_list); - string[0]='\0'; - while(*currsym) { - switch((*currsym)->type) { - case sySTRING: strcat(string," STRING:"); break; - case syNUMBER: strcat(string," NUMBER:"); break; - case syFREE: strcat(string," FREE:"); break; - case syARRAY: strcat(string," ARRAY:"); break; - default:sprintf(string," UNKNOWN:"); break; - } - strcat(string,(*currsym)->name); - - currsym=&((*currsym)->next_in_list); /* try next entry */ - } - error(DUMP,string); - currstack=currstack->prev_in_stack; - } - error(DUMP,"root of symbol stack"); - return; -} - - -void dump_sub(int short_dump) /* dump the stack of subroutine calls */ -{ - struct stackentry *st=stackhead; - struct command *cmd; - int first=TRUE; - do { - if (st->type==stRETADDCALL) { - cmd=st->pointer; - if (cmd->type==cCALL || cmd->type==cQCALL) { - char *dot; - dot=strchr(cmd->pointer,'.'); - if (first && !short_dump) error(DUMP,"Executing in:"); - sprintf(string,"sub %s() called in %s,%d",dot ? (dot+1):cmd->pointer,cmd->lib->l,cmd->line); - error(DUMP,string); - first=FALSE; - } - } - st=st->prev; - } while(st && st!=stackroot); - if (first && !short_dump) { - if (!short_dump) error(DUMP,"Executing in:"); - } - if (!short_dump) error(DUMP,"main program"); - - return; -} - - -static struct symbol *create_symbol(int type,char *name) /* create a new symbol */ -{ - struct symbol *new; - - new=my_malloc(sizeof(struct symbol)); - new->type=type; - new->next_in_list=NULL; - new->name=my_strdup(name); - new->pointer=NULL; - new->args=NULL; - new->value=0.0; - new->link=NULL; - - return new; -} - - -void function_or_array(struct command *cmd) /* decide whether to perform function or array */ -{ - struct command *fu; - - fu=search_label(cmd->name,smSUB|smLINK); - if (fu) { - cmd->type=cCALL; - cmd->pointer=cmd->name; - cmd->name=NULL; - error(DEBUG,"converting FUNCTION_OR_ARRAY to FUNCTION"); - } else { - if (cmd->type==cFUNCTION_OR_ARRAY) - cmd->tag=CALLARRAY; - else - cmd->tag=CALLSTRINGARRAY; - cmd->type=cDOARRAY; - cmd->args=-1; - error(DEBUG,"converting FUNCTION_OR_ARRAY to ARRAY"); - } -} - - -void swap() /* swap topmost elements on stack */ -{ - struct stackentry *a,*b; - - if ((a=stackhead->prev)==NULL || (b=a->prev)==NULL) { - error(ERROR,"Nothing to swap on stack !"); - return; - } - a->prev=b->prev;b->next=a->next; /* just swap the pointers */ - a->next=b;b->prev=a; - stackhead->prev=b; - (a->prev)->next=a; -} - - -struct stackentry *push() -/* push element on stack and enlarge stack it */ -{ - struct stackentry *new; - - if (!stackhead->next) { /* no next element */ - /* create new element */ - new=(struct stackentry *)my_malloc(sizeof(struct stackentry)); - /* and initialize it */ - new->next=NULL; - new->value=0.0; - new->type=stFREE; - new->prev=stackhead; - new->pointer=NULL; - stackhead->next=new; - } else if (stackhead->pointer!=NULL && (stackhead->type==stSTRING || stackhead->type==stSTRINGARRAYREF || stackhead->type==stNUMBERARRAYREF || stackhead->type==stLABEL)) { - /* any content is set free */ - my_free(stackhead->pointer); - stackhead->pointer=NULL; - } - stackhead=stackhead->next; /* advance head */ - return stackhead->prev; -} - - -struct stackentry *pop(int etype) -/* pops element to memory and looks for pop-error */ -{ - static char expected[50]; - static char found[50]; - int ftype; - struct stackentry *s; - - /* test if there is something on the stack */ - if (stackhead==stackroot) { - error(FATAL,"Popped too much."); - return stackhead; - } - stackhead=stackhead->prev; /* move down in stack */ - ftype=stackhead->type; - if (etype==ftype || etype==stANY || - (etype==stSTRING_OR_NUMBER && (ftype==stNUMBER || ftype==stSTRING)) || - (etype==stSTRING_OR_NUMBER_ARRAYREF && (ftype==stSTRINGARRAYREF || ftype==stNUMBERARRAYREF))) - return stackhead; /* this is your value; use it quickly ! */ - - /* expected and found don't match */ - stackdesc(etype,expected); - stackdesc(ftype,found); - sprintf(string,"expected %s but found %s",expected,found); - if (etype==stNUMBER || etype==stSTRING || etype==stSTRING_OR_NUMBER) { - s=push(); - if (etype==stNUMBER) { - s->type=stNUMBER; - s->value=0.0; - } else { - s->type=stSTRING; - s->pointer=my_strdup(""); - } - error(ERROR,string); - return s; - } else { - error(FATAL,string); - } - return stackhead; -} - - -static void stackdesc(int type,char *desc) /* give back string describing stackentry */ -{ - switch(type) { - case stGOTO: strcpy(desc,"a goto");break; - case stSTRING: strcpy(desc,"a string");break; - case stSTRINGARRAYREF: strcpy(desc,"a reference to a string array");break; - case stNUMBER: strcpy(desc,"a number");break; - case stNUMBERARRAYREF: strcpy(desc,"a reference to a numeric array");break; - case stLABEL: strcpy(desc,"a label");break; - case stRETADD: strcpy(desc,"a return address for gosub");break; - case stRETADDCALL: strcpy(desc,"a return address for a subroutine");break; - case stFREE: strcpy(desc,"nothing");break; - case stROOT: strcpy(desc,"the root of the stack");break; - case stANY: strcpy(desc,"anything");break; - case stSTRING_OR_NUMBER: strcpy(desc,"a string or a number");break; - case stSTRING_OR_NUMBER_ARRAYREF: strcpy(desc,"reference to a string or an array");break; - case stSWITCH_STRING: strcpy(desc,"number for switch");break; - case stSWITCH_NUMBER: strcpy(desc,"string for switch");break; - default: sprintf(desc,"type %d",type);break; - } -} - - -void pushname(char *name) /* bison: push a name on stack */ -{ - struct stackentry *s; - - s=push(); - s->pointer=my_strdup(name); - s->type=stSTRING; -} - - -void pushlabel() /* bison: generate goto and push label on stack */ -{ - char *st; - struct stackentry *en; - - st=(char *) my_malloc(sizeof(char)*20); - sprintf(st,"***%d",labelcount); - labelcount++; - create_goto(st); - en=push(); - en->type=stLABEL; - en->pointer=st; -} - - -void poplabel() /* bison: pops a label and generates the matching command */ -{ - create_label(pop(stLABEL)->pointer,cLABEL); /* and create it */ -} - - -void pushgoto() /* bison: generate label and push goto on stack */ -{ - char *st; - struct stackentry *en; - - st=(char *) my_malloc(sizeof(char)*20); - sprintf(st,"***%d",labelcount); - labelcount++; - create_label(st,cLABEL); - en=push(); - en->type=stGOTO; - en->pointer=st; -} - - -void popgoto() /* bison: pops a goto and generates the matching command */ -{ - create_goto(pop(stGOTO)->pointer); /* and create it */ -} - - -void storelabel() /* bison: push label on stack */ -{ - char *st; - struct stackentry *en; - - st=(char *)my_malloc(sizeof(char)*20); - sprintf(st,"***%d",labelcount); - labelcount++; - en=push(); - en->type=stLABEL; - en->pointer=st; -} - - -void matchgoto() /* bison: generate goto matching label on stack */ -{ - create_goto(stackhead->prev->pointer); -} - - -void create_pushdbl(double value) /* create command 'cPUSHDBL' */ -{ - struct command *cmd; - - cmd=add_command(cPUSHDBL,NULL); - cmd->pointer=my_malloc(sizeof(double)); - *(double *)(cmd->pointer)=value; -} - - -void pushdbl(struct command *cmd) -{ - /* push double onto stack */ - struct stackentry *p; - - p=push(); - p->value= *(double *)cmd->pointer; - p->type=stNUMBER; -} - - -void pushdblsym(struct command *cmd) -{ - /* push double symbol onto stack */ - struct stackentry *p; - - p=push(); - if (!cmd->name) error(WARNING,"invalid pushdblsym"); - - if (!cmd->symbol) cmd->symbol=&(get_sym(cmd->name,syNUMBER,amADD_GLOBAL)->value); - p->value=*(double *)cmd->symbol; - p->type=stNUMBER; -} - - -void popdblsym(struct command *cmd) /* pop double from stack */ -{ - double d; - - d=pop(stNUMBER)->value; - if (!cmd->symbol) cmd->symbol=&(get_sym(cmd->name,syNUMBER,amADD_GLOBAL)->value); - *(double *)(cmd->symbol)=d; -} - - -void create_makelocal(char *name,int type) /* create command 'cMAKELOCAL' */ -{ - struct command *cmd; - - cmd=add_command(cMAKELOCAL,name); - cmd->args=type; -} - - -void makelocal(struct command *cmd) /* makes symbol local */ -{ - if (get_sym(cmd->name,cmd->args,amSEARCH_VERY_LOCAL)) { - sprintf(string,"local variable '%s' already defined within this subroutine",strip(cmd->name)); - error(ERROR,string); - return; - } - get_sym(cmd->name,cmd->args,amADD_LOCAL); -} - - -void create_numparam(void) /* create command 'cNUMPARAM' */ -{ - struct command *cmd; - - /* dotifying numparams at compiletime (as opposed to runtime) is essential, - because the function name is not known at runtime */ - cmd=add_command(cNUMPARAM,dotify("numparams",FALSE)); -} - - -void numparam(struct command *cmd) /* count number of function parameters */ -{ - struct symbol *sym; - - sym=get_sym(cmd->name,syNUMBER,amADD_LOCAL); - sym->value=abs(count_args(FALSE)); -} - - -void create_makestatic(char *name,int type) /* create command 'cMAKESTATIC' */ -{ - struct command *cmd; - - cmd=add_command(cMAKESTATIC,name); - cmd->args=type; -} - - -void makestatic(struct command *cmd) /* makes symbol static */ -{ - struct symbol *l,*g; - char *at=NULL; - - - /* mask function name */ - if ((at=strchr(cmd->name,'@'))!=NULL) *at='\0'; - - if (get_sym(cmd->name,cmd->args,amSEARCH_VERY_LOCAL)) { - sprintf(string,"static variable '%s' already defined within this subroutine",strip(cmd->name)); - error(ERROR,string); - return; - } - - /* create global variable with unique name */ - if (at) *at='@'; - g=get_sym(cmd->name,cmd->args,amADD_GLOBAL); - if (at) *at='\0'; - - /* create local variable */ - l=get_sym(cmd->name,cmd->args,amADD_LOCAL); - if (at) *at='@'; - /* link those two together */ - link_symbols(l,g); -} - - -void create_arraylink(char *name,int type) /* create command 'cARRAYLINK' */ -{ - struct command *cmd; - - cmd=add_command(cARRAYLINK,name); - cmd->pointer=current_function; - cmd->args=type; -} - - -void arraylink(struct command *cmd) /* link a local symbol to a global array */ -{ - struct symbol *l,*g; - struct array *ar; - - if (get_sym(cmd->name,cmd->args,amSEARCH_VERY_LOCAL)) { - sprintf(string,"'%s()' already defined within this subroutine",strip(cmd->name)); - error(ERROR,string); - return; - } - /* get globally defined array */ - g=get_sym(pop(cmd->args)->pointer,syARRAY,amSEARCH_PRE); - /* create local array */ - l=get_sym(cmd->name,syARRAY,amADD_LOCAL); - if (!l) return; - if (!g || !g->pointer) { /* no global array supplied, create one */ - error(DEBUG,"creating dummy array"); - ar=create_array((cmd->args==stNUMBERARRAYREF)?'d':'s',0); - l->pointer=ar; - if (infolevel>=DEBUG) { - sprintf(string,"creating 0-dimensional dummy array '%s()'",cmd->name); - error(DEBUG,string); - } - } else { - /* link those two together */ - link_symbols(l,g); - } -} - - -void create_pusharrayref(char *name,int type) /* create command 'cPUSHARRAYREF' */ -{ - struct command *cmd; - - cmd=add_command(cPUSHARRAYREF,name); - cmd->args=type; -} - - -void pusharrayref(struct command *cmd) /* push an array reference onto stack */ -{ - struct stackentry *s; - s=push(); - s->type=cmd->args; - s->pointer=my_strdup(cmd->name); -} - - -void create_require(int type) /* create command 'cREQUIRE' */ -{ - struct command *cmd; - - cmd=add_command(cREQUIRE,NULL); - cmd->args=type; -} - - -void require(struct command *cmd) /* check, that item on stack has right type */ -{ - char *expected,*supplied; - struct stackentry *s; - - if (stackhead->prev->type==cmd->args) return; /* okay, they match */ - - if (stackhead->prev->type==stFREE) { /* no argument supplied, create it */ - s=push(); - if (cmd->args==stSTRING) { - s->type=stSTRING; - s->pointer=my_strdup(""); - return; - } else if (cmd->args==stNUMBER) { - s->type=stNUMBER; - s->value=0.0; - return; - } else { - /* create array */ - s->type=cmd->args; - s->pointer=NULL; - return; - } - } - - s=stackhead->prev; - if (s->type==stSTRING) - supplied="string"; - else if (s->type==stNUMBER) - supplied="number"; - else if (s->type==stSTRINGARRAYREF) - supplied="string array"; - else if (s->type==stNUMBERARRAYREF) - supplied="numeric array"; - else if (s->type==stFREE) - supplied="nothing"; - else - supplied="something strange"; - - if (cmd->args==stSTRING) - expected="string"; - else if (cmd->args==stNUMBER) - expected="number"; - else if (cmd->args==stSTRINGARRAYREF) - expected="string array"; - else if (cmd->args==stNUMBERARRAYREF) - expected="numeric array"; - else if (cmd->args==stFREE) - expected="nothing"; - else - expected="something strange"; - - sprintf(string,"invalid subroutine call: %s expected, %s supplied",expected,supplied); - error(ERROR,string); -} - - -void create_dblbin(char c) /* create command for binary double operation */ -{ - switch(c) { - case '+':add_command(cDBLADD,NULL);break; - case '-':add_command(cDBLMIN,NULL);break; - case '*':add_command(cDBLMUL,NULL);break; - case '/':add_command(cDBLDIV,NULL);break; - case '^':add_command(cDBLPOW,NULL);break; - } - /* no specific information needed */ -} - - -void dblbin(struct command *cmd) /* compute with two numbers from stack */ -{ - struct stackentry *d; - double a,b,c; - - b=pop(stNUMBER)->value; - a=pop(stNUMBER)->value; - d=push(); - switch(cmd->type) { - case(cDBLADD):c=a+b; break; - case(cDBLMIN):c=a-b; break; - case(cDBLMUL):c=a*b; break; - case(cDBLDIV): - if (fabs(b)value=c; - d->type=stNUMBER; -} - - -void negate() /* negates top of stack */ -{ - stackhead->prev->value=-stackhead->prev->value; -} - - -void pushstrptr(struct command *cmd) /* push string-pointer onto stack */ -{ - struct stackentry *p; - - p=push(); - if (!cmd->symbol) cmd->symbol=&(get_sym(cmd->name,sySTRING,amADD_GLOBAL)->pointer); - p->pointer=*(char **)cmd->symbol; - if (!p->pointer) p->pointer=my_strdup(""); - p->type=stSTRING; -} - - -void pushstrsym(struct command *cmd) /* push string-symbol onto stack */ -{ - struct stackentry *p; - - p=push(); - if (!cmd->symbol) cmd->symbol=&(get_sym(cmd->name,sySTRING,amADD_GLOBAL)->pointer); - p->pointer=my_strdup(*(char **)cmd->symbol); - p->type=stSTRING; -} - - -void popstrsym(struct command *cmd) /* pop string from stack */ -{ - if (!cmd->name) return; - if (!cmd->symbol) cmd->symbol= &(get_sym(cmd->name,sySTRING,amADD_GLOBAL)->pointer); - if (*(char **)cmd->symbol!=NULL) my_free(*(char **)cmd->symbol); - *(char **)cmd->symbol=my_strdup(pop(stSTRING)->pointer); -} - - -void create_pushstr(char *s) /* creates command pushstr */ -{ - struct command *cmd; - - cmd=add_command(cPUSHSTR,NULL); - cmd->pointer=my_strdup(s); /* store string */ -} - - -void pushstr(struct command *cmd) -{ - /* push string onto stack */ - struct stackentry *p; - - p=push(); - p->pointer=my_strdup((char *)cmd->pointer); - p->type=stSTRING; -} - - -void duplicate(void) /* duplicate topmost element of stack */ -{ - struct stackentry *s; - double actual; - - actual=stackhead->prev->value; - s=push(); - s->type=stNUMBER; - s->value=actual; -} - - -void create_goto(char *label) /* creates command goto */ -{ - struct command *cmd; - - cmd=add_command(cGOTO,NULL); - /* specific info */ - cmd->pointer=my_strdup(label); -} - - -void create_gosub(char *label) /* creates command gosub */ -{ - struct command *cmd; - - cmd=add_command(cGOSUB,NULL); - /* specific info */ - cmd->pointer=my_strdup(label); -} - - -void create_call(char *label) /* creates command function call */ -{ - struct command *cmd; - - cmd=add_command(cCALL,NULL); - /* specific info */ - cmd->pointer=my_strdup(label); -} - - -static void link_label(struct command *cmd) /* link label into list of labels */ -{ - if (!labelroot) - labelroot=cmd; - else - labelhead->nextassoc=cmd; - labelhead=cmd; -} - - -struct command *search_label(char *name,int type) /* search label */ -{ - struct command *curr; - char *at=NULL; - - curr=labelroot; - if (type&smGLOBAL) { - at=strchr(name,'@'); - if (at) *at='\0'; - } - while(curr) { - if ((type&smSUB) && curr->type==cUSER_FUNCTION && !strcmp(curr->pointer,name)) { - if (at) *at='@'; - return curr; - } - if ((type&smLINK) && curr->type==cSUBLINK && !strcmp(curr->pointer,name)) { - if (at) *at='@'; - return curr->next; - } - if ((type&smLABEL) && curr->type==cLABEL && !strcmp(curr->pointer,name)) { - if (at) *at='@'; - return curr; - } - curr=curr->nextassoc; - } - return NULL; -} - - -void jump(struct command *cmd) -/* jump to specific Label; used as goto, gosub or function call */ -{ - struct command *label; - struct stackentry *ret; - int type; - char *dot; - - type=cmd->type; - if (type==cGOSUB || type==cQGOSUB || type==cCALL || type==cQCALL) { - /* leave return address for return */ - ret=push(); - ret->pointer=current; - if (type==cGOSUB || type==cQGOSUB) { - ret->type=stRETADD; - } else { - ret->type=stRETADDCALL; - reshufflestack(ret); - } - } - - if (type==cQGOSUB || type==cQGOTO || type==cQCALL) { - current=(struct command *)cmd->jump; /* use remembered address */ - return; - } - label=search_label(cmd->pointer,smSUB|smLINK|smLABEL); - if (!label && type==cCALL && (dot=strchr(cmd->pointer,'.'))) { - strcpy(string,"main"); - strcat(string,dot); - label=search_label(string,smLINK); - } - if (label) { - /* found right label */ - current=label; /* jump to new location */ - /* use the address instead of the name next time */ - cmd->jump=label; - switch(cmd->type) { - case cGOTO: cmd->type=cQGOTO; break; - case cGOSUB: cmd->type=cQGOSUB; break; - case cCALL: cmd->type=cQCALL; break; - } - } else { - /* label not found */ - sprintf(string,"can't find %s '%s'",(type==cCALL)?"subroutine":"label",strip((char *)cmd->pointer)); - if (strchr(cmd->pointer,'@')) strcat(string," (not in this sub)"); - error(ERROR,string); - } - - /* check, if goto enters or leaves a switch_statement */ - if (cmd->type==cQGOTO) { - if (label->switch_id && !cmd->switch_id) - error(ERROR,"cannot jump into switch-statement"); - else if (!label->switch_id && cmd->switch_id) - error(ERROR,"cannot jump out of switch-statement"); - else if (label->switch_id!=cmd->switch_id) - error(ERROR,"cannot jump between switch statements"); - } -} - - -void reshufflestack(struct stackentry *ret) /* reorganize stack for function call */ -{ - struct stackentry *a,*b,*c; - struct stackentry *top,*bot; - struct stackentry *ttop,*bbot; - int args; - - - /* this is a function call; revert stack and shuffle return address to bottom */ - /* push address below parameters */ - args=0; - top=a=ret->prev; - while(a->type!=stFREE) { - a=a->prev; - args++; - } - bot=a->next; - b=a->prev; - /* remove ret */ - ret->prev->next=ret->next; - ret->next->prev=ret->prev; - /* squeeze ret between a and b */ - ret->next=a; - a->prev=ret; - b->next=ret; - ret->prev=b; - /* revert stack between top and bot */ - if (args>1) { - a=bot; - b=a->next; - bbot=bot->prev; - ttop=top->next; - for(;args>1;args--) { - a->prev=b; - c=b->next; - b->next=a; - a=b; - b=c; - } - bot->next=ttop; - bot->next->prev=bot; - top->prev=bbot; - top->prev->next=top; - } -} - - -void myreturn(struct command *cmd) /* return from gosub of function call */ -{ - struct stackentry *address; - - address=pop(stANY); - if (cmd->type==cRET_FROM_FUN) { - if (address->type!=stRETADDCALL) { - error(ERROR,"RETURN from a subroutine without CALL"); - return; - } - } else { - if (address->type!=stRETADD) { - error(ERROR,"RETURN without GOSUB"); - return; - } - } - current=(struct command *)address->pointer; - return; -} - - -void create_label(char *label,int type) /* creates command label */ -{ - struct command *cmd; - - /* check, if label is duplicate */ - if (search_label(label,smSUB|smLINK|smLABEL)) { - sprintf(string,"duplicate %s '%s'",(type==cLABEL)?"label":"subroutine",strip(label)); - error(ERROR,string); - return; - } - - cmd=add_command(type,NULL); - /* store label */ - cmd->pointer=my_strdup(label); - link_label(cmd); -} - - -void create_sublink(char *label) /* create link to subroutine */ -{ - char global[200]; - char *dot; - struct command *cmd; - - if (!inlib) return; - dot=strchr(label,'.'); - strcpy(global,"main"); - strcat(global,dot); - - /* check, if label is duplicate */ - if (search_label(global,smSUB|smLINK|smLABEL)) { - sprintf(string,"duplicate subroutine '%s'",strip(global)); - error(ERROR,string); - return; - } - - cmd=add_command(cSUBLINK,NULL); - /* store label */ - cmd->pointer=my_strdup(global); - link_label(cmd); -} - - -void decide() /* skips next command, if not 0 on stack */ -{ - if (pop(stNUMBER)->value!=0) current=current->next; /* skip one command */ -} - - -void create_dim(char *name,char type) /* create command 'dim' */ -/* type can be 's'=string or 'd'=double Array */ -{ - struct command *cmd; - - cmd=add_command(cDIM,name); - cmd->tag=type; /* type: string or double */ - cmd->args=-1; -} - - -void dim(struct command *cmd) /* get room for array */ -{ - struct array *nar,*oar; - char *nul; - int ntotal,ototal,esize,i,j; - int ind[10],nbounds[10],larger; - struct symbol *s; - int local; - - local=((cmd->tag==tolower(cmd->tag))?TRUE:FALSE); - if (cmd->args<0) cmd->args=count_args(FALSE); - if (cmd->args<0) { - error(ERROR,"only numerical indices allowed for arrays"); - return; - } - s=get_sym(cmd->name,syARRAY,local?amADD_LOCAL:amADD_GLOBAL); - if (search_label(cmd->name,smSUB|smLINK)) { - sprintf(string,"array '%s()' conflicts with user subroutine",strip(cmd->name)); - error(ERROR,string); - return; - } - - /* check for dimensions */ - if (cmd->args>10) { - error(ERROR,"more than 10 indices"); - return; - } - oar=s->pointer; - if (oar) { - /* check, if old and new array are compatible */ - if (cmd->args!=oar->dimension) { - sprintf(string,"cannot change dimension of '%s()' from %d to %d", - strip(cmd->name),oar->dimension,cmd->args); - error(ERROR,string); - } - } - /* check, if redim is actually needed */ - for(i=0;i<10;i++) nbounds[i]=0; - larger=FALSE; - for(i=0;iargs;i++) { - nbounds[i]=1+(int)pop(stNUMBER)->value; - if (nbounds[i]<=1) { - sprintf(string,"array index %d is less or equal zero",cmd->args-i); - error(ERROR,string); - return; - } - if (oar) { - if (nbounds[i]>oar->bounds[i]) - larger=TRUE; - else - nbounds[i]=oar->bounds[i]; - } - } - pop(stFREE); /* remove left over stFREE */ - if (oar && !larger) return; /* new array won't be larger than old one */ - - /* create array */ - nar=create_array(tolower(cmd->tag),cmd->args); - - /* count needed memory */ - ntotal=1; - for(i=0;idimension;i++) { - (nar->bounds)[i]=nbounds[i]; - ntotal*=nbounds[i]; - } - esize=(nar->type=='s')?sizeof(char *):sizeof(double); /* size of one array element */ - nar->pointer=my_malloc(ntotal*esize); - - if (oar) { /* array already exists, get its size */ - ototal=1; - for(i=0;idimension;i++) ototal*=(oar->bounds)[i]; - } - - /* initialize Array */ - for(i=0;itype=='s') { - nul=my_malloc(sizeof(char)); - *nul='\0'; - ((char **)nar->pointer)[i]=nul; - } else { - ((double *)nar->pointer)[i]=0.0; - } - } - - if (oar) { /* copy contents of old array onto new */ - for(i=0;ibounds,ind); - j=ind_to_off(ind,nar->bounds); - if (nar->type=='s') { - my_free(((char **)nar->pointer)[j]); - ((char **)nar->pointer)[j]= ((char **)oar->pointer)[i]; - } else { - ((double *)nar->pointer)[j]= ((double *)oar->pointer)[i]; - } - } - my_free(oar->pointer); - my_free(oar); - } - - s->pointer=nar; - cmd->symbol=nar; -} - - -static int ind_to_off(int *ind,int *bound) /* convert array of indices to single offset */ -{ - int i; - int cur,off; - - off=0; - cur=1; - for(i=0;i<10 && bound[i];i++) { - off+=ind[i]*cur; - cur*=bound[i]; - } - return off; -} - - -static void off_to_ind(int off,int *bound,int *ind) /* convert a single offset to an array of indices */ -{ - int i; - int cur; - - cur=1; - for(i=0;i<10;i++) { - if (bound[i]) cur*=bound[i]; - ind[i]=0; - } - for(i=9;i>=0;i--) { - if (bound[i]) { - cur/=bound[i]; - ind[i]=off/cur; - off-=ind[i]*cur; - } else { - ind[i]=0; - } - } -} - - -void query_array(struct command *cmd) /* query array */ -{ - int index; - struct stackentry *s; - struct array *ar; - struct symbol *sym; - - if (cmd->type==cARSIZE) index=(int)pop(stNUMBER)->value; - - s=pop(stSTRING_OR_NUMBER_ARRAYREF); - - if (!cmd->symbol) { - sym=get_sym(s->pointer,syARRAY,amSEARCH); - if (!sym || !sym->pointer) { - sprintf(string,"array '%s()' is not defined",strip(s->pointer)); - error(ERROR,string); - return; - } - cmd->symbol=sym; - } - - ar=((struct symbol *)cmd->symbol)->pointer; - - if (cmd->type==cARSIZE && (index<1 || index>ar->dimension)) { - sprintf(string,"only indices between 1 and %d allowed",ar->dimension); - error(ERROR,string); - return; - } - s=push(); - s->type=stNUMBER; - if (cmd->type==cARSIZE) - s->value=ar->bounds[ar->dimension-index]-1; - else - s->value=ar->dimension; - - return; -} - - -void create_doarray(char *symbol,int command) /* creates array-commands */ -{ - struct command *cmd; - - cmd=add_command(cDOARRAY,symbol); - cmd->tag=command; /* operation to perform */ - cmd->args=-1; -} - - -void doarray(struct command *cmd) /* call an array */ -{ - struct array *ar; - struct stackentry *stack; - struct symbol *sym; - void *p; - char **str; - double *dbl; - int i,j,bnd,index,cur,rval; - - - if (!cmd->symbol) { - sym=get_sym(cmd->name,syARRAY,amSEARCH); - if (!sym || !sym->pointer) { - sprintf(string,"'%s()' is neither array nor subroutine",strip(cmd->name)); - error(ERROR,string); - return; - } - cmd->symbol=sym; - } - rval=(current->tag==CALLARRAY || current->tag==CALLSTRINGARRAY || current->tag==GETSTRINGPOINTER); - if (cmd->args<0) cmd->args=count_args(!rval); - if (cmd->args<0) { - error(ERROR,"only numerical indices allowed for arrays"); - return; - } - cmd->args=abs(cmd->args); - if (!cmd->args) { /* no indizes supplied, create a reference to an array */ - pop(stFREE); /* remove left over stFREE */ - stack=push(); - if (cmd->tag==CALLARRAY) - stack->type=stNUMBERARRAYREF; - else - stack->type=stSTRINGARRAYREF; - stack->pointer=my_strdup(cmd->name); - return; - } - - ar=((struct symbol *)cmd->symbol)->pointer; - - if (!ar->dimension) { - sprintf(string,"array parameter '%s()' has not been supplied",strip(cmd->name)); - error(ERROR,string); - return; - } - if (cmd->args!=ar->dimension) { - sprintf(string,"%d indices supplied, %d expected for '%s()'",cmd->args,ar->dimension,strip(cmd->name)); - error(ERROR,string); - return; - } - - if (!rval) stack=pop(stSTRING_OR_NUMBER); - index=0; - cur=1; - for(i=0;idimension;i++) { - bnd=(ar->bounds[i]); - j=(int)pop(stNUMBER)->value; - if (j<0 || j>=bnd) { - sprintf(string,"index %d (=%d) out of range",ar->dimension-i,j); - error(ERROR,string); - return; - } - index+=j*cur; - cur*=bnd; - } - - pop(stFREE); /* remove left over stFREE */ - if (rval) stack=push(); - - p=ar->pointer; - switch(current->tag) { - case CALLARRAY: - dbl=(double *)p+index; - stack->value= *dbl; - stack->type=stNUMBER; - break; - case ASSIGNARRAY: - dbl=(double *)p+index; - *dbl=stack->value; - break; - case CALLSTRINGARRAY: - str=((char **)p+index); - stack->pointer=my_strdup(*str); - stack->type=stSTRING; - break; - case ASSIGNSTRINGARRAY: - str=((char **)p+index); - if (*str!=NULL)my_free(*str); - *str=my_strdup(stack->pointer); - break; - case GETSTRINGPOINTER: - str=((char **)p+index); - stack->pointer=*str; - stack->type=stSTRING; - break; - } -} - - -struct array *create_array(int type,int dimension) /* create an array */ -{ - int i; - struct array *ar; - - ar=my_malloc(sizeof(struct array)); - ar->type=type; - ar->dimension=dimension; - ar->pointer=NULL; - for(i=0;i<10;i++) ar->bounds[i]=0; - - return ar; -} - - -static int count_args(int skipfirst) /* count number of numeric arguments on stack */ -{ - int i=0; - int sign=1; - struct stackentry *curr; - - curr=stackhead->prev; - if (skipfirst) curr=curr->prev; - while(curr) { - if (curr->type==stFREE) return i*sign; - if (curr->type!=stNUMBER) sign=-1; - curr=curr->prev; - i++; - } - return -1; -} - - -void skipper() -/* used for on_goto/gosub, skip specified number of commands */ -{ - int i,len; - struct command *ahead; /* command to follow */ - - len=(int)pop(stNUMBER)->value; - i=1; - current=current->next; /* advance to first goto/gosub */ - for(i=1;inext->next; /* skip interleaving findnop statement */ - if (ahead->type==cNOP) - break; - else - current=ahead; - } -} - - -void skiponce(struct command *cmd) /* skip next command exectly once */ -{ - if (cmd->tag) current=current->next; - cmd->tag=0; -} - - -void resetskiponce(struct command *cmd) /* find and reset next skip */ -{ - struct command *c; - - c=cmd; - while(c->type!=cSKIPONCE) c=c->next; - c->tag=1; -} - -void create_break_mark(int minor,int major) /* create marks for break */ -{ - struct command *cmd; - - in_loop+=major; - cmd=add_command(cBREAK_MARK,NULL); - cmd->tag=(major+2)*16+minor+2; -} - - -void next_case(void) /* go to next case in switch statement */ -{ - if (stackhead->prev->type==stSTRING || stackhead->prev->type==stSWITCH_STRING) - stackhead->prev->type=stSWITCH_STRING; - else - stackhead->prev->type=stSWITCH_NUMBER; -} - - -void push_switch_id(void) /* generate a new switch id */ -{ - static int max_switch_id=0; - static int switch_stack_depth=1; - - struct switch_id *new_id; - if (switch_id_stackhead==NULL || switch_id_stackhead->next==NULL) { - if (switch_id_stackroot && switch_id_stackhead==NULL) { - new_id=switch_id_stackroot; - } else { - new_id=my_malloc(sizeof(struct switch_id)); - new_id->next=NULL; - new_id->depth=switch_stack_depth++; - } - } else { - new_id=switch_id_stackhead->next; - } - max_switch_id++; - new_id->id=max_switch_id; - if (switch_id_stackhead==NULL) { - switch_id_stackhead=new_id; - switch_id_stackhead->prev=NULL; - } else { - switch_id_stackhead->next=new_id; - new_id->prev=switch_id_stackhead; - switch_id_stackhead=new_id; - } -} - - -void pop_switch_id(void) /* get previous switch id */ -{ - if (switch_id_stackhead) switch_id_stackhead=switch_id_stackhead->prev; -} - - -int get_switch_id(void) /* get current switch id */ -{ - return switch_id_stackhead ? switch_id_stackhead->id : 0; -} - - -int get_switch_depth(void) /* get current depth of switch id stack */ -{ - return switch_id_stackhead ? switch_id_stackhead->depth : 0; -} - - -void push_switch_mark(void) /* push a switch mark */ -{ - push()->type=stSWITCH_MARK; -} - - -void create_clean_switch_mark(int keep,int ret) /* add command clean_switch_mark */ -{ - struct command *cmd; - - cmd=add_command(cCLEAN_SWITCH_MARK,NULL); - cmd->args=keep; - cmd->tag=ret; -} - - -void clean_switch_mark(struct command *cmd) /* pop everything up to (and including) first switch_mark from stack */ -{ - struct stackentry *t,*tt,*b,*bb,*s; - int keep,k,ret; - - k=keep=cmd->args; - ret=cmd->tag; - s=stackhead->prev; - while(k && s!=stackroot) { - k--; - s=s->prev; - } - t=s; - tt=s->next; - while(((ret && s->type!=stRETADDCALL) || (!ret && s->type!=stSWITCH_MARK)) && s!=stackroot) { - s=s->prev; - } - if (ret) { - bb=s; - b=s->next; - } else { - b=s; - bb=s->prev; - } - - /* cut part between (and including) b and t out of stack */ - bb->next=tt; - tt->prev=bb; - /* insert cut-out part between stackhead and stackhead->prev */ - stackhead->prev->next=b; - b->prev=stackhead->prev; - t->next=stackhead; - stackhead->prev=t; - if (keep) - stackhead=tt->next; - else - stackhead=bb->next; -} - - -void mybreak(struct command *cmd) /* find break_here statement */ -{ - struct command *curr; - int major,minor; - int major_nesting=0; - int minor_nesting=0; - - if (cmd->type==cBREAK) - major_nesting=1; - else - minor_nesting=0; - curr=cmd; - while(curr->type!=cBREAK_HERE || major_nesting || minor_nesting) { - if (curr->type==cBREAK_MARK) { - minor=(curr->tag&15)-2; - major=((curr->tag&240)/16)-2; - if (!major_nesting) minor_nesting+=minor; - major_nesting+=major; - if (infolevel>=DEBUG) { - sprintf(string,"searching break-mark: diff(%d,%d), total(%d,%d)",minor,major,minor_nesting,major_nesting); - error(DEBUG,string); - } - } - curr=curr->next; - if (!curr) error(FATAL,"break has left program"); - } - cmd->type=cQGOTO; - if (infolevel>=DEBUG) error(DEBUG,"converting cBREAK to cQGOTO"); - cmd->jump=current=curr; -} - - -void mycontinue(struct command *cmd) /* find continue_here statement */ -{ - struct command *curr; - int major; - int major_nesting=-1; - - curr=cmd; - while(curr->type!=cCONTINUE_HERE || major_nesting) { - if (curr->type==cBREAK_MARK) { - major=((curr->tag&240)>>4)-2; - major_nesting+=major; - } - if (curr->type==cCONTINUE_CORRECTION) major_nesting--; - curr=curr->prev; - if (!curr) error(FATAL,"continue has left program"); - } - cmd->type=cQGOTO; - if (infolevel>=DEBUG) error(DEBUG,"converting cCONTINUE to cQGOTO"); - cmd->jump=current=curr; -} - - -void findnop() -/* used for on_gosub, find trailing nop command */ -{ - while(current->type!=cNOP) { - current=current->next; /* next label */ - } -} - - -void forcheck(void) /* check, if for-loop is done */ -{ - double start,bound,step,val; - - val=pop(stNUMBER)->value; - step=pop(stNUMBER)->value; - bound=pop(stNUMBER)->value; - start=stackhead->prev->value; - if ((val<=bound && val>=start && step>=0) || (val<=start && val>=bound && step<=0)) - stackhead->prev->value=1.; - else - stackhead->prev->value=0.; -} - - -void forincrement(void) /* increment value on stack */ -{ -/* expecting on stack: BOUND,STEP,VAL,stackhead - where for VAL=START to BOUND step STEP */ - stackhead->prev->value+=stackhead->prev->prev->value; -} - - -void startfor(void) /* compute initial value of for-variable */ -{ - struct stackentry *p; - - p=push(); - p->value=stackhead->prev->prev->prev->prev->value-stackhead->prev->prev->value; - p->type=stNUMBER; - - return; -} - - diff --git a/src/yabasic.bison b/src/yabasic.bison deleted file mode 100644 index d19f24c..0000000 --- a/src/yabasic.bison +++ /dev/null @@ -1,944 +0,0 @@ -%{ -/* - - YABASIC --- a simple Basic Interpreter - written by Marc-Oliver Ihm 1995-2004 - homepage: www.yabasic.de - - BISON part - - This file is part of yabasic and may be copied only - under the terms of either the Artistic License or - the GNU General Public License (GPL), both of which - can be found at www.yabasic.de - -*/ - - -#ifndef YABASIC_INCLUDED -#include "yabasic.h" /* definitions of yabasic */ -#endif - -#include - -#if HAVE_ALLOCA_H -#ifndef WINDOWS -#include -#endif -#endif - -void __yy_bcopy(char *,char *,int); /* prototype missing */ - -int tileol; /* true, read should go to eon of line */ -int mylineno=1; /* line number; counts fresh in every new file */ -int main_lineno=1; /* line number of main */ -int function_type=ftNONE; /* contains function type while parsing function */ -char *current_function=NULL; /* name of currently parsed function */ -int exported=FALSE; /* true, if function is exported */ -int yylex(void); -extern struct libfile_name *current_libfile; /* defined in main.c: name of currently parsed file */ -int missing_endif=0; -int missing_endif_line=0; -int missing_endsub=0; -int missing_endsub_line=0; -int missing_next=0; -int missing_next_line=0; -int missing_wend=0; -int missing_wend_line=0; -int missing_until=0; -int missing_until_line=0; -int missing_loop=0; -int missing_loop_line=0; -int in_loop=0; - -void report_missing(int severity,char *text) { - if (missing_loop || missing_endif || missing_next || missing_until || missing_wend) { - error(severity,text); - string[0]='\0'; - if (missing_endif) - sprintf(string,"if statement starting at line %d has seen no 'endif' yet",missing_endif_line); - else if (missing_next) - sprintf(string,"for-loop starting at line %d has seen no 'next' yet",missing_next_line); - else if (missing_wend) - sprintf(string,"while-loop starting at line %d has seen no 'wend' yet",missing_wend_line); - else if (missing_until) - sprintf(string,"repeat-loop starting at line %d has seen no 'until' yet",missing_until_line); - else if (missing_loop) - sprintf(string,"do-loop starting at line %d has seen no 'loop' yet",missing_wend_line); - if (string[0]) error(severity,string); - } -} - -%} - -%union { - double fnum; /* double number */ - int inum; /* integer number */ - int token; /* token of command */ - int sep; /* number of newlines */ - char *string; /* quoted string */ - char *symbol; /* general symbol */ - char *digits; /* string of digits */ - char *docu; /* embedded documentation */ -} - -%type const -%type number -%type symbol_or_lineno -%type function_name -%type function_or_array -%type stringfunction_or_array -%type tSEP sep_list - -%token tFNUM -%token tSYMBOL -%token tSTRSYM -%token tDOCU -%token tDIGITS -%token tSTRING - -%token tFOR tTO tSTEP tNEXT tWHILE tWEND tREPEAT tUNTIL tIMPORT -%token tGOTO tGOSUB tLABEL tON tSUB tENDSUB tLOCAL tSTATIC tEXPORT tERROR -%token tEXECUTE tEXECUTE2 tCOMPILE tRUNTIME_CREATED_SUB -%token tINTERRUPT tBREAK tCONTINUE tSWITCH tSEND tCASE tDEFAULT tLOOP tDO tSEP tEOPROG -%token tIF tTHEN tELSE tELSIF tENDIF tUSING -%token tPRINT tINPUT tLINE tRETURN tDIM tEND tEXIT tAT tSCREEN tSCREENSHOT -%token tREVERSE tCOLOUR -%token tAND tOR tNOT tEOR -%token tNEQ tLEQ tGEQ tLTN tGTN tEQU tPOW -%token tREAD tDATA tRESTORE -%token tOPEN tCLOSE tSEEK tTELL tAS tREADING tWRITING -%token tWAIT tBELL tLET tARDIM tARSIZE tBIND -%token tWINDOW tDOT tCIRCLE tCLEAR tFILL tPRINTER tSETUP -%token tBUTTON tALERT tMENU tCHECKBOX tRADIOBUTTON tTEXTCONTROL -%token tLISTBOX tDROPBOX tADD tREMOVE tLOCALIZE tFILEPANEL tSLIDER tSTATUSBAR -%token tLAYOUT tSET tTEXTEDIT tCOUNT tVIEW tBOXVIEW tTABVIEW tTEXTURL tBITMAP tCANVAS -%token tOPTION tDROPZONE tCOLORCONTROL tTREEBOX tCOLUMNBOX tCOLUMN tSORT tTOOLTIP tTOOLTIPNEW tCALENDAR -%token tCLIPBOARD tCOPY tSUBMENU tSELECT tSCROLLBAR tEXPAND tCOLLAPSE tSPLITVIEW tSTACKVIEW -%token tPOPUPMENU tSPINCONTROL tMSEND tNUMMESSAGE tTHREAD tSOUND tPLAY tSTOP tMEDIASOUND tSHORTCUT tISCOMPUTERON -%token tDRAW tTEXT tFLUSH tELLIPSE tSAVE -%token tRECT tGETCHAR tPUTCHAR tNEW tCURVE tLAUNCH tATTRIBUTE - -%token tSIN tASIN tCOS tACOS tTAN tATAN tEXP tLOG -%token tSQRT tSQR tMYEOF tABS tSIG -%token tINT tFRAC tMOD tRAN tLEN tVAL tLEFT tRIGHT tMID tMIN tMAX -%token tSTR tINKEY tCHR tASC tHEX tDEC tBIN tUPPER tLOWER -%token tTRIM tLTRIM tRTRIM tINSTR tRINSTR -%token tSYSTEM tSYSTEM2 tPEEK tPEEK2 tPOKE -%token tDATE tTIME tTOKEN tTOKENALT tSPLIT tSPLITALT tGLOB -%token tMESSAGE tIMAGE tSVG tTRANSLATE tGET tMOUSE tISMOUSEIN -%token tKEYBOARD tPASTE tGETNUM - -%left tOR -%left tAND -%left tNOT -%left tNEQ -%left tGEQ -%left tLEQ -%left tLTN -%left tGTN -%left tEQU -%left '-' '+' -%left '*' '/' -%left tPOW -%nonassoc UMINUS - -%% - -program: statement_list tEOPROG {YYACCEPT;} - ; - -statement_list: statement - | statement_list {if (errorlevel<=ERROR) {YYABORT;}} - tSEP {if ($3>=0) mylineno+=$3; else switchlib();} statement - ; - -statement: /* empty */ - | string_assignment - | tLET string_assignment - | assignment - | tLET assignment - | tIMPORT {report_missing(ERROR,"do not import a library in a loop or an if-statement");switchlib();} - | tERROR string_expression {add_command(cERROR,NULL);} - | for_loop - | switch_number_or_string - | repeat_loop - | while_loop - | do_loop - | tBREAK {add_command(cBREAK,NULL);if (!in_loop) error(ERROR,"break outside loop");} - | tCONTINUE {add_command(cCONTINUE,NULL);if (!in_loop) error(ERROR,"continue outside loop");} - | function_definition - | function_or_array {create_call($1);add_command(cPOP,NULL);} - | stringfunction_or_array {create_call($1);add_command(cPOP,NULL);} - | tLOCAL {if (function_type==ftNONE) error(ERROR,"no use for 'local' outside functions");} local_list - | tSTATIC {if (function_type==ftNONE) error(ERROR,"no use for 'static' outside functions");} static_list - | if_clause - | short_if - | tGOTO symbol_or_lineno {create_goto((function_type!=ftNONE)?dotify($2,TRUE):$2);} - | tGOSUB symbol_or_lineno {create_gosub((function_type!=ftNONE)?dotify($2,TRUE):$2);} - | tON tINTERRUPT tBREAK {create_exception(TRUE);} - | tON tINTERRUPT tCONTINUE {create_exception(FALSE);} - | tON expression tGOTO {add_command(cSKIPPER,NULL);} - goto_list {add_command(cNOP,NULL);} - | tON expression tGOSUB {add_command(cSKIPPER,NULL);} - gosub_list {add_command(cNOP,NULL);} - | tLABEL symbol_or_lineno {create_label((function_type!=ftNONE)?dotify($2,TRUE):$2,cLABEL);} - | open_clause {add_command(cCHECKOPEN,NULL);} - | tCLOSE hashed_number {add_command(cCLOSE,NULL);} - | seek_clause {add_command(cCHECKSEEK,NULL);} - | tCOMPILE string_expression {add_command(cCOMPILE,NULL);} - | tEXECUTE '(' call_list ')' {create_execute(0);add_command(cPOP,NULL);add_command(cPOP,NULL);} - | tEXECUTE2 '(' call_list ')' {create_execute(1);add_command(cPOP,NULL);add_command(cPOP,NULL);} - | tPRINT printintro printlist {create_colour(0);create_print('n');create_pps(cPOPSTREAM,0);} - | tPRINT printintro printlist ';' {create_colour(0);create_pps(cPOPSTREAM,0);} - | tPRINT printintro printlist ',' {create_colour(0);create_print('t');create_pps(cPOPSTREAM,0);} - | tINPUT {tileol=FALSE;} inputbody - | tLINE tINPUT {tileol=TRUE;} inputbody - | tREAD readlist - | tDATA datalist - | tRESTORE {create_restore("");} - | tRESTORE symbol_or_lineno {create_restore((function_type!=ftNONE)?dotify($2,TRUE):$2);} - | tRESTORE string_expression {add_command(cRESTORE2, NULL);} - | tRETURN {if (get_switch_id()) create_clean_switch_mark(0,TRUE); - if (function_type!=ftNONE) { - add_command(cCLEARREFS,NULL);lastcmd->nextref=firstref; - add_command(cPOPSYMLIST,NULL); - create_retval(ftNONE,function_type); - add_command(cRET_FROM_FUN,NULL); - } else { - add_command(cRETURN,NULL); - }} - | tRETURN expression {if (get_switch_id()) create_clean_switch_mark(1,TRUE); if (function_type==ftNONE) {error(ERROR,"can not return value"); YYABORT;} add_command(cCLEARREFS,NULL);lastcmd->nextref=firstref;add_command(cPOPSYMLIST,NULL);create_retval(ftNUMBER,function_type);add_command(cRET_FROM_FUN,NULL);} - | tRETURN string_expression {if (get_switch_id()) create_clean_switch_mark(1,TRUE); if (function_type==ftNONE) {error(ERROR,"can not return value"); YYABORT;} add_command(cCLEARREFS,NULL);lastcmd->nextref=firstref;add_command(cPOPSYMLIST,NULL);create_retval(ftSTRING,function_type);add_command(cRET_FROM_FUN,NULL);} - | tDIM dimlist -/* | tOPEN tWINDOW expression ',' expression {create_openwin(FALSE);} */ - | tWINDOW tOPEN coordinates to coordinates ',' string_expression ',' string_expression {create_openwin(TRUE);} - | tBUTTON coordinates to coordinates ',' string_expression ',' string_expression ',' string_expression {add_command(cBUTTON,NULL);} - | tMENU string_expression ',' string_expression ',' string_expression ',' string_expression {add_command(cMENU,NULL);} - | tCHECKBOX coordinates ',' string_expression ',' string_expression ',' expression ',' string_expression {add_command(cCHECKBOX,NULL);} - | tRADIOBUTTON coordinates ',' string_expression ',' string_expression ',' expression ',' string_expression {add_command(cRADIOBUTTON,NULL);} - | tTEXTCONTROL coordinates to coordinates ',' string_expression ',' string_expression ',' string_expression ',' string_expression{add_command(cTEXTCONTROL,NULL);} - | tLISTBOX coordinates to coordinates ',' string_expression ',' expression ',' string_expression {add_command(cLISTBOX,NULL);} - | tLISTBOX tCLEAR string_expression {add_command(cITEMCLEAR, NULL);} - | tLISTBOX tADD string_expression ',' string_expression {add_command(cLISTBOXADD1, NULL);} - | tLISTBOX tADD string_expression ',' expression ',' string_expression {add_command(cLISTBOXADD2, NULL);} - | tDROPBOX coordinates to coordinates ',' string_expression ',' string_expression ',' string_expression {add_command(cDROPBOX,NULL);} - | tDROPBOX tADD string_expression ',' string_expression {add_command(cITEMADD,NULL);} - | tDROPBOX tCLEAR string_expression {add_command(cDROPBOXCLEAR,NULL);} - | tDROPBOX tREMOVE string_expression ',' expression {add_command(cDROPBOXREMOVE,NULL);} - | tLISTBOX tREMOVE string_expression ',' string_expression {add_command(cITEMDEL,NULL);} - | tLISTBOX tREMOVE string_expression ',' expression {add_command(cLISTBOXDEL2,NULL);} - | tLISTBOX tSELECT string_expression ',' expression {add_command(cLISTBOXSELECT,NULL);} - | tALERT string_expression ',' string_expression ',' string_expression {add_command(cALERT,NULL);} - | tTEXT coordinates ',' string_expression ',' string_expression ',' string_expression {add_command(cTEXT,NULL);} - | tTEXT coordinates to coordinates ',' string_expression ',' string_expression ',' string_expression {add_command(cTEXT2, NULL);} - | tTEXT tSET string_expression ',' string_expression {add_command(cTEXTALIGN,NULL);} - | tLOCALIZE {add_command(cLOCALIZE,NULL);} - | tLOCALIZE string_expression {add_command(cLOCALIZE2,NULL);} - | tLOCALIZE tSTOP {add_command(cLOCALIZESTOP, NULL);} - | tDRAW tTEXT coordinates ',' string_expression ',' string_expression {add_command(cDRAWTEXT,NULL);} - | tDRAW tRECT coordinates to coordinates ',' string_expression {add_command(cDRAWRECT,NULL);} - | tDRAW tFLUSH string_expression {add_command(cDRAWCLEAR,NULL);} - | tWINDOW tCLOSE string_expression {add_command(cCLOSEWIN,NULL);} - | tLAYOUT string_expression ',' string_expression {add_command(cLAYOUT,NULL);} - | tWINDOW tSET string_expression ',' string_expression {add_command(cWINSET4,NULL);} - | tWINDOW tSET string_expression ',' string_expression ',' string_expression {add_command(cWINSET1,NULL);} - | tWINDOW tSET string_expression ',' string_expression ',' expression ',' expression {add_command(cWINSET3,NULL);} - /* - | tWINDOW tSET string_expression ',' string_expression ',' expression ',' expression ',' expression {add_command(cWINSET2,NULL);} - this tWINDOW tSET was replaced by tDRAW tSET ... cWINSET2 - tWINDOW tCLEAR string_expression {add_command(cWINCLEAR,NULL);}*/ - | tSHORTCUT string_expression ',' string_expression ',' string_expression {add_command(cSHORTCUT,NULL);} - | tTEXTEDIT coordinates to coordinates ',' string_expression ',' expression ',' string_expression {add_command(cTEXTEDIT,NULL);} - | tTEXTEDIT tADD string_expression ',' string_expression {add_command(cTEXTADD,NULL);} - | tTEXTEDIT tSET string_expression ',' string_expression {add_command(cTEXTSET,NULL);} - | tTEXTEDIT tSET string_expression ',' string_expression ',' expression {add_command(cTEXTSET2,NULL);} - | tTEXTEDIT tSET string_expression ',' string_expression ',' string_expression {add_command(cTEXTSET3,NULL);} - | tTEXTEDIT tCOLOUR string_expression ',' string_expression ',' string_expression {add_command(cTEXTCOLOR1,NULL);} - | tTEXTEDIT tCOLOUR string_expression ',' string_expression ',' expression ',' expression ',' expression {add_command(cTEXTCOLOR2,NULL);} - | tTEXTEDIT tCLEAR string_expression {add_command(cTEXTCLEAR,NULL);} - | tDRAW tSET string_expression ',' string_expression {add_command(cDRAWSET1,NULL);} - | tDRAW tSET expression ',' string_expression {add_command(cDRAWSET2,NULL);} - | tDRAW tSET string_expression ',' expression ',' expression ',' expression ',' string_expression {add_command(cWINSET2,NULL);} - | tDRAW tSET string_expression ',' expression {add_command(cDRAWSET3,NULL);} - | tDRAW tSET string_expression ',' string_expression ',' string_expression {add_command(cDRAWSET4,NULL);} - | tVIEW coordinates to coordinates ',' string_expression ',' string_expression {add_command(cVIEW,NULL);} - | tVIEW tREMOVE string_expression {add_command(cWINCLEAR,NULL);} - | tBOXVIEW coordinates to coordinates ',' string_expression ',' string_expression ',' expression ',' string_expression {add_command(cBOXVIEW,NULL);} - | tBOXVIEW tSET string_expression ',' string_expression ',' string_expression {add_command(cBOXVIEWSET,NULL);} - | tTABVIEW coordinates to coordinates ',' string_expression ',' string_expression ',' string_expression {add_command(cTAB,NULL);} - | tTABVIEW tSET string_expression ',' expression {add_command(cTABSET,NULL);} - | tTABVIEW tADD string_expression ',' string_expression {add_command(cTABADD, NULL);} - | tTABVIEW tREMOVE string_expression ',' expression {add_command(cTABDEL, NULL);} - | tDRAW tDOT coordinates ',' string_expression {add_command(cDOT,NULL);} - | tDRAW tLINE coordinates to coordinates ',' string_expression {add_command(cLINE,NULL);} - | tDRAW tCIRCLE coordinates ',' expression ',' string_expression {add_command(cCIRCLE,NULL);} - | tDRAW tELLIPSE coordinates ',' expression ',' expression ',' string_expression {add_command(cELLIPSE,NULL);} - | tDRAW tCURVE coordinates ',' coordinates ',' coordinates ',' coordinates ',' string_expression {add_command(cCURVE,NULL);} - | tSLIDER coordinates to coordinates ',' string_expression ',' string_expression ',' expression ',' expression ',' string_expression {add_command(cSLIDER1,NULL);} - | tSLIDER coordinates to coordinates ',' string_expression ',' string_expression ',' expression ',' expression ',' string_expression ',' string_expression {add_command(cSLIDER2,NULL);} - | tSLIDER tLABEL string_expression ',' string_expression ',' string_expression {add_command(cSLIDER3,NULL);} - | tSLIDER tSET string_expression ',' string_expression ',' expression {add_command(cSLIDER4,NULL);} - | tSLIDER tCOLOUR string_expression ',' string_expression ',' expression ',' expression ',' expression {add_command(cSLIDER5,NULL);} - | tSLIDER tSET string_expression ',' expression {add_command(cSLIDER6,NULL);} - | tLAUNCH string_expression {add_command(cLAUNCH,NULL);} - | tOPTION tSET string_expression ',' string_expression ',' string_expression {add_command(cOPTION1,NULL);} - | tOPTION tCOLOUR string_expression ',' string_expression ',' expression ',' expression ',' expression {add_command(cOPTION2,NULL);} - /* - | tOPTION tRESIZE string_expression ',' coordinates to coordinates {add_command(cOPTION3,NULL);} - */ - | tOPTION tSET string_expression ',' string_expression {add_command(cOPTION4,NULL);} - | tOPTION tSET string_expression ',' string_expression ',' expression {add_command(cOPTION5,NULL);} - | tOPTION tSET string_expression ',' string_expression ',' expression ',' expression {add_command(cOPTION3,NULL);} - | tBITMAP coordinates ',' string_expression {add_command(cBITMAP,NULL);} - | tBITMAP tGETNUM coordinates to coordinates ',' string_expression ',' string_expression {add_command(cBITMAPGET, NULL);} - | tBITMAP tGETNUM expression ',' string_expression ',' string_expression {add_command(cBITMAPGET2, NULL);} - | tBITMAP tGETNUM string_expression ',' string_expression ',' string_expression {add_command(cBITMAPGETICON, NULL);} - | tDRAW tBITMAP coordinates ',' string_expression ',' string_expression ',' string_expression {add_command(cBITMAPDRAW,NULL);} - | tDRAW tBITMAP coordinates to coordinates ',' string_expression ',' string_expression ',' string_expression {add_command(cBITMAPDRAW2,NULL);} - /* - | tCANVAS tDRAG string_expression {add_command(cBITMAPDRAG,NULL);} - */ - | tBITMAP tREMOVE string_expression {add_command(cBITMAPREMOVE,NULL);} - | tSCREENSHOT coordinates to coordinates ',' string_expression {add_command(cSCREENSHOT,NULL);} - | tCANVAS coordinates to coordinates ',' string_expression ',' string_expression {add_command(cCANVAS,NULL);} - | tVIEW tDROPZONE string_expression {add_command(cDROPZONE,NULL);} - | tCOLORCONTROL coordinates ',' string_expression ',' string_expression {add_command(cCOLORCONTROL1,NULL);} - | tCOLORCONTROL tSET string_expression ',' expression ',' expression ',' expression {add_command(cCOLORCONTROL2,NULL);} - | tTEXTCONTROL tSET string_expression ',' string_expression {add_command(cTEXTCONTROL2,NULL);} - | tTEXTCONTROL tSET string_expression ',' expression {add_command(cTEXTCONTROL3,NULL);} - | tTEXTCONTROL tSET string_expression ',' string_expression ',' string_expression {add_command(cTEXTCONTROL4,NULL);} - | tTEXTCONTROL tCLEAR string_expression {add_command(cTEXTCONTROL5,NULL);} - | tTREEBOX coordinates to coordinates ',' string_expression ',' expression ',' string_expression {add_command(cTREEBOX1,NULL);} - | tTREEBOX tADD string_expression ',' string_expression {add_command(cTREEBOX2,NULL);} - | tTREEBOX tADD string_expression ',' string_expression ',' string_expression ',' expression {add_command(cTREEBOX3,NULL);} - | tTREEBOX tADD string_expression ',' string_expression ',' expression ',' expression ',' expression {add_command(cTREEBOX13,NULL);} - | tTREEBOX tADD string_expression ',' string_expression ',' expression {add_command(cTREEBOX12,NULL);} - | tTREEBOX tCLEAR string_expression {add_command(cTREEBOX4,NULL);} - | tTREEBOX tREMOVE string_expression ',' string_expression {add_command(cTREEBOX5,NULL);} - | tTREEBOX tSELECT string_expression ',' expression {add_command(cTREEBOX7,NULL);} - | tTREEBOX tREMOVE string_expression ',' expression {add_command(cTREEBOX8,NULL);} - | tTREEBOX tREMOVE string_expression ',' string_expression ',' string_expression {add_command(cTREEBOX9,NULL);} - | tTREEBOX tEXPAND string_expression ',' string_expression {add_command(cTREEBOX10,NULL);} - | tTREEBOX tCOLLAPSE string_expression ',' string_expression {add_command(cTREEBOX11,NULL);} - | tBUTTON tIMAGE coordinates ',' string_expression ',' string_expression ',' string_expression ',' string_expression ',' string_expression {add_command(cBUTTONIMAGE,NULL);} - | tCHECKBOX tIMAGE coordinates ',' string_expression ',' string_expression ',' string_expression ',' string_expression ',' string_expression ',' expression ',' string_expression {add_command(cCHECKBOXIMAGE,NULL);} - | tCHECKBOX tSET string_expression ',' expression {add_command(cCHECKBOXSET,NULL);} - | tRADIOBUTTON tSET string_expression ',' expression {add_command(cRADIOSET,NULL);} - | tTOOLTIP string_expression ',' string_expression {add_command(cTOOLTIP,NULL);} - | tTOOLTIPNEW string_expression ',' string_expression ',' string_expression ',' expression ',' expression ',' expression {add_command(cTOOLTIPNEW,NULL);} - | tTOOLTIP tCOLOUR string_expression ',' expression ',' expression ',' expression {add_command(cTOOLTIPCOLOR,NULL);} - | tLISTBOX tSORT string_expression {add_command(cLISTSORT,NULL);} - | tTREEBOX tSORT string_expression {add_command(cTREESORT,NULL);} - | tCOLUMNBOX coordinates to coordinates ',' string_expression ',' expression ',' string_expression ',' string_expression {add_command(cFILEBOX,NULL);} - | tCOLUMNBOX tADD string_expression ',' expression ',' expression ',' expression ',' string_expression {add_command(cCOLUMNBOXADD,NULL);} - | tCOLUMNBOX tCOLUMN string_expression ',' string_expression ',' expression ',' expression ',' expression ',' expression ',' string_expression {add_command(cFILEBOXADD2,NULL);} - | tCOLUMNBOX tCLEAR string_expression {add_command(cFILEBOXCLEAR,NULL);} - | tCOLUMNBOX tREMOVE string_expression ',' expression {add_command(cCOLUMNBOXREMOVE,NULL);} - | tCOLUMNBOX tSELECT string_expression ',' expression {add_command(cCOLUMNBOXSELECT,NULL);} - | tCOLUMNBOX tCOLOUR string_expression ',' string_expression ',' expression ',' expression ',' expression {add_command(cCOLUMNBOXCOLOR,NULL);} - | tCALENDAR coordinates ',' string_expression ',' string_expression ',' string_expression ',' string_expression {add_command(cCALENDAR,NULL);} - | tCALENDAR tSET string_expression ',' string_expression {add_command(cCALENDARSET,NULL);} - | tSCROLLBAR string_expression ',' expression ',' string_expression {add_command(cSCROLLBAR,NULL);} - | tSCROLLBAR tSET string_expression ',' string_expression ',' expression {add_command(cSCROLLBARSET1,NULL);} - | tSCROLLBAR tSET string_expression ',' string_expression ',' expression ',' expression {add_command(cSCROLLBARSET2,NULL);} - | tSCROLLBAR tSET string_expression ',' string_expression {add_command(cSCROLLBARSET3,NULL);} - | tDROPBOX tSELECT string_expression ',' expression {add_command(cDROPBOXSELECT,NULL);} - | tMENU tSET string_expression ',' expression ',' string_expression {add_command(cMENU2,NULL);} - | tMENU tSET string_expression ',' string_expression ',' string_expression ',' string_expression {add_command(cMENU3,NULL);} - | tSUBMENU string_expression ',' string_expression ',' string_expression ',' string_expression ',' string_expression {add_command(cSUBMENU1,NULL);} - | tSUBMENU tSET string_expression ',' string_expression ',' expression ',' string_expression {add_command(cSUBMENU2,NULL);} - | tSUBMENU tSET string_expression ',' string_expression ',' string_expression ',' string_expression ',' string_expression {add_command(cSUBMENU3,NULL);} - | tSTATUSBAR coordinates to coordinates ',' string_expression ',' string_expression ',' string_expression ',' string_expression {add_command(cSTATUSBAR,NULL);} - | tSTATUSBAR tSET string_expression ',' string_expression ',' string_expression ',' expression {add_command(cSTATUSBARSET,NULL);} - | tSTATUSBAR tSET string_expression ',' expression ',' expression ',' expression {add_command(cSTATUSBARSET3,NULL);} - | tSPINCONTROL coordinates ',' string_expression ',' string_expression ',' expression ',' expression ',' expression ',' string_expression {add_command(cSPINCONTROL1,NULL);} - | tSPINCONTROL tSET string_expression ',' expression {add_command(cSPINCONTROL2,NULL);} - | tCLIPBOARD tCOPY string_expression {add_command(cCLIPBOARDCOPY,NULL);} - | tPRINTER tSETUP string_expression {add_command(cPRINTERCONFIG,NULL);} - | tMOUSE tSET string_expression {add_command(cMOUSESET,NULL);} - | tSOUND tSTOP expression {add_command(cSOUNDSTOP,NULL);} - | tSOUND tSTOP '(' expression ')' {add_command(cSOUNDSTOP,NULL);} - | tSOUND tWAIT expression {add_command(cSOUNDWAIT,NULL);} - | tSOUND tWAIT '(' expression ')' {add_command(cSOUNDWAIT,NULL);} - | tMEDIASOUND tSTOP expression {add_command(cMEDIASOUNDSTOP,NULL);} - | tMEDIASOUND tSTOP '(' expression ')' {add_command(cMEDIASOUNDSTOP,NULL);} - | tSPLITVIEW coordinates to coordinates ',' string_expression ',' expression ',' expression ',' string_expression {add_command(cSPLITVIEW1,NULL);} - | tSPLITVIEW tSET string_expression ',' string_expression ',' expression {add_command(cSPLITVIEW2,NULL);} - | tSPLITVIEW tSET string_expression ',' string_expression ',' expression ',' expression {add_command(cSPLITVIEW3,NULL);} - | tSTACKVIEW coordinates to coordinates ',' string_expression ',' expression ',' string_expression {add_command(cSTACKVIEW1,NULL);} - | tSTACKVIEW tSET string_expression ',' expression {add_command(cSTACKVIEW2,NULL);} - | tTEXTURL coordinates ',' string_expression ',' string_expression ',' string_expression ',' string_expression {add_command(cTEXTURL1, NULL);} - | tTEXTURL tCOLOUR string_expression ',' string_expression ',' expression ',' expression ',' expression {add_command(cTEXTURL2, NULL);} - | tATTRIBUTE tSET string_expression ',' string_expression ',' string_expression ',' string_expression {add_command(cATTRIBUTE1, NULL);} - | tATTRIBUTE tCLEAR string_expression ',' string_expression {add_command(cATTRIBUTECLEAR, NULL);} - | tPUTCHAR string_expression to expression ',' expression {add_command(cPUTCHAR,NULL);} - | tCLEAR tSCREEN {add_command(cCLEARSCR,NULL);} - | tWAIT expression {add_command(cWAIT,NULL);} - | tBELL {add_command(cBELL,NULL);} - | tINKEY {create_pushdbl(-1);create_function(fINKEY);add_command(cPOP,NULL);} - | tINKEY '(' ')' {create_pushdbl(-1);create_function(fINKEY);add_command(cPOP,NULL);} - | tINKEY '(' expression ')' {create_function(fINKEY);add_command(cPOP,NULL);} - | tSYSTEM2 '(' string_expression ')' {create_function(fSYSTEM2); - add_command(cPOP,NULL);} - | tPOKE string_expression ',' string_expression {create_poke('s');} - | tPOKE string_expression ',' expression {create_poke('d');} - | tPOKE hashed_number ',' string_expression {create_poke('S');} - | tPOKE hashed_number ',' expression {create_poke('D');} - | tEND {add_command(cEND,NULL);} - | tEXIT {create_pushdbl(0);add_command(cEXIT,NULL);} - | tEXIT expression {add_command(cEXIT,NULL);} - | tDOCU {create_docu($1);} - | tBIND string_expression {add_command(cBIND,NULL);} - ; - -/* -clear_fill_clause: * empty * {drawmode=0;} - | tCLEAR {drawmode=dmCLEAR;} - | tFILL {drawmode=dmFILL;} - | tCLEAR tFILL {drawmode=dmFILL+dmCLEAR;} - | tFILL tCLEAR {drawmode=dmFILL+dmCLEAR;} - ;*/ - - -string_assignment: tSTRSYM tEQU string_expression {add_command(cPOPSTRSYM,dotify($1,FALSE));} - | tMID '(' string_scalar_or_array ',' expression ',' expression ')' tEQU string_expression {create_changestring(fMID);} - | tMID '(' string_scalar_or_array ',' expression ')' tEQU string_expression {create_changestring(fMID2);} - | tLEFT '(' string_scalar_or_array ',' expression ')' tEQU string_expression {create_changestring(fLEFT);} - | tRIGHT '(' string_scalar_or_array ',' expression ')' tEQU string_expression {create_changestring(fRIGHT);} - | stringfunction_or_array tEQU string_expression {create_doarray(dotify($1,FALSE),ASSIGNSTRINGARRAY);} - ; - -to: ',' - | tTO - ; - -open_clause: tOPEN hashed_number ',' string_expression ',' string_expression {create_myopen(OPEN_HAS_STREAM+OPEN_HAS_MODE);} - | tOPEN hashed_number ',' string_expression {create_myopen(OPEN_HAS_STREAM);} -/* | tOPEN hashed_number ',' tPRINTER {create_myopen(OPEN_HAS_STREAM+OPEN_PRINTER);} */ - | tOPEN string_expression tFOR tREADING tAS hashed_number {add_command(cSWAP,NULL);create_pushstr("r");create_myopen(OPEN_HAS_STREAM+OPEN_HAS_MODE);} - | tOPEN string_expression tFOR tWRITING tAS hashed_number {add_command(cSWAP,NULL);create_pushstr("w");create_myopen(OPEN_HAS_STREAM+OPEN_HAS_MODE);} - ; - -seek_clause: tSEEK hashed_number ',' expression {add_command(cSEEK,NULL);} - | tSEEK hashed_number ',' expression ',' string_expression {add_command(cSEEK2,NULL);} - ; - -string_scalar_or_array: tSTRSYM {add_command(cPUSHSTRPTR,dotify($1,FALSE));} - | tSTRSYM '(' call_list ')' {create_doarray(dotify($1,FALSE),GETSTRINGPOINTER);} - ; - -string_expression: tSTRSYM {add_command(cPUSHSTRSYM,dotify($1,FALSE));} - | string_function - | stringfunction_or_array {add_command(cSTRINGFUNCTION_OR_ARRAY,$1);} - | tSTRING {if ($1==NULL) {error(ERROR,"String not terminated");create_pushstr("");} else {create_pushstr($1);}} - | string_expression '+' string_expression {add_command(cCONCAT,NULL);} - | '(' string_expression ')' - ; - -string_function: tLEFT '(' string_expression ',' expression ')' {create_function(fLEFT);} - | tRIGHT '(' string_expression ',' expression ')' {create_function(fRIGHT);} - | tMID '(' string_expression ',' expression ',' expression ')' {create_function(fMID);} - | tMID '(' string_expression ',' expression ')' {create_function(fMID2);} - | tSTR '(' expression ')' {create_function(fSTR);} - | tSTR '(' expression ',' string_expression ')' {create_function(fSTR2);} - | tSTR '(' expression ',' string_expression ',' string_expression ')' {create_function(fSTR3);} - | tINKEY {create_pushdbl(-1);create_function(fINKEY);} - | tINKEY '(' ')' {create_pushdbl(-1);create_function(fINKEY);} - | tINKEY '(' expression ')' {create_function(fINKEY);} - | tCHR '(' expression ')' {create_function(fCHR);} - | tUPPER '(' string_expression ')' {create_function(fUPPER);} - | tLOWER '(' string_expression ')' {create_function(fLOWER);} - | tLTRIM '(' string_expression ')' {create_function(fLTRIM);} - | tRTRIM '(' string_expression ')' {create_function(fRTRIM);} - | tTRIM '(' string_expression ')' {create_function(fTRIM);} - | tSYSTEM '(' string_expression ')' {create_function(fSYSTEM);} - | tDATE {create_function(fDATE);} - | tDATE '(' ')' {create_function(fDATE);} - | tTIME {create_function(fTIME);} - | tTIME '(' ')' {create_function(fTIME);} - | tPEEK2 '(' string_expression ')' {create_function(fPEEK2);} - | tPEEK2 '(' string_expression ',' string_expression ')' {create_function(fPEEK3);} - | tTOKENALT '(' string_scalar_or_array ',' string_expression ')' {add_command(cTOKENALT2,NULL);} - | tTOKENALT '(' string_scalar_or_array ')' {add_command(cTOKENALT,NULL);} - | tSPLITALT '(' string_scalar_or_array ',' string_expression ')' {add_command(cSPLITALT2,NULL);} - | tSPLITALT '(' string_scalar_or_array ')' {add_command(cSPLITALT,NULL);} - | tGETCHAR '(' expression ',' expression to expression ',' expression ')' {create_function(fGETCHAR);} - | tHEX '(' expression ')' {create_function(fHEX);} - | tBIN '(' expression ')' {create_function(fBIN);} - | tEXECUTE2 '(' call_list ')' {create_execute(1);add_command(cSWAP,NULL);add_command(cPOP,NULL);} - | tMESSAGE {create_function(fMESSAGE);} - | tMESSAGE '(' ')' {create_function(fMESSAGE);} - | tMOUSE tMESSAGE {create_function(fMOUSEMOVE);} - | tMOUSE tMESSAGE '(' ')' {create_function(fMOUSEMOVE);} - | tTRANSLATE '(' string_expression ')' {create_function(fTRANSLATE);} - | tMENU tTRANSLATE '(' string_expression ')' {create_function(fMENUTRANSLATE);} - | tTEXTEDIT tGET string_expression {create_function(fTEXTGET);} - | tTEXTEDIT tGET string_expression ',' expression {create_function(fTEXTGET3);} - | tTEXTEDIT tGET string_expression ',' string_expression {create_function(fTEXTGET6);} - | tTEXTCONTROL tGET string_expression {create_function(fTEXTCONTROLGET);} - | tFILEPANEL string_expression ',' string_expression ',' string_expression {create_function(fLOAD);} - | tFILEPANEL string_expression ',' string_expression ',' string_expression ',' string_expression {create_function(fSAVE);} - | tMOUSE tMESSAGE string_expression {create_function(fMOUSE);} - //| tMOUSE tMESSAGE '(' string_expression ')' {create_function(fMOUSE);} - | tKEYBOARD tMESSAGE string_expression {create_function(fKEYBOARD);} - //| tKEYBOARD tMESSAGE '(' string_expression ')' {create_function(fKEYBOARD);} - | tCLIPBOARD tPASTE {create_function(fCLIPBOARDPASTE);} - | tCOLUMNBOX tGET string_expression ',' expression ',' expression {create_function(fCOLUMNBOXGET);} - | tCALENDAR tGET string_expression {create_function(fCALENDAR);} - | tLISTBOX tGET string_expression ',' expression {create_function(fLISTBOXGET);} - | tTREEBOX tGET string_expression ',' expression {create_function(fTREEBOXGET);} - | tPOPUPMENU coordinates ',' string_expression ',' string_expression {create_function(fPOPUPMENU);} - | tDROPBOX tGET string_expression ',' expression {create_function(fDROPBOXGET);} - | tDRAW tGET string_expression {create_function(fDRAWGET3);} - | tATTRIBUTE tGET string_expression ',' string_expression {create_function(fATTRIBUTEGET1);} - ; - -assignment: tSYMBOL tEQU expression {add_command(cPOPDBLSYM,dotify($1,FALSE));} - | function_or_array tEQU expression {create_doarray($1,ASSIGNARRAY);} - ; - -expression: expression tOR {add_command(cORSHORT,NULL);pushlabel();} expression {poplabel();create_boole('|');} - | expression tAND {add_command(cANDSHORT,NULL);pushlabel();} expression {poplabel();create_boole('&');} - | tNOT expression {create_boole('!');} - | expression tEQU expression {create_dblrelop('=');} - | expression tNEQ expression {create_dblrelop('!');} - | expression tLTN expression {create_dblrelop('<');} - | expression tLEQ expression {create_dblrelop('{');} - | expression tGTN expression {create_dblrelop('>');} - | expression tGEQ expression {create_dblrelop('}');} - | tMYEOF '(' hashed_number ')' {add_command(cTESTEOF,NULL);} - | tGLOB '(' string_expression ',' string_expression ')' {add_command(cGLOB,NULL);} - | number {create_pushdbl($1);} - | tARDIM '(' arrayref ')' {add_command(cARDIM,"");} - | tARDIM '(' string_arrayref ')' {add_command(cARDIM,"");} - | tARSIZE '(' arrayref ',' expression ')' {add_command(cARSIZE,"");} - | tARSIZE '(' string_arrayref ',' expression ')' {add_command(cARSIZE,"");} - | function_or_array {add_command(cFUNCTION_OR_ARRAY,$1);} - | tSYMBOL {add_command(cPUSHDBLSYM,dotify($1,FALSE));} - | expression '+' expression {create_dblbin('+');} - | expression '-' expression {create_dblbin('-');} - | expression '*' expression {create_dblbin('*');} - | expression '/' expression {create_dblbin('/');} - | expression tPOW expression {create_dblbin('^');} - | '-' expression %prec UMINUS {add_command(cNEGATE,NULL);} - | string_expression tEQU string_expression {create_strrelop('=');} - | string_expression tNEQ string_expression {create_strrelop('!');} - | string_expression tLTN string_expression {create_strrelop('<');} - | string_expression tLEQ string_expression {create_strrelop('{');} - | string_expression tGTN string_expression {create_strrelop('>');} - | string_expression tGEQ string_expression {create_strrelop('}');} - | function - | '(' expression ')' - ; - -arrayref: tSYMBOL '(' ')' {create_pusharrayref(dotify($1,FALSE),stNUMBERARRAYREF);} - ; - -string_arrayref: tSTRSYM '(' ')' {create_pusharrayref(dotify($1,FALSE),stSTRINGARRAYREF);} - ; - -coordinates: expression ',' expression - ; - -function: tSIN '(' expression ')' {create_function(fSIN);} - | tASIN '(' expression ')' {create_function(fASIN);} - | tCOS '(' expression ')' {create_function(fCOS);} - | tACOS '(' expression ')' {create_function(fACOS);} - | tTAN '(' expression ')' {create_function(fTAN);} - | tATAN '(' expression ')' {create_function(fATAN);} - | tATAN '(' expression ',' expression ')' {create_function(fATAN2);} - | tEXP '(' expression ')' {create_function(fEXP);} - | tLOG '(' expression ')' {create_function(fLOG);} - | tLOG '(' expression ',' expression ')' {create_function(fLOG2);} - | tSQRT '(' expression ')' {create_function(fSQRT);} - | tSQR '(' expression ')' {create_function(fSQR);} - | tINT '(' expression ')' {create_function(fINT);} - | tFRAC '(' expression ')' {create_function(fFRAC);} - | tABS '(' expression ')' {create_function(fABS);} - | tSIG '(' expression ')' {create_function(fSIG);} - | tMOD '(' expression ',' expression ')' {create_function(fMOD);} - | tRAN '(' expression ')' {create_function(fRAN);} - | tRAN '(' ')' {create_function(fRAN2);} - | tMIN '(' expression ',' expression ')' {create_function(fMIN);} - | tMAX '(' expression ',' expression ')' {create_function(fMAX);} - | tLEN '(' string_expression ')' {create_function(fLEN);} - | tVAL '(' string_expression ')' {create_function(fVAL);} - | tASC '(' string_expression ')' {create_function(fASC);} - | tDEC '(' string_expression ')' {create_function(fDEC);} - | tDEC '(' string_expression ',' expression ')' {create_function(fDEC2);} - | tINSTR '(' string_expression ',' string_expression ')' {if (check_compat) error(WARNING,"instr() has changed in version 2.712"); create_function(fINSTR);} - | tINSTR '(' string_expression ',' string_expression ',' expression ')' {create_function(fINSTR2);} - | tRINSTR '(' string_expression ',' string_expression ')' {create_function(fRINSTR);} - | tRINSTR '(' string_expression ',' string_expression ',' expression ')' {create_function(fRINSTR2);} - | tSYSTEM2 '(' string_expression ')' {create_function(fSYSTEM2);} - | tPEEK '(' hashed_number ')' {create_function(fPEEK4);} - | tPEEK '(' string_expression ')' {create_function(fPEEK);} -/* - | tMOUSEX '(' string_expression ')' {create_function(fMOUSEX);} - | tMOUSEX {create_pushstr("");create_function(fMOUSEX);} - | tMOUSEX '(' ')' {create_pushstr("");create_function(fMOUSEX);} - | tMOUSEY '(' string_expression ')' {create_function(fMOUSEY);} - | tMOUSEY {create_pushstr("");create_function(fMOUSEY);} - | tMOUSEY '(' ')' {create_pushstr("");create_function(fMOUSEY);} - | tMOUSEB '(' string_expression ')' {create_function(fMOUSEB);} - | tMOUSEB {create_pushstr("");create_function(fMOUSEB);} - | tMOUSEB '(' ')' {create_pushstr("");create_function(fMOUSEB);} - | tMOUSEMOD '(' string_expression ')' {create_function(fMOUSEMOD);} - | tMOUSEMOD {create_pushstr("");create_function(fMOUSEMOD);} - | tMOUSEMOD '(' ')' {create_pushstr("");create_function(fMOUSEMOD);}*/ - | tAND '(' expression ',' expression ')' {create_function(fAND);} - | tOR '(' expression ',' expression ')' {create_function(fOR);} - | tEOR '(' expression ',' expression ')' {create_function(fEOR);} - | tTELL '(' hashed_number ')' {create_function(fTELL);} - | tTOKEN '(' string_expression ',' string_arrayref ',' string_expression ')' {add_command(cTOKEN2,NULL);} - | tTOKEN '(' string_expression ',' string_arrayref ')' {add_command(cTOKEN,NULL);} - | tSPLIT '(' string_expression ',' string_arrayref ',' string_expression ')' {add_command(cSPLIT2,NULL);} - | tSPLIT '(' string_expression ',' string_arrayref ')' {add_command(cSPLIT,NULL);} - | tEXECUTE '(' call_list ')' {create_execute(0);add_command(cSWAP,NULL);add_command(cPOP,NULL);} - | tOPEN '(' string_expression ')' {create_myopen(0);} - | tOPEN '(' string_expression ',' string_expression ')' {create_myopen(OPEN_HAS_MODE);} - | tOPEN '(' hashed_number ',' string_expression ')' {create_myopen(OPEN_HAS_STREAM);} - | tOPEN '(' hashed_number ',' string_expression ',' string_expression ')' {create_myopen(OPEN_HAS_STREAM+OPEN_HAS_MODE);} - | tDRAW tIMAGE expression ',' expression ',' string_expression ',' string_expression {create_function(fDRAWIMAGE);} - | tDRAW tIMAGE coordinates to coordinates ',' string_expression ',' string_expression {create_function(fDRAWIMAGE2);} - | tSVG coordinates to coordinates ',' string_expression ',' string_expression {create_function(fDRAWSVG);} - | tWINDOW tCOUNT {create_function(fNUMWINDOWS);} - // | tISMOUSEIN '(' string_expression ')' {create_function(fISMOUSEIN);} - | tISMOUSEIN string_expression {create_function(fISMOUSEIN);} - | tCOLUMNBOX tCOUNT string_expression {create_function(fCOLUMNBOXCOUNT);} - | tWINDOW tGETNUM string_expression ',' string_expression {create_function(fWINDOWGET);} - | tVIEW tGETNUM string_expression ',' string_expression {create_function(fVIEWGET);} - | tALERT string_expression ',' string_expression ',' string_expression ',' string_expression ',' string_expression {create_function(fALERT);} - | tLISTBOX tCOUNT string_expression {create_function(fLISTBOXCOUNT);} - | tTREEBOX tCOUNT string_expression {create_function(fTREEBOXCOUNT);} - | tSCROLLBAR tGETNUM string_expression ',' string_expression {create_function(fSCROLLBARGET);} - | tSPLITVIEW tGETNUM string_expression ',' string_expression {create_function(fSPLITVIEWGET);} - | tSTACKVIEW tGETNUM string_expression {create_function(fSTACKVIEWGET);} - | tTABVIEW tGETNUM string_expression {create_function(fTABVIEWGET);} - | tSPINCONTROL tGETNUM string_expression {create_function(fSPINCONTROLGET);} - | tDROPBOX tCOUNT string_expression {create_function(fDROPBOXCOUNT);} - | tSLIDER tGETNUM string_expression {create_function(fSLIDERGET);} - | tCOLORCONTROL tGETNUM string_expression ',' string_expression {create_function(fCOLORCONTROLGET);} - | tTEXTEDIT tGETNUM string_expression ',' string_expression {create_function(fTEXTGET2);} - | tTEXTEDIT tGETNUM string_expression ',' string_expression ',' expression {create_function(fTEXTGET4);} - | tTEXTEDIT tGETNUM string_expression ',' string_expression ',' string_expression {create_function(fTEXTGET5);} - | tDRAW tGETNUM string_expression ',' string_expression ',' string_expression {create_function(fDRAWGET1);} - | tDRAW tGETNUM string_expression ',' string_expression {create_function(fDRAWGET2);} - | tDRAW tGETNUM coordinates ',' string_expression ',' string_expression {create_function(fDRAWGET4);} - | tNUMMESSAGE tMSEND string_expression ',' string_expression {create_function(fMESSAGESEND);} - | tTHREAD tREMOVE string_expression ',' expression {create_function(fTHREADKILL);} - | tTHREAD tGETNUM string_expression ',' string_expression {create_function(fTHREADGET);} - | tPRINTER string_expression ',' string_expression ',' string_expression {create_function(fPRINTER);} - | tSOUND tPLAY string_expression {create_function(fSOUND);} - | tMEDIASOUND tPLAY string_expression {create_function(fMEDIASOUND);} - | tISCOMPUTERON {create_function(fISCOMPUTERON);} - | tLISTBOX tGETNUM string_expression {create_function(fLISTBOXGETNUM);} - | tDROPBOX tGETNUM string_expression {create_function(fDROPBOXGETNUM);} - | tTREEBOX tGETNUM string_expression {create_function(fTREEBOXGETNUM);} - | tCOLUMNBOX tGETNUM string_expression {create_function(fCOLUMNBOXGETNUM);} - | tTREEBOX tGETNUM string_expression ',' string_expression ',' expression {create_function(fTREEBOXGETOPT);} - | tBITMAP tSAVE string_expression ',' string_expression ',' string_expression {create_function(fBITMAPSAVE);} - | tBITMAP tIMAGE string_expression ',' string_expression {create_function(fBITMAPLOAD);} - | tBITMAP tGETNUM string_expression ',' string_expression {create_function(fBITMAPGET);} - | tBITMAP tCOLOUR expression ',' expression ',' string_expression ',' string_expression {create_function(fBITMAPCOLOR);} - | tATTRIBUTE tGETNUM string_expression ',' string_expression {create_function(fATTRIBUTEGET2);} - ; - -const: number {$$=$1;} - | '+' number {$$=$2;} - | '-' number {$$=-$2;} - ; - -number: tFNUM {$$=$1;} - | tDIGITS {$$=strtod($1,NULL);} - ; - -symbol_or_lineno: tDIGITS {$$=my_strdup(dotify($1,FALSE));} - | tSYMBOL {$$=my_strdup(dotify($1,FALSE));} - ; - -dimlist: tSYMBOL '(' call_list ')' {create_dim(dotify($1,FALSE),'D');} - | dimlist ',' tSYMBOL '(' call_list ')' {create_dim(dotify($3,FALSE),'D');} - | tSTRSYM '(' call_list ')' {create_dim(dotify($1,FALSE),'S');} - | dimlist ',' tSTRSYM '(' call_list ')' {create_dim(dotify($3,FALSE),'S');} - ; - -function_or_array: tSYMBOL '(' call_list ')' {$$=my_strdup(dotify($1,FALSE));} - ; - -stringfunction_or_array: tSTRSYM '(' call_list ')' {$$=my_strdup(dotify($1,FALSE));} - ; - -call_list: {add_command(cPUSHFREE,NULL);} calls - ; - -calls: /* empty */ - | call_item - | calls ',' call_item - ; - -call_item: string_expression - | expression - ; - -function_definition: export tSUB {missing_endsub++;missing_endsub_line=mylineno;pushlabel();report_missing(WARNING,"do not define a function in a loop or an if-statement");if (function_type!=ftNONE) {error(ERROR,"nested functions not allowed");YYABORT;}} - function_name {if (exported) create_sublink($4); create_label($4,cUSER_FUNCTION); - add_command(cPUSHSYMLIST,NULL);add_command(cCLEARREFS,NULL);firstref=lastref=lastcmd; - create_numparam();} - '(' paramlist ')' {create_require(stFREE);add_command(cPOP,NULL);} - statement_list - endsub {add_command(cCLEARREFS,NULL);lastcmd->nextref=firstref;add_command(cPOPSYMLIST,NULL);create_retval(ftNONE,function_type);function_type=ftNONE;add_command(cRET_FROM_FUN,NULL);lastref=NULL;create_endfunction();poplabel();} - ; - -endsub: tEOPROG {if (missing_endsub) {sprintf(string,"%d end-sub(s) are missing (last at line %d)",missing_endsub,missing_endsub_line);error(ERROR,string);} YYABORT;} - | tENDSUB {missing_endsub--;} - ; - -function_name: tSYMBOL {function_type=ftNUMBER;current_function=my_strdup(dotify($1,FALSE));$$=my_strdup(dotify($1,FALSE));} - | tSTRSYM {function_type=ftSTRING;current_function=my_strdup(dotify($1,FALSE));$$=my_strdup(dotify($1,FALSE));} - ; - -export: /* empty */ {exported=FALSE;} - | tEXPORT {exported=TRUE;} - | tRUNTIME_CREATED_SUB {exported=FALSE;} - | tRUNTIME_CREATED_SUB tEXPORT {exported=TRUE;} - ; - -local_list: local_item - | local_list ',' local_item - ; - -local_item: tSYMBOL {create_makelocal(dotify($1,FALSE),syNUMBER);} - | tSTRSYM {create_makelocal(dotify($1,FALSE),sySTRING);} - | tSYMBOL '(' call_list ')' {create_makelocal(dotify($1,FALSE),syARRAY);create_dim(dotify($1,FALSE),'d');} - | tSTRSYM '(' call_list ')' {create_makelocal(dotify($1,FALSE),syARRAY);create_dim(dotify($1,FALSE),'s');} - ; - -static_list: static_item - | static_list ',' static_item - ; - -static_item: tSYMBOL {create_makestatic(dotify($1,TRUE),syNUMBER);} - | tSTRSYM {create_makestatic(dotify($1,TRUE),sySTRING);} - | tSYMBOL '(' call_list ')' {create_makestatic(dotify($1,TRUE),syARRAY);create_dim(dotify($1,TRUE),'D');} - | tSTRSYM '(' call_list ')' {create_makestatic(dotify($1,TRUE),syARRAY);create_dim(dotify($1,TRUE),'S');} - ; - -paramlist: /* empty */ - | paramitem - | paramlist ',' paramitem - ; - -paramitem: tSYMBOL {create_require(stNUMBER);create_makelocal(dotify($1,FALSE),syNUMBER);add_command(cPOPDBLSYM,dotify($1,FALSE));} - | tSTRSYM {create_require(stSTRING);create_makelocal(dotify($1,FALSE),sySTRING);add_command(cPOPSTRSYM,dotify($1,FALSE));} - | tSYMBOL '(' ')' {create_require(stNUMBERARRAYREF);create_arraylink(dotify($1,FALSE),stNUMBERARRAYREF);} - | tSTRSYM '(' ')' {create_require(stSTRINGARRAYREF);create_arraylink(dotify($1,FALSE),stSTRINGARRAYREF);} - ; - -for_loop: tFOR {missing_next++;missing_next_line=mylineno;} tSYMBOL tEQU - {pushname(dotify($3,FALSE)); /* will be used by next_symbol to check equality */ - add_command(cRESETSKIPONCE,NULL); - pushgoto();add_command(cCONTINUE_HERE,NULL);create_break_mark(0,1);} - expression tTO expression - step_part { /* pushes another expression */ - add_command(cSKIPONCE,NULL); - pushlabel(); - add_command(cSTARTFOR,NULL); - add_command(cPOPDBLSYM,dotify($3,FALSE)); - poplabel(); - add_command(cPUSHDBLSYM,dotify($3,FALSE)); - add_command(cFORINCREMENT,NULL); - add_command(cPOPDBLSYM,dotify($3,FALSE)); - add_command(cPUSHDBLSYM,dotify($3,FALSE)); - add_command(cFORCHECK,NULL); - add_command(cDECIDE,NULL); - pushlabel();} - statement_list { - swap();popgoto();poplabel();} - next next_symbol {create_break_mark(0,-1);add_command(cBREAK_HERE,NULL);} - ; - -next: tEOPROG {if (missing_next) {sprintf(string,"%d next(s) are missing (last at line %d)",missing_next,missing_next_line);error(ERROR,string);} YYABORT;} - | tNEXT {missing_next--;} - ; - -step_part: {create_pushdbl(1);} /* can be omitted */ - | tSTEP expression - ; - -next_symbol: {pop(stSTRING);}/* can be omitted */ - | tSYMBOL {if (strcmp(pop(stSTRING)->pointer,dotify($1,FALSE))) - {error(ERROR,"'for' and 'next' do not match"); YYABORT;} - } - ; - -switch_number_or_string: tSWITCH {push_switch_id();add_command(cPUSH_SWITCH_MARK,NULL);create_break_mark(0,1); - add_command(cCONTINUE_CORRECTION,NULL);} - number_or_string sep_list case_list default tSEND {create_break_mark(-1,0);add_command(cBREAK_HERE,NULL);create_break_mark(0,-1);add_command(cBREAK_HERE,NULL);create_clean_switch_mark(0,FALSE);pop_switch_id();} - ; - -sep_list: tSEP {if ($1>=0) mylineno+=$1;} - | sep_list tSEP {if ($2>=0) mylineno+=$2;} - ; - -number_or_string: expression - | string_expression - ; - - -case_list: /* empty */ - | case_list tCASE {create_break_mark(-1,0);add_command(cBREAK_HERE,NULL);} number_or_string - {add_command(cSWITCH_COMPARE,NULL);add_command(cDECIDE,NULL);add_command(cMINOR_BREAK,NULL);create_break_mark(1,0);} statement_list {add_command(cNEXT_CASE,NULL);} - ; - - -default: /* empty */ - | tDEFAULT tSEP {if ($2>=0) mylineno+=$2; create_break_mark(-1,0);add_command(cBREAK_HERE,NULL);} statement_list - ; - - -do_loop: tDO {add_command(cCONTINUE_HERE,NULL);create_break_mark(0,1);missing_loop++;missing_loop_line=mylineno;pushgoto();} - statement_list - loop - ; - - -loop: tEOPROG {if (missing_loop) {sprintf(string,"%d loop(s) are missing (last at line %d)",missing_loop,missing_loop_line);error(ERROR,string);} YYABORT;} - | tLOOP {missing_loop--;popgoto();create_break_mark(0,-1);add_command(cBREAK_HERE,NULL);} - ; - - -while_loop: tWHILE {add_command(cCONTINUE_HERE,NULL);create_break_mark(0,1);missing_wend++;missing_wend_line=mylineno;pushgoto();} '(' expression ')' - {add_command(cDECIDE,NULL); - pushlabel();} - statement_list - wend - ; - -wend: tEOPROG {if (missing_wend) {sprintf(string,"%d wend(s) are missing (last at line %d)",missing_wend,missing_wend_line);error(ERROR,string);} YYABORT;} - | tWEND {missing_wend--;swap();popgoto();poplabel();create_break_mark(0,-1);add_command(cBREAK_HERE,NULL);} - ; - - -repeat_loop: tREPEAT {add_command(cCONTINUE_HERE,NULL);create_break_mark(0,1);missing_until++;missing_until_line=mylineno;pushgoto();} - statement_list - until - ; - -until: tEOPROG {if (missing_until) {sprintf(string,"%d until(s) are missing (last at line %d)",missing_until,missing_until_line);error(ERROR,string);} YYABORT;} - | tUNTIL '(' expression ')' - {missing_until--;add_command(cDECIDE,NULL);popgoto();create_break_mark(0,-1);add_command(cBREAK_HERE,NULL);} - ; - -if_clause: tIF expression {add_command(cDECIDE,NULL);storelabel();pushlabel();} - tTHEN {missing_endif++;missing_endif_line=mylineno;} statement_list {swap();matchgoto();swap();poplabel();} - elsif_part - else_part {poplabel();} - endif - ; - -endif: tEOPROG {if (missing_endif) {sprintf(string,"%d endif(s) are missing (last at line %d)",missing_endif,missing_endif_line);error(ERROR,string);} YYABORT;} - | tENDIF {missing_endif--;} - ; - -short_if: tIF expression {fi_pending++;add_command(cDECIDE,NULL);pushlabel();} - statement_list tENDIF {poplabel();} - ; - -else_part: /* can be omitted */ - | tELSE statement_list - ; - -elsif_part: /* can be omitted */ - | tELSIF expression maybe_then - {add_command(cDECIDE,NULL);pushlabel();} - statement_list - {swap();matchgoto();swap();poplabel();} - elsif_part - ; - -maybe_then: /* can be omitted */ - | tTHEN - ; - -inputlist: input - | input ',' {add_command(cCHKPROMPT,NULL);} inputlist - ; - -input: tSYMBOL {create_myread('d',tileol);add_command(cPOPDBLSYM,dotify($1,FALSE));} - | tSYMBOL '(' call_list ')' - {create_myread('d',tileol);create_doarray(dotify($1,FALSE),ASSIGNARRAY);} - | tSTRSYM {create_myread('s',tileol);add_command(cPOPSTRSYM,dotify($1,FALSE));} - | tSTRSYM '(' call_list ')' - {create_myread('s',tileol);create_doarray(dotify($1,FALSE),ASSIGNSTRINGARRAY);} - ; - -readlist: readitem - | readlist ',' readitem - ; - -readitem: tSYMBOL {create_readdata('d');add_command(cPOPDBLSYM,dotify($1,FALSE));} - | tSYMBOL '(' call_list ')' - {create_readdata('d');create_doarray(dotify($1,FALSE),ASSIGNARRAY);} - | tSTRSYM {create_readdata('s');add_command(cPOPSTRSYM,dotify($1,FALSE));} - | tSTRSYM '(' call_list ')' - {create_readdata('s');create_doarray(dotify($1,FALSE),ASSIGNSTRINGARRAY);} - ; - -datalist: tSTRING {create_strdata($1);} - | const {create_dbldata($1);} - | datalist ',' tSTRING {create_strdata($3);} - | datalist ',' const {create_dbldata($3);} - ; - -printlist: /* possible empty */ - | expression using - | printlist ',' expression using - | string_expression {create_print('s');} - | printlist ',' string_expression {create_print('s');} - ; - -using: {create_print('d');} /* possible empty */ - | tUSING string_expression {create_print('u');} - | tUSING '(' string_expression ',' string_expression ')' {create_print('U');} - ; - -inputbody: '#' tSYMBOL {add_command(cPUSHDBLSYM,dotify($2,FALSE));create_pps(cPUSHSTREAM,1);} inputlist {create_pps(cPOPSTREAM,0);} - | '#' tDIGITS {create_pushdbl(atoi($2));create_pps(cPUSHSTREAM,1);} inputlist {create_pps(cPOPSTREAM,0);} - | '#' '(' expression ')' {create_pps(cPUSHSTREAM,1);} inputlist {create_pps(cPOPSTREAM,0);} - | tAT '(' expression ',' expression ')' {add_command(cMOVE,NULL);create_pushdbl(STDIO_STREAM);create_pps(cPUSHSTREAM,1);} prompt inputlist {create_pps(cPOPSTREAM,0);} - | {create_pushdbl(STDIO_STREAM);create_pps(cPUSHSTREAM,1);} prompt inputlist {create_pps(cPOPSTREAM,0);} - ; - -prompt: /* empty */ {create_pushstr("?");create_print('s');} - | tSTRING {create_pushstr($1);create_print('s');} - ; - -printintro: /* may be empty */ {create_pushdbl(STDIO_STREAM);create_pps(cPUSHSTREAM,0);} - | '#' tSYMBOL {add_command(cPUSHDBLSYM,dotify($2,FALSE));create_pps(cPUSHSTREAM,0);} - | '#' tDIGITS {create_pushdbl(atoi($2));create_pps(cPUSHSTREAM,0);} - | '#' '(' expression ')' {create_pps(cPUSHSTREAM,0);} - | tREVERSE {create_colour(1);create_pushdbl(STDIO_STREAM);create_pps(cPUSHSTREAM,0);} - | tCOLOUR '(' string_expression ')' {create_colour(2);create_pushdbl(STDIO_STREAM);create_pps(cPUSHSTREAM,0);} - | tCOLOUR '(' string_expression ',' string_expression ')' {create_colour(3);create_pushdbl(STDIO_STREAM);create_pps(cPUSHSTREAM,0);} - | tAT '(' expression ',' expression ')' {add_command(cMOVE,NULL);create_pushdbl(STDIO_STREAM);create_pps(cPUSHSTREAM,0);} - | tREVERSE tAT '(' expression ',' expression ')' {add_command(cMOVE,NULL);create_colour(1);create_pushdbl(STDIO_STREAM);create_pps(cPUSHSTREAM,0);} - | tCOLOUR '(' string_expression ')' tAT '(' expression ',' expression ')' {add_command(cMOVE,NULL);create_colour(2);create_pushdbl(STDIO_STREAM);create_pps(cPUSHSTREAM,0);} - | tCOLOUR '(' string_expression ',' string_expression ')' tAT '(' expression ',' expression ')' {add_command(cMOVE,NULL);create_colour(3);create_pushdbl(STDIO_STREAM);create_pps(cPUSHSTREAM,0);} - | tAT '(' expression ',' expression ')' tREVERSE {create_colour(1);create_pushdbl(STDIO_STREAM);create_pps(cPUSHSTREAM,0);add_command(cMOVE,NULL);} - | tAT '(' expression ',' expression ')' tCOLOUR '(' string_expression ')' {create_colour(2);create_pushdbl(STDIO_STREAM);create_pps(cPUSHSTREAM,0);add_command(cMOVE,NULL);} - | tAT '(' expression ',' expression ')' tCOLOUR '(' string_expression ',' string_expression ')' {create_colour(3);create_pushdbl(STDIO_STREAM);create_pps(cPUSHSTREAM,0);add_command(cMOVE,NULL);} - ; - -hashed_number: '#' expression - | expression; - -goto_list: symbol_or_lineno {create_goto((function_type!=ftNONE)?dotify($1,TRUE):$1);add_command(cFINDNOP,NULL);} - | goto_list ',' symbol_or_lineno {create_goto((function_type!=ftNONE)?dotify($3,TRUE):$3);add_command(cFINDNOP,NULL);} - ; - -gosub_list: symbol_or_lineno {create_gosub((function_type!=ftNONE)?dotify($1,TRUE):$1);add_command(cFINDNOP,NULL);} - | gosub_list ',' symbol_or_lineno {create_gosub((function_type!=ftNONE)?dotify($3,TRUE):$3);add_command(cFINDNOP,NULL);} - ; - diff --git a/src/yabasic.flex b/src/yabasic.flex deleted file mode 100644 index e74b317..0000000 --- a/src/yabasic.flex +++ /dev/null @@ -1,562 +0,0 @@ -%{ -/* - - YABASIC --- a simple Basic Interpreter - written by Marc-Oliver Ihm 1995-2004 - homepage: www.yabasic.de - - FLEX part - - This file is part of yabasic and may be copied only - under the terms of either the Artistic License or - the GNU General Public License (GPL), both of which - can be found at www.yabasic.de - -*/ - -#include -#undef WINDOWS - -#include "bison.h" /* get tokens from BISON */ -#ifndef YABASIC_INCLUDED -#include "yabasic.h" /* definitions of yabasic */ -#endif -extern int main_lineno; /* defined in yabasic.bison: line number of main file */ -extern int mylineno; /* defined in yabasic.bison: line number of main file */ -int import_lib(char *); /* import library */ - -#define MAX_INCLUDE_DEPTH 5 -#define MAX_INCLUDE_NUMBER 100 -static YY_BUFFER_STATE include_stack[MAX_INCLUDE_DEPTH]; /* stack for included libraries */ -int include_stack_ptr; /* current position in libfile_stack */ -struct libfile_name *libfile_stack[MAX_INCLUDE_DEPTH]; /* stack for library file names */ -int libfile_chain_length=0; /* length of libfile_chain */ -struct libfile_name *libfile_chain[MAX_INCLUDE_NUMBER]; /* list of all library file names */ -struct libfile_name *currlib; /* current libfile as relevant to bison */ -int inlib; /* true, while in library */ -int fi_pending=0; /* true, if within a short if */ -int flex_line=0; /* line number counted in flex */ -%} - -WS [ \t\f\r\v] -NAME ([A-Za-z_][A-za-z0-9_]*\.[A-Za-z_][A-za-z0-9_]*)|([A-Za-z_][A-za-z0-9_]*) - -%option noyywrap -%x PRELNO -%x PASTLNO -%x IMPORT -%x IMPORT_DONE - -%% -<> { - if (--include_stack_ptr<0) { - return tEOPROG; - } else { - if (!is_bound) { - yy_delete_buffer(YY_CURRENT_BUFFER); - yy_switch_to_buffer(include_stack[include_stack_ptr]); - } - flex_line+=yylval.sep=-1; - return tSEP; - } -} - -{WS}+ {BEGIN(INITIAL);} /* ignore whitespace */ - -^{WS}*/[0-9]+ {BEGIN(PRELNO);return tLABEL;} -[0-9]+ { - BEGIN(PASTLNO); - yylval.symbol=(char *)my_strdup(yytext); - return tSYMBOL; -} -.* {BEGIN(INITIAL);flex_line+=yylval.sep=0;yyless(0);return tSEP;} -\n {if (fi_pending) {fi_pending--;yyless(0);return tENDIF;}BEGIN(INITIAL);flex_line+=yylval.sep=1;return tSEP;} - -\n\n {if (fi_pending) {fi_pending--;yyless(0);return tENDIF;}if (interactive && !inlib) {return tEOPROG;} else {flex_line+=yylval.sep=2;return tSEP;}} -\n {if (fi_pending) {fi_pending--;yyless(0);return tENDIF;}flex_line+=yylval.sep=1;return tSEP;} -: {if (fi_pending && check_compat) error_with_line(WARNING,"short-if has changed in version 2.71",flex_line);flex_line+=yylval.sep=0;return tSEP;} - -REM{WS}+.* {flex_line+=yylval.sep=0;return tSEP;} /* comments span 'til end of line */ -\/\/.* {flex_line+=yylval.sep=0;return tSEP;} /* comments span 'til end of line */ -REM\n {if (fi_pending) {fi_pending--;yyless(0);return tENDIF;}flex_line+=yylval.sep=1;return tSEP;} -REM {yymore();} - -IMPORT {BEGIN(IMPORT);} -{WS}+{NAME} {if (!import_lib(yytext)) return 0;BEGIN(IMPORT_DONE);return tIMPORT;} -(.|\n) {if (yytext[0]=='\n' && fi_pending) {fi_pending--;yyless(0);return tENDIF;}BEGIN(INITIAL);yyless(0);flex_line+=yylval.sep=0;return tSEP;} - -((DOCU|DOC|DOCUMENTATION)({WS}+.*)?) { - char *where=strpbrk(yytext," \t\r\f\v"); - yylval.docu=(char *)my_strdup(where ? where+1 : NULL); - return tDOCU; -} - -^#.*\n {flex_line+=yylval.sep=1;return tSEP;} /* '#' as first character may introduce comments too */ -^'.*\n {flex_line+=yylval.sep=1;return tSEP;} /* ' as first character may introduce comments too */ - -EXECUTE return tEXECUTE; -"EXECUTE$" return tEXECUTE2; -COMPILE return tCOMPILE; -RUNTIME_CREATED_SUB return tRUNTIME_CREATED_SUB; -END{WS}+SUB return tENDSUB; -END{WS}+IF return tENDIF; -END-IF return tENDIF; -END{WS}+WHILE return tWEND; -END-WHILE return tWEND; -END{WS}+SWITCH return tSEND; -END-SWITCH return tSEND; -END{WS}+"SWITCH$" return tSEND; -END-"SWITCH$" return tSEND; -EXPORT return tEXPORT; -ERROR return tERROR; -FOR return tFOR; -BREAK return tBREAK; -SWITCH return tSWITCH; -CASE return tCASE; -DEFAULT return tDEFAULT; -LOOP return tLOOP; -DO return tDO; -TO return tTO; -AS return tAS; -READING return tREADING; -WRITING return tWRITING; -STEP return tSTEP; -NEXT return tNEXT; -WHILE return tWHILE; -WEND return tWEND; -REPEAT return tREPEAT; -UNTIL return tUNTIL; -GOTO return tGOTO; -GOSUB return tGOSUB; -SUB return tSUB; -SUBROUTINE return tSUB; -LOCAL return tLOCAL; -STATIC return tSTATIC; -ON return tON; -INTERRUPT return tINTERRUPT; -CONTINUE return tCONTINUE; -LABEL return tLABEL; -IF return tIF; -THEN return tTHEN; -ELSE return tELSE; -ELSIF return tELSIF; -ELSEIF return tELSIF; -ENDIF return tENDIF; -FI return tENDIF; -OPEN return tOPEN; -CLOSE return tCLOSE; -SEEK return tSEEK; -TELL return tTELL; -PRINT return tPRINT; -USING return tUSING; -REVERSE return tREVERSE; -COLOR return tCOLOUR; -COLOUR return tCOLOUR; -\? return tPRINT; -INPUT return tINPUT; -RETURN return tRETURN; -DIM return tDIM; -REDIM return tDIM; -END return tEND; -EXIT return tEXIT; -READ return tREAD; -DATA return tDATA; -RESTORE return tRESTORE; -AND return tAND; -OR return tOR; -NOT return tNOT; -EOR return tEOR; -XOR return tEOR; -WINDOW return tWINDOW; -PRINTER return tPRINTER; -SETUP return tSETUP; -PUTSCREEN return tPUTCHAR; -"GETSCREEN$" return tGETCHAR; -NEW return tNEW; -WAIT return tWAIT; -PAUSE return tWAIT; -SLEEP return tWAIT; -BELL return tBELL; -BEEP return tBELL; -LET return tLET; -ARRAYDIM return tARDIM; -ARRAYDIMENSION return tARDIM; -ARRAYSIZE return tARSIZE; -NUMPARAM(S)?({WS}*\({WS}*\))? {yylval.symbol=(char *)my_strdup("numparams"); return tSYMBOL;} -BIND return tBIND; -SET return tSET; - -LOCALIZE return tLOCALIZE; -BUTTON return tBUTTON; -ALERT return tALERT; -MENU return tMENU; -CHECKBOX return tCHECKBOX; -RADIOBUTTON return tRADIOBUTTON; -TEXTCONTROL return tTEXTCONTROL; -LISTBOX return tLISTBOX; -DROPBOX return tDROPBOX; -ADD return tADD; -REMOVE return tREMOVE; -TEXT return tTEXT; -RECT return tRECT; -DRAW return tDRAW; -FLUSH return tFLUSH; -FILEPANEL return tFILEPANEL; -LAYOUT return tLAYOUT; -TEXTEDIT return tTEXTEDIT; -COUNT return tCOUNT; -VIEW return tVIEW; -BOXVIEW return tBOXVIEW; -TABVIEW return tTABVIEW; -ELLIPSE return tELLIPSE; -DOT return tDOT; -LINE return tLINE; -CURVE return tCURVE; -CIRCLE return tCIRCLE; -CLEAR return tCLEAR; -TEXT return tTEXT; -RECT return tRECT; -SLIDER return tSLIDER; -OPTION return tOPTION; -DROPZONE return tDROPZONE; -COLORCONTROL return tCOLORCONTROL; -TREEBOX return tTREEBOX; -SORT return tSORT; -TOOLTIP return tTOOLTIP; -TOOLTIPNEW return tTOOLTIPNEW; -COLUMNBOX return tCOLUMNBOX; -COLUMN return tCOLUMN; -CLIPBOARD return tCLIPBOARD; -COPY return tCOPY; -SUBMENU return tSUBMENU; -KEYBOARD return tKEYBOARD; -SELECT return tSELECT; -CALENDAR return tCALENDAR; -SCROLLBAR return tSCROLLBAR; -COLLAPSE return tCOLLAPSE; -EXPAND return tEXPAND; -SOUND return tSOUND; -MEDIASOUND return tMEDIASOUND; -PLAY return tPLAY; -STOP return tSTOP; -SPLITVIEW return tSPLITVIEW; -STACKVIEW return tSTACKVIEW; -TEXTURL return tTEXTURL; -SPINCONTROL return tSPINCONTROL; -POPUPMENU return tPOPUPMENU; -SEND return tMSEND; -MESSAGE return tNUMMESSAGE; -THREAD return tTHREAD; -BITMAP return tBITMAP; -CANVAS return tCANVAS; -SHORTCUT return tSHORTCUT; -SAVE return tSAVE; -ISCOMPUTERON return tISCOMPUTERON; -SCREENSHOT return tSCREENSHOT; -STATUSBAR return tSTATUSBAR; -LAUNCH return tLAUNCH; -ATTRIBUTE return tATTRIBUTE; - -"PASTE$" return tPASTE; -IMAGE return tIMAGE; -SVG return tSVG; -"MESSAGE$" return tMESSAGE; -"TRANSLATE$" return tTRANSLATE; -"GET$" return tGET; -MOUSE return tMOUSE; -ISMOUSEIN return tISMOUSEIN; -GET return tGETNUM; - -SIN return tSIN; -ASIN return tASIN; -COS return tCOS; -ACOS return tACOS; -TAN return tTAN; -ATAN return tATAN; -EXP return tEXP; -LOG return tLOG; -SQRT return tSQRT; -SQR return tSQR; -INT return tINT; -FRAC return tFRAC; -ABS return tABS; -SIG return tSIG; -MOD return tMOD; -RAN return tRAN; -MIN return tMIN; -MAX return tMAX; -"LEFT$" return tLEFT; -"RIGHT$" return tRIGHT; -"MID$" return tMID; -"LOWER$" return tLOWER; -"UPPER$" return tUPPER; -"LTRIM$" return tLTRIM; -"RTRIM$" return tRTRIM; -"TRIM$" return tTRIM; -INSTR return tINSTR; -RINSTR return tRINSTR; -LEN return tLEN; -VAL return tVAL; -EOF return tMYEOF; -"STR$" return tSTR; -"INKEY$" return tINKEY; -"CHR$" return tCHR; -ASC return tASC; -"HEX$" return tHEX; -"BIN$" return tBIN; -DEC return tDEC; -AT return tAT; -@ return tAT; -SCREEN return tSCREEN; -"SYSTEM$" return tSYSTEM; -SYSTEM return tSYSTEM2; -"DATE$" return tDATE; -"TIME$" return tTIME; -PEEK return tPEEK; -"PEEK$" return tPEEK2; -POKE return tPOKE; -TOKEN return tTOKEN; -"TOKEN$" return tTOKENALT; -SPLIT return tSPLIT; -"SPLIT$" return tSPLITALT; -GLOB return tGLOB; -"^" return tPOW; -"**" return tPOW; - -"<>" return tNEQ; -"<=" return tLEQ; -">=" return tGEQ; -"=" return tEQU; -"<" return tLTN; -">" return tGTN; -"!" return tNOT; - -[-+*/:(),.;] {return yytext[0];} - -[0-9]+ { - yylval.digits=(char *)my_strdup(yytext); - return tDIGITS; -} - -(([0-9]+|([0-9]*\.[0-9]*))([eE][-+]?[0-9]+)?) { - { double d; - sscanf(yytext,"%lg",&d); - yylval.fnum=d; - return tFNUM; - } -} - -pi {yylval.fnum=3.1415926535897932;return tFNUM;} -euler {yylval.fnum=2.7182818284590452;return tFNUM;} -TRUE {yylval.fnum=1; return tFNUM;} -FALSE {yylval.fnum=0; return tFNUM;} - -{NAME} { - yylval.symbol=(char *)my_strdup(yytext); - return tSYMBOL; -} - - /* Symbols with a trailing $-sign are treated special */ -{NAME}\$ { - yylval.symbol=(char *)my_strdup(yytext); - return tSTRSYM; -} - -\"[^"]*(\"|\n) { - int cnt; - if (yytext[yyleng-1]=='\n' && fi_pending) {fi_pending--;yyless(0);return tENDIF;} - if (yytext[yyleng-1]=='\n') { - yylval.string=NULL; - return tSTRING; - } - for(cnt=0;yytext[yyleng-cnt-2]=='\\';cnt++) ; - if (cnt%2) { - yyless(yyleng-1); - yymore(); - } else { - yylval.string=(char *)my_strdup(yytext+1); - *(yylval.string+yyleng-2)='\0'; - replace(yylval.string); - return tSTRING; - } -} - - -. {if (isprint(yytext[0])) return yytext[0]; else return ' ';} - -%% -void yyerror(char *msg) -{ - int i,j; - - sprintf(string,"%s at %n",msg,&j); - if (*yytext=='\n' || *yytext=='\0') { - sprintf(string+j,"end of line"); - } else { - i=0; - string[j++]='\"'; - while(yytext[i]) { - if (isprint(yytext[i])) string[j++]=yytext[i++]; - else { - sprintf(string+j,"0x%02x",yytext[i]); - j+=4; - break; - } - } - string[j++]='\"'; - string[j]='\0'; - } - error(ERROR,string); - return; -} - - -void open_main(FILE *file,char *explicit,char *main_file_name) /* open main file */ -{ - include_stack_ptr=0; - - if (explicit) - include_stack[include_stack_ptr]=yy_scan_string(explicit); - else - include_stack[include_stack_ptr]=yy_create_buffer(file,YY_BUF_SIZE); - libfile_stack[include_stack_ptr]=new_file(main_file_name,"main"); - libfile_chain[libfile_chain_length++]=libfile_stack[include_stack_ptr]; - if (!explicit) yy_switch_to_buffer(include_stack[include_stack_ptr]); - currlib=libfile_stack[0]; - inlib=FALSE; - - return; -} - -void open_string(char *cmd) /* open string with commands */ -{ - yy_switch_to_buffer(yy_scan_string(cmd)); -} - - -int import_lib(char *name) /* import library */ -{ - char *full; - static int end_of_import=FALSE; - - if (!*name) name=pop(stSTRING)->pointer; - while(isspace(*name)) name++; - - if (!strcmp(name,"__END_OF_IMPORT")) end_of_import=TRUE; - if (end_of_import) return TRUE; - - /* start line numbers anew */ - libfile_stack[include_stack_ptr]->lineno=mylineno; - - include_stack_ptr++; - if (include_stack_ptr>=MAX_INCLUDE_DEPTH) { - sprintf(string,"Could not import '%s': nested too deep",name); - error(ERROR,string); - return FALSE; - } - - if (is_bound) { - full=name; - } else { - yyin=open_library(name,&full,FALSE); - if (!yyin) return FALSE; - yy_switch_to_buffer(yy_create_buffer(yyin,YY_BUF_SIZE)); - include_stack[include_stack_ptr]=YY_CURRENT_BUFFER; - } - libfile_stack[include_stack_ptr]=new_file(full,NULL); - libfile_chain[libfile_chain_length++]=libfile_stack[include_stack_ptr]; - if (libfile_chain_length>=MAX_INCLUDE_NUMBER) { - sprintf(string,"Cannot import more than %d libraries",MAX_INCLUDE_NUMBER); - error(ERROR,string); - return FALSE; - } - if (!libfile_stack[include_stack_ptr]) { - sprintf(string,"library '%s' has already been imported",full); - error(ERROR,string); - return FALSE; - } - - if (infolevel>=NOTE && !is_bound) { - sprintf(string,"importing from file '%s'",full); - error(NOTE,string); - } - return TRUE; -} - - -FILE *open_library(char *name,char **fullreturn,int without) /* search and open a library */ -{ - static char full[200]; - char unquoted[200]; - char *p; - FILE *lib; - int i; - char *trail; - - if (fullreturn) *fullreturn=full; - - for(p=name;strchr(" \"'`",*p);p++) if (!*p) break; - strncpy(unquoted,p,200); - for(;!strchr(" \"'`",*p);p++) if (!*p) break; - if (*p) unquoted[p-name-2]='\0'; - name=unquoted; - if (strchr(name,'.')) { - sprintf(string,"library name '%s' contains '.'",name); - error(ERROR,string); - return NULL; - } - if (!strcmp(name,"main")) { - if (is_bound) return NULL; - error(ERROR,"invalid library name 'main'"); - return NULL; - } - - /* search local */ - trail=".yab"; - for(i=0;i<2;i++) { - strcpy(full,name); - if (!strchr(full,'.')) strcat(full,trail); - lib=fopen(full,"r"); - if (lib) return lib; - trail=""; - if (!without) break; - } - - /* search in global location */ - trail=".yab"; - for(i=0;i<2;i++) { - strcpy(full,library_path); - if (full[0] && !strchr("\\/",full[strlen(full)-1])) { -#ifdef UNIX - strcat(full,"/"); -#else - strcat(full,"\\"); -#endif - } - strcat(full,name); - if (!strchr(full,'.')) strcat(full,trail); - lib=fopen(full,"r"); - if (lib) return lib; - trail=""; - if (!without) break; - } - - sprintf(string,"couldn't open library '%s'",full); - error(ERROR,string); - return NULL; -} - - -void switchlib(void) /* switch library, called by bison */ -{ - if (include_stack_ptr<0) return; - if (infolevel>=DEBUG) { - sprintf(string,"switching from '%s' to '%s'",currlib->s,libfile_stack[include_stack_ptr]->s); - error(DEBUG,string); - } - currlib=libfile_stack[include_stack_ptr]; - mylineno=currlib->lineno; - inlib=(include_stack_ptr>0); -} - - diff --git a/src/yabasic.h b/src/yabasic.h deleted file mode 100644 index 471529e..0000000 --- a/src/yabasic.h +++ /dev/null @@ -1,888 +0,0 @@ -/* - - YABASIC --- a simple Basic Interpreter - written by Marc-Oliver Ihm 1995-2004 - homepage: www.yabasic.de - - yabasic.h --- function prototypes and global variables - - This file is part of yabasic and may be copied only - under the terms of either the Artistic License or - the GNU General Public License (GPL), both of which - can be found at www.yabasic.de - -*/ - - -#define YABLICENSE \ -"\n"\ -" Yab may only be copied under the terms of the Artistic \n"\ -" License which can be found at yab-interpreter.sourceforge.net. \n"\ -"\n"\ -" The Artistic License gives you the right to use and distribute \n"\ -" yab in a more-or-less customary fashion, plus the right to make \n"\ -" reasonable modifications and distribute (or even sell) such a \n"\ -" modified version under a different name. \n"\ -" However, the original author and copyright holder still reserves \n"\ -" himself some sort of artistic control over the development \n"\ -" of yab itself. \n"\ - - - -#define YABASIC_INCLUDED - -/* ------------- defines ---------------- */ - -/* - Define one and only one of the following symbols, depending on your - System: - - UNIX: uses some UNIX-features and X11 - - WINDOWS: uses WIN32-features - Define UNIX and BEOS for a BeOS build -*/ - -#if defined(UNIX) && defined(WINDOWS) -UNIX and WINDOWS are defined at once; check your compiler settings -#endif - - -/* ------------- includes ---------------- */ - -#include "global.h" -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef WINDOWS -#include -#include -#include -#define ARCHITECTURE "windows" -#ifdef __LCC__ /* fix for lccwin32 */ -#include -#endif -#endif - -#include "YabInterface.h" - - -#ifdef UNIX -#define ARCHITECTURE UNIX_ARCHITECTURE -#ifdef HAS_STRING_HEADER -#include -#elif HAS_STRINGS_HEADER -#include -#endif - -#include -#include - -#ifndef BEOS - #include - #include - #include - #include - #define XK_LATIN1 - #define XK_MISCELLANY - #include -#endif - -#include -#include -#ifdef BUILD_NCURSES -#include -// #else -// #ifdef HAVE_CURSES_HEADER -// #include -// #endif -#endif -#ifndef KEY_MAX -#define KEY_MAX 0777 -#endif -#endif - -#ifndef FOPEN_MAX -#define FOPEN_MAX 24 -#endif - -#include -#include - -#ifdef UNIX -#ifndef LIBRARY_PATH -#define LIBRARY_PATH "/boot/home/config/settings/yab" -#endif -#endif - -#define OPEN_HAS_STREAM 1 -#define OPEN_HAS_MODE 2 -#define OPEN_PRINTER 8 -#define STDIO_STREAM 1234 - -/* -------- variables needed in all files and defined in ... -------- */ - -/* main.c */ -extern struct command *current; /* currently executed command */ -extern struct command *cmdroot; /* first command */ -extern struct command *cmdhead; /* next command */ -extern struct command *lastcmd; /* last command */ -extern int infolevel; /* controls issuing of error messages */ -extern int errorlevel; /* highest level of error message seen til now */ -extern int interactive; /* true, if commands come from stdin */ -extern char *progname; /* name of yabasic-program */ -extern char *explanation[]; /* explanations of commands */ -extern char **yabargv; /* arguments for yabasic */ -extern int yabargc; /* number of arguments in yabargv */ -extern time_t compilation_start,compilation_end,execution_end; -extern char *string; /* for trash-strings */ -extern char *errorstring; /* for error-strings */ -extern int errorcode; /* error-codes */ -extern char library_path[]; /* full path to search libraries */ -extern int program_state; /* state of program */ -extern int check_compat; /* true, if compatibility should be checked */ -extern int is_bound; /* true, if this executable is bound */ -extern char* appdirectory; /* appdir */ - - -/* io.c */ -extern FILE *streams[]; /* file streams */ -extern int read_controls; /* TRUE, if input should read control characters */ -extern int stream_modes[]; /* modes for streams */ -extern int curinized; /* true, if curses has been initialized */ -extern int badstream(int,int); /* test for valid stream id */ -void myseek(struct command *); /* reposition file pointer */ -#ifdef WINDOWS -extern HANDLE wantkey; /* mutex to signal key desire */ -extern HANDLE gotkey; /* mutex to signal key reception */ -extern HANDLE wthandle; /* handle of win thread */ -extern HANDLE kthandle; /* handle of inkey thread */ -extern DWORD ktid; /* id of inkey thread */ -extern int LINES; /* number of lines on screen */ -extern int COLS; /* number of columns on screen */ -extern HANDLE ConsoleInput; /* handle for console input */ -extern HANDLE ConsoleOutput; /* handle for console output */ -#else -extern int winpid; /* pid of process waiting for window keys */ -extern int termpid; /* pid of process waiting for terminal keys */ -#ifndef BUILD_NCURSES -extern int LINES; /* number of lines on screen */ -extern int COLS; /* number of columns on screen */ -#endif -#endif - -/* graphic.c */ -/* printing and plotting */ -extern int print_to_file; /* print to file ? */ -#ifdef WINDOWS -extern HFONT printerfont; /* handle of printer-font */ -extern HDC printer; /* handle of printer */ -#endif -extern FILE *printerfile; /* file to print on */ -extern double xoff; /* offset for x-mapping */ -extern double xinc; /* inclination of x-mapping */ -extern double yoff; /* offset for y-mapping */ -extern double yinc; /* inclination for y-mapping */ -/* window coordinates */ -extern int winopened; /* flag if window is open already */ -extern char *winorigin; /* e.g. "lt","rc"; defines origin of grafic window */ -extern int winwidth,winheight; /* size of window */ -/* mouse, console and keyboard */ -/* extern int mousex,mousey,mouseb,mousemod; */ /* last know mouse coordinates */ -extern char *ykey[]; /* keys returned by inkey */ -/* text and font */ -extern char *getreg(char *); /* get defaults from Registry */ -extern char *text_align; /* specifies alignement of text */ -extern int fontheight; /* height of font in pixel */ -#ifdef WINDOWS -extern HFONT myfont; /* handle of font for screen */ -#endif -/* general window stuff */ -extern char *foreground; -extern char *background; -extern char *geometry; -extern char *displayname; -extern char *font; -extern int drawmode; -#ifdef WINDOWS -extern HWND window; /* handle of my window */ -extern HANDLE mainthread; /* handle to main thread */ -extern HANDLE this_instance; -extern WNDCLASS myclass; /* window class for my program */ -extern char *my_class; -extern BOOL Commandline; /* true if launched from command line */ -#else -extern int backpid; /* pid of process waiting for redraw events */ -#endif - - -/* function.c */ -extern struct command *datapointer; /* current location for read-command */ - -/* symbol.c */ -extern struct stackentry *stackroot; /* first element of stack */ -extern struct stackentry *stackhead; /* last element of stack */ -extern void query_array(struct command *cmd); /* query array */ -extern struct command *lastref; /* last command in UDS referencing a symbol */ -extern struct command *firstref; /* first command in UDS referencing a symbol */ -extern int labelcount; /* count self-generated labels */ - - -/* flex.c */ -extern int include_stack_ptr; /* Lex buffer for any imported file */ -extern struct libfile_name *libfile_stack[]; /* stack for library file names */ -extern struct libfile_name *currlib; /* current libfile as relevant to bison */ -extern int inlib; /* true, while in library */ -extern int fi_pending; /* true, if within a short if */ -extern int libfile_chain_length; /* length of libfile_chain */ -extern struct libfile_name *libfile_chain[]; /* list of all library file names */ - - -/* bison.c */ -extern char *current_function; /* name of currently parsed function */ -extern int yydebug; -extern int missing_endif; -extern int missing_endif_line; -extern int in_loop; - -/*-------------------------- defs and undefs ------------------------*/ - -/* undef symbols */ -#undef FATAL -#undef ERROR -#undef WARNING -#undef NOTE -#undef DEBUG -#undef DUMP - -#if !defined(TRUE) -#define TRUE (1==1) -#endif - -#ifndef FALSE -#define FALSE (1!=1) -#endif - -/* I've been told, that some symbols are missing under SunOs ... */ -#ifndef RAND_MAX -#define RAND_MAX 32767 -#endif - -/* length of buffers for system() and input */ -#define SYSBUFFLEN 100 -#define INBUFFLEN 10000 - - -/* ---------------------- enum types ------------------------------- */ - -enum error { /* error levels */ - FATAL,ERROR,INFO,DUMP,WARNING,NOTE,DEBUG -}; - -enum endreasons { /* ways to end the program */ - erNONE,erERROR,erREQUEST,erEOF -}; - -enum streammodes { /* ways to access a stream */ - smCLOSED=0,smREAD=1,smWRITE=2,smPRINT=4,smREADWRITE=3 -}; - -enum functions { /* functions in yabasic (sorted by number of arguments) */ - fRAN2,fDATE,fTIME,fMESSAGE,fNUMWINDOWS,fCLIPBOARDPASTE,fISCOMPUTERON,fMOUSEMOVE, - fZEROARGS, - fINKEY,/* fMOUSEX,fMOUSEY,fMOUSEB,fMOUSEMOD,*/ - fSIN,fASIN,fCOS,fACOS,fTAN, - fATAN,fSYSTEM,fSYSTEM2,fPEEK,fPEEK2,fPEEK4,fTELL,fEXP,fLOG,fLEN,fSTR, - fSQRT,fSQR,fFRAC,fABS,fSIG,fRAN,fINT,fVAL,fASC,fHEX,fBIN,fDEC,fUPPER,fLOWER, - fLTRIM,fRTRIM,fTRIM,fCHR,fTRANSLATE,fMENUTRANSLATE,fMOUSE, fISMOUSEIN,fTEXTCONTROLGET, - fKEYBOARD,fCOLUMNBOXCOUNT, fCALENDAR, fLISTBOXCOUNT, fTREEBOXCOUNT, fSTACKVIEWGET, - fSPINCONTROLGET, fDROPBOXCOUNT, fSLIDERGET, fTEXTGET, fDRAWGET3, fTABVIEWGET, - fLISTBOXGETNUM, fDROPBOXGETNUM, fCOLUMNBOXGETNUM, fTREEBOXGETNUM, fSOUND, fMEDIASOUND, - fONEARGS, - fDEC2,fATAN2,fLEFT,fAND,fOR,fEOR,fLOG2, - fRIGHT,fINSTR,fRINSTR,fSTR2,fMOD,fMIN,fMAX,fPEEK3,fMID2,fWINDOWGET, fVIEWGET /* vasper */, - fLISTBOXGET, fTREEBOXGET, fSCROLLBARGET, fSPLITVIEWGET, fDROPBOXGET, fCOLORCONTROLGET, - fTEXTGET2,fTEXTGET6,fDRAWGET2, fTEXTGET3, fMESSAGESEND, fTHREADKILL, fTHREADGET, fBITMAPGET, - fBITMAPLOAD, fATTRIBUTEGET1, fATTRIBUTEGET2, - fTWOARGS, - fMID,fINSTR2,fRINSTR2,fSTR3,fCOLUMNBOXGET,fDRAWGET1,fTEXTGET4,fTEXTGET5,fPRINTER, - fLOAD, fTREEBOXGETOPT,fBITMAPSAVE, - fTHREEARGS, - fGETCHAR,fDRAWIMAGE,fPOPUPMENU,fSAVE,fDRAWGET4,fBITMAPCOLOR, - fFOURARGS, - fALERT, - fFIVEARGS, - fDRAWSVG,fDRAWIMAGE2, - fSIXARGS -}; - -enum arraymode { /* type of array access */ - CALLARRAY,ASSIGNARRAY,CALLSTRINGARRAY,ASSIGNSTRINGARRAY,GETSTRINGPOINTER -}; - -enum drawing_modes { /* various ways to draw */ - dmNORMAL=0,dmCLEAR=1,dmFILL=2 -}; - -enum cmd_type { /* type of command */ - cFIRST_COMMAND, /* no command, just marks start of list */ - - cLABEL,cSUBLINK,cGOTO,cQGOTO,cGOSUB,cQGOSUB,cRETURN, /* flow control */ - cEND,cEXIT,cBIND,cDECIDE,cSKIPPER,cNOP,cFINDNOP,cEXCEPTION,cANDSHORT, - cORSHORT,cSKIPONCE,cRESETSKIPONCE,cCOMPILE,cEXECUTE,cEXECUTE2, - - cDIM,cFUNCTION,cDOARRAY,cARRAYLINK,cPUSHARRAYREF,cCLEARREFS, /* everything with "()" */ - cARDIM,cARSIZE,cTOKEN,cTOKEN2,cTOKENALT,cTOKENALT2, - cSPLIT,cSPLIT2,cSPLITALT,cSPLITALT2, - cSTARTFOR,cFORCHECK,cFORINCREMENT, /* for for-loops */ - - cSWITCH_COMPARE,cNEXT_CASE,cBREAK,cMINOR_BREAK, /* break-continue-switch */ - cCONTINUE,cBREAK_HERE,cCONTINUE_HERE,cCONTINUE_CORRECTION, - cBREAK_MARK,cPUSH_SWITCH_MARK,cCLEAN_SWITCH_MARK, - - cDBLADD,cDBLMIN,cDBLMUL,cDBLDIV,cDBLPOW, /* double operations */ - cNEGATE,cPUSHDBLSYM,cPOP,cPOPDBLSYM,cPUSHDBL, - - cREQUIRE,cPUSHFREE,cMAKELOCAL,cMAKESTATIC,cNUMPARAM, /* functions and procedures */ - cCALL,cQCALL,cPUSHSYMLIST,cPOPSYMLIST,cRET_FROM_FUN, - cUSER_FUNCTION,cRETVAL,cEND_FUNCTION, - cFUNCTION_OR_ARRAY,cSTRINGFUNCTION_OR_ARRAY, - - cPOKE,cPOKEFILE,cSWAP,cDUPLICATE,cDOCU, /* internals */ - - cAND,cOR,cNOT,cLT,cGT,cLE,cGE,cEQ,cNE, /* comparisons */ - cSTREQ,cSTRNE,cSTRLT,cSTRLE,cSTRGT,cSTRGE, - - cPUSHSTRSYM,cPOPSTRSYM,cPUSHSTR,cCONCAT, /* string operations */ - cPUSHSTRPTR,cCHANGESTRING,cGLOB, - - cPRINT,cREAD,cRESTORE,cQRESTORE,cONESTRING, /* i/o operations */ - cREADDATA,cDATA,cOPEN,cCHECKOPEN,cCHECKSEEK,cCLOSE,cPUSHSTREAM,cPOPSTREAM, - cSEEK,cSEEK2,cTESTEOF,cWAIT,cBELL,cMOVE, - cCLEARSCR,cCOLOUR,cCHKPROMPT,cERROR, - - /* - cDOT,cLINE,cCIRCLE,cCLEARWIN, - cOPENPRN,cCLOSEPRN,cMOVEORIGIN,cRECT, - cPUTBIT, */ - - cPUTCHAR, - - cOPENWIN, cCLOSEWIN, cLAYOUT, cWINSET1, cWINSET2, cWINSET3, cWINSET4, /* Be Graphics */ - cBUTTON, cALERT, cMENU, cTEXTCONTROL, cCHECKBOX, cRADIOBUTTON, cWINCLEAR, - cLISTBOX, cDROPBOX, cITEMADD, cITEMDEL, cITEMCLEAR, cLOCALIZE, cLOCALIZE2, cLOCALIZESTOP, cTEXT, cTEXT2, cTEXTALIGN, - cTEXTEDIT, cTEXTADD, cTEXTSET, cTEXTSET2, cTEXTCOLOR1, cTEXTCOLOR2, cTEXTSET3, cTEXTCLEAR, - cVIEW, cBOXVIEW, cBOXVIEWSET, cTAB, cSLIDER1, cSLIDER2, cSLIDER3, cSLIDER4, cSLIDER5, cSLIDER6, - cOPTION1, cOPTION2, cOPTION3, cDROPZONE, cTEXTCONTROL2, cTEXTCONTROL3, cTEXTCONTROL4, cTEXTCONTROL5, - cCOLORCONTROL1, cCOLORCONTROL2, cTREEBOX1, cTREEBOX2, cTREEBOX3, cTREEBOX4, cTREEBOX5, - cBUTTONIMAGE, cCHECKBOXIMAGE, cCHECKBOXSET, cRADIOSET, cTOOLTIP, cTOOLTIPNEW, cTOOLTIPCOLOR, cTREESORT, - cLISTSORT, cFILEBOX, cFILEBOXADD2, cFILEBOXCLEAR, cCOLUMNBOXREMOVE, - cCOLUMNBOXSELECT, cCOLUMNBOXADD, cDROPBOXSELECT, cMENU2, cSUBMENU1, cSUBMENU2, cCLIPBOARDCOPY, - cCOLUMNBOXCOLOR, cPRINTERCONFIG, cCALENDAR, cLISTBOXSELECT, cLISTBOXADD1, cLISTBOXADD2, - cLISTBOXDEL2, cSCROLLBAR, cSCROLLBARSET1, cSCROLLBARSET2, cSCROLLBARSET3, cTREEBOX7, cTREEBOX8, - cTREEBOX9, cTREEBOX10, cTREEBOX11, cSPLITVIEW1, cSPLITVIEW2, cSPLITVIEW3, - cSTACKVIEW1, cSTACKVIEW2, cTEXTURL1, cTEXTURL2, cDRAWSET3, cSPINCONTROL1, cTABSET, cTABDEL, cTABADD, - cSPINCONTROL2, cDROPBOXREMOVE, cDROPBOXCLEAR, cSUBMENU3, cMENU3, cCALENDARSET, - cDOT, cLINE, cCIRCLE, cDRAWTEXT, cDRAWRECT, cTREEBOX12, cOPTION4, cOPTION5, - cDRAWCLEAR, cDRAWSET1, cDRAWSET2, cELLIPSE, cCURVE, /* Drawing */ - cBITMAP, cBITMAPDRAW, cBITMAPDRAW2, cBITMAPGET, cBITMAPGET2, cBITMAPGETICON, cBITMAPDRAG, cBITMAPREMOVE, cCANVAS, /* Bitmaps */ - cSOUNDSTOP, cSOUNDWAIT, cMEDIASOUNDSTOP, /* Sound */ - cTREEBOX13, cDRAWSET4, cSHORTCUT, cMOUSESET, - cSCREENSHOT, cSTATUSBAR, cSTATUSBARSET, cSTATUSBARSET2, cSTATUSBARSET3, cLAUNCH, cRESTORE2, cRESTORE3, - cATTRIBUTE1, cATTRIBUTE2, cATTRIBUTECLEAR, - cLAST_COMMAND /* no command, just marks end of list */ -}; - -enum stackentries { /* different types of stackentries */ - stGOTO,stSTRING,stSTRINGARRAYREF,stNUMBER,stNUMBERARRAYREF,stLABEL,stRETADD,stRETADDCALL,stFREE,stROOT, - stANY,stSTRING_OR_NUMBER,stSTRING_OR_NUMBER_ARRAYREF, /* these will never appear on stack but are used to check with pop */ - stSWITCH_MARK, /* used to clean up stack after switch-statement */ - stSWITCH_STRING,stSWITCH_NUMBER /* only used in switch statement, compares true to every string or number */ -}; - -enum symbols { /* different types of symbols */ - sySTRING,syNUMBER,syFREE,syARRAY -}; - -enum function_type { /* different types of functions */ - ftNONE,ftNUMBER,ftSTRING -}; - -enum addmodes { /* different modes for adding symbols */ - amSEARCH,amSEARCH_PRE,amADD_LOCAL,amADD_GLOBAL,amSEARCH_VERY_LOCAL -}; - -enum states { /* current state of program */ - HATCHED,INITIALIZED,COMPILING,RUNNING,FINISHED -}; - -enum yabkeys { /* recognized special keys */ - kERR,kUP,kDOWN,kLEFT,kRIGHT,kDEL,kINS,kCLEAR,kHOME,kEND, - kF0,kF1,kF2,kF3,kF4,kF5,kF6,kF7,kF8,kF9,kF10,kF11,kF12, - kF13,kF14,kF15,kF16,kF17,kF18,kF19,kF20,kF21,kF22,kF23,kF24, - kBACKSPACE,kSCRNDOWN,kSCRNUP,kENTER,kESC,kTAB,kLASTKEY -}; - -enum searchmodes { /* modes for searching labels */ - smSUB=1,smLINK=2,smLABEL=4,smGLOBAL=8 -}; - -/* ------------- global types ---------------- */ - -struct stackentry { /* one element on stack */ - int type; /* contents of entry */ - struct stackentry *next; - struct stackentry *prev; - void *pointer; /* multiuse ptr */ - double value; /* double value, only one of pointer or value is used */ -}; - -/* - symbols are organized as a stack of lists: for every procedure call - a new list is pushed onto the stack; all local variables of this - function are chained into this list. After return from this procedure, - the whole list is discarded and one element is popped from - the stack. -*/ - -struct symstack { /* stack of symbol lists */ - struct symbol *next_in_list; - struct symstack *next_in_stack; - struct symstack *prev_in_stack; -}; - -struct symbol { /* general symbol; either variable, string */ - int type; - struct symbol *link; /* points to linked symbol, if any */ - struct symbol *next_in_list; /* next symbol in symbollist */ - char *name; /* name of symbol */ - void *pointer; /* pointer to string contents (if any) */ - char *args; /* used to store number of arguments for functions/array */ - double value; -}; - -struct command { /* one interpreter command */ - int type; /* type of command */ - int cnt; /* count of this command */ - struct command *prev; /* link to previous command */ - struct command *next; /* link to next command */ - void *pointer; /* pointer to data */ - void *symbol; /* pointer to symbol (or data within symbol) associated with command */ - struct command *jump; /* pointer to jump destination */ - char *name; /* name of symbol associated with command */ - struct command *nextref; /* next cmd within function referencing a symbol */ - struct command *nextassoc; /* next cmd within within chain of associated commands */ - int args; /* number of arguments for function/array call */ - /* or stream number for open/close */ - int tag; /* char/int to pass some information */ - int line; /* line this command has been created for */ - struct libfile_name *lib; /* associated library */ - int switch_id; /* TRUE, if in switch, FALSE else; used to check gotos */ -}; - -struct array { /* data structure for arrays */ - int bounds[10]; /* index boundaries */ - int dimension; /* dimension of array */ - void *pointer; /* contents of array */ - char type; /* decide between string- ('s') and double-Arrays ('d') */ -}; - -struct buff_chain { /* buffer chain for system-input */ - char buff[SYSBUFFLEN+1]; /* content of buffer */ - int len; /* used length of buff */ - struct buff_chain *next; /* next buffer in chain */ -}; - -struct libfile_name { /* used to store library names */ - char *l; /* long version, including path */ - int llen; /* length of l */ - char *s; /* short version */ - int slen; /* length of s */ - int lineno; /* linenumber within file */ - struct command *datapointer; /* data pointer of this library */ - struct command *firstdata; /* first data-command in library */ - struct libfile_name *next; /* next in chain */ -}; - -/* ------------- function prototypes defined in ... ---------------- */ - -/* main.c */ -void error(int,char *); /* reports an error and possibly exits */ -void error_with_line(int,char *,int); /* reports an error and possibly exits */ -void *my_malloc(unsigned); /* my own version of malloc */ -void my_free(void *); /* free memory */ -char *my_strerror(int); /* return description of error messages */ -struct command *add_command(int,char *); /* get room for new command */ -void signal_handler(int); /* handle various signals */ -char *my_strdup(char *); /* my own version of strdup */ -char *my_strndup(char *,int); /* own version of strndup */ -struct libfile_name *new_file(char *,char *); /* create a new structure for library names */ -char *dotify(char *,int); /* add library name, if not already present */ -char *strip(char *); /* strip off to minimal name */ -void do_error(struct command *); /* issue user defined error */ -void create_docu(char *); /* create command 'docu' */ -extern void add_variables(char *); /* add pi and e to symbol table */ -void compile(void); /* create a subroutine at runtime */ -void create_execute(int); /* create command 'cEXECUTE' */ -void execute(struct command *); /* execute a subroutine */ -int isbound(void); /* check if this interpreter is bound to a program */ - - -/* io.c */ -void checkopen(void); /* check, if open has been sucessfull */ -void create_colour(int); /* create command 'reverse' */ -void colour(struct command *cmd); /* switch reverse-printing */ -void create_print(char); /* create command 'print' */ -void print(struct command *); /* print on screen */ -void create_myread(char,int); /* create command 'read' */ -void myread(struct command *); /* read from file or stdin */ -void create_onestring(char *); /* write string to file */ -void onestring(char *); /* write string to file */ -void chkprompt(void); /* print an intermediate prompt if necessary */ -void create_myopen(int); /* create command 'myopen' */ -void myopen(struct command *); /* open specified file for given name */ -void testeof(struct command *); /* close the specified stream */ -void myclose(); /* close the specified stream */ -void create_pps(int,int); /* create command pushswitch or popswitch */ -void push_switch(struct command *); /* push current stream on stack and switch to new one */ -void pop_switch(void); /* pop current stream from stack and switch to it */ -void mymove(); /* move to specific position on screen */ -void clearscreen(); /* clear entire screen */ -char *inkey(double); /* gets char from keyboard, blocks and doesnt print */ -char *replace(char *); /* replace \n,\a, etc. */ - -/* graphic.c */ -void create_openwin(int); /* create Command 'openwin' */ -void openwin(struct command *, YabInterface* yab); /* open a Window */ -void closewin(struct command *, YabInterface* yab); /* close the window */ -int numwindows(); /* number of windows opened */ -void createbutton(struct command *, YabInterface* yab); /* create a Button */ -int createimage(double x, double y, const char* imagefile, const char* window, YabInterface* yab, int line, const char* libname); /* insert an image*/ -int createimage2(double x1, double y1, double x2, double y2, const char* imagefile, const char* window, YabInterface* yab, int line, const char* libname); /* insert an image*/ -int createsvg(double x1, double y1, double x2, double y2, const char* imagefile, const char* window, YabInterface* yab, int line, const char* libname); /* insert a svg image*/ -int ismousein(const char* view, YabInterface *yab, int line, const char* libname); /* check if mouse is in view */ -char* getmousein(YabInterface *yab, int line, const char* libname); /* check which view the mouse is in */ //vasper -void drawtext(struct command *, YabInterface* yab); /* draw text */ -void drawrect(struct command *, YabInterface* yab); /* draw rectangle */ -void drawclear(struct command *, YabInterface* yab); /* clears canvas */ -void createmenu(struct command *, YabInterface* yab); /* add a menu */ -void createalert(struct command *, YabInterface* yab); /* alert */ -void createtext(struct command *, YabInterface* yab); /* text */ -void text2(struct command *, YabInterface* yab); /* text */ -void textalign(struct command *, YabInterface* yab); /* align text */ -void createtextcontrol(struct command *, YabInterface* yab); /* textcontrol */ -void createcheckbox(struct command *, YabInterface* yab); /* checkbox*/ -void createradiobutton(struct command *, YabInterface* yab); /* radio button */ -void createlistbox(struct command *, YabInterface* yab); /* list box */ -void createdropbox(struct command *, YabInterface* yab); /* drop box */ -void createitem(struct command *, YabInterface* yab); /* item add*/ -void removeitem(struct command *, YabInterface* yab); /* item del*/ -void clearitems(struct command *, YabInterface* yab); /* clears itemlist */ -void localize(); -void localizestop(); -void localize2(struct command *, YabInterface* yab); -void setlayout(struct command *, YabInterface* yab); /* set layout */ -void winset1(struct command *, YabInterface* yab); -void winset2(struct command *, YabInterface* yab); -void winset3(struct command *, YabInterface* yab); -void winset4(struct command *, YabInterface* yab); -void winclear(struct command *, YabInterface* yab); -void textedit(struct command *, YabInterface* yab); -void textadd(struct command *, YabInterface* yab); -void textset(struct command *, YabInterface* yab); -void textset2(struct command *, YabInterface* yab); -void textset3(struct command *, YabInterface* yab); -void textcolor1(struct command *, YabInterface* yab); -void textcolor2(struct command *, YabInterface* yab); -void textclear(struct command *, YabInterface* yab); -char* textget(const char*, YabInterface* yab, int line, const char* libname); -int textget2(const char*, const char*, YabInterface* yab, int line, const char* libname); -char* textget3(const char*, int, YabInterface* yab, int line, const char* libname); -double textget4(const char*, const char*, int, YabInterface* yab, int line, const char* libname); -int textget5(const char*, const char*, const char*, YabInterface* yab, int line, const char* libname); -char* textget6(const char*, const char*, YabInterface *yab, int line, const char* libname); -char* textcontrolget(const char*, YabInterface* yab, int line, const char* libname); -void drawset1(struct command *, YabInterface* yab); -void drawset2(struct command *, YabInterface* yab); -char* getmessages(YabInterface* yab, int line, const char* libname); /* get message string */ -char* getmousemessages(const char* view, YabInterface* yab, int line, const char* libname); /* get mouse message string */ -char* gettranslation(const char*,YabInterface* yab, int line, const char* libname); /* get translation string */ -char* getmenutranslation(const char*,YabInterface* yab, int line, const char* libname); /* get translation string */ -char* getloadfilepanel(const char*, const char*, const char*, YabInterface *yab, int line, const char* libname); /* open a load filepanel */ -char* getsavefilepanel(const char*, const char*, const char*, const char*, YabInterface *yab, int line, const char* libname); /* open a save filepanel */ -void view(struct command *, YabInterface *yab); /* add a view */ -void boxview(struct command *, YabInterface *yab); /* add a boxview */ -void boxviewset(struct command *, YabInterface *yab);/*boxview options*/ -void tab(struct command *, YabInterface *yab); /* add a tab */ -void tabset(struct command *, YabInterface *yab); /* set a tab */ -void tabadd(struct command *, YabInterface *yab); -void tabdel(struct command *, YabInterface *yab); -int tabviewget(const char* tab, YabInterface *yab, int line, const char* libname); /* get a tab */ -void drawdot(struct command *, YabInterface *yab); /* draw a dot */ -void drawline(struct command *, YabInterface *yab); /* draw a line */ -void drawcircle(struct command *, YabInterface *yab); /* draw a circle */ -void drawellipse(struct command *, YabInterface *yab); /* draw a ellipse */ -void drawcurve(struct command *, YabInterface *yab); /* draw a curve */ -void slider1(struct command *, YabInterface *yab); -void slider2(struct command *, YabInterface *yab); -void slider3(struct command *, YabInterface *yab); -void slider4(struct command *, YabInterface *yab); -void slider5(struct command *, YabInterface *yab); -void slider6(struct command *, YabInterface *yab); -void option1(struct command *, YabInterface *yab); -void option2(struct command *, YabInterface *yab); -void option3(struct command *, YabInterface *yab); -void dropzone(struct command *, YabInterface *yab); -void colorcontrol1(struct command *, YabInterface *yab); -void colorcontrol2(struct command *, YabInterface *yab); -void textcontrol2(struct command *, YabInterface *yab); -void textcontrol3(struct command *, YabInterface *yab); -void textcontrol4(struct command *, YabInterface *yab); -void textcontrol5(struct command *, YabInterface *yab); -void treebox1(struct command *, YabInterface *yab); -void treebox2(struct command *, YabInterface *yab); -void treebox3(struct command *, YabInterface *yab); -void treebox4(struct command *, YabInterface *yab); -void treebox5(struct command *, YabInterface *yab); -void treebox7(struct command *, YabInterface *yab); -void treebox8(struct command *, YabInterface *yab); -void treebox9(struct command *, YabInterface *yab); -void treebox10(struct command *, YabInterface *yab); -void treebox11(struct command *, YabInterface *yab); -void buttonimage(struct command *, YabInterface *yab); -void checkboximage(struct command *, YabInterface *yab); -void checkboxset(struct command *, YabInterface *yab); -void radioset(struct command *, YabInterface *yab); -void tooltip(struct command *, YabInterface *yab); -void tooltipnew(struct command *, YabInterface *yab); -void tooltipcolor(struct command *, YabInterface *yab); -void listsort(struct command *, YabInterface *yab); -void treesort(struct command *, YabInterface *yab); -void filebox(struct command *, YabInterface *yab); -void fileboxadd2(struct command *, YabInterface *yab); -void fileboxclear(struct command *, YabInterface *yab); -void columnboxadd(struct command *, YabInterface *yab); -void columnboxremove(struct command *, YabInterface *yab); -void columnboxselect(struct command *, YabInterface *yab); -void columnboxcolor(struct command *, YabInterface *yab); -void dropboxselect(struct command *, YabInterface *yab); -void menu2(struct command *, YabInterface *yab); -void submenu1(struct command *, YabInterface *yab); -void submenu2(struct command *, YabInterface *yab); -void clipboardcopy(struct command *, YabInterface *yab); -void launch(struct command *, YabInterface *yab); -int printer(const char* docname, const char *view, const char* config, YabInterface *yab, int line, const char* libname); -void printerconfig(struct command *, YabInterface *yab); -char* keyboardmessages(const char* view, YabInterface* yab, int line, const char* libname); -char* clipboardpaste(YabInterface* yab, int line, const char* libname); -char* columnboxget(const char* columnbox, int column, int position, YabInterface* yab, int line, const char* libname); -int columnboxcount(const char* columnbox, YabInterface* yab, int line, const char* libname); -int windowgetnum(const char* view, const char *option, YabInterface* yab, int line, const char* libname); -int viewgetnum(const char* view, const char *option, YabInterface* yab, int line, const char* libname); //vasper -int newalert(const char* text, const char* button1, const char* button2, const char* button3, const char* option, YabInterface* yab, int line, const char* libname); -void calendar1(struct command *, YabInterface *yab); -char* calendar2(const char* calendar, YabInterface *yab, int line, const char* libname); -void calendar3(struct command *, YabInterface *yab); -void listboxadd1(struct command *, YabInterface *yab); -void listboxadd2(struct command *, YabInterface *yab); -void listboxselect(struct command *, YabInterface *yab); -void listboxremove(struct command *, YabInterface *yab); -int listboxcount(const char* listbox, YabInterface *yab, int line, const char* libname); -char* treeboxget(const char* treebox, int position, YabInterface *yab, int line, const char* libname); -int treeboxcount(const char* treebox, YabInterface *yab, int line, const char* libname); -char* listboxget(const char* listbox, int position, YabInterface *yab, int line, const char* libname); -void scrollbar(struct command *, YabInterface *yab); -void scrollbarset1(struct command *, YabInterface *yab); -void scrollbarset2(struct command *, YabInterface *yab); -void scrollbarset3(struct command *, YabInterface *yab); -double scrollbarget(const char* scrollbar, const char* option, YabInterface *yab, int line, const char* libname); -void splitview1(struct command *, YabInterface *yab); -void splitview2(struct command *, YabInterface *yab); -void splitview3(struct command *, YabInterface *yab); -double splitviewget(const char* splitview, const char* option, YabInterface *yab, int line, const char* libname); -void stackview1(struct command *, YabInterface *yab); -void stackview2(struct command *, YabInterface *yab); -int stackviewget(const char* stackview, YabInterface *yab, int line, const char* libname); -void texturl1(struct command *, YabInterface *yab); -void texturl2(struct command *, YabInterface *yab); -void drawset3(struct command *, YabInterface *yab); -void spincontrol1(struct command *, YabInterface *yab); -void spincontrol2(struct command *, YabInterface *yab); -int spincontrol(const char* spincontrol, YabInterface *yab, int line, const char* libname); -char* popupmenu(double x, double y, const char* messages, const char* id, YabInterface *yab, int line, const char* libname); -void dropboxremove(struct command *, YabInterface *yab); -void dropboxclear(struct command *, YabInterface *yab); -int dropboxcount(const char* id, YabInterface *yab, int line, const char* libname); -char* dropboxget(const char* id, int position, YabInterface *yab, int line, const char* libname); -int sliderget(const char *slider, YabInterface *yab, int line, const char* libname); -int colorcontrolget(const char* colorcontrol, const char* option, YabInterface *yab, int line, const char* libname); -void submenu3(struct command *, YabInterface *yab); -void menu3(struct command *, YabInterface *yab); -double drawget1(const char*, const char*, const char*, YabInterface *yab, int line, const char* libname); -double drawget2(const char*, const char*, YabInterface *yab, int line, const char* libname); -char* drawget3(const char*, YabInterface *yab, int line, const char* libname); -int drawget4(double, double, const char*, const char*, YabInterface *yab, int line, const char* libname); -void option4(struct command *, YabInterface *yab); -void option5(struct command *, YabInterface *yab); -void treebox12(struct command *, YabInterface *yab); -int messagesend(const char*, const char*, YabInterface *yab, int line, const char* libname); -int threadkill(const char*, int, YabInterface *yab, int line, const char* libname); -int threadget(const char*, const char*, YabInterface *yab, int line, const char* libname); -void bitmap(struct command *, YabInterface *yab); -void bitmapdraw(struct command *, YabInterface *yab); -void bitmapdraw2(struct command *, YabInterface *yab); -void bitmapget(struct command *, YabInterface *yab); -void bitmapget2(struct command *, YabInterface *yab); -void bitmapgeticon(struct command *, YabInterface *yab); -void bitmapdrag(struct command *, YabInterface *yab); -void bitmapremove(struct command *, YabInterface *yab); -void screenshot(struct command *, YabInterface *yab); -void statusbar(struct command *, YabInterface *yab); -void statusbarset(struct command *, YabInterface *yab); -void statusbarset2(struct command *, YabInterface *yab); -void statusbarset3(struct command *, YabInterface *yab); -void canvas(struct command *, YabInterface *yab); -int bitmapsave(const char*, const char*, const char*, YabInterface *yab, int line, const char* libname); -int bitmapload(const char*, const char*, YabInterface *yab, int line, const char* libname); -int bitmapgetnum(const char*, const char*, YabInterface *yab, int line, const char* libname); -int bitmapcolor(double x, double y, const char* id, const char* option, YabInterface *yab, int line, const char* libname); -int listboxgetnum(const char*, YabInterface *yab, int line, const char* libname); -int dropboxgetnum(const char*, YabInterface *yab, int line, const char* libname); -int columnboxgetnum(const char*, YabInterface *yab, int line, const char* libname); -int treeboxgetnum(const char*, YabInterface *yab, int line, const char* libname); -int treeboxgetopt(const char*, const char*, int, YabInterface *yab, int line, const char* libname); -void treebox13(struct command *, YabInterface *yab); -void drawset4(struct command *, YabInterface *yab); -int sound(const char*, YabInterface *yab, int line, const char* libname); -void soundstop(struct command *, YabInterface *yab); -void soundwait(struct command *, YabInterface *yab); -int mediasound(const char*, YabInterface *yab, int line, const char* libname); -void mediasoundstop(struct command *, YabInterface *yab); -void shortcut(struct command *, YabInterface *yab); -int iscomputeron(YabInterface *yab, int line, const char* libname); -void mouseset(struct command *, YabInterface *yab); -void gettermkey(char *); /* read a key from terminal */ -void attribute1(struct command *, YabInterface *yab); -void attributeclear(struct command *, YabInterface *yab); -char* attributeget1(const char*, const char*, YabInterface *yab, int line, const char* libname); -double attributeget2(const char*, const char*, YabInterface *yab, int line, const char* libname); - -/* function.c */ -void create_exception(int); /* create command 'exception' */ -void exception(struct command *); /* change handling of exceptions */ -void create_poke(char); /* create Command 'POKE' */ -void poke(); /* poke in internals */ -void pokefile(struct command *); /* poke into file */ -void create_dblrelop(char); /* create command dblrelop */ -void dblrelop(struct command *); /* compare topmost double-values */ -void concat(void); /* concetenates two strings from stack */ -void create_strrelop(char); /* create command strrelop */ -void strrelop(struct command *); /* compare topmost string-values */ -void create_changestring(int); /* create command 'changestring' */ -void changestring(struct command *); /* changes a string */ -void glob(void); /* check, if pattern globs string */ -void create_boole(char); /* create command boole */ -void boole(struct command *); /* perform and/or/not */ -void create_function(int); /* create command 'function' */ -void function(struct command *, YabInterface* yab); /* performs a function */ -int myformat(char *,double,char *,char *); /* format number */ -void create_restore(char *); /* create command 'restore' */ -void restore(struct command *); /* reset data pointer to given label */ -void create_dbldata(double); /* create command dbldata */ -void create_strdata(char *); /* create command strdata */ -void create_readdata(char); /* create command readdata */ -void readdata(struct command *); /* read data items */ -void mywait(); /* wait given number of seconds */ -void mybell(); /* ring ascii bell */ -void getmousexybm(char *,int *,int *,int *,int *); /* get mouse coordinates */ -void token(struct command *); /* extract token from variable */ -void tokenalt(struct command *); /* extract token from variable with alternate semantics */ - - -/* symbol.c */ -struct array *create_array(int,int); /* create an array */ -void clearrefs(struct command *); /* clear references for commands within function */ -void duplicate(void); /* duplicate topmost element of stack */ -void negate(void); /* negates top of stack */ -void create_require(int); /* create command 'cREQUIRE' */ -void require(struct command *); /* check item on stack has right type */ -void create_makelocal(char *,int); /* create command 'cMAKELOCAL' */ -void create_makestatic(char *,int); /* create command 'cMAKESTATIC' */ -void create_arraylink(char *,int); /* create command 'cARRAYLINK' */ -void create_pusharrayref(char *,int); /* create command 'cPUSHARRAYREF' */ -void pusharrayref(struct command *); /* push an array reference onto stack */ -void arraylink(struct command *); /* link a local symbol to a global array */ -void makestatic(struct command *); /* makes symbol static */ -void makelocal(struct command *); /* makes symbol local */ -void create_numparam(void); /* create command 'cNUMPARAM' */ -void numparam(struct command *); /* count number of function parameters */ -void pushdblsym(struct command *); /* push double symbol onto stack */ -void popdblsym(struct command *); /* pop double from stack */ -void create_pushdbl(double); /* create command 'pushdbl' */ -void pushdbl(struct command *); /* push double onto stack */ -void create_dblbin(char); /* create binary expression calculation */ -void dblbin(struct command *); /* compute with two numbers from stack */ -void pushstrsym(struct command *); /* push string symbol onto stack */ -void popstrsym(struct command *); /* pop string from stack */ -void create_pushstr(char *); /* creates command pushstr */ -void pushstr(struct command *); /* push string onto stack */ -void pushname(char *); /* push a name on stack */ -void pushstrptr(struct command *); /* push string-pointer onto stack */ -void forcheck(void); /* check, if for-loop is done */ -void forincrement(void); /* increment value on stack */ -void startfor(void); /* compute initial value of for-variable */ -void create_goto(char *); /* creates command goto */ -void create_gosub(char *); /* creates command gosub */ -void create_call(char *); /* creates command function call */ -void create_label(char *,int); /* creates command label */ -void create_sublink(char *); /* create link to subroutine */ -void pushgoto(void); /* generate label and push goto on stack */ -void popgoto(void); /* pops a goto and generates the matching command */ -void jump(struct command *); /* jump to specific Label */ -void myreturn(struct command *); /* return from gosub */ -void findnop(); /* used for on_gosub, find trailing nop command */ -void skipper(void); /* used for on_goto/gosub, skip commands */ -void skiponce(struct command *); /* skip next command once */ -void resetskiponce(struct command *); /* find and reset next skip */ -void decide(void); /* skips next command, if not 0 on stack */ -void logical_shortcut(struct command *type); /* shortcut and/or if possible */ -void create_doarray(char *,int); /* creates array-commands */ -void doarray(struct command *); /* call an array */ -void create_dim(char *,char); /* create command 'dim' */ -void dim(struct command *); /* get room for array */ -void pushlabel(void); /* generate goto and push label on stack */ -void poplabel(void); /* pops a label and generates the matching command */ -void storelabel(); /* push label on stack */ -void matchgoto(); /* generate goto matching label on stack */ -void swap(void); /*swap topmost elements on stack */ -struct stackentry *push(void); /* push element on stack and enlarge it*/ -struct stackentry *pop(int); /* pops element to memory */ -struct symbol *get_sym(char *,int,int); /* find and/or add a symbol */ -void link_symbols(struct symbol *,struct symbol *); /* link one symbol to the other */ -void pushsymlist(void); /* push a new list on symbol stack */ -void popsymlist(void); /* pop list of symbols and free symbol contents */ -void dump_sym(); /* dump the stack of lists of symbols */ -void dump_sub(int); /* dump the stack of subroutine calls */ -void create_retval(int,int); /* create command 'cRETVAL' */ -void retval(struct command *); /* check return value of function */ -void create_endfunction(void); /* create command cEND_FUNCTION */ -void function_or_array(struct command *); /* decide whether to do perform function or array */ -struct command *search_label(char *,int); /* search label */ -void reshufflestack(struct stackentry *); /* reorganize stack for function call */ -void push_switch_mark(void); /* push a switch mark */ -void create_clean_switch_mark(int,int); /* add command clean_switch_mark */ -void clean_switch_mark(struct command *); /* pop everything up to (and including) first switch_mark from stack */ -void push_switch_id(void); /* generate a new switch id */ -void pop_switch_id(void); /* get previous switch id */ -int get_switch_depth(void); /* get current depth of switch id stack */ - - -/* flex.c */ -void yyerror(char *); /* yyerror message */ -void open_main(FILE *,char *,char *); /* switch to file */ -void open_string(char *); /* open string with commands */ -FILE *open_library(char *,char **,int); /* search and open a library */ -void switchlib(void); /* switch library, called by bison */