OpenClonk
C4StartupNetListEntry Class Reference

#include <C4StartupNetDlg.h>

Inheritance diagram for C4StartupNetListEntry:
[legend]
Collaboration diagram for C4StartupNetListEntry:
[legend]

Public Types

enum  QueryType { NRQT_Unknown , NRQT_GameDiscovery , NRQT_Masterserver , NRQT_DirectJoin }
 
enum  TimeoutType { TT_RefReqWait , TT_Reference , TT_Masterserver }
 
enum  { InfoLabelCount =5 , MaxInfoIconCount =10 }
 

Public Member Functions

 C4StartupNetListEntry (C4GUI::ListBox *pForListBox, C4GUI::Element *pInsertBefore, class C4StartupNetDlg *pNetDlg)
 
 ~C4StartupNetListEntry () override
 
void ClearRef ()
 
void SetRefQuery (const char *szAddress, QueryType eQueryType)
 
void SetReference (C4Network2Reference *pNewRef)
 
bool Execute ()
 
bool OnReference ()
 
void UpdateCollapsed (bool fToCollapseValue)
 
void SetVisibility (bool fToValue) override
 
const char * GetError ()
 
C4Network2ReferenceGrabReference ()
 
C4Network2ReferenceGetReference () const
 
bool IsSameHost (const C4Network2Reference *pRef2)
 
bool IsSameAddress (const C4Network2Reference *pRef2)
 
bool IsSameRefQueryAddress (const char *szJoinAddress)
 
bool KeywordMatch (const char *szMatch)
 
const char * GetJoinAddress ()
 
void MouseInput (CMouse &rMouse, int32_t iButton, int32_t iX, int32_t iY, DWORD dwKeyParam) override
 
void SetPos (int32_t iXPos, int32_t iYPos)
 
void UpdateOwnPos () override
 
C4RectGetClientRect () override
 
void ApplyElementOffset (int32_t &riX, int32_t &riY) override
 
void ApplyInvElementOffset (int32_t &riX, int32_t &riY) override
 
virtual bool IsComponentOutsideClientArea ()
 
virtual int32_t GetMarginTop ()
 
virtual int32_t GetMarginLeft ()
 
virtual int32_t GetMarginRight ()
 
virtual int32_t GetMarginBottom ()
 
void Clear ()
 
void ClearChildren ()
 
void RemoveElement (Element *pChild) override
 
void MakeLastElement (Element *pChild)
 
void AddElement (Element *pChild)
 
void ReaddElement (Element *pChild)
 
void InsertElement (Element *pChild, Element *pInsertBefore)
 
ElementGetNextNestedElement (Element *pPrevElement, bool fBackwards)
 
ElementGetFirstContained () override
 
virtual ElementGetLastContained ()
 
ElementGetFirstNestedElement (bool fBackwards) override
 
Iterator begin ()
 
Iterator end ()
 
ReverseIterator rbegin ()
 
ReverseIterator rend ()
 
ElementGetFirst ()
 
ElementGetLast ()
 
ContainerGetContainer () override
 
ElementGetElementByIndex (int32_t i)
 
int32_t GetElementCount ()
 
virtual bool IsFocused (Control *pCtrl)
 
virtual bool IsSelectedChild (Element *pChild)
 
bool IsParentOf (Element *pEl) override
 
virtual void MouseEnter (CMouse &rMouse)
 
virtual void MouseLeave (CMouse &rMouse)
 
virtual void StartDragging (CMouse &rMouse, int32_t iX, int32_t iY, DWORD dwKeyParam)
 
virtual void DoDragging (CMouse &rMouse, int32_t iX, int32_t iY, DWORD dwKeyParam)
 
virtual void StopDragging (CMouse &rMouse, int32_t iX, int32_t iY, DWORD dwKeyParam)
 
bool DoContext ()
 
ContainerGetParent ()
 
virtual class Dialog * GetDlg ()
 
virtual Screen * GetScreen ()
 
virtual ControlIsFocusElement ()
 
void ScreenPos2ClientPos (int32_t &riX, int32_t &riY)
 
void ClientPos2ScreenPos (int32_t &riX, int32_t &riY)
 
void SetToolTip (const char *szNewTooltip, bool is_immediate=false)
 
const char * GetToolTip ()
 
const char * GetOwnToolTip ()
 
bool IsImmediateToolTip () const
 
int32_t GetWidth ()
 
int32_t GetHeight ()
 
C4RectGetBounds ()
 
void SetBounds (const C4Rect &rcNewBound)
 
C4Rect GetContainedClientRect ()
 
ElementGetNext () const
 
ElementGetPrev () const
 
bool IsInActiveDlg (bool fForKeyboard)
 
C4Rect GetToprightCornerRect (int32_t iWidth=16, int32_t iHeight=16, int32_t iHIndent=4, int32_t iVIndent=4, int32_t iIndexX=0)
 
bool IsVisible ()
 
virtual bool GetListItemTopSpacingBar ()
 
void SetDragTarget (Window *pToWindow)
 
void SetContextHandler (ContextHandler *pNewHd)
 
virtual ContextHandler * GetContextHandler ()
 

Public Attributes

bool fVisible {true}
 

Protected Member Functions

int32_t GetListItemTopSpacing () override
 
void DrawElement (C4TargetFacet &cgo) override
 
C4GUI::ElementGetNextLower (int32_t sortOrder)
 
void Draw (C4TargetFacet &cgo) override
 
virtual void ElementSizeChanged (Element *pOfElement)
 
virtual void ElementPosChanged (Element *pOfElement)
 
virtual void AfterElementRemoval ()
 
bool OnHotkey (uint32_t cHotkey) override
 
virtual void UpdateSize ()
 
virtual void UpdatePos ()
 
void Draw3DFrame (C4TargetFacet &cgo, bool fUp=false, int32_t iIndent=1, BYTE byAlpha=C4GUI_BorderAlpha, bool fDrawTop=true, int32_t iTopOff=0, bool fDrawLeft=true, int32_t iLeftOff=0)
 
void DrawBar (C4TargetFacet &cgo, DynBarFacet &rFacets)
 
void DrawVBar (C4TargetFacet &cgo, DynBarFacet &rFacets)
 
void DrawHBarByVGfx (C4TargetFacet &cgo, DynBarFacet &rFacets)
 
void DrawHVBar (C4TargetFacet &cgo, DynBarFacet &rFacets, C4DrawTransform &trf, int32_t iMiddleLength)
 
virtual bool IsOwnPtrElement ()
 
virtual bool IsExternalDrawDialog ()
 
virtual bool IsMenu ()
 
virtual class DialogWindow * GetDialogWindow ()
 
virtual bool CheckNameHotkey (const char *)
 

Protected Attributes

C4Rect rcClientRect
 
ElementpFirst
 
ElementpLast
 
ContainerpParent {nullptr}
 
ElementpPrev
 
ElementpNext
 
WindowpDragTarget {nullptr}
 
int32_t iDragX
 
int32_t iDragY
 
bool fDragging {false}
 
ContextHandler * pContextHandler {nullptr}
 
C4Rect rcBounds
 

Detailed Description

Definition at line 35 of file C4StartupNetDlg.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
InfoLabelCount 
MaxInfoIconCount 

Definition at line 56 of file C4StartupNetDlg.h.

◆ QueryType

Enumerator
NRQT_Unknown 
NRQT_GameDiscovery 
NRQT_Masterserver 
NRQT_DirectJoin 

Definition at line 41 of file C4StartupNetDlg.h.

42  {
43  NRQT_Unknown, // unknown source
44  NRQT_GameDiscovery, // by UDP broadcast in local network
45  NRQT_Masterserver, // by internet masterserver
46  NRQT_DirectJoin // by user-entered address
47  };
@ NRQT_GameDiscovery
@ NRQT_Unknown
@ NRQT_DirectJoin
@ NRQT_Masterserver

◆ TimeoutType

Enumerator
TT_RefReqWait 
TT_Reference 
TT_Masterserver 

Definition at line 49 of file C4StartupNetDlg.h.

50  {
51  TT_RefReqWait, // C4NetMasterServerQueryInterval for masterserver; C4NetErrorRefTimeout for other ref clients
52  TT_Reference, // C4NetReferenceTimeout
53  TT_Masterserver // C4NetMasterServerQueryInterval
54  };
@ TT_Reference
@ TT_RefReqWait
@ TT_Masterserver

Constructor & Destructor Documentation

◆ C4StartupNetListEntry()

C4StartupNetListEntry::C4StartupNetListEntry ( C4GUI::ListBox pForListBox,
C4GUI::Element pInsertBefore,
class C4StartupNetDlg pNetDlg 
)

Definition at line 31 of file C4StartupNetDlg.cpp.

32  : pNetDlg(pNetDlg), pList(pForListBox), pRefClient(nullptr), pRef(nullptr), fError(false), eQueryType(NRQT_Unknown), iTimeout(0), iInfoIconCount(0), iSortOrder(0), fIsSmall(false), fIsCollapsed(false), fIsEnabled(true), fIsImportant(false)
33 {
34  // calc height
35  int32_t iLineHgt = ::GraphicsResource.TextFont.GetLineHeight(), iHeight = iLineHgt * 2 + 4;
36  // add icons - normal icons use small size, only animated netgetref uses full size
37  rctIconLarge.Set(0, 0, iHeight, iHeight);
38  int32_t iSmallIcon = iHeight * 2 / 3; rctIconSmall.Set((iHeight - iSmallIcon)/2, (iHeight - iSmallIcon)/2, iSmallIcon, iSmallIcon);
39  pIcon = new C4GUI::Icon(rctIconSmall, C4GUI::Ico_Host);
40  AddElement(pIcon);
41  SetBounds(pIcon->GetBounds());
42  // add to listbox (will get resized horizontally and moved)
43  pForListBox->InsertElement(this, pInsertBefore);
44  // add status icons and text labels now that width is known
45  CStdFont *pUseFont = &(::GraphicsResource.TextFont);
46  int32_t iIconSize = pUseFont->GetLineHeight();
47  C4Rect rcIconRect = GetContainedClientRect();
48  int32_t iThisWdt = rcIconRect.Wdt;
49  rcIconRect.x = iThisWdt - iIconSize * (iInfoIconCount + 1);
50  rcIconRect.Wdt = rcIconRect.Hgt = iIconSize;
51  for (auto & pInfoIcon : pInfoIcons)
52  {
53  AddElement(pInfoIcon = new C4GUI::Icon(rcIconRect, C4GUI::Ico_None));
54  rcIconRect.x -= rcIconRect.Wdt;
55  }
56  C4Rect rcLabelBounds;
57  rcLabelBounds.x = iHeight+3;
58  rcLabelBounds.Hgt = iLineHgt;
59  for (int i=0; i<InfoLabelCount; ++i)
60  {
61  C4GUI::Label *pLbl;
62  rcLabelBounds.y = 1+i*(iLineHgt+2);
63  rcLabelBounds.Wdt = iThisWdt - rcLabelBounds.x - 1;
64  if (!i) rcLabelBounds.Wdt -= iLineHgt; // leave space for topright extra icon
65  AddElement(pLbl = pInfoLbl[i] = new C4GUI::Label("", rcLabelBounds, ALeft, C4GUI_CaptionFontClr));
66  // label will have collapsed due to no text: Repair it
67  pLbl->SetAutosize(false);
68  pLbl->SetBounds(rcLabelBounds);
69  }
70  // update small state, which will resize this to a small entry
71  UpdateSmallState();
72  // Set*-function will fill icon and text and calculate actual size
73 }
C4GraphicsResource GraphicsResource
#define C4GUI_CaptionFontClr
Definition: C4Gui.h:37
const int ALeft
Definition: C4Surface.h:41
void AddElement(Element *pChild)
C4Rect GetContainedClientRect()
Definition: C4Gui.h:448
void SetBounds(const C4Rect &rcNewBound)
Definition: C4Gui.h:446
C4Rect & GetBounds()
Definition: C4Gui.h:445
void SetAutosize(bool fToVal)
Definition: C4Gui.h:507
bool InsertElement(Element *pChild, Element *pInsertBefore, int32_t iIndent=0)
Definition: C4Rect.h:28
int32_t y
Definition: C4Rect.h:30
int32_t Hgt
Definition: C4Rect.h:30
int32_t Wdt
Definition: C4Rect.h:30
int32_t x
Definition: C4Rect.h:30
void Set(int32_t iX, int32_t iY, int32_t iWdt, int32_t iHgt)
Definition: C4Rect.cpp:86
int GetLineHeight() const
Definition: C4FontLoader.h:125
@ Ico_Host
Definition: C4Gui.h:645
@ Ico_None
Definition: C4Gui.h:640

References C4GUI::Container::AddElement(), ALeft, C4GUI_CaptionFontClr, C4GUI::Element::GetBounds(), C4GUI::Element::GetContainedClientRect(), CStdFont::GetLineHeight(), GraphicsResource, C4Rect::Hgt, C4GUI::Ico_Host, C4GUI::Ico_None, InfoLabelCount, C4GUI::ListBox::InsertElement(), C4Rect::Set(), C4GUI::Label::SetAutosize(), C4GUI::Element::SetBounds(), C4GraphicsResource::TextFont, C4Rect::Wdt, C4Rect::x, and C4Rect::y.

Here is the call graph for this function:

◆ ~C4StartupNetListEntry()

C4StartupNetListEntry::~C4StartupNetListEntry ( )
override

Definition at line 75 of file C4StartupNetDlg.cpp.

76 {
77  ClearRef();
78 }
void ClearRef()

References ClearRef().

Here is the call graph for this function:

Member Function Documentation

◆ AddElement()

void C4GUI::Container::AddElement ( Element pChild)
inherited

Definition at line 118 of file C4GuiContainers.cpp.

119  {
120  // safety
121  if (!pChild) return;
122  // remove from any previous container
123  if (pChild->pParent) pChild->pParent->RemoveElement(pChild);
124  // add to end of list
125  if (pLast) pLast->pNext = pChild; else pFirst = pChild;
126  pChild->pPrev = pLast; pChild->pNext = nullptr; pLast = pChild;
127  pChild->pParent = this;
128 
129  assert(pChild->pNext != pChild);
130  assert(pChild->pPrev != pChild);
131  assert(pChild->pParent != pChild);
132  }
Element * pFirst
Definition: C4Gui.h:750
Element * pLast
Definition: C4Gui.h:750
Element * pPrev
Definition: C4Gui.h:377
Container * pParent
Definition: C4Gui.h:376
Element * pNext
Definition: C4Gui.h:377

References C4GUI::Container::pFirst, C4GUI::Container::pLast, C4GUI::Element::pNext, C4GUI::Element::pParent, C4GUI::Element::pPrev, and C4GUI::Container::RemoveElement().

Referenced by C4GUI::Tabular::AddCustomSheet(), C4GUI::ListBox::AddElement(), C4ChartDialog::C4ChartDialog(), C4ChatControl::C4ChatControl(), C4ChatDlg::C4ChatDlg(), C4DownloadDlg::C4DownloadDlg(), C4GameOptionButtons::C4GameOptionButtons(), C4GameOverDlg::C4GameOverDlg(), C4LeagueSignupDialog::C4LeagueSignupDialog(), C4Menu::C4Menu(), C4Network2ClientListDlg::C4Network2ClientListDlg(), C4Network2StartWaitDlg::C4Network2StartWaitDlg(), C4StartupAboutDlg::C4StartupAboutDlg(), C4StartupLegalDlg::C4StartupLegalDlg(), C4StartupMainDlg::C4StartupMainDlg(), C4StartupModsDlg::C4StartupModsDlg(), C4StartupModsListEntry::C4StartupModsListEntry(), C4StartupNetDlg::C4StartupNetDlg(), C4StartupNetListEntry(), C4StartupOptionsDlg::C4StartupOptionsDlg(), C4StartupPlrColorPickerDlg::C4StartupPlrColorPickerDlg(), C4StartupPlrPropertiesDlg::C4StartupPlrPropertiesDlg(), C4StartupPlrSelDlg::C4StartupPlrSelDlg(), C4StartupScenSelDlg::C4StartupScenSelDlg(), C4GUI::ContextButton::ContextButton(), C4MapFolderData::CreateGUIElements(), C4GUI::InfoDialog::CreateSubComponents(), C4FileSelDlg::DefaultListItem::DefaultListItem(), C4GUI::FullscreenDialog::FullscreenDialog(), C4FileSelDlg::InitElements(), C4GUI::InputDialog::InputDialog(), C4GUI::Container::InsertElement(), C4GUI::LabeledEdit::LabeledEdit(), C4GameLobby::MainDlg::MainDlg(), C4GUI::MessageDialog::MessageDialog(), C4ChatControl::ChatSheet::NickItem::NickItem(), C4GUI::ProgressDialog::ProgressDialog(), C4GUI::RenameEdit::RenameEdit(), C4GameLobby::ScenDesc::ScenDesc(), C4StartupScenSelDlg::ScenListItem::ScenListItem(), C4GUI::ScrollWindow::ScrollWindow(), C4GUI::InputDialog::SetCustomEdit(), C4GoalDisplay::SetGoals(), C4GUI::FullscreenDialog::SetTitle(), C4GUI::Dialog::SetTitle(), and C4GUI::TextWindow::TextWindow().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ AfterElementRemoval()

virtual void C4GUI::Container::AfterElementRemoval ( )
inlineprotectedvirtualinherited

Reimplemented in C4GUI::ListBox.

Definition at line 756 of file C4Gui.h.

757  { if (pParent) pParent->AfterElementRemoval(); } // called by ScrollWindow to parent after an element has been removed
virtual void AfterElementRemoval()
Definition: C4Gui.h:756

References C4GUI::Container::AfterElementRemoval(), and C4GUI::Element::pParent.

Referenced by C4GUI::Container::AfterElementRemoval(), C4GUI::ListBox::AfterElementRemoval(), and C4GUI::Container::RemoveElement().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ApplyElementOffset()

void C4GUI::Window::ApplyElementOffset ( int32_t &  riX,
int32_t &  riY 
)
inlineoverridevirtualinherited

Reimplemented from C4GUI::Container.

Reimplemented in C4GUI::Dialog.

Definition at line 866 of file C4Gui.h.

867  { riX -= rcClientRect.x; riY -= rcClientRect.y; }
C4Rect rcClientRect
Definition: C4Gui.h:851

References C4GUI::Window::rcClientRect, C4Rect::x, and C4Rect::y.

Referenced by C4GUI::Dialog::ApplyElementOffset().

Here is the caller graph for this function:

◆ ApplyInvElementOffset()

void C4GUI::Window::ApplyInvElementOffset ( int32_t &  riX,
int32_t &  riY 
)
inlineoverridevirtualinherited

Reimplemented from C4GUI::Container.

Reimplemented in C4GUI::Dialog.

Definition at line 868 of file C4Gui.h.

869  { riX += rcClientRect.x; riY += rcClientRect.y; }

References C4GUI::Window::rcClientRect, C4Rect::x, and C4Rect::y.

Referenced by C4GUI::Dialog::ApplyInvElementOffset().

Here is the caller graph for this function:

◆ begin()

Iterator C4GUI::Container::begin ( )
inlineinherited

Definition at line 824 of file C4Gui.h.

824 { return Iterator(pFirst); }

References C4GUI::Container::pFirst.

Referenced by C4ScriptGuiWindow::ClearPointers().

Here is the caller graph for this function:

◆ CheckNameHotkey()

virtual bool C4GUI::Element::CheckNameHotkey ( const char *  )
inlineprotectedvirtualinherited

Reimplemented in C4StartupScenSelDlg::ScenListItem.

Definition at line 407 of file C4Gui.h.

407 { return false; }

Referenced by C4GUI::ListBox::CharIn().

Here is the caller graph for this function:

◆ Clear()

void C4GUI::Container::Clear ( )
inherited

Definition at line 63 of file C4GuiContainers.cpp.

64  {
65  ClearChildren();
66  }

References C4GUI::Container::ClearChildren().

Referenced by C4GUI::Screen::Clear(), C4GUI::ComboBox_FillCB::ClearEntries(), ClearRef(), C4GUI::Container::~Container(), and C4GUI::ContextMenu::~ContextMenu().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ClearChildren()

void C4GUI::Container::ClearChildren ( )
inherited

Definition at line 68 of file C4GuiContainers.cpp.

69  {
70  // delete all items; dtor will update list
71  while (pFirst)
72  {
73  if (pFirst->IsOwnPtrElement())
74  {
75  // unlink from list
76  Element *pANext = pFirst->pNext;
77  pFirst->pPrev = pFirst->pNext = nullptr;
78  pFirst->pParent = nullptr;
79  if ((pFirst = pANext))
80  pFirst->pPrev = nullptr;
81  else
82  pLast = nullptr;
83  }
84  else
85  delete pFirst;
86  }
87  }
friend class Element
Definition: C4Gui.h:844
virtual bool IsOwnPtrElement()
Definition: C4Gui.h:401

References C4GUI::Element::IsOwnPtrElement(), C4GUI::Container::pFirst, C4GUI::Container::pLast, C4GUI::Element::pNext, C4GUI::Element::pParent, and C4GUI::Element::pPrev.

Referenced by C4GUI::Container::Clear(), C4ScriptGuiWindow::Close(), C4ScriptGuiWindow::RemoveChild(), C4GoalDisplay::SetGoals(), and C4ScriptGuiWindow::~C4ScriptGuiWindow().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ClearRef()

void C4StartupNetListEntry::ClearRef ( )

Definition at line 94 of file C4StartupNetDlg.cpp.

95 {
96  // del old ref data
97  if (pRefClient)
98  {
100  Thread.RemoveProc(pRefClient);
101  delete pRefClient; pRefClient = nullptr;
102  }
103  if (pRef) { delete pRef; pRef = nullptr; }
104  eQueryType = NRQT_Unknown;
105  iTimeout = iRequestTimeout = 0;
106  fError = false;
107  sError.Clear();
108  int32_t i;
109  for (i=0; i<InfoLabelCount; ++i) sInfoText[i].Clear();
110  InvalidateStatusIcons();
111  sRefClientAddress.Clear();
112  fIsEnabled = true;
113  fIsImportant = false;
114 }
C4Application Application
Definition: C4Globals.cpp:44
C4InteractiveThread InteractiveThread
Definition: C4Application.h:45
void RemoveProc(StdSchedulerProc *pProc)
void Clear()
Definition: StdBuf.h:466

References Application, C4GUI::Container::Clear(), StdStrBuf::Clear(), InfoLabelCount, C4Application::InteractiveThread, NRQT_Unknown, and C4InteractiveThread::RemoveProc().

Referenced by SetReference(), SetRefQuery(), and ~C4StartupNetListEntry().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ClientPos2ScreenPos()

void C4GUI::Element::ClientPos2ScreenPos ( int32_t &  riX,
int32_t &  riY 
)
inherited

Definition at line 231 of file C4Gui.cpp.

232  {
233  // apply all parent offsets
234  Container *pCont = pParent;
235  while (pCont)
236  {
237  pCont->ApplyInvElementOffset(riX, riY);
238  pCont = pCont->GetParent();
239  }
240  // apply own offset
241  riX += rcBounds.x; riY += rcBounds.y;
242  }
virtual void ApplyInvElementOffset(int32_t &riX, int32_t &riY)
Definition: C4Gui.h:841
C4Rect rcBounds
Definition: C4Gui.h:385
friend class Container
Definition: C4Gui.h:472

References C4GUI::Container::ApplyInvElementOffset(), C4GUI::Element::GetParent(), C4GUI::Element::pParent, C4GUI::Element::rcBounds, C4Rect::x, and C4Rect::y.

Referenced by C4MapFolderData::CreateGUIElements(), C4GUI::Screen::DoContext(), and C4Menu::Draw().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DoContext()

bool C4GUI::Element::DoContext ( )
inherited

Definition at line 417 of file C4Gui.cpp.

418  {
419  if (!pContextHandler) return false;
420  return pContextHandler->OnContext(this, rcBounds.Wdt/2, rcBounds.Hgt/2);
421  }
virtual bool OnContext(Element *pOnElement, int32_t iX, int32_t iY)=0
ContextHandler * pContextHandler
Definition: C4Gui.h:381

References C4Rect::Hgt, C4GUI::ContextHandler::OnContext(), C4GUI::Element::pContextHandler, C4GUI::Element::rcBounds, and C4Rect::Wdt.

Referenced by C4GUI::Control::KeyContext(), and C4GUI::ContextButton::MouseInput().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DoDragging()

void C4GUI::Element::DoDragging ( CMouse rMouse,
int32_t  iX,
int32_t  iY,
DWORD  dwKeyParam 
)
virtualinherited

Reimplemented in C4GUI::Edit, and C4GUI::ScrollBar.

Definition at line 269 of file C4Gui.cpp.

270  {
271  // check if anything moved
272  if (pDragTarget && (iX != iDragX || iY != iDragY))
273  {
274  // move position, then
275  pDragTarget->rcBounds.x += iX-iDragX;
276  pDragTarget->rcBounds.y += iY-iDragY;
277  // drag X/Y is up-to-date if this is a child element of the drag target
279  }
280  }
int32_t iDragY
Definition: C4Gui.h:379
int32_t iDragX
Definition: C4Gui.h:379
virtual void UpdatePos()
Definition: C4Gui.cpp:193
Window * pDragTarget
Definition: C4Gui.h:378

References C4GUI::Element::iDragX, C4GUI::Element::iDragY, C4GUI::Element::pDragTarget, C4GUI::Element::rcBounds, C4GUI::Element::UpdatePos(), C4Rect::x, and C4Rect::y.

Referenced by C4GUI::Screen::MouseInput(), and C4GUI::Element::StopDragging().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Draw()

void C4GUI::Window::Draw ( C4TargetFacet cgo)
overrideprotectedvirtualinherited

Reimplemented from C4GUI::Container.

Reimplemented in C4ScriptGuiWindow, C4ScoreboardDlg, C4Menu, C4GUI::Dialog, and C4GUI::ContextMenu.

Definition at line 293 of file C4GuiContainers.cpp.

294  {
295  // invisible?
296  if (!IsVisible()) return;
297  // draw window itself
298  DrawElement(cgo);
299  // get target area
302  // clip to window area
303  int clx1, cly1, clx2, cly2;
304  pDraw->GetPrimaryClipper(clx1, cly1, clx2, cly2);
305  float nclx1 = cgo.TargetX+rcClipArea.x, ncly1 = cgo.TargetY+rcClipArea.y, nclx2 = cgo.TargetX+rcClipArea.x+rcClipArea.Wdt-1, ncly2 = cgo.TargetY+rcClipArea.y+rcClipArea.Hgt-1;
306  pDraw->ApplyZoom(nclx1, ncly1);
307  pDraw->ApplyZoom(nclx2, ncly2);
308  pDraw->SubPrimaryClipper(nclx1, ncly1, nclx2, ncly2);
309  // update target area
310  cgo.TargetX += rcClientRect.x; cgo.TargetY += rcClientRect.y;
311  // draw contents
312  Container::Draw(cgo);
313  // reset target area
314  cgo.TargetX -= rcClientRect.x; cgo.TargetY -= rcClientRect.y;
315  // reset clipper
316  pDraw->SetPrimaryClipper(clx1, cly1, clx2, cly2);
317  }
C4Draw * pDraw
Definition: C4Draw.cpp:42
bool SubPrimaryClipper(int iX1, int iY1, int iX2, int iY2)
Definition: C4Draw.cpp:196
bool GetPrimaryClipper(int &rX1, int &rY1, int &rX2, int &rY2)
Definition: C4Draw.cpp:716
bool SetPrimaryClipper(int iX1, int iY1, int iX2, int iY2)
Definition: C4Draw.cpp:217
void ApplyZoom(float &X, float &Y)
Definition: C4Draw.cpp:778
void Draw(C4TargetFacet &cgo) override
virtual void DrawElement(C4TargetFacet &cgo)
Definition: C4Gui.h:388
bool IsVisible()
Definition: C4Gui.cpp:201
C4Rect & GetClientRect() override
Definition: C4Gui.h:864
virtual bool IsComponentOutsideClientArea()
Definition: C4Gui.h:870
float TargetY
Definition: C4Facet.h:165
float TargetX
Definition: C4Facet.h:165

References C4Draw::ApplyZoom(), C4GUI::Container::Draw(), C4GUI::Element::DrawElement(), C4GUI::Element::GetBounds(), C4GUI::Window::GetClientRect(), C4Draw::GetPrimaryClipper(), C4Rect::Hgt, C4GUI::Window::IsComponentOutsideClientArea(), C4GUI::Element::IsVisible(), pDraw, C4GUI::Window::rcClientRect, C4Draw::SetPrimaryClipper(), C4Draw::SubPrimaryClipper(), C4TargetFacet::TargetX, C4TargetFacet::TargetY, C4Rect::Wdt, C4Rect::x, and C4Rect::y.

Referenced by C4GUI::ContextMenu::Draw(), C4GUI::Dialog::Draw(), and C4GUI::Screen::Draw().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Draw3DFrame()

void C4GUI::Element::Draw3DFrame ( C4TargetFacet cgo,
bool  fUp = false,
int32_t  iIndent = 1,
BYTE  byAlpha = C4GUI_BorderAlpha,
bool  fDrawTop = true,
int32_t  iTopOff = 0,
bool  fDrawLeft = true,
int32_t  iLeftOff = 0 
)
protectedinherited

Definition at line 291 of file C4Gui.cpp.

292  {
293  DWORD dwAlpha = byAlpha<<24;
294  int32_t x0 = cgo.TargetX + rcBounds.x + iLeftOff,
295  y0 = cgo.TargetY + rcBounds.y + iTopOff,
296  x1 = cgo.TargetX + rcBounds.x + rcBounds.Wdt - 1,
297  y1 = cgo.TargetY + rcBounds.y + rcBounds.Hgt - 1;
298  if (fDrawTop) pDraw->DrawLineDw(cgo.Surface, (float)x0,(float)y0,(float)x1,(float)y0, C4GUI_BorderColor1 | dwAlpha);
299  if (fDrawLeft) pDraw->DrawLineDw(cgo.Surface, (float)x0,(float)y0,(float)x0,(float)y1, C4GUI_BorderColor1 | dwAlpha);
300  if (fDrawTop) pDraw->DrawLineDw(cgo.Surface, (float)(x0+1),(float)(y0+1),(float)(x1-1),(float)(y0+1), C4GUI_BorderColor2 | dwAlpha);
301  if (fDrawLeft) pDraw->DrawLineDw(cgo.Surface, (float)(x0+1),(float)(y0+1),(float)(x0+1),(float)(y1-1), C4GUI_BorderColor2 | dwAlpha);
302  pDraw->DrawLineDw(cgo.Surface, (float)x0,(float)y1,(float)x1,(float)y1, C4GUI_BorderColor3 | dwAlpha);
303  pDraw->DrawLineDw(cgo.Surface, (float)x1,(float)y0,(float)x1,(float)y1, C4GUI_BorderColor3 | dwAlpha);
304  pDraw->DrawLineDw(cgo.Surface, (float)(x0+1),(float)(y1-1),(float)(x1-1),(float)(y1-1), C4GUI_BorderColor1 | dwAlpha);
305  pDraw->DrawLineDw(cgo.Surface, (float)(x1-1),(float)(y0+1),(float)(x1-1),(float)(y1-1), C4GUI_BorderColor1 | dwAlpha);
306  }
#define C4GUI_BorderColor2
Definition: C4Gui.h:86
#define C4GUI_BorderColor1
Definition: C4Gui.h:85
#define C4GUI_BorderColor3
Definition: C4Gui.h:87
uint32_t DWORD
void DrawLineDw(C4Surface *sfcTarget, float x1, float y1, float x2, float y2, DWORD dwClr, float width=1.0f)
Definition: C4Draw.cpp:608
C4Surface * Surface
Definition: C4Facet.h:117

References C4GUI_BorderColor1, C4GUI_BorderColor2, C4GUI_BorderColor3, C4Draw::DrawLineDw(), C4Rect::Hgt, pDraw, C4GUI::Element::rcBounds, C4Facet::Surface, C4TargetFacet::TargetX, C4TargetFacet::TargetY, C4Rect::Wdt, C4Rect::x, and C4Rect::y.

Referenced by C4GUI::ProgressBar::DrawElement(), C4GUI::GroupBox::DrawElement(), C4GUI::Edit::DrawElement(), C4GUI::ListBox::DrawElement(), C4GUI::Tabular::DrawElement(), C4GUI::TextWindow::DrawElement(), C4GUI::ContextMenu::DrawElement(), C4GUI::ComboBox::DrawElement(), and C4GUI::Dialog::DrawElement().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DrawBar()

void C4GUI::Element::DrawBar ( C4TargetFacet cgo,
DynBarFacet rFacets 
)
protectedinherited

Definition at line 308 of file C4Gui.cpp.

309  {
310  if (rcBounds.Hgt == rFacets.fctMiddle.Hgt)
311  {
312  // exact bar
313  int32_t x0=cgo.TargetX+rcBounds.x, y0=cgo.TargetY+rcBounds.y;
314  int32_t iX = rFacets.fctBegin.Wdt, w=rFacets.fctMiddle.Wdt, wLeft=rFacets.fctBegin.Wdt, wRight=rFacets.fctEnd.Wdt;
315  int32_t iRightShowLength = wRight/3;
316  bool fOverflow = (wLeft > rcBounds.Wdt);
317  if (fOverflow) rFacets.fctBegin.Wdt = rcBounds.Wdt;
318  rFacets.fctBegin.Draw(cgo.Surface, x0,y0);
319  if (fOverflow) rFacets.fctBegin.Wdt = wLeft;
320  while (iX < rcBounds.Wdt-iRightShowLength)
321  {
322  int32_t w2=std::min(w, rcBounds.Wdt-iRightShowLength-iX); rFacets.fctMiddle.Wdt=w2;
323  rFacets.fctMiddle.Draw(cgo.Surface, x0+iX, y0);
324  iX += w;
325  }
326  rFacets.fctMiddle.Wdt=w;
327  fOverflow = (wRight > rcBounds.Wdt);
328  if (fOverflow)
329  {
330  rFacets.fctEnd.X += wRight - rcBounds.Wdt;
331  rFacets.fctEnd.Wdt = rcBounds.Wdt;
332  }
333  rFacets.fctEnd.Draw(cgo.Surface, x0+rcBounds.Wdt-rFacets.fctEnd.Wdt, y0);
334  if (fOverflow)
335  {
336  rFacets.fctEnd.X -= wRight - rcBounds.Wdt;
337  rFacets.fctEnd.Wdt = wRight;
338  }
339  }
340  else
341  {
342  // zoomed bar
343  float fZoom = (float) rcBounds.Hgt / rFacets.fctMiddle.Hgt;
344  int32_t x0=cgo.TargetX+rcBounds.x, y0=cgo.TargetY+rcBounds.y;
345  int32_t iX = int32_t(fZoom*rFacets.fctBegin.Wdt), w=int32_t(fZoom*rFacets.fctMiddle.Wdt), wOld=rFacets.fctMiddle.Wdt;
346  int32_t iRightShowLength = rFacets.fctEnd.Wdt/3;
347  rFacets.fctBegin.DrawX(cgo.Surface, x0,y0,int32_t(fZoom*rFacets.fctBegin.Wdt),rcBounds.Hgt);
348  while (iX < rcBounds.Wdt-(fZoom*iRightShowLength))
349  {
350  int32_t w2=std::min<int32_t>(w, rcBounds.Wdt-int32_t(fZoom*iRightShowLength)-iX); rFacets.fctMiddle.Wdt=long(float(w2)/fZoom);
351  rFacets.fctMiddle.DrawX(cgo.Surface, x0+iX, y0, w2,rcBounds.Hgt);
352  iX += w;
353  }
354  rFacets.fctMiddle.Wdt=wOld;
355  rFacets.fctEnd.DrawX(cgo.Surface, x0+rcBounds.Wdt-int32_t(fZoom*rFacets.fctEnd.Wdt), y0,int32_t(fZoom*rFacets.fctEnd.Wdt),rcBounds.Hgt);
356  }
357  }

References C4Facet::Draw(), C4Facet::DrawX(), C4GUI::DynBarFacet::fctBegin, C4GUI::DynBarFacet::fctEnd, C4GUI::DynBarFacet::fctMiddle, C4Facet::Hgt, C4Rect::Hgt, C4GUI::Element::rcBounds, C4Facet::Surface, C4TargetFacet::TargetX, C4TargetFacet::TargetY, C4Facet::Wdt, C4Rect::Wdt, C4Facet::X, C4Rect::x, and C4Rect::y.

Referenced by C4GUI::WoodenLabel::DrawElement(), and C4GUI::Button::DrawElement().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DrawElement()

void C4StartupNetListEntry::DrawElement ( C4TargetFacet cgo)
overrideprotectedvirtual

Reimplemented from C4GUI::Element.

Definition at line 80 of file C4StartupNetDlg.cpp.

81 {
82  typedef C4GUI::Window ParentClass;
83  // background if important and not selected
84  if (fIsImportant && !IsSelectedChild(this))
85  {
86  int32_t x1 = cgo.X+cgo.TargetX+rcBounds.x;
87  int32_t y1 = cgo.Y+cgo.TargetY+rcBounds.y;
89  }
90  // inherited
91  ParentClass::DrawElement(cgo);
92 }
#define C4GUI_ImportantBGColor
Definition: C4Gui.h:60
void DrawBoxDw(C4Surface *sfcDest, int iX1, int iY1, int iX2, int iY2, DWORD dwClr)
Definition: C4Draw.cpp:840
float Y
Definition: C4Facet.h:118
float X
Definition: C4Facet.h:118
virtual bool IsSelectedChild(Element *pChild)
Definition: C4Gui.h:837

References C4GUI_ImportantBGColor, C4Draw::DrawBoxDw(), C4Rect::Hgt, C4GUI::Container::IsSelectedChild(), pDraw, C4GUI::Element::rcBounds, C4Facet::Surface, C4TargetFacet::TargetX, C4TargetFacet::TargetY, C4Rect::Wdt, C4Facet::X, C4Rect::x, C4Facet::Y, and C4Rect::y.

Here is the call graph for this function:

◆ DrawHBarByVGfx()

void C4GUI::Element::DrawHBarByVGfx ( C4TargetFacet cgo,
DynBarFacet rFacets 
)
protectedinherited

Definition at line 365 of file C4Gui.cpp.

366  {
367  C4DrawTransform trf;
368  float fOffX = cgo.TargetX + rcBounds.x + rcBounds.Hgt/2;
369  float fOffY = cgo.TargetY + rcBounds.y + rcBounds.Hgt/2;
370  trf.SetRotate(-90.0f, fOffX, fOffY);
371 
372  DrawHVBar(cgo, rFacets, trf, rcBounds.Wdt);
373  }
void SetRotate(float iAngle, float fOffX, float fOffY)
void DrawHVBar(C4TargetFacet &cgo, DynBarFacet &rFacets, C4DrawTransform &trf, int32_t iMiddleLength)
Definition: C4Gui.cpp:375

References C4GUI::Element::DrawHVBar(), C4Rect::Hgt, C4GUI::Element::rcBounds, C4BltTransform::SetRotate(), C4TargetFacet::TargetX, C4TargetFacet::TargetY, C4Rect::Wdt, C4Rect::x, and C4Rect::y.

Referenced by C4GUI::ScrollBar::DrawElement().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DrawHVBar()

void C4GUI::Element::DrawHVBar ( C4TargetFacet cgo,
DynBarFacet rFacets,
C4DrawTransform trf,
int32_t  iMiddleLength 
)
protectedinherited

Definition at line 375 of file C4Gui.cpp.

376  {
377  int32_t y0 = cgo.TargetY + rcBounds.y;
378  int32_t x0 = cgo.TargetX + rcBounds.x;
379 
380  // draw up arrow
381  rFacets.fctBegin.DrawT(cgo.Surface, x0, y0, 0, 0, &trf);
382 
383  // draw middle part
384  int32_t h = rFacets.fctMiddle.Hgt;
385  int32_t barHeight = iMiddleLength - (rFacets.fctBegin.Hgt + rFacets.fctEnd.Hgt);
386 
387  for (int32_t iY = 0; iY <= barHeight; iY += h)
388  {
389  int32_t h2 = std::min(h, barHeight - iY);
390  rFacets.fctMiddle.Hgt = h2;
391  rFacets.fctMiddle.DrawT(cgo.Surface, x0, y0 + rFacets.fctBegin.Hgt + iY, 0, 0, &trf);
392  }
393  rFacets.fctMiddle.Hgt = h;
394 
395  // draw lower arrow
396  rFacets.fctEnd.DrawT(cgo.Surface, x0, y0 + iMiddleLength - rFacets.fctEnd.Hgt, 0, 0, &trf);
397  }
int Hgt
Definition: C4Surface.h:65

References C4Facet::DrawT(), C4GUI::DynBarFacet::fctBegin, C4GUI::DynBarFacet::fctEnd, C4GUI::DynBarFacet::fctMiddle, C4Facet::Hgt, C4GUI::Element::rcBounds, C4Facet::Surface, C4TargetFacet::TargetX, C4TargetFacet::TargetY, C4Rect::x, and C4Rect::y.

Referenced by C4GUI::Element::DrawHBarByVGfx(), and C4GUI::Element::DrawVBar().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DrawVBar()

void C4GUI::Element::DrawVBar ( C4TargetFacet cgo,
DynBarFacet rFacets 
)
protectedinherited

Definition at line 359 of file C4Gui.cpp.

360  {
361  C4DrawTransform trf(1);
362  DrawHVBar(cgo, rFacets, trf, rcBounds.Hgt);
363  }

References C4GUI::Element::DrawHVBar(), C4Rect::Hgt, and C4GUI::Element::rcBounds.

Referenced by C4GUI::ScrollBar::DrawElement().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ElementPosChanged()

virtual void C4GUI::Container::ElementPosChanged ( Element pOfElement)
inlineprotectedvirtualinherited

Reimplemented in C4GUI::Screen, C4GUI::ContextMenu, C4GUI::TextWindow, C4GUI::ListBox, and C4GUI::ScrollWindow.

Definition at line 754 of file C4Gui.h.

754 { } // called when an element position is changed

Referenced by C4GUI::ScrollWindow::ElementPosChanged(), and C4GUI::Element::UpdatePos().

Here is the caller graph for this function:

◆ ElementSizeChanged()

virtual void C4GUI::Container::ElementSizeChanged ( Element pOfElement)
inlineprotectedvirtualinherited

Reimplemented in C4GUI::ContextMenu, C4GUI::TextWindow, C4GUI::ListBox, and C4GUI::ScrollWindow.

Definition at line 753 of file C4Gui.h.

753 { } // called when an element size is changed

Referenced by C4GUI::ListBox::ElementPosChanged(), C4GUI::TextWindow::ElementPosChanged(), C4GUI::ContextMenu::ElementPosChanged(), C4GUI::ScrollWindow::ElementSizeChanged(), C4GUI::ListBox::ElementSizeChanged(), C4GUI::TextWindow::ElementSizeChanged(), C4GUI::ContextMenu::ElementSizeChanged(), and C4GUI::Element::UpdateSize().

Here is the caller graph for this function:

◆ end()

Iterator C4GUI::Container::end ( )
inlineinherited

Definition at line 825 of file C4Gui.h.

825 { return Iterator(nullptr); }

Referenced by C4ScriptGuiWindow::ClearPointers().

Here is the caller graph for this function:

◆ Execute()

bool C4StartupNetListEntry::Execute ( )

Definition at line 175 of file C4StartupNetDlg.cpp.

176 {
177  // update entries
178  // if the return value is false, this entry will be deleted
179  // timer running?
180  if (iTimeout) if (time(nullptr) >= iTimeout)
181  {
182  // timeout!
183  // for internet servers, this means refresh needed - search anew!
184  if (pRefClient && eQueryType == NRQT_Masterserver)
185  {
186  fError = false;
187  sError.Clear();
188  pIcon->SetFacet(C4Startup::Get()->Graphics.fctNetGetRef);
189  pIcon->SetAnimated(true, 1);
190  pIcon->SetBounds(rctIconLarge);
191  sInfoText[1].Copy(LoadResStr("IDS_NET_INFOQUERY"));
192  iTimeout = 0;
193  QueryReferences();
194  // always keep item even if query failed
195  return true;
196  }
197  // any other item is just removed - return value marks this
198  return false;
199  }
200  // failed without a timer. Nothing to be done about it.
201  if (fError) return true;
202  // updates need to be done for references being retrieved only
203  if (!pRefClient) return true;
204  // check if it has arrived
205  if (pRefClient->isBusy())
206  // still requesting - but do not wait forever
207  if (time(nullptr) >= iRequestTimeout)
208  {
209  SetError(LoadResStr("IDS_NET_ERR_REFREQTIMEOUT"), TT_RefReqWait);
210  pRefClient->Cancel("Timeout");
211  }
212  return true;
213 }
const char * LoadResStr(const char *id)
Definition: C4Language.h:83
void SetFacet(const C4Facet &fct)
Definition: C4Gui.h:612
void SetAnimated(bool fEnabled, int iDelay)
bool isBusy() const
Definition: C4HTTP.h:86
void Cancel(const char *szReason)
Definition: C4HTTP.cpp:277
static C4Startup * Get()
Definition: C4Startup.h:147
void Copy()
Definition: StdBuf.h:467

References C4HTTPClient::Cancel(), StdStrBuf::Clear(), StdStrBuf::Copy(), C4Startup::Get(), C4HTTPClient::isBusy(), LoadResStr(), NRQT_Masterserver, C4GUI::Picture::SetAnimated(), C4GUI::Element::SetBounds(), C4GUI::Picture::SetFacet(), and TT_RefReqWait.

Here is the call graph for this function:

◆ GetBounds()

C4Rect& C4GUI::Element::GetBounds ( )
inlineinherited

Definition at line 445 of file C4Gui.h.

445 { return rcBounds; }

References C4GUI::Element::rcBounds.

