Renamed View.* to BBView.* and Application.* to BBApp.*.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@505 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
8002202d9d
commit
e6b7649c0f
|
@ -1,4 +1,4 @@
|
||||||
#include "Application.h"
|
#include "BBApp.h"
|
||||||
|
|
||||||
BMessage* NewMessage(uint32 what, uint32 data)
|
BMessage* NewMessage(uint32 what, uint32 data)
|
||||||
{
|
{
|
||||||
|
@ -44,7 +44,7 @@ AppWindow::AppWindow(BRect aRect)
|
||||||
// add view
|
// add view
|
||||||
aRect.Set(0, menubar->Bounds().Height()+1, aRect.Width(), aRect.Height());
|
aRect.Set(0, menubar->Bounds().Height()+1, aRect.Width(), aRect.Height());
|
||||||
view = NULL;
|
view = NULL;
|
||||||
AddChild(view = new View(aRect));
|
AddChild(view = new BBView(aRect));
|
||||||
// make window visible
|
// make window visible
|
||||||
Show();
|
Show();
|
||||||
}
|
}
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
#include <AppKit.h>
|
#include <AppKit.h>
|
||||||
#include <InterfaceKit.h>
|
#include <InterfaceKit.h>
|
||||||
#include "View.h"
|
#include "BBView.h"
|
||||||
#include "MsgConsts.h"
|
#include "MsgConsts.h"
|
||||||
|
|
||||||
#define APPLICATION "Application"
|
#define APPLICATION "Application"
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
class AppWindow : public BWindow {
|
class AppWindow : public BWindow {
|
||||||
public:
|
public:
|
||||||
BMenuBar *menubar;
|
BMenuBar *menubar;
|
||||||
View *view;
|
BBView *view;
|
||||||
AppWindow(BRect);
|
AppWindow(BRect);
|
||||||
bool QuitRequested();
|
bool QuitRequested();
|
||||||
void AboutRequested();
|
void AboutRequested();
|
Binary file not shown.
|
@ -1,8 +1,8 @@
|
||||||
#include "BezierBounds.h"
|
#include "BezierBounds.h"
|
||||||
#include "View.h"
|
#include "BBView.h"
|
||||||
#include <InterfaceKit.h>
|
#include <InterfaceKit.h>
|
||||||
|
|
||||||
View::View(BRect rect)
|
BBView::BBView(BRect rect)
|
||||||
: BView(rect, NULL, B_FOLLOW_ALL_SIDES, B_WILL_DRAW | B_FULL_UPDATE_ON_RESIZE | B_SUBPIXEL_PRECISE) {
|
: BView(rect, NULL, B_FOLLOW_ALL_SIDES, B_WILL_DRAW | B_FULL_UPDATE_ON_RESIZE | B_SUBPIXEL_PRECISE) {
|
||||||
//SetViewColor(B_TRANSPARENT_COLOR);
|
//SetViewColor(B_TRANSPARENT_COLOR);
|
||||||
fMode = kStroke;
|
fMode = kStroke;
|
||||||
|
@ -10,7 +10,7 @@ View::View(BRect rect)
|
||||||
fWidth = 16;
|
fWidth = 16;
|
||||||
}
|
}
|
||||||
|
|
||||||
void View::Draw(BRect updateRect) {
|
void BBView::Draw(BRect updateRect) {
|
||||||
if (fMode == kDrawOutline) {
|
if (fMode == kDrawOutline) {
|
||||||
|
|
||||||
} else if (fMode == kStroke) {
|
} else if (fMode == kStroke) {
|
||||||
|
@ -55,7 +55,7 @@ void View::Draw(BRect updateRect) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void View::MouseDown(BPoint point) {
|
void BBView::MouseDown(BPoint point) {
|
||||||
uint32 buttons;
|
uint32 buttons;
|
||||||
GetMouse(&point, &buttons, false);
|
GetMouse(&point, &buttons, false);
|
||||||
|
|
||||||
|
@ -74,18 +74,18 @@ void View::MouseDown(BPoint point) {
|
||||||
Invalidate();
|
Invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
void View::MouseMoved(BPoint point, uint32 transit, const BMessage *message) {
|
void BBView::MouseMoved(BPoint point, uint32 transit, const BMessage *message) {
|
||||||
if (fCurPoint != -1) {
|
if (fCurPoint != -1) {
|
||||||
fPath.AtPut(fCurPoint, point);
|
fPath.AtPut(fCurPoint, point);
|
||||||
Invalidate();
|
Invalidate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void View::MouseUp(BPoint point) {
|
void BBView::MouseUp(BPoint point) {
|
||||||
fCurPoint = -1;
|
fCurPoint = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void View::SetClose(bool close) {
|
void BBView::SetClose(bool close) {
|
||||||
if (close) fPath.Close();
|
if (close) fPath.Close();
|
||||||
else fPath.Open();
|
else fPath.Open();
|
||||||
}
|
}
|
|
@ -4,7 +4,7 @@
|
||||||
#include "SubPath.h"
|
#include "SubPath.h"
|
||||||
#include <View.h>
|
#include <View.h>
|
||||||
|
|
||||||
class View : public BView {
|
class BBView : public BView {
|
||||||
SubPath fPath;
|
SubPath fPath;
|
||||||
enum {
|
enum {
|
||||||
kDrawOutline,
|
kDrawOutline,
|
||||||
|
@ -14,7 +14,7 @@ class View : public BView {
|
||||||
float fWidth;
|
float fWidth;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
View(BRect rect);
|
BBView(BRect rect);
|
||||||
void Draw(BRect updateRect);
|
void Draw(BRect updateRect);
|
||||||
void MouseDown(BPoint point);
|
void MouseDown(BPoint point);
|
||||||
void MouseUp(BPoint point);
|
void MouseUp(BPoint point);
|
|
@ -2,11 +2,11 @@ SubDir OBOS_TOP src tests add-ons print pdf bezierbounds ;
|
||||||
|
|
||||||
SubDirHdrs $(OBOS_TOP) src add-ons print drivers pdf source ;
|
SubDirHdrs $(OBOS_TOP) src add-ons print drivers pdf source ;
|
||||||
|
|
||||||
AddResources BezierBounds : <$(SOURCE_GRIST)>Application.rsrc ;
|
AddResources BezierBounds : BBApp.rsrc ;
|
||||||
|
|
||||||
local sources =
|
local sources =
|
||||||
Application.cpp
|
BBApp.cpp
|
||||||
View.cpp
|
BBView.cpp
|
||||||
BezierBounds.cpp
|
BezierBounds.cpp
|
||||||
SubPath.cpp
|
SubPath.cpp
|
||||||
;
|
;
|
||||||
|
@ -19,10 +19,3 @@ SimpleTest BezierBounds
|
||||||
# Tell Jam where to find these sources:
|
# Tell Jam where to find these sources:
|
||||||
SEARCH on [ FGristFiles SubPath.cpp ]
|
SEARCH on [ FGristFiles SubPath.cpp ]
|
||||||
= [ FDirName $(OBOS_TOP) src add-ons print drivers pdf source ] ;
|
= [ FDirName $(OBOS_TOP) src add-ons print drivers pdf source ] ;
|
||||||
|
|
||||||
# Ugly hack: Prepend the dirs containing Be's Application.h/View.h to the list
|
|
||||||
# of include search dirs. Otherwise they won't be found.
|
|
||||||
# It is certainly a good idea to rename the local files.
|
|
||||||
PrependObjectHdrs $(sources)
|
|
||||||
: /boot/develop/headers/be/app /boot/develop/headers/be/interface ;
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue