Tracker: Privatize most members of BPoseView.
Greatly reduces what is available to inherited classes. No functional change intended.
This commit is contained in:
@@ -695,12 +695,12 @@ OpenWithPoseView::OpenSelection(BPose* pose, int32*)
|
||||
{
|
||||
OpenWithContainerWindow* window = ContainerWindow();
|
||||
|
||||
int32 count = fSelectionList->CountItems();
|
||||
int32 count = SelectionList()->CountItems();
|
||||
if (count == 0)
|
||||
return;
|
||||
|
||||
if (pose == NULL)
|
||||
pose = fSelectionList->FirstItem();
|
||||
pose = SelectionList()->FirstItem();
|
||||
|
||||
ASSERT(pose != NULL);
|
||||
|
||||
@@ -764,7 +764,7 @@ OpenWithPoseView::Pulse()
|
||||
|
||||
OpenWithContainerWindow* window = ContainerWindow();
|
||||
|
||||
if (!fSelectionList->CountItems()) {
|
||||
if (!SelectionList()->CountItems()) {
|
||||
window->SetCanSetAppAsDefault(false);
|
||||
window->SetCanOpen(false);
|
||||
_inherited::Pulse();
|
||||
@@ -773,7 +773,7 @@ OpenWithPoseView::Pulse()
|
||||
|
||||
// if we selected a non-handling application, don't allow setting
|
||||
// it as preferred
|
||||
Model* firstSelected = fSelectionList->FirstItem()->TargetModel();
|
||||
Model* firstSelected = SelectionList()->FirstItem()->TargetModel();
|
||||
if (OpenWithRelation(firstSelected) == kNoRelation) {
|
||||
window->SetCanSetAppAsDefault(false);
|
||||
window->SetCanOpen(true);
|
||||
@@ -789,11 +789,11 @@ OpenWithPoseView::Pulse()
|
||||
return;
|
||||
}
|
||||
|
||||
ASSERT(fSelectionList->CountItems() == 1);
|
||||
ASSERT(SelectionList()->CountItems() == 1);
|
||||
|
||||
// enable the Open and make default if selected application different
|
||||
// from preferred app ref
|
||||
window->SetCanSetAppAsDefault((*fSelectionList->FirstItem()->
|
||||
window->SetCanSetAppAsDefault((*SelectionList()->FirstItem()->
|
||||
TargetModel()->EntryRef()) != fPreferredRef);
|
||||
|
||||
_inherited::Pulse();
|
||||
|
||||
@@ -217,12 +217,19 @@ BPoseView::BPoseView(Model* model, uint32 viewMode)
|
||||
:
|
||||
BView("PoseView", B_WILL_DRAW | B_PULSE_NEEDED),
|
||||
fIsDrawingSelectionRect(false),
|
||||
fViewState(new BViewState),
|
||||
fStateNeedsSaving(false),
|
||||
fSavePoseLocations(true),
|
||||
fMultipleSelection(true),
|
||||
fDragEnabled(true),
|
||||
fDropEnabled(true),
|
||||
fSelectionHandler(be_app),
|
||||
fPoseList(new PoseList(40, true)),
|
||||
fHScrollBar(NULL),
|
||||
fVScrollBar(NULL),
|
||||
fModel(model),
|
||||
fActivePose(NULL),
|
||||
fExtent(INT32_MAX, INT32_MAX, INT32_MIN, INT32_MIN),
|
||||
fPoseList(new PoseList(40, true)),
|
||||
fFilteredPoseList(new PoseList()),
|
||||
fVSPoseList(new PoseList()),
|
||||
fSelectionList(new PoseList()),
|
||||
@@ -232,14 +239,11 @@ BPoseView::BPoseView(Model* model, uint32 viewMode)
|
||||
fMimeTypeList(new BObjectList<BString>(10, true)),
|
||||
fBrokenLinks(new BObjectList<Model>(10, false)),
|
||||
fMimeTypeListIsDirty(false),
|
||||
fViewState(new BViewState),
|
||||
fStateNeedsSaving(false),
|
||||
fCountView(NULL),
|
||||
fListElemHeight(0.0f),
|
||||
fIconPoseHeight(0.0f),
|
||||
fDropTarget(NULL),
|
||||
fAlreadySelectedDropTarget(NULL),
|
||||
fSelectionHandler(be_app),
|
||||
fLastClickPoint(INT32_MAX, INT32_MAX),
|
||||
fLastClickButtons(0),
|
||||
fLastClickedPose(NULL),
|
||||
@@ -255,14 +259,10 @@ BPoseView::BPoseView(Model* model, uint32 viewMode)
|
||||
fTrackRightMouseUp(false),
|
||||
fTrackMouseUp(false),
|
||||
fSelectionVisible(true),
|
||||
fMultipleSelection(true),
|
||||
fDragEnabled(true),
|
||||
fDropEnabled(true),
|
||||
fSelectionRectEnabled(true),
|
||||
fAlwaysAutoPlace(false),
|
||||
fAllowPoseEditing(true),
|
||||
fSelectionChangedHook(false),
|
||||
fSavePoseLocations(true),
|
||||
fShowHideSelection(true),
|
||||
fOkToMapIcons(false),
|
||||
fEnsurePosesVisible(false),
|
||||
|
||||
+18
-13
@@ -303,8 +303,7 @@ public:
|
||||
void AddRemovePoseFromSelection(BPose* pose, int32 index,
|
||||
bool select);
|
||||
|
||||
BLooper* SelectionHandler();
|
||||
void SetSelectionHandler(BLooper*);
|
||||
void SetSelectionHandler(BLooper* looper);
|
||||
|
||||
BObjectList<BString>*MimeTypesInSelection();
|
||||
|
||||
@@ -397,7 +396,6 @@ public:
|
||||
void HideBarberPole();
|
||||
|
||||
bool fShowSelectionWhenInactive;
|
||||
bool fTransparentSelection;
|
||||
bool fIsDrawingSelectionRect;
|
||||
|
||||
bool IsWatchingDateFormatChange();
|
||||
@@ -707,13 +705,28 @@ protected:
|
||||
};
|
||||
|
||||
protected:
|
||||
BViewState* fViewState;
|
||||
bool fStateNeedsSaving;
|
||||
|
||||
bool fSavePoseLocations : 1;
|
||||
bool fMultipleSelection : 1;
|
||||
bool fDragEnabled : 1;
|
||||
bool fDropEnabled : 1;
|
||||
|
||||
BLooper* fSelectionHandler;
|
||||
|
||||
std::set<thread_id> fAddPosesThreads;
|
||||
PoseList* fPoseList;
|
||||
|
||||
PendingNodeMonitorCache pendingNodeMonitorCache;
|
||||
|
||||
private:
|
||||
TScrollBar* fHScrollBar;
|
||||
BScrollBar* fVScrollBar;
|
||||
Model* fModel;
|
||||
BPose* fActivePose;
|
||||
BRect fExtent;
|
||||
// the following should probably be just member lists, not pointers
|
||||
PoseList* fPoseList;
|
||||
PoseList* fFilteredPoseList;
|
||||
PoseList* fVSPoseList;
|
||||
PoseList* fSelectionList;
|
||||
@@ -721,20 +734,16 @@ protected:
|
||||
BObjectList<BString> fMimeTypesInSelectionCache;
|
||||
// used for mime string based icon highliting during a drag
|
||||
BObjectList<Model>* fZombieList;
|
||||
PendingNodeMonitorCache pendingNodeMonitorCache;
|
||||
BObjectList<BColumn>* fColumnList;
|
||||
BObjectList<BString>* fMimeTypeList;
|
||||
BObjectList<Model>* fBrokenLinks;
|
||||
bool fMimeTypeListIsDirty;
|
||||
BViewState* fViewState;
|
||||
bool fStateNeedsSaving;
|
||||
BCountView* fCountView;
|
||||
float fListElemHeight;
|
||||
float fListOffset;
|
||||
float fIconPoseHeight;
|
||||
BPose* fDropTarget;
|
||||
BPose* fAlreadySelectedDropTarget;
|
||||
BLooper* fSelectionHandler;
|
||||
BPoint fLastClickPoint;
|
||||
int32 fLastClickButtons;
|
||||
const BPose* fLastClickedPose;
|
||||
@@ -747,7 +756,6 @@ protected:
|
||||
BPoint fHintLocation;
|
||||
float fAutoScrollInc;
|
||||
int32 fAutoScrollState;
|
||||
std::set<thread_id> fAddPosesThreads;
|
||||
bool fWidgetTextOutline;
|
||||
const BPose* fSelectionPivotPose;
|
||||
const BPose* fRealPivotPose;
|
||||
@@ -773,15 +781,12 @@ protected:
|
||||
SelectionRectInfo fSelectionRectInfo;
|
||||
|
||||
bool fSelectionVisible : 1;
|
||||
bool fMultipleSelection : 1;
|
||||
bool fDragEnabled : 1;
|
||||
bool fDropEnabled : 1;
|
||||
bool fSelectionRectEnabled : 1;
|
||||
bool fTransparentSelection : 1;
|
||||
bool fAlwaysAutoPlace : 1;
|
||||
bool fAllowPoseEditing : 1;
|
||||
bool fSelectionChangedHook : 1;
|
||||
// get rid of this
|
||||
bool fSavePoseLocations : 1;
|
||||
bool fShowHideSelection : 1;
|
||||
bool fOkToMapIcons : 1;
|
||||
bool fEnsurePosesVisible : 1;
|
||||
|
||||
Reference in New Issue
Block a user