Referenced by C4GUI::ListBox::AddElement(), C4Menu::AdjustPosition(), C4GameOverDlg::C4GameOverDlg(), C4StartupModsDlg::C4StartupModsDlg(), C4StartupModsListEntry::C4StartupModsListEntry(), C4StartupNetDlg::C4StartupNetDlg(), C4StartupNetListEntry(), C4StartupScenSelDlg::C4StartupScenSelDlg(), C4GUI::ContextMenu::CheckOpenSubmenu(), C4GUI::ListBox::ContractToElementHeight(), C4MapFolderData::CreateGUIElements(), C4GUI::Screen::DoContext(), C4GUI::Window::Draw(), C4GUI::ListBox::DrawElement(), C4GUI::ContextMenu::DrawElement(), C4GUI::TextWindow::ElementPosChanged(), C4GUI::TextWindow::ElementSizeChanged(), C4GUI::Dialog::GetMarginTop(), C4GUI::ScrollBar::GetMaxScroll(), C4GUI::GetScreenHgt(), C4GUI::GetScreenWdt(), C4Menu::InitSize(), C4GUI::ListBox::InsertElement(), C4GUI::ScrollWindow::IsRangeInView(), C4StartupPlrSelDlg::PlayerListItem::Load(), C4GUI::Window::MouseInput(), C4GUI::ScrollBar::MouseInput(), C4GUI::ListBox::MouseInput(), C4GUI::Screen::MouseInput(), C4StartupPlrSelDlg::OnNewBtn(), C4GUI::ScrollBar::OnPosChanged(), C4StartupPlrSelDlg::OnPropertyBtn(), C4StartupScenSelDlg::ScenListItem::ScenListItem(), C4GUI::ScrollWindow::ScrollBy(), C4GUI::ListBox::ScrollItemInView(), C4GUI::ScrollWindow::ScrollPages(), C4GUI::ScrollWindow::ScrollRangeInView(), C4GUI::ScrollWindow::ScrollToBottom(), C4GUI::Tabular::SetGfx(), C4GoalDisplay::SetGoals(), C4GUI::TextWindow::SetPicture(), C4GUI::Dialog::SetTitle(), C4GUI::ScrollBar::Update(), C4GUI::ScrollWindow::Update(), C4StartupPlrSelDlg::PlayerListItem::UpdateCore(), C4GUI::ListBox::UpdateElementPosition(), C4GUI::ListBox::UpdateElementPositions(), C4Menu::UpdateElementPositions(), C4GUI::ScrollWindow::UpdateOwnPos(), C4Menu::UpdateScrollBar(), and C4GUI::TextWindow::UpdateSize().

Here is the caller graph for this function:

◆ GetClientRect()

C4Rect& C4GUI::Window::GetClientRect ( )
inlineoverridevirtualinherited

Reimplemented from C4GUI::Element.

Definition at line 864 of file C4Gui.h.

864 { return rcClientRect; }

References C4GUI::Window::rcClientRect.

Referenced by C4GameOverDlg::C4GameOverDlg(), C4LeagueSignupDialog::C4LeagueSignupDialog(), C4StartupMainDlg::C4StartupMainDlg(), C4StartupModsDlg::C4StartupModsDlg(), C4StartupNetDlg::C4StartupNetDlg(), C4StartupOptionsDlg::C4StartupOptionsDlg(), C4StartupPlrColorPickerDlg::C4StartupPlrColorPickerDlg(), C4StartupPlrPropertiesDlg::C4StartupPlrPropertiesDlg(), C4StartupPlrSelDlg::C4StartupPlrSelDlg(), C4StartupScenSelDlg::C4StartupScenSelDlg(), C4GUI::ContextMenu::CheckOpenSubmenu(), C4GUI::ListBox::ContractToElementHeight(), C4MapFolderData::CreateGUIElements(), C4GUI::InfoDialog::CreateSubComponents(), C4GUI::Window::Draw(), C4GUI::ListBox::DrawElement(), C4GUI::ContextMenu::DrawElement(), C4GUI::FullscreenDialog::FullscreenDialog(), C4GUI::ListBox::GetItemWidth(), C4FileSelDlg::InitElements(), C4GUI::InputDialog::InputDialog(), C4GUI::LabeledEdit::LabeledEdit(), C4GameLobby::MainDlg::MainDlg(), C4GUI::MessageDialog::MessageDialog(), C4GUI::Window::MouseInput(), C4GUI::ContextMenu::MouseInput(), C4GUI::Screen::MouseInput(), C4GUI::ScrollBar::OnPosChanged(), C4GUI::ProgressDialog::ProgressDialog(), C4GameLobby::ScenDesc::ScenDesc(), C4StartupScenSelDlg::ScenListItem::ScenListItem(), C4GUI::ScrollWindow::ScrollBy(), C4GUI::ScrollWindow::ScrollRangeInView(), C4GUI::ScrollWindow::ScrollToBottom(), C4GUI::ScrollWindow::ScrollWindow(), C4GoalDisplay::SetGoals(), C4GUI::FullscreenDialog::SetTitle(), C4GUI::TextWindow::TextWindow(), C4GUI::ScrollBar::Update(), C4GUI::ListBox::UpdateColumnCount(), and C4GUI::TextWindow::UpdateSize().

Here is the caller graph for this function:

◆ GetContainedClientRect()

C4Rect C4GUI::Element::GetContainedClientRect ( )
inlineinherited

Definition at line 448 of file C4Gui.h.

448 { C4Rect rc=GetClientRect(); rc.x=rc.y=0; return rc; }
virtual C4Rect & GetClientRect()
Definition: C4Gui.h:447

References C4GUI::Element::GetClientRect(), C4Rect::x, and C4Rect::y.

Referenced by C4GUI::Tabular::AddSheet(), C4ChartDialog::C4ChartDialog(), C4Network2ClientListDlg::C4Network2ClientListDlg(), C4Network2StartWaitDlg::C4Network2StartWaitDlg(), C4StartupAboutDlg::C4StartupAboutDlg(), C4StartupLegalDlg::C4StartupLegalDlg(), C4StartupModsDlg::C4StartupModsDlg(), C4StartupModsListEntry::C4StartupModsListEntry(), C4StartupNetDlg::C4StartupNetDlg(), C4StartupNetListEntry(), C4FileSelDlg::DefaultListItem::DefaultListItem(), C4ChatDlg::DoPlacement(), C4GUI::Element::GetToprightCornerRect(), C4GUI::InputDialog::InputDialog(), C4GameLobby::MainDlg::MainDlg(), C4GUI::TextWindow::TextWindow(), C4Menu::UpdateElementPositions(), C4ChatControl::ChatSheet::NickItem::UpdateOwnPos(), C4FileSelDlg::DefaultListItem::UpdateOwnPos(), C4GUI::ScrollWindow::UpdateOwnPos(), C4StartupScenSelDlg::ScenListItem::UpdateOwnPos(), C4ChatControl::UpdateSize(), C4ChatDlg::UpdateSize(), C4GUI::Tabular::UpdateSize(), and C4GUI::TextWindow::UpdateSize().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetContainer()

Container* C4GUI::Container::GetContainer ( )
inlineoverridevirtualinherited

Reimplemented from C4GUI::Element.

Definition at line 831 of file C4Gui.h.

831 { return this; } // returns parent for elements; this for containers

◆ GetContextHandler()

ContextHandler * C4GUI::Element::GetContextHandler ( )
virtualinherited

Reimplemented in C4GUI::Dialog.

Definition at line 429 of file C4Gui.cpp.

430  {
431  // fallback to parent context, if own is not assigned
433  }
virtual ContextHandler * GetContextHandler()
Definition: C4Gui.cpp:429

References C4GUI::Element::GetContextHandler(), C4GUI::Element::pContextHandler, and C4GUI::Element::pParent.

Referenced by C4GUI::ContextButton::ContextButton(), C4GUI::Element::GetContextHandler(), and C4GUI::Element::MouseInput().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetDialogWindow()

virtual class DialogWindow* C4GUI::Element::GetDialogWindow ( )
inlineprotectedvirtualinherited

Reimplemented in C4GUI::Dialog.

Definition at line 404 of file C4Gui.h.

404 { return nullptr; } // return DialogWindow if this element is a dialog

◆ GetDlg()

Dialog * C4GUI::Element::GetDlg ( )
virtualinherited

Reimplemented in C4GUI::Dialog.

Definition at line 288 of file C4Gui.cpp.

288 { if (pParent) return pParent->GetDlg (); return nullptr; }
virtual class Dialog * GetDlg()
Definition: C4Gui.cpp:288

References C4GUI::Element::GetDlg(), and C4GUI::Element::pParent.

Referenced by C4GUI::Control::DisableFocus(), C4ChatControl::DlgEnter(), C4ChatControl::GetDefaultControl(), C4GUI::Element::GetDlg(), C4GUI::ContextMenu::GetTargetDialog(), C4GUI::Control::HasDrawFocus(), C4GUI::Element::IsInActiveDlg(), C4GUI::Label::MouseInput(), C4GUI::Control::MouseInput(), C4GUI::Screen::MouseInput(), C4ChatControl::OnConnectBtn(), C4GUI::RenameEdit::OnFinishInput(), C4GUI::Label::OnHotkey(), C4ChatControl::OnLoginDataEnter(), C4GUI::CloseButton::OnPress(), C4GUI::CloseIconButton::OnPress(), C4GUI::RenameEdit::RenameEdit(), C4GUI::Container::SetVisibility(), and C4GUI::Screen::ShowDialog().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetElementByIndex()

Element * C4GUI::Container::GetElementByIndex ( int32_t  i)
inherited

Definition at line 223 of file C4GuiContainers.cpp.

224  {
225  // get next until end of list or queried index is reached
226  // if i is negative or equal or larger than childcount, the loop will never break and nullptr returned
227  Element *pEl;
228  for (pEl = pFirst; i-- && pEl; pEl=pEl->pNext) {}
229  return pEl;
230  }

References C4GUI::Container::pFirst, and C4GUI::Element::pNext.

Referenced by C4GUI::ContextMenu::GetIndexedEntry(), C4Menu::GetItem(), C4GUI::Tabular::GetSheet(), and C4GUI::ContextMenu::SelectItem().

Here is the caller graph for this function:

◆ GetElementCount()

int32_t C4GUI::Container::GetElementCount ( )
inherited

Definition at line 232 of file C4GuiContainers.cpp.

233  {
234  int32_t cnt=0;
235  for (Element *pEl = pFirst; pEl; pEl=pEl->pNext) ++cnt;
236  return cnt;
237  }

References C4GUI::Container::pFirst, and C4GUI::Element::pNext.

Referenced by C4ScriptGuiWindow::ExecuteCommand(), C4GUI::Tabular::GetSheetCount(), and C4GUI::ListBox::SortElements().

Here is the caller graph for this function:

◆ GetError()

const char* C4StartupNetListEntry::GetError ( )
inline

Definition at line 114 of file C4StartupNetDlg.h.

114 { return fError ? sError.getData() : nullptr; } // return error message, if any is set
const char * getData() const
Definition: StdBuf.h:442

References StdStrBuf::getData().

Referenced by C4StartupNetDlg::DoOK().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetFirst()

◆ GetFirstContained()

Element* C4GUI::Container::GetFirstContained ( )
inlineoverridevirtualinherited

Reimplemented from C4GUI::Element.

Definition at line 773 of file C4Gui.h.

773 { return pFirst; }

References C4GUI::Container::pFirst.

Referenced by C4GUI::ListBox::OnGetFocus().

Here is the caller graph for this function:

◆ GetFirstNestedElement()

Element * C4GUI::Container::GetFirstNestedElement ( bool  fBackwards)
overridevirtualinherited

Reimplemented from C4GUI::Element.

Definition at line 204 of file C4GuiContainers.cpp.

205  {
206  // get first/last in own list
207  if (pFirst) return (fBackwards ? pLast : pFirst)->GetFirstNestedElement(fBackwards);
208  // no own list: return this one
209  return this;
210  }

References C4GUI::Element::GetFirstNestedElement(), C4GUI::Container::pFirst, and C4GUI::Container::pLast.

Referenced by C4GUI::Container::GetNextNestedElement().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetHeight()

int32_t C4GUI::Element::GetHeight ( )
inlineinherited

Definition at line 444 of file C4Gui.h.

444 { return rcBounds.Hgt; }

References C4Rect::Hgt, and C4GUI::Element::rcBounds.

Referenced by C4GUI::Screen::ShowDialog().

Here is the caller graph for this function:

◆ GetJoinAddress()

const char * C4StartupNetListEntry::GetJoinAddress ( )

Definition at line 572 of file C4StartupNetDlg.cpp.

573 {
574  // only unresolved references
575  if (!pRefClient) return nullptr;
576  // not masterservers (cannot join directly on clonk.de)
577  if (eQueryType == NRQT_Masterserver) return nullptr;
578  // return join address
579  return pRefClient->getServerName();
580 }
const char * getServerName() const
Definition: C4HTTP.h:94

References C4HTTPClient::getServerName(), and NRQT_Masterserver.

Referenced by C4StartupNetDlg::DoOK().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetLast()

Element* C4GUI::Container::GetLast ( )
inlineinherited

Definition at line 830 of file C4Gui.h.

830 { return pLast; }

References C4GUI::Container::pLast.

Referenced by C4GUI::ListBox::GetLast(), C4Menu::InitSize(), and C4Menu::UpdateScrollBar().

Here is the caller graph for this function:

◆ GetLastContained()

virtual Element* C4GUI::Container::GetLastContained ( )
inlinevirtualinherited

Definition at line 774 of file C4Gui.h.

774 { return pLast; }

References C4GUI::Container::pLast.

◆ GetListItemTopSpacing()

int32_t C4StartupNetListEntry::GetListItemTopSpacing ( )
inlineoverrideprotectedvirtual

Reimplemented from C4GUI::Element.

Definition at line 99 of file C4StartupNetDlg.h.

99 { return fIsCollapsed ? 5 : 10; }

◆ GetListItemTopSpacingBar()

virtual bool C4GUI::Element::GetListItemTopSpacingBar ( )
inlinevirtualinherited

Definition at line 462 of file C4Gui.h.

462 { return false; }

Referenced by C4GUI::ListBox::DrawElement().

Here is the caller graph for this function:

◆ GetMarginBottom()

virtual int32_t C4GUI::Window::GetMarginBottom ( )
inlinevirtualinherited

Reimplemented in C4StartupPlrPropertiesDlg, C4Menu, C4GUI::FullscreenDialog, C4GUI::Dialog, C4GUI::ContextMenu, C4GUI::TextWindow, C4GUI::Tabular, C4GUI::ListBox, C4GUI::Edit, and C4GUI::GroupBox.

Definition at line 876 of file C4Gui.h.

876 { return 0; }

Referenced by C4GUI::Dialog::GetMarginBottom(), C4Menu::InitSize(), C4GoalDisplay::SetGoals(), and C4GUI::Window::UpdateOwnPos().

Here is the caller graph for this function:

◆ GetMarginLeft()

virtual int32_t C4GUI::Window::GetMarginLeft ( )
inlinevirtualinherited

Reimplemented in C4StartupPlrPropertiesDlg, C4Menu, C4GUI::FullscreenDialog, C4GUI::Dialog, C4GUI::ContextMenu, C4GUI::TextWindow, C4GUI::Tabular, C4GUI::ListBox, C4GUI::Edit, and C4GUI::GroupBox.

Definition at line 874 of file C4Gui.h.

874 { return 0; }

Referenced by C4GUI::Dialog::GetMarginLeft(), C4Menu::InitSize(), and C4GUI::Window::UpdateOwnPos().

Here is the caller graph for this function:

◆ GetMarginRight()

virtual int32_t C4GUI::Window::GetMarginRight ( )
inlinevirtualinherited

Reimplemented in C4StartupPlrPropertiesDlg, C4Menu, C4GUI::FullscreenDialog, C4GUI::Dialog, C4GUI::ContextMenu, C4GUI::TextWindow, C4GUI::Tabular, C4GUI::ListBox, C4GUI::Edit, and C4GUI::GroupBox.

Definition at line 875 of file C4Gui.h.

875 { return 0; }

Referenced by C4GUI::Dialog::GetMarginRight(), C4Menu::InitSize(), and C4GUI::Window::UpdateOwnPos().

Here is the caller graph for this function:

◆ GetMarginTop()

virtual int32_t C4GUI::Window::GetMarginTop ( )
inlinevirtualinherited

Reimplemented in C4StartupScenSelDlg, C4StartupPlrPropertiesDlg, C4StartupPlrSelDlg, C4GUI::FullscreenDialog, C4GUI::Dialog, C4GUI::ContextMenu, C4GUI::TextWindow, C4GUI::Tabular, C4GUI::ListBox, C4GUI::Edit, and C4GUI::GroupBox.

Definition at line 873 of file C4Gui.h.

873 { return 0; }

Referenced by C4GUI::Dialog::GetMarginTop(), C4Menu::InitSize(), C4GoalDisplay::SetGoals(), and C4GUI::Window::UpdateOwnPos().

Here is the caller graph for this function:

◆ GetNext()

◆ GetNextLower()

C4GUI::Element * C4StartupNetListEntry::GetNextLower ( int32_t  sortOrder)
protected

Definition at line 280 of file C4StartupNetDlg.cpp.

281 {
282  // search list for the next element of a lower sort order
283  for (C4GUI::Element *pElem = pList->GetFirst(); pElem; pElem = pElem->GetNext())
284  {
285  C4StartupNetListEntry *pEntry = static_cast<C4StartupNetListEntry *>(pElem);
286  if (pEntry->iSortOrder < sortOrder)
287  return pElem;
288  }
289  // none found: insert at start
290  return nullptr;
291 }
Element * GetNext() const
Definition: C4Gui.h:449
Element * GetFirst()
Definition: C4Gui.h:1572

References C4GUI::ListBox::GetFirst(), and C4GUI::Element::GetNext().

Referenced by OnReference().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetNextNestedElement()

Element * C4GUI::Container::GetNextNestedElement ( Element pPrevElement,
bool  fBackwards 
)
inherited

Definition at line 171 of file C4GuiContainers.cpp.

172  {
173  if (fBackwards)
174  {
175  // this is last
176  if (pPrevElement == this) return nullptr;
177  // no previous given?
178  if (!pPrevElement)
179  // then use last nested for backwards search
180  return GetFirstNestedElement(true);
181  // get nested, previous element if present
182  if (pPrevElement->pPrev) return pPrevElement->pPrev->GetFirstNestedElement(true);
183  // if not, return parent (could be this)
184  return pPrevElement->pParent;
185  }
186  else
187  {
188  // forward search: first element is this
189  if (!pPrevElement) return this;
190  // check next nested
191  Element *pEl;
192  if ((pEl = pPrevElement->GetFirstContained())) return pEl;
193  // check next in list, going upwards until this container is reached
194  while (pPrevElement && pPrevElement != this)
195  {
196  if ((pEl = pPrevElement->pNext)) return pEl;
197  pPrevElement = pPrevElement->pParent;
198  }
199  // nothing found
200  }
201  return nullptr;
202  }
Element * GetFirstNestedElement(bool fBackwards) override

References C4GUI::Element::GetFirstContained(), C4GUI::Element::GetFirstNestedElement(), C4GUI::Container::GetFirstNestedElement(), C4GUI::Element::pNext, C4GUI::Element::pParent, and C4GUI::Element::pPrev.

Referenced by C4GUI::Dialog::AdvanceFocus().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetOwnToolTip()

const char* C4GUI::Element::GetOwnToolTip ( )
inlineinherited

Definition at line 440 of file C4Gui.h.

440 { return ToolTip.getData(); } // return tooltip const char*, without fallback to parent

References StdStrBuf::getData().

Here is the call graph for this function:

◆ GetParent()

◆ GetPrev()

Element* C4GUI::Element::GetPrev ( ) const
inlineinherited

Definition at line 450 of file C4Gui.h.

450 { return pPrev; }

References C4GUI::Element::pPrev.

Referenced by C4GUI::ListBox::AddElement(), C4GUI::Screen::GetDialog(), C4GUI::Screen::GetTopDialog(), C4GUI::Window::MouseInput(), C4GUI::Screen::MouseInput(), and C4GUI::Container::ReverseIterator::operator++().

Here is the caller graph for this function:

◆ GetReference()

C4Network2Reference* C4StartupNetListEntry::GetReference ( ) const
inline

Definition at line 116 of file C4StartupNetDlg.h.

116 { return pRef; } // have a look at the reference

Referenced by C4StartupNetDlg::DoOK().

Here is the caller graph for this function:

◆ GetScreen()

Screen * C4GUI::Element::GetScreen ( )
virtualinherited

Reimplemented in C4GUI::Screen, and C4GUI::ContextMenu.

Definition at line 289 of file C4Gui.cpp.

289 { if (pParent) return pParent->GetScreen(); return nullptr; }
virtual Screen * GetScreen()
Definition: C4Gui.cpp:289

References C4GUI::Element::GetScreen(), and C4GUI::Element::pParent.

Referenced by C4GUI::Dialog::Close(), C4StartupScenSelDlg::DoOK(), C4GUI::Dialog::Draw(), C4GUI::ContextButton::DrawElement(), C4GUI::ComboBox::DrawElement(), C4GUI::Dialog::FadeOut(), C4GUI::Element::GetScreen(), C4GUI::Control::HasDrawFocus(), C4GUI::Dialog::IsActive(), C4StartupScenSelDlg::KeyDelete(), C4GUI::ComboBox::MouseInput(), C4GameOptionButtons::OnBtnComment(), C4GameOptionButtons::OnBtnPassword(), C4StartupPlrPropertiesDlg::OnClosed(), C4StartupPlrPropertiesDlg::OnClrChangeCustom(), C4ChatControl::OnConnectBtn(), C4GUI::CBContextHandler< CBClass >::OnContext(), C4StartupPlrSelDlg::OnDelBtn(), C4StartupPlrSelDlg::OnDelBtnConfirm(), C4StartupPlrSelDlg::OnNewBtn(), C4StartupPlrPropertiesDlg::OnPictureBtn(), C4StartupPlrSelDlg::OnPropertyBtn(), C4StartupMainDlg::OnShown(), C4StartupMainDlg::OnTODO(), C4StartupOptionsDlg::SaveConfig(), C4GUI::Element::SetVisibility(), C4GameLobby::MainDlg::Start(), C4StartupScenSelDlg::StartScenario(), C4ScoreboardDlg::Update(), C4StartupPlrSelDlg::PlayerListItem::UpdateCore(), C4FileSelDlg::UserClose(), C4StartupPlrPropertiesDlg::UserClose(), and C4ChatControl::UserQueryQuit().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetToolTip()

const char * C4GUI::Element::GetToolTip ( )
inherited

Definition at line 423 of file C4Gui.cpp.

424  {
425  // fallback to parent tooltip, if own is not assigned
426  return (!pParent || !ToolTip.isNull()) ? ToolTip.getData() : pParent->GetToolTip();
427  }
const char * GetToolTip()
Definition: C4Gui.cpp:423
bool isNull() const
Definition: StdBuf.h:441

References StdStrBuf::getData(), C4GUI::Element::GetToolTip(), StdStrBuf::isNull(), and C4GUI::Element::pParent.

Referenced by C4GUI::CMouse::Draw(), C4GUI::Element::GetToolTip(), C4GameLobby::MainDlg::OnRightTabContext(), and C4GameLobby::MainDlg::UpdateRightTab().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetToprightCornerRect()

C4Rect C4GUI::Element::GetToprightCornerRect ( int32_t  iWidth = 16,
int32_t  iHeight = 16,
int32_t  iHIndent = 4,
int32_t  iVIndent = 4,
int32_t  iIndexX = 0 
)
inherited

Definition at line 399 of file C4Gui.cpp.

400  {
401  // bounds by topright corner of element
402  C4Rect rtBounds = (GetContainer() != this) ? GetClientRect() : GetContainedClientRect();
403  rtBounds.x += rtBounds.Wdt - (iWidth + iHIndent) * (iIndexX + 1);
404  rtBounds.y += iVIndent;
405  rtBounds.Wdt = rtBounds.Hgt = iHeight;
406  return rtBounds;
407  }
virtual Container * GetContainer()
Definition: C4Gui.h:410

References C4GUI::Element::GetClientRect(), C4GUI::Element::GetContainedClientRect(), C4GUI::Element::GetContainer(), C4Rect::Hgt, C4Rect::Wdt, C4Rect::x, and C4Rect::y.

Referenced by C4GUI::ContextButton::ContextButton(), C4GameLobby::MainDlg::MainDlg(), C4GUI::Dialog::SetTitle(), and C4GUI::Dialog::UpdateSize().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetWidth()

int32_t C4GUI::Element::GetWidth ( )
inlineinherited

Definition at line 443 of file C4Gui.h.

443 { return rcBounds.Wdt; }

References C4GUI::Element::rcBounds, and C4Rect::Wdt.

Referenced by C4GUI::Screen::ShowDialog().

Here is the caller graph for this function:

◆ GrabReference()

C4Network2Reference * C4StartupNetListEntry::GrabReference ( )

Definition at line 582 of file C4StartupNetDlg.cpp.

583 {
584  C4Network2Reference *pOldRef = pRef;
585  pRef = nullptr;
586  return pOldRef;
587 }

Referenced by C4StartupNetDlg::DoOK().

Here is the caller graph for this function:

◆ InsertElement()

void C4GUI::Container::InsertElement ( Element pChild,
Element pInsertBefore 
)
inherited

Definition at line 150 of file C4GuiContainers.cpp.

151  {
152  // add?
153  if (!pInsertBefore) { AddElement(pChild); return; }
154  // safety
155  if (!pChild || pInsertBefore->pParent != this) return;
156  // remove from any previous container
157  if (pChild->pParent) pChild->pParent->RemoveElement(pChild);
158  // add before given element
159  if ((pChild->pPrev = pInsertBefore->pPrev))
160  pInsertBefore->pPrev->pNext = pChild;
161  else
162  pFirst = pChild;
163  pChild->pNext = pInsertBefore; pInsertBefore->pPrev = pChild;
164  pChild->pParent = this;
165 
166  assert(pChild->pNext != pChild);
167  assert(pChild->pPrev != pChild);
168  assert(pChild->pParent != pChild);
169  }

References C4GUI::Container::AddElement(), C4GUI::Container::pFirst, C4GUI::Element::pNext, C4GUI::Element::pParent, C4GUI::Element::pPrev, and C4GUI::Container::RemoveElement().

Referenced by C4GUI::ListBox::InsertElement(), and C4GUI::Screen::ShowDialog().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsComponentOutsideClientArea()

virtual bool C4GUI::Window::IsComponentOutsideClientArea ( )
inlinevirtualinherited

Reimplemented in C4StartupPlrPropertiesDlg, C4GUI::FullscreenDialog, C4GUI::Dialog, and C4GUI::ScrollWindow.

Definition at line 870 of file C4Gui.h.

870 { return false; } // if set, drawing routine of subcomponents will clip to Bounds rather than to ClientRect

Referenced by C4GUI::Window::Draw().

Here is the caller graph for this function:

◆ IsExternalDrawDialog()

virtual bool C4GUI::Element::IsExternalDrawDialog ( )
inlineprotectedvirtualinherited

Reimplemented in C4Menu, and C4GUI::Dialog.

Definition at line 402 of file C4Gui.h.

402 { return false; }

◆ IsFocused()

virtual bool C4GUI::Container::IsFocused ( Control pCtrl)
inlinevirtualinherited

Reimplemented in C4GUI::Dialog, and C4GUI::ListBox.

Definition at line 836 of file C4Gui.h.

836 { return pParent ? pParent->IsFocused(pCtrl) : false; }
virtual bool IsFocused(Control *pCtrl)
Definition: C4Gui.h:836

References C4GUI::Container::IsFocused(), and C4GUI::Element::pParent.

Referenced by C4GUI::Control::HasFocus(), C4GUI::Container::IsFocused(), and C4GUI::ListBox::IsFocused().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsFocusElement()

virtual Control* C4GUI::Element::IsFocusElement ( )
inlinevirtualinherited

Reimplemented in C4GUI::ComboBox, C4GUI::TextWindow, C4GUI::Tabular, C4GUI::ListBox, C4GUI::CheckBox, and C4GUI::Control.

Definition at line 432 of file C4Gui.h.

432 { return nullptr; }; // return control to gain focus in search-cycle

Referenced by C4GUI::Dialog::AdvanceFocus().

Here is the caller graph for this function:

◆ IsImmediateToolTip()

bool C4GUI::Element::IsImmediateToolTip ( ) const
inlineinherited

Definition at line 441 of file C4Gui.h.

441 { return is_immediate_tooltip; }

Referenced by C4GUI::CMouse::Draw().

Here is the caller graph for this function:

◆ IsInActiveDlg()

bool C4GUI::Element::IsInActiveDlg ( bool  fForKeyboard)
inherited

Definition at line 435 of file C4Gui.cpp.

436  {
437  // get dlg
438  Dialog *pDlg=GetDlg();
439  if (!pDlg) return false;
440  // check if dlg is active
441  return pDlg->IsActive(fForKeyboard);
442  }

References C4GUI::Element::GetDlg(), and C4GUI::Dialog::IsActive().

Referenced by C4GUI::ControlKeyDlgCB< TargetClass >::CheckCondition(), C4GUI::Button::DrawElement(), C4GUI::IconButton::DrawElement(), C4GUI::ArrowButton::DrawElement(), C4GUI::FacetButton::DrawElement(), C4GUI::CheckBox::DrawElement(), and C4GUI::ContextButton::DrawElement().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsMenu()

virtual bool C4GUI::Element::IsMenu ( )
inlineprotectedvirtualinherited

Reimplemented in C4GUI::ContextMenu, and C4GUI::ContextMenu::Entry.

Definition at line 403 of file C4Gui.h.

403 { return false; }

Referenced by C4GUI::Element::RemoveElement().

Here is the caller graph for this function:

◆ IsOwnPtrElement()

virtual bool C4GUI::Element::IsOwnPtrElement ( )
inlineprotectedvirtualinherited

Reimplemented in C4Menu.

Definition at line 401 of file C4Gui.h.

401 { return false; } // if true is returned, item will not be deleted when container is cleared

Referenced by C4GUI::Container::ClearChildren().

Here is the caller graph for this function:

◆ IsParentOf()

bool C4GUI::Container::IsParentOf ( Element pEl)
overridevirtualinherited

Reimplemented from C4GUI::Element.

Definition at line 239 of file C4GuiContainers.cpp.

240  {
241  // return whether this is the parent container (directly or recursively) of the passed element
242  for (Container *pC = pEl->GetParent(); pC; pC = pC->GetParent())
243  if (pC == this) return true;
244  return false;
245  }

References C4GUI::Element::GetParent().

Referenced by C4GUI::Control::MouseInput(), and C4GUI::Container::SetVisibility().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsSameAddress()

bool C4StartupNetListEntry::IsSameAddress ( const C4Network2Reference pRef2)

Definition at line 534 of file C4StartupNetDlg.cpp.

535 {
536  // not if ref has not been retrieved yet
537  if (!pRef) return false;
538  // check all of our addresses
539  for (int i = 0; i < pRef->getAddrCnt(); i++)
540  // against all of the other ref's addresses
541  for (int j = 0; j < pRef2->getAddrCnt(); j++)
542  // at least one match!
543  if (pRef->getAddr(i) == pRef2->getAddr(j))
544  return true;
545  // no match
546  return false;
547 }
const C4Network2Address & getAddr(int i) const

References C4Network2Reference::getAddr(), and C4Network2Reference::getAddrCnt().

Here is the call graph for this function:

◆ IsSameHost()

bool C4StartupNetListEntry::IsSameHost ( const C4Network2Reference pRef2)

Definition at line 523 of file C4StartupNetDlg.cpp.

