Tracker: SlowMenu style fixes
This commit is contained in:
@@ -36,17 +36,21 @@ All rights reserved.
|
|||||||
#include "SlowMenu.h"
|
#include "SlowMenu.h"
|
||||||
|
|
||||||
|
|
||||||
|
const int32 kItemsToAddChunk = 20;
|
||||||
|
const bigtime_t kMaxTimeBuildingMenu = 200000;
|
||||||
|
|
||||||
|
|
||||||
|
// #pragma mark - BSlowMenu
|
||||||
|
|
||||||
|
|
||||||
BSlowMenu::BSlowMenu(const char* title, menu_layout layout)
|
BSlowMenu::BSlowMenu(const char* title, menu_layout layout)
|
||||||
: BMenu(title, layout),
|
:
|
||||||
|
BMenu(title, layout),
|
||||||
fMenuBuilt(false)
|
fMenuBuilt(false)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const int32 kItemsToAddChunk = 20;
|
|
||||||
const bigtime_t kMaxTimeBuildingMenu = 200000;
|
|
||||||
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
BSlowMenu::AddDynamicItem(add_state state)
|
BSlowMenu::AddDynamicItem(add_state state)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -31,8 +31,8 @@ of Be Incorporated in the United States and other countries. Other brand product
|
|||||||
names are registered trademarks or trademarks of their respective holders.
|
names are registered trademarks or trademarks of their respective holders.
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
*/
|
*/
|
||||||
#ifndef __SLOW_MENU__
|
#ifndef _SLOW_MENU_H
|
||||||
#define __SLOW_MENU__
|
#define _SLOW_MENU_H
|
||||||
|
|
||||||
|
|
||||||
// SlowMenu is a convenience class that makes it easier to
|
// SlowMenu is a convenience class that makes it easier to
|
||||||
@@ -49,10 +49,10 @@ All rights reserved.
|
|||||||
namespace BPrivate {
|
namespace BPrivate {
|
||||||
|
|
||||||
class BSlowMenu : public BMenu {
|
class BSlowMenu : public BMenu {
|
||||||
public:
|
public:
|
||||||
BSlowMenu(const char* title, menu_layout layout = B_ITEMS_IN_COLUMN);
|
BSlowMenu(const char* title, menu_layout layout = B_ITEMS_IN_COLUMN);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual bool StartBuildingItemList();
|
virtual bool StartBuildingItemList();
|
||||||
// set up state to start building the item list
|
// set up state to start building the item list
|
||||||
// returns false if setup failed
|
// returns false if setup failed
|
||||||
@@ -64,7 +64,7 @@ class BSlowMenu : public BMenu {
|
|||||||
|
|
||||||
virtual void ClearMenuBuildingState() = 0;
|
virtual void ClearMenuBuildingState() = 0;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual bool AddDynamicItem(add_state state);
|
virtual bool AddDynamicItem(add_state state);
|
||||||
// this is the callback from BMenu, you shouldn't need to
|
// this is the callback from BMenu, you shouldn't need to
|
||||||
// override this
|
// override this
|
||||||
@@ -76,4 +76,5 @@ class BSlowMenu : public BMenu {
|
|||||||
|
|
||||||
using namespace BPrivate;
|
using namespace BPrivate;
|
||||||
|
|
||||||
#endif // __SLOW_MENU__
|
|
||||||
|
#endif // _SLOW_MENU_H
|
||||||
|
|||||||
Reference in New Issue
Block a user