From c2bc275d5d382c98d16269c0f87486f8ee3221c6 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Tue, 24 Jun 2014 22:41:43 +0200 Subject: [PATCH] CComponentsForm: add functions to get first and last item --- src/gui/components/cc_frm.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gui/components/cc_frm.h b/src/gui/components/cc_frm.h index c5dc0f6ec..6b526a4e2 100644 --- a/src/gui/components/cc_frm.h +++ b/src/gui/components/cc_frm.h @@ -78,6 +78,10 @@ class CComponentsForm : public CComponentsItem virtual bool empty(){return v_cc_items.empty();}; ///return size (count) of available items virtual size_t size(){return v_cc_items.size();}; + ///return reference to first item + virtual CComponentsItem* front(){return v_cc_items.front();}; + ///return reference to last item + virtual CComponentsItem* back(){return v_cc_items.back();}; virtual void setAppendOffset(const int &x_offset, const int& y_offset){append_x_offset = x_offset; append_y_offset = y_offset;}; };