On Thu, Nov 18, 2010 at 06:44:57PM +0000, corvid wrote:
Johannes wrote:
-----Urspr?ngliche Nachricht----- An: dillo-dev@dillo.org; Von: corvid <corvid@lavabit.com> Gesendet: Do 11.11.2010 02:43 Betreff: Re: [Dillo-dev] patch: text-indent
Johannes wrote:
We probabely want some isBlockLevelWidget() function...
Using Widget::Flags, perhaps, or would you think it best generally to save the flags for state that changes during a widget's life?
I was just thinking about something simple like
bool isBlockLevelWidget(Widget *w) { return widget->instanceOf (Textblock::CLASS_ID) || widget->instanceOf (Table::CLASS_ID) ... ); }
in textblock.cc to explain to the code reader why we are testing for exactly these widget types. Plus we might have to reuse at some point.
Textblock doesn't know what Table and Ruler are, though.
Hm, I see. In that case your proposal of using the widget flags sounds just fine to me. Cheers, Johannes