524 {
525  // not if ref has not been retrieved yet
526  if (!pRef) return false;
527  C4Client *pHost1 = pRef->Parameters.Clients.getHost();
528  C4Client *pHost2 = pRef2->Parameters.Clients.getHost();
529  if (!pHost1 || !pHost2) return false;
530  // check
531  return SEqual(pHost1->getCUID(), pHost2->getCUID()) && SEqual(pHost1->getName(), pHost2->getName());
532 }
bool SEqual(const char *szStr1, const char *szStr2)
Definition: Standard.h:93
const char * getCUID() const
Definition: C4Client.h:108
const char * getName() const
Definition: C4Client.h:107
C4Client * getHost() const
Definition: C4Client.h:163
C4ClientList Clients
C4GameParameters Parameters

References C4GameParameters::Clients, C4Client::getCUID(), C4ClientList::getHost(), C4Client::getName(), C4Network2Reference::Parameters, and SEqual().

Here is the call graph for this function:

◆ IsSameRefQueryAddress()

bool C4StartupNetListEntry::IsSameRefQueryAddress ( const char *  szJoinAddress)

Definition at line 549 of file C4StartupNetDlg.cpp.

550 {
551  // only unretrieved references
552  if (!pRefClient) return false;
553  // if request failed, create a duplicate anyway in case the game is opened now
554  // except masterservers, which would re-search some time later anyway
555  if (fError && eQueryType != NRQT_Masterserver) return false;
556  // check equality of address
557  // do it the simple way for now
558  return SEqualNoCase(sRefClientAddress.getData(), szJoinaddress);
559 }
bool SEqualNoCase(const char *szStr1, const char *szStr2, int iLen)
Definition: Standard.cpp:213

References StdStrBuf::getData(), NRQT_Masterserver, and SEqualNoCase().

Here is the call graph for this function:

◆ IsSelectedChild()

virtual bool C4GUI::Container::IsSelectedChild ( Element pChild)
inlinevirtualinherited

Reimplemented in C4GUI::Tabular, and C4GUI::ListBox.

Definition at line 837 of file C4Gui.h.

837 { return pParent ? pParent->IsSelectedChild(pChild) : true; } // whether the child element is selected - only false for list-box-containers which can have unselected children

References C4GUI::Container::IsSelectedChild(), and C4GUI::Element::pParent.

Referenced by C4GUI::Dialog::AdvanceFocus(), DrawElement(), and C4GUI::Container::IsSelectedChild().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsVisible()

bool C4GUI::Element::IsVisible ( )
inherited

◆ KeywordMatch()

bool C4StartupNetListEntry::KeywordMatch ( const char *  szMatch)

Definition at line 561 of file C4StartupNetDlg.cpp.

562 {
563  // only finished references
564  if (!pRef) return false;
565  if(SSearchNoCase(pRef->getTitle(),szMatch)) return true;
566  C4Client *pHost = pRef->Parameters.Clients.getHost();
567  if(pHost && SSearchNoCase(pHost->getName(),szMatch)) return true;
568  if(SSearchNoCase(pRef->getComment(),szMatch)) return true;
569  return false;
570 }
const char * SSearchNoCase(const char *szString, const char *szIndex)
Definition: Standard.cpp:384
const char * getComment() const
const char * getTitle() const

References C4GameParameters::Clients, C4Network2Reference::getComment(), C4ClientList::getHost(), C4Client::getName(), C4Network2Reference::getTitle(), C4Network2Reference::Parameters, and SSearchNoCase().

Here is the call graph for this function:

◆ MakeLastElement()

void C4GUI::Container::MakeLastElement ( Element pChild)
inherited

Definition at line 106 of file C4GuiContainers.cpp.

107  {
108  // must be from same container
109  if (pChild->pParent != this) return;
110  // unlink from list
111  if (pChild->pPrev) pChild->pPrev->pNext = pChild->pNext; else pFirst = pChild->pNext;
112  if (pChild->pNext) pChild->pNext->pPrev = pChild->pPrev; else pLast = pChild->pPrev;
113  // readd to front of list
114  if (pLast) pLast->pNext = pChild; else pFirst = pChild;
115  pChild->pPrev = pLast; pChild->pNext = nullptr; pLast = pChild;
116  }

References C4GUI::Container::pFirst, C4GUI::Container::pLast, C4GUI::Element::pNext, C4GUI::Element::pParent, and C4GUI::Element::pPrev.

Referenced by C4GUI::Screen::ActivateDialog().

Here is the caller graph for this function:

◆ MouseEnter()

virtual void C4GUI::Element::MouseEnter ( CMouse rMouse)
inlinevirtualinherited

Reimplemented in C4GUI::ComboBox, C4GUI::ContextButton, C4GUI::CheckBox, C4GUI::Button, C4MenuItem, and C4ScriptGuiWindow.

Definition at line 413 of file C4Gui.h.

413 {}; // called when mouse cursor enters element region

Referenced by C4GUI::Button::MouseEnter(), C4GUI::CheckBox::MouseEnter(), C4GUI::ContextButton::MouseEnter(), C4GUI::ComboBox::MouseEnter(), and C4GUI::Screen::MouseInput().

Here is the caller graph for this function:

◆ MouseInput()

void C4GUI::Window::MouseInput ( CMouse rMouse,
int32_t  iButton,
int32_t  iX,
int32_t  iY,
DWORD  dwKeyParam 
)
overridevirtualinherited

Reimplemented from C4GUI::Element.

Reimplemented in C4GUI::Dialog, C4GUI::ComboBox, C4GUI::ContextButton, C4GUI::ContextMenu, C4GUI::Tabular, C4GUI::ListBox, C4GUI::CheckBox, C4GUI::Edit, C4GUI::Button, C4GUI::Control, C4GUI::PaintBox, C4GUI::ScrollWindow, and C4StartupScenSelDlg::ScenListItem.

Definition at line 273 of file C4GuiContainers.cpp.

274  {
275  // invisible?
276  if (!IsVisible()) return;
277  // inherited
278  Container::MouseInput(rMouse, iButton, iX, iY, dwKeyParam);
279  // get client pos
281  iX -= rcClientRect.x - rcBounds.x; iY -= rcClientRect.y - rcBounds.y;
282  // forward to topmost child element
283  for (Element *pChild = pLast; pChild; pChild = pChild->GetPrev())
284  if (pChild->fVisible && pChild->GetBounds().Contains(iX, iY))
285  {
286  // forward
287  pChild->MouseInput(rMouse, iButton, iX - pChild->GetBounds().x, iY - pChild->GetBounds().y, dwKeyParam);
288  // forward to one control only
289  break;
290  }
291  }
Element * GetPrev() const
Definition: C4Gui.h:450
virtual void MouseInput(CMouse &rMouse, int32_t iButton, int32_t iX, int32_t iY, DWORD dwKeyParam)
Definition: C4Gui.cpp:244

References C4GUI::Element::GetBounds(), C4GUI::Window::GetClientRect(), C4GUI::Element::GetPrev(), C4GUI::Element::IsVisible(), C4GUI::Element::MouseInput(), C4GUI::Container::pLast, C4GUI::Element::rcBounds, C4GUI::Window::rcClientRect, C4GUI::CMouse::x, C4Rect::x, and C4Rect::y.

Referenced by C4GUI::ScrollWindow::MouseInput(), C4GUI::Control::MouseInput(), C4GUI::ContextMenu::MouseInput(), C4GUI::Dialog::MouseInput(), and C4GUI::Screen::MouseInput().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MouseLeave()

virtual void C4GUI::Element::MouseLeave ( CMouse rMouse)
inlinevirtualinherited

Reimplemented in C4GUI::ComboBox, C4GUI::ContextButton, C4GUI::ContextMenu::Entry, C4GUI::Tabular, C4GUI::CheckBox, C4GUI::Button, C4GUI::ScrollBar, and C4ScriptGuiWindow.

Definition at line 414 of file C4Gui.h.

414 {}; // called when mouse cursor leaves element region

Referenced by C4GUI::Screen::MouseInput(), C4GUI::ScrollBar::MouseLeave(), C4GUI::Button::MouseLeave(), C4GUI::CheckBox::MouseLeave(), C4GUI::Tabular::MouseLeave(), C4GUI::ContextButton::MouseLeave(), C4GUI::ComboBox::MouseLeave(), C4GUI::CMouse::ReleaseElements(), and C4GUI::CMouse::RemoveElement().

Here is the caller graph for this function:

◆ OnHotkey()

bool C4GUI::Container::OnHotkey ( uint32_t  cHotkey)
overrideprotectedvirtualinherited

Reimplemented from C4GUI::Element.

Reimplemented in C4GUI::CheckBox, and C4GUI::Button.

Definition at line 212 of file C4GuiContainers.cpp.

213  {
214  if (!IsVisible()) return false;
215  // check all nested elements
216  for (Element *pEl = pFirst; pEl; pEl=pEl->pNext)
217  if (pEl->fVisible)
218  if (pEl->OnHotkey(cHotkey)) return true;
219  // no match found
220  return false;
221  }

References C4GUI::Element::IsVisible(), C4GUI::Container::pFirst, and C4GUI::Element::pNext.

Here is the call graph for this function:

◆ OnReference()

bool C4StartupNetListEntry::OnReference ( )

Definition at line 215 of file C4StartupNetDlg.cpp.

216 {
217  // wrong type / still busy?
218  if (!pRefClient || pRefClient->isBusy())
219  return true;
220  // successful?
221  if (!pRefClient->isSuccess())
222  {
223  // couldn't get references
224  SetError(pRefClient->GetError(), TT_RefReqWait);
225  return true;
226  }
227  // Ref getting done!
228  pIcon->SetAnimated(false, 1);
229  // Get reference information from client
230  C4Network2Reference **ppNewRefs=nullptr; int32_t iNewRefCount;
231  if (!pRefClient->GetReferences(ppNewRefs, iNewRefCount))
232  {
233  // References could be retrieved but not read
234  SetError(LoadResStr("IDS_NET_ERR_REFINVALID"), TT_RefReqWait);
235  delete [] ppNewRefs;
236  return true;
237  }
238  if (!iNewRefCount)
239  {
240  // References retrieved but no game open: Inform user
241  sInfoText[1].Copy(LoadResStr("IDS_NET_INFONOGAME"));
242  UpdateText();
243  }
244  else
245  {
246  // Grab references, count players
247  C4StartupNetListEntry *pNewRefEntry = this; int iPlayerCount = 0;
248  for (int i = 0; i < iNewRefCount; i++)
249  {
250  pNewRefEntry = AddReference(ppNewRefs[i], pNewRefEntry->GetNextLower(ppNewRefs[i]->getSortOrder()));
251  iPlayerCount += ppNewRefs[i]->Parameters.PlayerInfos.GetActivePlayerCount(false);
252  }
253  // Count player
254  sInfoText[1].Format(LoadResStr("IDS_NET_INFOGAMES"), (int) iNewRefCount, iPlayerCount);
255  UpdateText();
256  }
257  delete [] ppNewRefs;
258  // special masterserver handling
259  if (eQueryType == NRQT_Masterserver)
260  {
261  // masterserver: schedule next query
262  sInfoText[1].Format(LoadResStr("IDS_NET_INFOGAMES"), (int) iNewRefCount);
263  SetTimeout(TT_Masterserver);
264  return true;
265  }
266  // non-masterserver
267  if (iNewRefCount)
268  {
269  // this item has been "converted" into the references - remove without further feedback
270  return false;
271  }
272  else
273  {
274  // no ref found on custom adress: Schedule re-check
275  SetTimeout(TT_RefReqWait);
276  }
277  return true;
278 }
C4PlayerInfoList PlayerInfos
bool isSuccess() const
Definition: C4HTTP.h:88
virtual const char * GetError() const
Definition: C4HTTP.h:96
bool GetReferences(C4Network2Reference **&rpReferences, int32_t &rRefCount)
int32_t GetActivePlayerCount(bool fCountInvisible) const
C4GUI::Element * GetNextLower(int32_t sortOrder)
void Format(const char *szFmt,...) GNUC_FORMAT_ATTRIBUTE_O
Definition: StdBuf.cpp:174

References StdStrBuf::Copy(), StdStrBuf::Format(), C4PlayerInfoList::GetActivePlayerCount(), C4HTTPClient::GetError(), GetNextLower(), C4Network2RefClient::GetReferences(), C4Network2Reference::getSortOrder(), C4HTTPClient::isBusy(), C4HTTPClient::isSuccess(), LoadResStr(), NRQT_Masterserver, C4Network2Reference::Parameters, C4GameParameters::PlayerInfos, C4GUI::Picture::SetAnimated(), TT_Masterserver, and TT_RefReqWait.

Here is the call graph for this function:

◆ rbegin()

ReverseIterator C4GUI::Container::rbegin ( )
inlineinherited

Definition at line 826 of file C4Gui.h.

826 { return ReverseIterator(pLast); }

References C4GUI::Container::pLast.

Referenced by C4ScriptGuiWindow::MouseInput(), and C4ScriptGuiWindow::ProcessMouseInput().

Here is the caller graph for this function:

◆ ReaddElement()

void C4GUI::Container::ReaddElement ( Element pChild)
inherited

Definition at line 134 of file C4GuiContainers.cpp.

135  {
136  // safety
137  if (!pChild || pChild->pParent != this) return;
138  // remove from any previous container
139  if (pChild->pPrev) pChild->pPrev->pNext = pChild->pNext; else pFirst = pChild->pNext;
140  if (pChild->pNext) pChild->pNext->pPrev = pChild->pPrev; else pLast = pChild->pPrev;
141  // add to end of list
142  if (pLast) pLast->pNext = pChild; else pFirst = pChild;
143  pChild->pPrev = pLast; pChild->pNext = nullptr; pLast = pChild;
144 
145  assert(pChild->pNext != pChild);
146  assert(pChild->pPrev != pChild);
147  assert(pChild->pParent != pChild);
148  }

References C4GUI::Container::pFirst, C4GUI::Container::pLast, C4GUI::Element::pNext, C4GUI::Element::pParent, and C4GUI::Element::pPrev.

Referenced by C4GUI::ListBox::SortElements().

Here is the caller graph for this function:

◆ RemoveElement()

void C4GUI::Container::RemoveElement ( Element pChild)
overridevirtualinherited

Reimplemented from C4GUI::Element.

Reimplemented in C4GUI::Screen, C4GUI::Dialog, C4GUI::ContextMenu, C4GUI::Tabular, and C4GUI::ListBox.

Definition at line 89 of file C4GuiContainers.cpp.

90  {
91  // safety
92  if (!pChild) return;
93  // inherited
94  Element::RemoveElement(pChild);
95  // must be from same container
96  if (pChild->pParent != this) return;
97  // unlink from list
98  if (pChild->pPrev) pChild->pPrev->pNext = pChild->pNext; else pFirst = pChild->pNext;
99  if (pChild->pNext) pChild->pNext->pPrev = pChild->pPrev; else pLast = pChild->pPrev;
100  // unset parent; invalidates pPrev/pNext
101  pChild->pParent = nullptr;
102  // element has been removed
104  }
virtual void RemoveElement(Element *pChild)
Definition: C4Gui.cpp:173

References C4GUI::Container::AfterElementRemoval(), C4GUI::Container::pFirst, C4GUI::Container::pLast, C4GUI::Element::pNext, C4GUI::Element::pParent, C4GUI::Element::pPrev, and C4GUI::Element::RemoveElement().

Referenced by C4GUI::Container::AddElement(), C4GUI::Container::InsertElement(), C4ScriptGuiWindow::RemoveChild(), C4GUI::Element::RemoveElement(), C4GUI::ListBox::RemoveElement(), C4GUI::Tabular::RemoveElement(), C4GUI::ContextMenu::RemoveElement(), C4GUI::Dialog::RemoveElement(), C4GUI::Screen::RemoveElement(), and C4GUI::Element::~Element().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rend()

ReverseIterator C4GUI::Container::rend ( )
inlineinherited

Definition at line 827 of file C4Gui.h.

827 { return ReverseIterator(nullptr); }

Referenced by C4ScriptGuiWindow::MouseInput(), and C4ScriptGuiWindow::ProcessMouseInput().

Here is the caller graph for this function:

◆ ScreenPos2ClientPos()

void C4GUI::Element::ScreenPos2ClientPos ( int32_t &  riX,
int32_t &  riY 
)
inherited

Definition at line 218 of file C4Gui.cpp.

219  {
220  // apply all parent offsets
221  Container *pCont = pParent;
222  while (pCont)
223  {
224  pCont->ApplyElementOffset(riX, riY);
225  pCont = pCont->GetParent();
226  }
227  // apply own offset
228  riX -= rcBounds.x; riY -= rcBounds.y;
229  }
virtual void ApplyElementOffset(int32_t &riX, int32_t &riY)
Definition: C4Gui.h:840

References C4GUI::Container::ApplyElementOffset(), C4GUI::Element::GetParent(), C4GUI::Element::pParent, C4GUI::Element::rcBounds, C4Rect::x, and C4Rect::y.

Referenced by C4GUI::Screen::MouseInput(), and C4GUI::CMouse::ReleaseElements().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetBounds()

void C4GUI::Element::SetBounds ( const C4Rect rcNewBound)
inlineinherited

Definition at line 446 of file C4Gui.h.

446 { rcBounds=rcNewBound; UpdatePos(); UpdateSize(); }
virtual void UpdateSize()
Definition: C4Gui.cpp:185

References C4GUI::Element::rcBounds, C4GUI::Element::UpdatePos(), and C4GUI::Element::UpdateSize().

Referenced by C4GameOptionButtons::C4GameOptionButtons(), C4GoalDisplay::C4GoalDisplay(), C4StartupModsListEntry::C4StartupModsListEntry(), C4StartupNetDlg::C4StartupNetDlg(), C4StartupNetListEntry(), C4GUI::ContextButton::ContextButton(), C4GUI::ListBox::ContractToElementHeight(), C4GUI::Control::Control(), C4GUI::Dialog::Dialog(), C4ChatDlg::DoPlacement(), Execute(), C4GUI::FullscreenDialog::FullscreenDialog(), C4GUI::GroupBox::GroupBox(), C4GUI::HorizontalLine::HorizontalLine(), C4GUI::Screen::Init(), C4Menu::InitSize(), C4GUI::LabeledEdit::LabeledEdit(), C4StartupModsListEntry::MakeInfoEntry(), C4Game::OnResolutionChanged(), C4GameLobby::ScenDesc::ScenDesc(), C4StartupScenSelDlg::ScenListItem::ScenListItem(), C4GUI::ScrollWindow::ScrollWindow(), C4GUI::InputDialog::SetCustomEdit(), C4GUI::Tabular::SetGfx(), C4GoalDisplay::SetGoals(), SetReference(), SetRefQuery(), C4GUI::Tabular::Sheet::Sheet(), C4GUI::TextWindow::TextWindow(), C4ScoreboardDlg::Update(), C4GUI::ListBox::UpdateElementPositions(), C4Menu::UpdateElementPositions(), C4GUI::ScrollWindow::UpdateOwnPos(), C4ChatControl::UpdateSize(), C4ChatDlg::UpdateSize(), C4GUI::TextWindow::UpdateSize(), and C4GUI::Dialog::UpdateSize().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetContextHandler()

void C4GUI::Element::SetContextHandler ( ContextHandler pNewHd)
inlineinherited

Definition at line 465 of file C4Gui.h.

466  {
468  if ((pContextHandler = pNewHd)) pNewHd->Ref();
469  }

References C4GUI::ContextHandler::DeRef(), C4GUI::Element::pContextHandler, and C4GUI::ContextHandler::Ref().

Referenced by C4StartupMainDlg::C4StartupMainDlg(), C4GUI::ContextButton::ContextButton(), C4GUI::Edit::Edit(), and C4GameLobby::MainDlg::MainDlg().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetDragTarget()

void C4GUI::Element::SetDragTarget ( Window pToWindow)
inlineinherited

Definition at line 464 of file C4Gui.h.

464 { pDragTarget = pToWindow; }

References C4GUI::Element::pDragTarget.

Referenced by C4GUI::Dialog::SetTitle().

Here is the caller graph for this function:

◆ SetPos()

void C4GUI::Window::SetPos ( int32_t  iXPos,
int32_t  iYPos 
)
inlineinherited

Definition at line 860 of file C4Gui.h.

861  { rcBounds.x=iXPos; rcBounds.y=iYPos; UpdatePos(); }

References C4GUI::Element::rcBounds, C4GUI::Element::UpdatePos(), C4Rect::x, and C4Rect::y.

Referenced by C4ScoreboardDlg::DoPlacement(), C4Menu::InitLocation(), C4StartupPlrSelDlg::OnNewBtn(), C4StartupPlrSelDlg::OnPropertyBtn(), C4Menu::SetLocation(), and C4GUI::Screen::ShowDialog().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetReference()

void C4StartupNetListEntry::SetReference ( C4Network2Reference pNewRef)

Definition at line 383 of file C4StartupNetDlg.cpp.

384 {
385  // safety: clear previous
386  ClearRef();
387  // set info
388  this->pRef = pRef;
389  int32_t iIcon = pRef->getIcon();
390  if (!Inside<int32_t>(iIcon, 0, C4StartupScenSel_IconCount-1)) iIcon = C4StartupScenSel_DefaultIcon_Scenario;
391  pIcon->SetFacet(C4Startup::Get()->Graphics.fctScenSelIcons.GetPhase(iIcon));
392  pIcon->SetAnimated(false, 0);
393  pIcon->SetBounds(rctIconSmall);
394  int32_t iPlrCnt = pRef->isEditor() ? pRef->Parameters.PlayerInfos.GetActivePlayerCount(false) : pRef->Parameters.Clients.getClientCnt();
395  C4Client *pHost = pRef->Parameters.Clients.getHost();
396  sInfoText[0].Format(LoadResStr("IDS_NET_REFONCLIENT"), pRef->getTitle(), pHost ? pHost->getName() : "unknown");
397  if (pRef->isEditor())
398  {
399  sInfoText[1].Format(LoadResStr("IDS_NET_INFOEDITOR"),
400  (int)iPlrCnt,
401  StdStrBuf(pRef->getGameStatus().getDescription(), true).getData());
402  }
403  else
404  {
405  sInfoText[1].Format(LoadResStr("IDS_NET_INFOPLRSGOALDESC"),
406  (int)iPlrCnt,
407  (int)pRef->Parameters.MaxPlayers,
408  pRef->getGameGoalString().getData(),
409  StdStrBuf(pRef->getGameStatus().getDescription(), true).getData());
410  }
411  if (pRef->getTime() > 0)
412  {
413  StdStrBuf strDuration; strDuration.Format("%02d:%02d:%02d", pRef->getTime()/3600, (pRef->getTime() % 3600) / 60, pRef->getTime() % 60);
414  sInfoText[1].Append(" - "); sInfoText[1].Append(strDuration);
415  }
416  sInfoText[2].Format(LoadResStr("IDS_DESC_VERSION"), pRef->getGameVersion().GetString().getData());
417  sInfoText[3].Format("%s: %s", LoadResStr("IDS_CTL_COMMENT"), pRef->getComment());
418  StdStrBuf sAddress;
419  for (int i=0; i<pRef->getAddrCnt(); ++i)
420  {
421  if (i) sAddress.Append(", ");
422  sAddress.Append(pRef->getAddr(i).toString());
423  }
424  // editor reference
425  if (pRef->isEditor())
426  AddStatusIcon(C4GUI::Ico_Editor, LoadResStr("IDS_CNS_CONSOLE"));
427  // password
428  if (pRef->isPasswordNeeded())
429  AddStatusIcon(C4GUI::Ico_Ex_LockedFrontal, LoadResStr("IDS_NET_INFOPASSWORD"));
430  // league
431  if (pRef->Parameters.isLeague())
432  AddStatusIcon(C4GUI::Ico_Ex_League, pRef->Parameters.getLeague());
433  // lobby active
434  if (pRef->getGameStatus().isLobbyActive())
435  AddStatusIcon(C4GUI::Ico_Lobby, LoadResStr("IDS_DESC_EXPECTING"));
436  // game running
437  if (pRef->getGameStatus().isPastLobby())
438  AddStatusIcon(C4GUI::Ico_GameRunning, LoadResStr("IDS_NET_INFOINPROGR"));
439  // runtime join
440  if (pRef->isJoinAllowed() && pRef->getGameStatus().isPastLobby()) // A little workaround to determine RuntimeJoin...
441  AddStatusIcon(C4GUI::Ico_RuntimeJoin, LoadResStr("IDS_NET_RUNTIMEJOINFREE"));
442  // official server
443  if (pRef->isOfficialServer() && !Config.Network.UseAlternateServer) // Offical server icon is only displayed if references are obtained from official league server
444  {
445  fIsImportant = true;
446  AddStatusIcon(C4GUI::Ico_OfficialServer, LoadResStr("IDS_NET_OFFICIALSERVER"));
447  }
448  // list participating player/client names
449  if (pRef->isEditor())
450  {
451  sInfoText[4].Format("%s%s", LoadResStr("IDS_DESC_CLIENTS"), iPlrCnt ? pRef->Parameters.Clients.GetAllClientNames().getData() : LoadResStr("IDS_CTL_NONE"));
452  }
453  else
454  {
455  sInfoText[4].Format("%s: %s", LoadResStr("IDS_CTL_PLAYER"), iPlrCnt ? pRef->Parameters.PlayerInfos.GetActivePlayerNames(false).getData() : LoadResStr("IDS_CTL_NONE"));
456  }
457  // disabled if join is not possible for some reason
458  C4GameVersion verThis;
459  if (!pRef->isJoinAllowed() || !(pRef->getGameVersion() == verThis))
460  {
461  fIsEnabled = false;
462  }
463  // store sort order
464  iSortOrder = pRef->getSortOrder();
465  // all references expire after a while
466  SetTimeout(TT_Reference);
467  UpdateSmallState(); UpdateText();
468 }
C4Config Config
Definition: C4Config.cpp:930
const int32_t C4StartupScenSel_IconCount
const int32_t C4StartupScenSel_DefaultIcon_Scenario
StdStrBuf GetAllClientNames() const
Definition: C4Client.cpp:232
int32_t getClientCnt() const
Definition: C4Client.cpp:224
C4ConfigNetwork Network
Definition: C4Config.h:259
int32_t UseAlternateServer
Definition: C4Config.h:152
bool isLeague() const
const char * getLeague()
StdStrBuf toString() const
int32_t getTime() const
bool isPasswordNeeded() const
int32_t getSortOrder() const
const C4GameVersion & getGameVersion() const
bool isOfficialServer() const
StdStrBuf getGameGoalString() const
C4Network2Status getGameStatus() const
int32_t getIcon() const
bool isLobbyActive() const
Definition: C4Network2.h:87
bool isPastLobby() const
Definition: C4Network2.h:88
const char * getDescription() const
Definition: C4Network2.cpp:69
StdStrBuf GetActivePlayerNames(bool fCountInvisible, int32_t iAtClientID=-1) const
void Append(const char *pnData, size_t iChars)
Definition: StdBuf.h:519
@ Ico_Editor
Definition: C4Gui.h:657
@ Ico_Lobby
Definition: C4Gui.h:675
@ Ico_Ex_LockedFrontal
Definition: C4Gui.h:711
@ Ico_Ex_League
Definition: C4Gui.h:706
@ Ico_RuntimeJoin
Definition: C4Gui.h:676
@ Ico_OfficialServer
Definition: C4Gui.h:688
@ Ico_GameRunning
Definition: C4Gui.h:674
StdStrBuf GetString() const
Definition: C4GameVersion.h:33

References StdStrBuf::Append(), C4StartupScenSel_DefaultIcon_Scenario, C4StartupScenSel_IconCount, ClearRef(), C4GameParameters::Clients, Config, StdStrBuf::Format(), C4Startup::Get(), C4PlayerInfoList::GetActivePlayerCount(), C4PlayerInfoList::GetActivePlayerNames(), C4Network2Reference::getAddr(), C4Network2Reference::getAddrCnt(), C4ClientList::GetAllClientNames(), C4ClientList::getClientCnt(), C4Network2Reference::getComment(), StdStrBuf::getData(), C4Network2Status::getDescription(), C4Network2Reference::getGameGoalString(), C4Network2Reference::getGameStatus(), C4Network2Reference::getGameVersion(), C4ClientList::getHost(), C4Network2Reference::getIcon(), C4GameParameters::getLeague(), C4Client::getName(), C4Network2Reference::getSortOrder(), C4GameVersion::GetString(), C4Network2Reference::getTime(), C4Network2Reference::getTitle(), C4GUI::Ico_Editor, C4GUI::Ico_Ex_League, C4GUI::Ico_Ex_LockedFrontal, C4GUI::Ico_GameRunning, C4GUI::Ico_Lobby, C4GUI::Ico_OfficialServer, C4GUI::Ico_RuntimeJoin, C4Network2Reference::isEditor(), C4Network2Reference::isJoinAllowed(), C4GameParameters::isLeague(), C4Network2Status::isLobbyActive(), C4Network2Reference::isOfficialServer(), C4Network2Reference::isPasswordNeeded(), C4Network2Status::isPastLobby(), LoadResStr(), C4GameParameters::MaxPlayers, C4Config::Network, C4Network2Reference::Parameters, C4GameParameters::PlayerInfos, C4GUI::Picture::SetAnimated(), C4GUI::Element::SetBounds(), C4GUI::Picture::SetFacet(), C4Network2Address::toString(), TT_Reference, and C4ConfigNetwork::UseAlternateServer.

Here is the call graph for this function:

◆ SetRefQuery()

void C4StartupNetListEntry::SetRefQuery ( const char *  szAddress,
QueryType  eQueryType 
)

Definition at line 127 of file C4StartupNetDlg.cpp.

128 {
129  // safety: clear previous
130  ClearRef();
131  // setup layout
132  const_cast<C4Facet &>(reinterpret_cast<const C4Facet &>(pIcon->GetFacet()))
134  pIcon->SetAnimated(true, 1);
135  pIcon->SetBounds(rctIconLarge);
136  // init a new ref client to query
137  sRefClientAddress.Copy(szAddress);
138  this->eQueryType = eQueryType;
139  pRefClient = new C4Network2RefClient();
140  if (!pRefClient->Init() || !pRefClient->SetServer(szAddress))
141  {
142  // should not happen
143  sInfoText[0].Clear();
144  SetError(pRefClient->GetError(), TT_RefReqWait);
145  return;
146  }
147  // set info
148  sInfoText[0].Format(LoadResStr("IDS_NET_CLIENTONNET"), GetQueryTypeName(eQueryType), pRefClient->getServerName());
149  sInfoText[1].Copy(LoadResStr("IDS_NET_INFOQUERY"));
150  UpdateSmallState(); UpdateText();
152  // masterserver: always on top
153  if (eQueryType == NRQT_Masterserver)
154  iSortOrder = 100;
155  // register proc
157  Thread.AddProc(pRefClient);
158  // start querying!
159  QueryReferences();
160 }
const C4FacetSurface & GetFacet() const
Definition: C4Gui.h:610
bool Init()
Definition: C4HTTP.cpp:42
bool SetServer(const char *szServerAddress)
Definition: C4HTTP.cpp:298
void SetNotify(class C4InteractiveThread *pnNotify)
Definition: C4HTTP.h:106
bool AddProc(StdSchedulerProc *pProc)
C4FacetID fctNetGetRef
Definition: C4Startup.h:86
C4StartupGraphics Graphics
Definition: C4Startup.h:112

