DayZ 1.24
Loading...
Searching...
No Matches
CollapsibleContainer Class Reference
Inheritance diagram for CollapsibleContainer:
[legend]
Collaboration diagram for CollapsibleContainer:
[legend]

Protected Member Functions

void CollapsibleContainer (LayoutHolder parent, int sort=-1)
 
override void SetLayoutName ()
 
EntityAI GetEntity ()
 
override void OnDropReceivedFromHeader (Widget w, int x, int y, Widget receiver)
 
override void Refresh ()
 
override void OnShow ()
 
override void OnHide ()
 
override void Insert (LayoutHolder container, int pos=-1, bool immedUpdate=true)
 
override void Remove (LayoutHolder container)
 
bool CanDisplayAnyCategory ()
 
void UpdateCollapseButtons ()
 
void LoadDefaultState ()
 
bool IsHidden ()
 
void CollapseButtonOnMouseButtonDown (Widget w)
 
override void Toggle ()
 
override bool OnChildRemove (Widget w, Widget child)
 
override bool OnChildAdd (Widget w, Widget child)
 
override Header GetHeader ()
 
override void SetHeader (Header header)
 
void SetCollapsibleHeaderArrowState (bool open)
 

Protected Attributes

ref CollapsibleHeader m_CollapsibleHeader
 
bool m_Hidden
 

Additional Inherited Members

- Private Member Functions inherited from Container
void CargoContainer (LayoutHolder parent, bool is_attachment=false)
 
void ~CargoContainer ()
 
int GetCargoIndex ()
 
void AddedToCargoEx (EntityAI item, bool refresh=true)
 
void AddedToCargo (EntityAI item)
 
void RemovedFromCargo (EntityAI item)
 
void MovedInCargo (EntityAI item)
 
void SetLock (EntityAI item)
 
void ReleaseLock (EntityAI item)
 
override void SetLayoutName ()
 
void SetEntity (EntityAI item, int cargo_index=0, bool immedUpdate=true)
 
EntityAI GetEntity ()
 
void UpdateHeaderText ()
 
void InitGridHeight ()
 
void UpdateSize ()
 
float GetIconSize ()
 
float GetSpaceSize ()
 
int GetCargoCapacity ()
 
int GetMaxCargoCapacity ()
 
Icon GetIcon (EntityAI item)
 
Icon GetIcon (int index)
 
Icon GetFocusedIcon ()
 
override float GetFocusedContainerHeight (bool contents=false)
 
override float GetFocusedContainerYPos (bool contents=false)
 
override float GetFocusedContainerYScreenPos (bool contents=false)
 
void UpdateSelection ()
 
void UpdateRowVisibility (int count)
 
override void Refresh ()
 
void RefreshImpl ()
 
override void UpdateInterval ()
 
Icon InitIconEx (Icon icon, EntityAI item, int pos_x, int pos_y, bool refresh=true)
 
Icon InitIcon (Icon icon, EntityAI item, int pos_x, int pos_y)
 
bool HasItem (EntityAI item)
 
override bool TransferItemToVicinity ()
 
override void SetDefaultFocus (bool while_micromanagment_mode=false)
 
override void SetLastFocus ()
 
override void Unfocus ()
 
override void UnfocusAll ()
 
override void SetNextActive ()
 
override void SetPreviousActive (bool force=false)
 
override void SetNextRightActive ()
 
override void SetNextLeftActive ()
 
override EntityAI GetFocusedItem ()
 
override void SetLastActive ()
 
override void SetActive (bool active)
 
override bool IsItemActive ()
 
override bool IsItemWithQuantityActive ()
 
override bool IsEmpty ()
 
int GetRecipeCount (bool recipe_anywhere, ItemBase entity1, ItemBase entity2, PlayerBase player)
 
override bool CanCombineAmmo ()
 
override bool TransferItem ()
 
override bool SplitItem ()
 
override bool EquipItem ()
 
override bool SelectItem ()
 
override bool Select ()
 
override bool Combine ()
 
void ShowFalseCargoHeader (bool show)
 
void SetAlternateFalseTextHeaderWidget (TextWidget w)
 
void ClosableContainer (LayoutHolder parent, int sort=-1)
 
override bool IsDisplayable ()
 
override void UpdateRadialIcon ()
 
void SetOpenState (bool state)
 
override Header GetHeader ()
 
override void Open ()
 
override void Close ()
 
override void SetLayoutName ()
 
override void OnShow ()
 
override LayoutHolder Get (int x)
 
override void Refresh ()
 
void CloseButtonOnMouseButtonDown ()
 
override float GetFocusedContainerHeight (bool contents=false)
 
override float GetFocusedContainerYPos (bool contents=false)
 
override float GetFocusedContainerYScreenPos (bool contents=false)
 
void MoveContainerUp (Widget cont)
 
