Fixed warnings.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20881 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
08a996b87a
commit
d3a12648fc
@ -85,7 +85,7 @@ DiagramBox::draw(BRect updateRect)
|
||||
region.Exclude(&clipping);
|
||||
view()->ConstrainClippingRegion(®ion);
|
||||
drawBox();
|
||||
for (int32 i = 0; i < countItems(); i++) {
|
||||
for (uint32 i = 0; i < countItems(); i++) {
|
||||
DiagramItem *item = itemAt(i);
|
||||
if (region.Intersects(item->frame()))
|
||||
item->draw(item->frame());
|
||||
@ -95,7 +95,7 @@ DiagramBox::draw(BRect updateRect)
|
||||
region.Include(frame());
|
||||
if (view()->getClippingAbove(this, &clipping))
|
||||
region.Exclude(&clipping);
|
||||
for (int32 i = 0; i < countItems(); i++) {
|
||||
for (uint32 i = 0; i < countItems(); i++) {
|
||||
DiagramItem *item = itemAt(i);
|
||||
BRect r;
|
||||
if (region.Intersects(r = item->frame())) {
|
||||
@ -210,7 +210,7 @@ DiagramBox::moveBy(float x, float y, BRegion *wireRegion)
|
||||
if (view()) {
|
||||
view()->PushState();
|
||||
{
|
||||
for (int32 i = 0; i < countItems(); i++) {
|
||||
for (uint32 i = 0; i < countItems(); i++) {
|
||||
DiagramEndPoint *endPoint = dynamic_cast<DiagramEndPoint *>(itemAt(i));
|
||||
if (endPoint)
|
||||
endPoint->moveBy(x, y, wireRegion);
|
||||
@ -243,7 +243,7 @@ DiagramBox::_setOwner(DiagramView *owner)
|
||||
{
|
||||
D_METHOD(("DiagramBox::_setOwner()\n"));
|
||||
m_view = owner;
|
||||
for (int32 i = 0; i < countItems(DiagramItem::M_ENDPOINT); i++) {
|
||||
for (uint32 i = 0; i < countItems(DiagramItem::M_ENDPOINT); i++) {
|
||||
DiagramItem *item = itemAt(i);
|
||||
item->_setOwner(m_view);
|
||||
if (m_view)
|
||||
|
@ -613,25 +613,26 @@ void DiagramView::setBackgroundColor(
|
||||
m_useBackgroundBitmap = false;
|
||||
}
|
||||
|
||||
void DiagramView::setBackgroundBitmap(
|
||||
BBitmap *bitmap)
|
||||
|
||||
void
|
||||
DiagramView::setBackgroundBitmap(BBitmap* bitmap)
|
||||
{
|
||||
D_METHOD(("DiagramView::setBackgroundBitmap()\n"));
|
||||
if (m_backgroundBitmap)
|
||||
{
|
||||
delete m_backgroundBitmap;
|
||||
}
|
||||
|
||||
m_backgroundBitmap = new BBitmap(bitmap);
|
||||
m_useBackgroundBitmap = true;
|
||||
}
|
||||
|
||||
void DiagramView::updateDataRect()
|
||||
|
||||
void
|
||||
DiagramView::updateDataRect()
|
||||
{
|
||||
D_METHOD(("DiagramView::updateDataRect()\n"));
|
||||
// calculate the area in which boxes display
|
||||
m_boxRegion.MakeEmpty();
|
||||
for (int32 i = 0; i < countItems(DiagramItem::M_BOX); i++)
|
||||
{
|
||||
for (uint32 i = 0; i < countItems(DiagramItem::M_BOX); i++) {
|
||||
m_boxRegion.Include(itemAt(i, DiagramItem::M_BOX)->frame());
|
||||
}
|
||||
// adapt the data rect to the new region of boxes
|
||||
@ -642,12 +643,12 @@ void DiagramView::updateDataRect()
|
||||
_updateScrollBars();
|
||||
}
|
||||
|
||||
// -------------------------------------------------------- //
|
||||
// *** internal operations (private)
|
||||
// -------------------------------------------------------- //
|
||||
|
||||
void DiagramView::_beginWireTracking(
|
||||
DiagramEndPoint *startPoint)
|
||||
// #pragma mark - internal operations (private)
|
||||
|
||||
|
||||
void
|
||||
DiagramView::_beginWireTracking(DiagramEndPoint *startPoint)
|
||||
{
|
||||
D_METHOD(("DiagramView::beginWireTracking()\n"));
|
||||
m_draggedWire = createWire(startPoint);
|
||||
@ -687,9 +688,9 @@ void DiagramView::_beginRectTracking(
|
||||
BView::BeginRectTracking(BRect(origin, origin), B_TRACK_RECT_CORNER);
|
||||
}
|
||||
|
||||
void DiagramView::_trackRect(
|
||||
BPoint origin,
|
||||
BPoint current)
|
||||
|
||||
void
|
||||
DiagramView::_trackRect(BPoint origin, BPoint current)
|
||||
{
|
||||
D_METHOD(("DiagramView::trackRect()\n"));
|
||||
bool changed = false;
|
||||
@ -698,29 +699,25 @@ void DiagramView::_trackRect(
|
||||
rect.top = origin.y < current.y ? origin.y : current.y;
|
||||
rect.right = origin.x < current.x ? current.x : origin.x;
|
||||
rect.bottom = origin.y < current.y ? current.y : origin.y;
|
||||
for (int32 i = 0; i < countItems(DiagramItem::M_BOX); i++)
|
||||
{
|
||||
for (uint32 i = 0; i < countItems(DiagramItem::M_BOX); i++) {
|
||||
DiagramBox *box = dynamic_cast<DiagramBox *>(itemAt(i, DiagramItem::M_BOX));
|
||||
if (box)
|
||||
{
|
||||
if (box) {
|
||||
if (rect.Intersects(box->frame()))
|
||||
{
|
||||
changed |= selectItem(box, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
changed |= deselectItem(box);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (changed)
|
||||
{
|
||||
|
||||
if (changed) {
|
||||
sortItems(DiagramItem::M_BOX, &compareSelectionTime);
|
||||
selectionChanged();
|
||||
}
|
||||
}
|
||||
|
||||
void DiagramView::_updateScrollBars()
|
||||
|
||||
void
|
||||
DiagramView::_updateScrollBars()
|
||||
{
|
||||
D_METHOD(("DiagramView::_updateScrollBars()\n"));
|
||||
// fetch the vertical ScrollBar
|
||||
|
@ -7,26 +7,22 @@
|
||||
|
||||
__USE_CORTEX_NAMESPACE
|
||||
|
||||
// ---------------------------------------------------------------- //
|
||||
// ctor/dtor
|
||||
// ---------------------------------------------------------------- //
|
||||
|
||||
MouseTrackingSourceView::MouseTrackingSourceView(
|
||||
BRect frame,
|
||||
const char* pName,
|
||||
uint32 resizeMode,
|
||||
uint32 flags,
|
||||
uint32 trackingFlags) :
|
||||
|
||||
BView(frame, pName, resizeMode, flags),
|
||||
MouseTrackingSourceView::MouseTrackingSourceView(BRect frame, const char* name,
|
||||
uint32 resizeMode, uint32 flags, uint32 trackingFlags)
|
||||
: BView(frame, name, resizeMode, flags),
|
||||
m_pDest(0),
|
||||
m_trackingFlags(trackingFlags),
|
||||
m_bTracking(false),
|
||||
m_pDest(0) {
|
||||
|
||||
// FrameResized(frame.Width(), frame.Height());
|
||||
m_bTracking(false)
|
||||
{
|
||||
//FrameResized(frame.Width(), frame.Height());
|
||||
}
|
||||
|
||||
|
||||
MouseTrackingSourceView::~MouseTrackingSourceView()
|
||||
{
|
||||
}
|
||||
|
||||
MouseTrackingSourceView::~MouseTrackingSourceView() {}
|
||||
|
||||
// get mouse-down point in screen coordinates; returns
|
||||
// B_OK on success, or B_ERROR if no longer tracking
|
||||
|
Loading…
x
Reference in New Issue
Block a user