References C4InteractiveThread::AddProc(), Application, StdStrBuf::Clear(), ClearRef(), StdStrBuf::Copy(), C4StartupGraphics::fctNetGetRef, StdStrBuf::Format(), C4Startup::Get(), C4HTTPClient::GetError(), C4GUI::Picture::GetFacet(), C4HTTPClient::getServerName(), C4Startup::Graphics, C4HTTPClient::Init(), C4Application::InteractiveThread, LoadResStr(), NRQT_Masterserver, C4GUI::Picture::SetAnimated(), C4GUI::Element::SetBounds(), C4HTTPClient::SetNotify(), C4HTTPClient::SetServer(), and TT_RefReqWait.

Here is the call graph for this function:

◆ SetToolTip()

void C4GUI::Element::SetToolTip ( const char *  szNewTooltip,
bool  is_immediate = false 
)
inherited

Definition at line 409 of file C4Gui.cpp.

410  {
411  // store tooltip
412  if (szNewTooltip) ToolTip.Copy(szNewTooltip); else ToolTip.Clear();
413  // store immediate flag
414  is_immediate_tooltip = is_immediate;
415  }

References StdStrBuf::Clear(), and StdStrBuf::Copy().

Referenced by C4GUI::ContextMenu::AddItem(), C4GameOverDlg::C4GameOverDlg(), C4LeagueSignupDialog::C4LeagueSignupDialog(), C4MenuItem::C4MenuItem(), C4StartupAboutDlg::C4StartupAboutDlg(), C4StartupLegalDlg::C4StartupLegalDlg(), C4StartupMainDlg::C4StartupMainDlg(), C4StartupModsDlg::C4StartupModsDlg(), C4StartupNetDlg::C4StartupNetDlg(), C4StartupOptionsDlg::C4StartupOptionsDlg(), C4StartupPlrPropertiesDlg::C4StartupPlrPropertiesDlg(), C4StartupPlrSelDlg::C4StartupPlrSelDlg(), C4StartupScenSelDlg::C4StartupScenSelDlg(), C4MapFolderData::CreateGUIElements(), C4GUI::InfoDialog::CreateSubComponents(), C4GUI::FullscreenDialog::FullscreenDialog(), C4GUI::IconButton::IconButton(), C4GUI::InputDialog::InputDialog(), C4GameLobby::MainDlg::MainDlg(), C4GUI::ProgressDialog::ProgressDialog(), C4StartupScenSelDlg::ScenListItem::ScenListItem(), C4GUI::InputDialog::SetCustomEdit(), C4GUI::FullscreenDialog::SetTitle(), C4GUI::Dialog::SetTitle(), C4ChatControl::ChatSheet::NickItem::Update(), and C4GameLobby::MainDlg::UpdateRightTab().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetVisibility()

void C4StartupNetListEntry::SetVisibility ( bool  fToValue)
overridevirtual

Reimplemented from C4GUI::Container.

Definition at line 367 of file C4StartupNetDlg.cpp.

367  {
368  bool fChange = fToValue != fVisible;
370  if(fChange) UpdateEntrySize();
371 }
void SetVisibility(bool fToValue) override

References C4GUI::Element::fVisible, and C4GUI::Container::SetVisibility().

Here is the call graph for this function:

◆ StartDragging()

void C4GUI::Element::StartDragging ( CMouse rMouse,
int32_t  iX,
int32_t  iY,
DWORD  dwKeyParam 
)
virtualinherited

Definition at line 259 of file C4Gui.cpp.

260  {
261  // set flag
262  fDragging = true;
263  // set drag start pos
264  iDragX = iX; iDragY = iY;
265  // mark drag in mouse
266  rMouse.pDragElement = this;
267  }
bool fDragging
Definition: C4Gui.h:380

References C4GUI::Element::fDragging, C4GUI::Element::iDragX, C4GUI::Element::iDragY, and C4GUI::CMouse::pDragElement.

Referenced by C4MenuItem::MouseInput(), and C4GUI::Element::MouseInput().

Here is the caller graph for this function:

◆ StopDragging()

void C4GUI::Element::StopDragging ( CMouse rMouse,
int32_t  iX,
int32_t  iY,
DWORD  dwKeyParam 
)
virtualinherited

Definition at line 282 of file C4Gui.cpp.

283  {
284  // move element pos
285  DoDragging(rMouse, iX, iY, dwKeyParam);
286  }
virtual void DoDragging(CMouse &rMouse, int32_t iX, int32_t iY, DWORD dwKeyParam)
Definition: C4Gui.cpp:269

References C4GUI::Element::DoDragging().

Referenced by C4GUI::Screen::MouseInput(), and C4GUI::CMouse::ReleaseElements().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ UpdateCollapsed()

void C4StartupNetListEntry::UpdateCollapsed ( bool  fToCollapseValue)

Definition at line 294 of file C4StartupNetDlg.cpp.

295 {
296  // if collapsed state changed, update the text
297  if (fIsCollapsed == fToCollapseValue) return;
298  fIsCollapsed = fToCollapseValue;
299  UpdateSmallState();
300 }

Referenced by C4StartupNetDlg::OnReferenceEntryAdd().

Here is the caller graph for this function:

◆ UpdateOwnPos()

void C4GUI::Window::UpdateOwnPos ( )
overridevirtualinherited

Reimplemented from C4GUI::Element.

Reimplemented in C4StartupScenSelDlg::ScenListItem, C4Menu, C4GUI::FullscreenDialog, C4GUI::CheckBox, and C4GUI::ScrollWindow.

Definition at line 324 of file C4GuiContainers.cpp.

325  {
327  // set client rect
328  int32_t iMarginL=GetMarginLeft(), iMarginT=GetMarginTop();
329  rcClientRect.Set(rcBounds.x + iMarginL, rcBounds.y + iMarginT, std::max<int32_t>(rcBounds.Wdt - iMarginL - GetMarginRight(), 0), std::max<int32_t>(rcBounds.Hgt - iMarginT - GetMarginBottom(), 0));
330  }
virtual void UpdateOwnPos()
Definition: C4Gui.h:434
virtual int32_t GetMarginRight()
Definition: C4Gui.h:875
virtual int32_t GetMarginTop()
Definition: C4Gui.h:873
virtual int32_t GetMarginLeft()
Definition: C4Gui.h:874
virtual int32_t GetMarginBottom()
Definition: C4Gui.h:876

References C4GUI::Window::GetMarginBottom(), C4GUI::Window::GetMarginLeft(), C4GUI::Window::GetMarginRight(), C4GUI::Window::GetMarginTop(), C4Rect::Hgt, C4GUI::Element::rcBounds, C4GUI::Window::rcClientRect, C4Rect::Set(), C4GUI::Element::UpdateOwnPos(), C4Rect::Wdt, C4Rect::x, and C4Rect::y.

Referenced by C4GameOverDlg::C4GameOverDlg(), C4GUI::Edit::Edit(), C4GUI::ListBox::ListBox(), C4GUI::Dialog::SetFrameDeco(), C4GUI::GroupBox::SetMargin(), C4GUI::Tabular::SetSheetMargin(), C4GUI::GroupBox::SetTitle(), C4GUI::Tabular::Tabular(), C4GUI::TextWindow::TextWindow(), C4FileSelDlg::DefaultListItem::UpdateOwnPos(), C4GUI::FullscreenDialog::UpdateOwnPos(), and C4GUI::Window::Window().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ UpdatePos()

void C4GUI::Element::UpdatePos ( )
protectedvirtualinherited

Reimplemented in C4GUI::Dialog.

Definition at line 193 of file C4Gui.cpp.

194  {
195  // update own fields
196  UpdateOwnPos();
197  // notify container
198  if (pParent) pParent->ElementPosChanged(this);
199  }
virtual void ElementPosChanged(Element *pOfElement)
Definition: C4Gui.h:754

References C4GUI::Container::ElementPosChanged(), C4GUI::Element::pParent, and C4GUI::Element::UpdateOwnPos().

Referenced by C4GUI::Element::DoDragging(), C4GUI::ContextMenu::Open(), C4GUI::ProgressBar::ProgressBar(), C4GUI::Element::SetBounds(), C4GUI::Window::SetPos(), and C4GUI::Dialog::UpdatePos().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ UpdateSize()

void C4GUI::Element::UpdateSize ( )
protectedvirtualinherited

Reimplemented in C4GUI::Dialog, C4GUI::TextWindow, C4GUI::Tabular, C4GUI::ListBox, C4GUI::MultilineLabel, C4ChatDlg, and C4ChatControl.

Definition at line 185 of file C4Gui.cpp.

186  {
187  // update own fields
188  UpdateOwnPos();
189  // notify container
190  if (pParent) pParent->ElementSizeChanged(this);
191  }
virtual void ElementSizeChanged(Element *pOfElement)
Definition: C4Gui.h:753

References C4GUI::Container::ElementSizeChanged(), C4GUI::Element::pParent, and C4GUI::Element::UpdateOwnPos().

Referenced by C4FileSelDlg::DefaultListItem::DefaultListItem(), C4GUI::Element::SetBounds(), C4GUI::Label::SetX0(), C4GUI::MultilineLabel::UpdateHeight(), C4GUI::ListBox::UpdateSize(), C4GUI::Tabular::UpdateSize(), C4GUI::TextWindow::UpdateSize(), and C4GUI::Dialog::UpdateSize().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ fDragging

bool C4GUI::Element::fDragging {false}
protectedinherited

Definition at line 380 of file C4Gui.h.

Referenced by C4GUI::Element::StartDragging().

◆ fVisible

◆ iDragX

int32_t C4GUI::Element::iDragX
protectedinherited

Definition at line 379 of file C4Gui.h.

Referenced by C4GUI::Element::DoDragging(), and C4GUI::Element::StartDragging().

◆ iDragY

int32_t C4GUI::Element::iDragY
protectedinherited

Definition at line 379 of file C4Gui.h.

Referenced by C4GUI::Element::DoDragging(), and C4GUI::Element::StartDragging().

◆ pContextHandler

ContextHandler* C4GUI::Element::pContextHandler {nullptr}
protectedinherited

◆ pDragTarget

Window* C4GUI::Element::pDragTarget {nullptr}
protectedinherited

◆ pFirst

◆ pLast

◆ pNext

◆ pParent

◆ pPrev

◆ rcBounds

C4Rect C4GUI::Element::rcBounds
protectedinherited

Definition at line 385 of file C4Gui.h.

Referenced by C4Chart::C4Chart(), C4GameOptionButtons::C4GameOptionButtons(), C4GoalDisplay::C4GoalDisplay(), C4StartupMainDlg::C4StartupMainDlg(), C4StartupScenSelDlg::C4StartupScenSelDlg(), C4GUI::Element::ClientPos2ScreenPos(), C4GUI::ContextMenu::ContextMenu(), C4GUI::Dialog::CreateConsoleWindow(), C4GUI::ContextMenu::CtxMouseInput(), C4FileSelDlg::DefaultListItem::DefaultListItem(), C4GUI::Dialog::Dialog(), C4GUI::Element::DoContext(), C4GUI::Element::DoDragging(), C4ScoreboardDlg::DoPlacement(), C4GUI::Dialog::Draw(), C4ScriptGuiWindow::Draw(), C4GUI::Element::Draw3DFrame(), C4GUI::Element::DrawBar(), C4ScriptGuiWindow::DrawChildren(), C4GUI::Label::DrawElement(), C4GUI::WoodenLabel::DrawElement(), C4GUI::MultilineLabel::DrawElement(), C4GUI::ProgressBar::DrawElement(), C4GUI::HorizontalLine::DrawElement(), C4GUI::Picture::DrawElement(), C4GUI::OverlayPicture::DrawElement(), C4GUI::ScrollBar::DrawElement(), C4GUI::GroupBox::DrawElement(), C4GUI::PaintBox::DrawElement(), C4GUI::Button::DrawElement(), C4GUI::IconButton::DrawElement(), C4GUI::ArrowButton::DrawElement(), C4GUI::FacetButton::DrawElement(), C4GUI::Edit::DrawElement(), C4GUI::CheckBox::DrawElement(), C4GUI::ListBox::DrawElement(), C4GUI::Tabular::DrawElement(), C4GUI::TextWindow::DrawElement(), C4GUI::ContextMenu::Entry::DrawElement(), C4GUI::ContextMenu::DrawElement(), C4GUI::ContextButton::DrawElement(), C4GUI::ComboBox::DrawElement(), C4GUI::Dialog::DrawElement(), C4MenuItem::DrawElement(), C4Menu::DrawElement(), C4StartupMainDlg::DrawElement(), DrawElement(), C4StartupPlrPropertiesDlg::DrawElement(), C4Chart::DrawElement(), C4GUI::Element::DrawHBarByVGfx(), C4GUI::Element::DrawHVBar(), C4GUI::Element::DrawVBar(), C4GUI::Element::Element(), C4GUI::ContextMenu::Entry::Entry(), C4GUI::Element::GetBounds(), C4GUI::Element::GetClientRect(), C4ScriptGuiWindow::GetClippingRect(), C4GUI::Element::GetHeight(), C4GUI::WoodenLabel::GetLeftIndent(), C4GUI::Tabular::GetMarginBottom(), C4GUI::Tabular::GetMarginLeft(), C4GUI::Tabular::GetMarginRight(), C4GUI::Tabular::GetMarginTop(), C4StartupPlrSelDlg::GetMarginTop(), C4StartupScenSelDlg::GetMarginTop(), C4GUI::Element::GetWidth(), C4GUI::ScrollBar::HasPin(), C4Menu::InitLocation(), C4Menu::InitSize(), C4GUI::ScrollWindow::IsScrollingNecessary(), C4GUI::Label::Label(), C4GUI::LabeledEdit::LabeledEdit(), C4GUI::Window::MouseInput(), C4GUI::CheckBox::MouseInput(), C4GUI::Tabular::MouseInput(), C4GUI::ContextMenu::MouseInput(), C4ScriptGuiWindow::MouseInput(), C4GUI::Screen::MouseInput(), C4GUI::MultilineLabel::MultilineLabel(), C4ChatControl::ChatSheet::NickItem::NickItem(), C4ScriptGuiWindow::OnMouseIn(), C4GUI::ContextMenu::Open(), C4GUI::Picture::Picture(), C4ScriptGuiWindow::ProcessMouseInput(), C4GUI::ProgressBar::ProgressBar(), C4GUI::Screen::Render(), C4GameLobby::ScenDesc::ScenDesc(), C4GUI::Element::ScreenPos2ClientPos(), C4GUI::ScrollBar::ScrollBar(), C4GUI::Element::SetBounds(), C4GUI::Dialog::SetClientSize(), C4GUI::Tabular::SetGfx(), C4GUI::Window::SetPos(), C4GUI::Label::SetText(), C4GUI::Dialog::SetTitle(), C4GUI::Label::SetX0(), C4GUI::Tabular::Sheet::Sheet(), C4GUI::ScrollWindow::Update(), C4ScoreboardDlg::Update(), C4GUI::MultilineLabel::UpdateHeight(), C4ScriptGuiWindow::UpdateLayout(), C4ScriptGuiWindow::UpdateLayoutGrid(), C4ScriptGuiWindow::UpdateLayoutTightGrid(), C4ScriptGuiWindow::UpdateLayoutVertical(), C4GUI::Label::UpdateOwnPos(), C4GUI::Window::UpdateOwnPos(), C4GUI::Dialog::UpdatePos(), C4GUI::MultilineLabel::UpdateSize(), C4GUI::Dialog::UpdateSize(), and C4GUI::WoodenLabel::WoodenLabel().

◆ rcClientRect


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