void MoveContainerDown (Widget cont)
 
override void CheckHeaderDragability ()
 
- Private Attributes inherited from Container
const int ROWS_NUMBER_XBOX = 5
 
CargoBase m_Cargo
 
int m_CargoIndex = -1
 
int m_FocusedItemPosition = -1
 
ref array< ref CargoContainerRowm_Rows
 
ref array< ref Iconm_Icons
 
ref map< EntityAI, ref Param3< ref Icon, int, int > > m_ShowedItemPositions
 
ref map< EntityAI, ref Param3< ref Icon, int, int > > m_ShowedLockPositions
 
float m_IconSize
 
float m_SpaceSize
 
bool m_IsAttachment
 
TextWidget m_FalseHeaderTextWidget
 
TextWidget m_AlternateFalseHeaderTextWidget
 
Widget m_CargoHeader
 
Widget m_CargoContainer
 
Widget m_ItemsContainer
 
ref SizeToChild m_Resizer1
 
ref SizeToChild m_Resizer2
 
ref Timer m_ResizeTimer
 
ref ClosableHeader m_ClosableHeader
 
bool m_LockCargo
 

Detailed Description

Definition at line 1 of file CollapsibleContainer.c.

Constructor & Destructor Documentation

◆ CollapsibleContainer()

void CollapsibleContainer::CollapsibleContainer ( LayoutHolder parent,
int sort = -1 )
inlineprotected

Definition at line 6 of file CollapsibleContainer.c.

7 {
8 m_MainWidget.Show(true);
9
10 if (sort > -1)
11 m_MainWidget.SetSort(sort + 2);
12
13 m_MainWidget = m_MainWidget.FindAnyWidget("header");
14
15 m_Body = new array<ref LayoutHolder>;
16 m_CollapsibleHeader = new CollapsibleHeader(this, "CollapseButtonOnMouseButtonDown");
17 }
ref CollapsibleHeader m_CollapsibleHeader

References m_CollapsibleHeader.

Member Function Documentation

◆ CanDisplayAnyCategory()

bool CollapsibleContainer::CanDisplayAnyCategory ( )
inlineprotected

Definition at line 80 of file CollapsibleContainer.c.

81 {
82 return false;
83 }

◆ CollapseButtonOnMouseButtonDown()

void CollapsibleContainer::CollapseButtonOnMouseButtonDown ( Widget w)
inlineprotected

Definition at line 117 of file CollapsibleContainer.c.

118 {
119 Toggle();
120 }

References Toggle().

◆ GetEntity()

EntityAI CollapsibleContainer::GetEntity ( )
inlineprotected

Definition at line 24 of file CollapsibleContainer.c.

25 {
26 return m_Entity;
27 }
EntityAI m_Entity
Definition ActionDebug.c:11

References m_Entity.

◆ GetHeader()

override Header CollapsibleContainer::GetHeader ( )
inlineprotected

Definition at line 158 of file CollapsibleContainer.c.

159 {
160 return m_CollapsibleHeader;
161 }

References m_CollapsibleHeader.

Referenced by PlayerContainer::PlayerContainer(), and ZombieContainer::ZombieContainer().

◆ Insert()

override void CollapsibleContainer::Insert ( LayoutHolder container,
int pos = -1,
bool immedUpdate = true )
inlineprotected

Definition at line 60 of file CollapsibleContainer.c.

61 {
62 super.Insert(container, pos, immedUpdate);
63
64 //if ( immedUpdate )
65 //{
66 RecomputeOpenedContainers();
68 //}
69
71 }
void SetCollapsibleHeaderArrowState(bool open)

References m_Hidden, SetCollapsibleHeaderArrowState(), and UpdateCollapseButtons().

Referenced by AttachmentCategoriesContainer::InitGhostSlots().

◆ IsHidden()

bool CollapsibleContainer::IsHidden ( )
inlineprotected

Definition at line 112 of file CollapsibleContainer.c.

113 {
114 return m_Hidden;
115 }

References m_Hidden.

Referenced by PlayerContainer::UpdateRadialIcon(), and ZombieContainer::UpdateRadialIcon().

◆ LoadDefaultState()

void CollapsibleContainer::LoadDefaultState ( )
inlineprotected

Definition at line 101 of file CollapsibleContainer.c.

102 {
103 m_Hidden = !ItemManager.GetInstance().GetDefaultHeaderOpenState("VICINITY");
104 //m_Closed = m_Hidden;
105
106 if (m_Hidden)
107 OnHide();
108 else
109 OnShow();
110 }
static ItemManager GetInstance()

References ItemManager::GetInstance(), m_Hidden, OnHide(), and OnShow().

Referenced by VicinityContainer::VicinityContainer().

◆ OnChildAdd()

override bool CollapsibleContainer::OnChildAdd ( Widget w,
Widget child )
inlineprotected

