git.cweiske.de
/
enigma2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c3e7df2
)
itemheight is now a property of the listbox content
author
Felix Domke
<tmbinc@elitedvb.net>
Thu, 12 Apr 2007 19:47:26 +0000
(19:47 +0000)
committer
Felix Domke
<tmbinc@elitedvb.net>
Thu, 12 Apr 2007 19:47:26 +0000
(19:47 +0000)
lib/gui/elistbox.h
patch
|
blob
|
history
lib/gui/elistboxcontent.cpp
patch
|
blob
|
history
lib/gui/elistboxcontent.h
patch
|
blob
|
history
lib/service/listboxservice.cpp
patch
|
blob
|
history
lib/service/listboxservice.h
patch
|
blob
|
history
diff --git
a/lib/gui/elistbox.h
b/lib/gui/elistbox.h
index 2eb54dd96fe2ac717084e37f8b23cf26bd28a8ef..7538170cf2c20c38651e89e813244ad32c2c99ad 100644
(file)
--- a/
lib/gui/elistbox.h
+++ b/
lib/gui/elistbox.h
@@
-48,6
+48,8
@@
protected:
/* the following functions always refer to the selected item */
virtual void paint(gPainter &painter, eWindowStyle &style, const ePoint &offset, int selected)=0;
/* the following functions always refer to the selected item */
virtual void paint(gPainter &painter, eWindowStyle &style, const ePoint &offset, int selected)=0;
+ virtual int getItemHeight()=0;
+
eListbox *m_listbox;
#endif
};
eListbox *m_listbox;
#endif
};
@@
-95,7
+97,7
@@
public:
pageDown,
justCheck
};
pageDown,
justCheck
};
-
+
void setItemHeight(int h);
void setSelectionEnable(int en);
#ifndef SWIG
void setItemHeight(int h);
void setSelectionEnable(int en);
#ifndef SWIG
diff --git
a/lib/gui/elistboxcontent.cpp
b/lib/gui/elistboxcontent.cpp
index 621fa5cc907b0a33549d414c7891a9ede769f084..4fa5a65ed2f2233ae2e350a6e9845b7912fdf6d8 100644
(file)
--- a/
lib/gui/elistboxcontent.cpp
+++ b/
lib/gui/elistboxcontent.cpp
@@
-37,6
+37,7
@@
iListboxContent::iListboxContent(): m_listbox(0)
void iListboxContent::setListbox(eListbox *lb)
{
m_listbox = lb;
void iListboxContent::setListbox(eListbox *lb)
{
m_listbox = lb;
+ m_listbox->setItemHeight(getItemHeight());
}
int iListboxContent::currentCursorSelectable()
}
int iListboxContent::currentCursorSelectable()
@@
-48,7
+49,7
@@
int iListboxContent::currentCursorSelectable()
DEFINE_REF(eListboxPythonStringContent);
DEFINE_REF(eListboxPythonStringContent);
-eListboxPythonStringContent::eListboxPythonStringContent()
+eListboxPythonStringContent::eListboxPythonStringContent()
: m_itemheight(25)
{
}
{
}
@@
-661,3
+662,10
@@
void eListboxPythonMultiContent::setFont(int fnt, gFont *font)
else
m_font.erase(fnt);
}
else
m_font.erase(fnt);
}
+
+void eListboxPythonMultiContent::setItemHeight(int height)
+{
+ m_itemheight = height;
+ if (m_listbox)
+ m_listbox->setItemHeight(height);
+}
diff --git
a/lib/gui/elistboxcontent.h
b/lib/gui/elistboxcontent.h
index 9c89c65863295e74a9b778f4769da1e8d06132dc..f934ed599264eee959dbef66840b38c072d80b19 100644
(file)
--- a/
lib/gui/elistboxcontent.h
+++ b/
lib/gui/elistboxcontent.h
@@
-38,11
+38,14
@@
protected:
/* the following functions always refer to the selected item */
virtual void paint(gPainter &painter, eWindowStyle &style, const ePoint &offset, int selected);
/* the following functions always refer to the selected item */
virtual void paint(gPainter &painter, eWindowStyle &style, const ePoint &offset, int selected);
+
+ int getItemHeight() { return m_itemheight; }
protected:
ePyObject m_list;
int m_cursor, m_saved_cursor;
eSize m_itemsize;
protected:
ePyObject m_list;
int m_cursor, m_saved_cursor;
eSize m_itemsize;
+ int m_itemheight;
#endif
};
#endif
};
@@
-68,6
+71,7
@@
public:
void setFont(int fnt, gFont *fnt);
void setBuildFunc(SWIG_PYOBJECT(ePyObject) func);
void setFont(int fnt, gFont *fnt);
void setBuildFunc(SWIG_PYOBJECT(ePyObject) func);
+ void setItemHeight(int height);
private:
std::map<int, ePtr<gFont> > m_font;
};
private:
std::map<int, ePtr<gFont> > m_font;
};
diff --git
a/lib/service/listboxservice.cpp
b/lib/service/listboxservice.cpp
index 8bb026116284bb27c973b03157c2862d0309bb61..627895c2549a56e7cb6d95e5df5187fc128325af 100644
(file)
--- a/
lib/service/listboxservice.cpp
+++ b/
lib/service/listboxservice.cpp
@@
-260,7
+260,7
@@
void eListboxServiceContent::sort()
DEFINE_REF(eListboxServiceContent);
eListboxServiceContent::eListboxServiceContent()
DEFINE_REF(eListboxServiceContent);
eListboxServiceContent::eListboxServiceContent()
- :m_visual_mode(visModeSimple), m_size(0), m_current_marked(false), m_numberoffset(0)
+ :m_visual_mode(visModeSimple), m_size(0), m_current_marked(false), m_numberoffset(0)
, m_itemheight(25)
{
cursorHome();
eServiceCenter::getInstance(m_service_center);
{
cursorHome();
eServiceCenter::getInstance(m_service_center);
@@
-606,3
+606,10
@@
void eListboxServiceContent::setIgnoreService( const eServiceReference &service
{
m_is_playable_ignore=service;
}
{
m_is_playable_ignore=service;
}
+
+int eListboxServiceContent::setItemHeight(int height)
+{
+ m_itemheight = height;
+ if (m_listbox)
+ m_listbox->setItemHeight(height);
+}
diff --git
a/lib/service/listboxservice.h
b/lib/service/listboxservice.h
index 8623336f61355d8c1e7fea3b6f3980fe8c53f023..01b3d3c6d33e2dfa0281a6b80d745b1087e500c9 100644
(file)
--- a/
lib/service/listboxservice.h
+++ b/
lib/service/listboxservice.h
@@
-72,6
+72,10
@@
public:
int setCurrentMarked(bool);
void setNumberOffset(int offset) { m_numberoffset = offset; }
int setCurrentMarked(bool);
void setNumberOffset(int offset) { m_numberoffset = offset; }
+
+ int getItemHeight() { return m_itemheight; }
+ int setItemHeight(int height);
+
protected:
void cursorHome();
void cursorEnd();
protected:
void cursorHome();
void cursorEnd();
@@
-120,6
+124,8
@@
private:
int m_numberoffset;
eServiceReference m_is_playable_ignore;
int m_numberoffset;
eServiceReference m_is_playable_ignore;
+
+ int m_itemheight;
};
#endif
};
#endif