Patches from John Scipione as part of bug 7052.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40815 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -26,9 +26,10 @@ 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
|
used in advertising or otherwise to promote the sale, use or other dealings in
|
||||||
this Software without prior written authorization from Be Incorporated.
|
this Software without prior written authorization from Be Incorporated.
|
||||||
|
|
||||||
Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered trademarks
|
Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered
|
||||||
of Be Incorporated in the United States and other countries. Other brand product
|
trademarks of Be Incorporated in the United States and other countries. Other
|
||||||
names are registered trademarks or trademarks of their respective holders.
|
brand product names are registered trademarks or trademarks of their respective
|
||||||
|
holders.
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -179,9 +180,10 @@ init_tracking_hook(BMenuItem* item, bool (*hookFunction)(BMenu*, void*),
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
BMenu* windowMenu = item->Submenu();
|
BMenu* windowMenu = item->Submenu();
|
||||||
if (windowMenu)
|
if (windowMenu) {
|
||||||
// have a menu, set the tracking hook
|
// have a menu, set the tracking hook
|
||||||
windowMenu->SetTrackingHook(hookFunction, state);
|
windowMenu->SetTrackingHook(hookFunction, state);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -192,9 +194,9 @@ TBarMenuBar::InitTrackingHook(bool (*hookFunction)(BMenu*, void*),
|
|||||||
BPoint loc;
|
BPoint loc;
|
||||||
uint32 buttons;
|
uint32 buttons;
|
||||||
GetMouse(&loc, &buttons);
|
GetMouse(&loc, &buttons);
|
||||||
// set the hook functions for the two menus
|
// set the hook functions for the two menus
|
||||||
// will always have the be menu
|
// will always have the be menu
|
||||||
// may have the app menu as well (mini mode)
|
// may have the app menu as well (mini mode)
|
||||||
if (fBeMenuItem->Frame().Contains(loc) || both)
|
if (fBeMenuItem->Frame().Contains(loc) || both)
|
||||||
init_tracking_hook(fBeMenuItem, hookFunction, state);
|
init_tracking_hook(fBeMenuItem, hookFunction, state);
|
||||||
|
|
||||||
|
|||||||
@@ -26,15 +26,16 @@ 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
|
used in advertising or otherwise to promote the sale, use or other dealings in
|
||||||
this Software without prior written authorization from Be Incorporated.
|
this Software without prior written authorization from Be Incorporated.
|
||||||
|
|
||||||
Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered trademarks
|
Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered
|
||||||
of Be Incorporated in the United States and other countries. Other brand product
|
trademarks of Be Incorporated in the United States and other countries. Other
|
||||||
names are registered trademarks or trademarks of their respective holders.
|
brand product names are registered trademarks or trademarks of their respective
|
||||||
|
holders.
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Be Menu, used in vertical mode, expanded and mini
|
// Be Menu, used in vertical mode, expanded and mini
|
||||||
// in mini mode will have team menu next to Be menu
|
// - in mini mode will have team menu next to Be menu
|
||||||
// Be menu in horizontal mode is embedded in ExpandoMenuBar
|
// - Be menu in horizontal mode is embedded in ExpandoMenuBar
|
||||||
|
|
||||||
#ifndef BARMENUBAR_H
|
#ifndef BARMENUBAR_H
|
||||||
#define BARMENUBAR_H
|
#define BARMENUBAR_H
|
||||||
|
|||||||
@@ -26,9 +26,10 @@ 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
|
used in advertising or otherwise to promote the sale, use or other dealings in
|
||||||
this Software without prior written authorization from Be Incorporated.
|
this Software without prior written authorization from Be Incorporated.
|
||||||
|
|
||||||
Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered trademarks
|
Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered
|
||||||
of Be Incorporated in the United States and other countries. Other brand product
|
trademarks of Be Incorporated in the United States and other countries. Other
|
||||||
names are registered trademarks or trademarks of their respective holders.
|
brand product names are registered trademarks or trademarks of their respective
|
||||||
|
holders.
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -26,9 +26,10 @@ 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
|
used in advertising or otherwise to promote the sale, use or other dealings in
|
||||||
this Software without prior written authorization from Be Incorporated.
|
this Software without prior written authorization from Be Incorporated.
|
||||||
|
|
||||||
Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered trademarks
|
Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered
|
||||||
of Be Incorporated in the United States and other countries. Other brand product
|
trademarks of Be Incorporated in the United States and other countries. Other
|
||||||
names are registered trademarks or trademarks of their respective holders.
|
brand product names are registered trademarks or trademarks of their respective
|
||||||
|
holders.
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -46,8 +47,8 @@ class BMenu;
|
|||||||
|
|
||||||
class TBarMenuTitle : public BMenuItem {
|
class TBarMenuTitle : public BMenuItem {
|
||||||
public:
|
public:
|
||||||
TBarMenuTitle(float width,float height, const BBitmap* icon,
|
TBarMenuTitle(float width, float height, const BBitmap* icon,
|
||||||
BMenu* menu, bool inexpando = false);
|
BMenu* menu, bool inexpando = false);
|
||||||
virtual ~TBarMenuTitle();
|
virtual ~TBarMenuTitle();
|
||||||
|
|
||||||
void SetWidthHeight(float width, float height);
|
void SetWidthHeight(float width, float height);
|
||||||
|
|||||||
@@ -26,9 +26,10 @@ 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
|
used in advertising or otherwise to promote the sale, use or other dealings in
|
||||||
this Software without prior written authorization from Be Incorporated.
|
this Software without prior written authorization from Be Incorporated.
|
||||||
|
|
||||||
Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered trademarks
|
Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered
|
||||||
of Be Incorporated in the United States and other countries. Other brand product
|
trademarks of Be Incorporated in the United States and other countries. Other
|
||||||
names are registered trademarks or trademarks of their respective holders.
|
brand product names are registered trademarks or trademarks of their respective
|
||||||
|
holders.
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -206,9 +207,9 @@ TBarView::PlaceBeMenu()
|
|||||||
fBarMenuBar = NULL;
|
fBarMenuBar = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// top or bottom expando mode has Be menu built in for tracking
|
// top or bottom expando mode has Be menu built in for tracking
|
||||||
// only for vertical mini or expanded
|
// only for vertical mini or expanded
|
||||||
// mini mode will have team menu added as part of BarMenuBar
|
// mini mode will have team menu added as part of BarMenuBar
|
||||||
if (fVertical && !fBarMenuBar) {
|
if (fVertical && !fBarMenuBar) {
|
||||||
// create the Be menu
|
// create the Be menu
|
||||||
BRect mbarFrame(Bounds());
|
BRect mbarFrame(Bounds());
|
||||||
@@ -217,8 +218,8 @@ TBarView::PlaceBeMenu()
|
|||||||
AddChild(fBarMenuBar);
|
AddChild(fBarMenuBar);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if there isn't a bemenu at this point,
|
// if there isn't a bemenu at this point,
|
||||||
// DB should be in top/bottom mode, else error
|
// DB should be in top/bottom mode, else error
|
||||||
if (!fBarMenuBar)
|
if (!fBarMenuBar)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -237,9 +238,10 @@ TBarView::PlaceBeMenu()
|
|||||||
else
|
else
|
||||||
width = floorf(width) / 2;
|
width = floorf(width) / 2;
|
||||||
loc = Bounds().LeftTop();
|
loc = Bounds().LeftTop();
|
||||||
} else
|
} else {
|
||||||
// mini mode, BeMenu next to team menu
|
// mini mode, BeMenu next to team menu
|
||||||
fBarMenuBar->AddTeamMenu();
|
fBarMenuBar->AddTeamMenu();
|
||||||
|
}
|
||||||
|
|
||||||
fBarMenuBar->SmartResize(width, menuFrame.Height());
|
fBarMenuBar->SmartResize(width, menuFrame.Height());
|
||||||
fBarMenuBar->MoveTo(loc);
|
fBarMenuBar->MoveTo(loc);
|
||||||
@@ -406,8 +408,8 @@ TBarView::SaveSettings()
|
|||||||
settings->showTime = ShowingClock();
|
settings->showTime = ShowingClock();
|
||||||
|
|
||||||
fReplicantTray->RememberClockSettings();
|
fReplicantTray->RememberClockSettings();
|
||||||
settings->alwaysOnTop = (Window()->Feel() & B_FLOATING_ALL_WINDOW_FEEL)
|
settings->alwaysOnTop
|
||||||
!= 0;
|
= (Window()->Feel() & B_FLOATING_ALL_WINDOW_FEEL) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -469,10 +471,10 @@ TBarView::ChangeState(int32 state, bool vertical, bool left, bool top)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PlaceApplicationBar(screenFrame);
|
PlaceApplicationBar(screenFrame);
|
||||||
SizeWindow(screenFrame);
|
SizeWindow(screenFrame);
|
||||||
PositionWindow(screenFrame);
|
PositionWindow(screenFrame);
|
||||||
Window()->UpdateIfNeeded();
|
Window()->UpdateIfNeeded();
|
||||||
|
|
||||||
// Re-expand those apps.
|
// Re-expand those apps.
|
||||||
if (expandedItems.CountItems() > 0) {
|
if (expandedItems.CountItems() > 0) {
|
||||||
@@ -505,7 +507,7 @@ TBarView::ChangeState(int32 state, bool vertical, bool left, bool top)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// window placement functions
|
// window placement functions
|
||||||
|
|
||||||
bool
|
bool
|
||||||
TBarView::Vertical() const
|
TBarView::Vertical() const
|
||||||
|
|||||||
@@ -26,9 +26,10 @@ 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
|
used in advertising or otherwise to promote the sale, use or other dealings in
|
||||||
this Software without prior written authorization from Be Incorporated.
|
this Software without prior written authorization from Be Incorporated.
|
||||||
|
|
||||||
Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered trademarks
|
Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered
|
||||||
of Be Incorporated in the United States and other countries. Other brand product
|
trademarks of Be Incorporated in the United States and other countries. Other
|
||||||
names are registered trademarks or trademarks of their respective holders.
|
brand product names are registered trademarks or trademarks of their respective
|
||||||
|
holders.
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -98,7 +99,7 @@ class TBarView : public BView {
|
|||||||
void CacheDragData(const BMessage* incoming);
|
void CacheDragData(const BMessage* incoming);
|
||||||
status_t DragStart();
|
status_t DragStart();
|
||||||
static bool MenuTrackingHook(BMenu* menu, void* castToThis);
|
static bool MenuTrackingHook(BMenu* menu, void* castToThis);
|
||||||
void DragStop(bool full=false);
|
void DragStop(bool full = false);
|
||||||
TrackingHookData* GetTrackingHookData();
|
TrackingHookData* GetTrackingHookData();
|
||||||
bool Dragging() const;
|
bool Dragging() const;
|
||||||
const BMessage* DragMessage() const;
|
const BMessage* DragMessage() const;
|
||||||
|
|||||||
Reference in New Issue
Block a user