Definition at line 151 of file CollapsibleContainer.c.

152 {
153 if (w == GetMainWidget())
154 GetMainWidget().Update();
155 return true;
156 }

◆ OnChildRemove()

override bool CollapsibleContainer::OnChildRemove ( Widget w,
Widget child )
inlineprotected

Definition at line 144 of file CollapsibleContainer.c.

145 {
146 if (w == GetMainWidget())
147 GetMainWidget().Update();
148 return true;
149 }

◆ OnDropReceivedFromHeader()

override void CollapsibleContainer::OnDropReceivedFromHeader ( Widget w,
int x,
int y,
Widget receiver )
inlineprotected

Definition at line 29 of file CollapsibleContainer.c.

29{ }

◆ OnHide()

override void CollapsibleContainer::OnHide ( )
inlineprotected

Definition at line 50 of file CollapsibleContainer.c.

51 {
52 m_Hidden = true;
55 else
56 super.OnHide();
57
58 }

References m_CollapsibleHeader, m_Hidden, and SetCollapsibleHeaderArrowState().

Referenced by LoadDefaultState(), and Toggle().

◆ OnShow()

override void CollapsibleContainer::OnShow ( )
inlineprotected

Definition at line 36 of file CollapsibleContainer.c.

37 {
38 super.OnShow();
39 m_Hidden = false;
40 for (int i = 0; i < m_Body.Count(); i++)
41 {
42 m_Body.Get(i).OnShow();
43 Container c = Container.Cast(m_Body.Get(i));
44 if (c)
45 c.Open();
46 }
48 }

References m_Hidden, and SetCollapsibleHeaderArrowState().

Referenced by AttachmentCategoriesContainer::CollapseButtonOnMouseButtonDown(), LoadDefaultState(), AttachmentCategoriesContainer::Open(), and Toggle().

◆ Refresh()

override void CollapsibleContainer::Refresh ( )
inlineprotected

◆ Remove()

override void CollapsibleContainer::Remove ( LayoutHolder container)
inlineprotected

Definition at line 73 of file CollapsibleContainer.c.

74 {
75 super.Remove(container);
76 RecomputeOpenedContainers();
78 }

References UpdateCollapseButtons().

Referenced by PlayerContainer::ItemDetached(), ZombieContainer::ItemDetached(), and VicinityContainer::UpdateInterval().

◆ SetCollapsibleHeaderArrowState()

void CollapsibleContainer::SetCollapsibleHeaderArrowState ( bool open)
inlineprotected

Definition at line 168 of file CollapsibleContainer.c.

169 {
171 m_CollapsibleHeader.SetArrowButtonOpened(open);
172 }

References m_CollapsibleHeader.

Referenced by AttachmentCategoriesContainer::CollapseButtonOnMouseButtonDown(), Insert(), OnHide(), OnShow(), and Toggle().

◆ SetHeader()

override void CollapsibleContainer::SetHeader ( Header header)
inlineprotected

◆ SetLayoutName()

override void CollapsibleContainer::SetLayoutName ( )
inlineprotected

Definition at line 19 of file CollapsibleContainer.c.

20 {
22 }
const string CollapsibleContainer

References WidgetLayoutName::CollapsibleContainer.

◆ Toggle()

override void CollapsibleContainer::Toggle ( )
inlineprotected

Definition at line 122 of file CollapsibleContainer.c.

123 {
124 if (!m_Hidden)
125 {
126 for (int i = 1; i < m_Body.Count(); i++)
127 {
128 m_Body.Get(i).OnHide();
129 Container c = Container.Cast(m_Body.Get(i));
130 if (c)
131 c.Close();
132 }
133 OnHide();
134 }
135 else
136 OnShow();
137 m_Closed = m_Hidden;
138
140
142 }

References m_Hidden, OnHide(), OnShow(), SetCollapsibleHeaderArrowState(), and UpdateCollapseButtons().

Referenced by CollapseButtonOnMouseButtonDown().

◆ UpdateCollapseButtons()

void CollapsibleContainer::UpdateCollapseButtons ( )
inlineprotected

Definition at line 85 of file CollapsibleContainer.c.

86 {
87#ifndef PLATFORM_CONSOLE
88 if (m_Body.Count() < 2)
89 {
91 m_CollapsibleHeader.ShowCollapseButton(false);
92 }
93 else
94 {
96 m_CollapsibleHeader.ShowCollapseButton(true);
97 }
98#endif
99 }

References m_CollapsibleHeader.

Referenced by AttachmentCategoriesContainer::CollapseButtonOnMouseButtonDown(), Insert(), Remove(), Toggle(), and VicinityContainer::UpdateInterval().

Member Data Documentation

◆ m_CollapsibleHeader

◆ m_Hidden


The documentation for this class was generated from the following file: