[TextEditor_mcc] MUIA_Font gettable

  • From: Mathias PARNAUDEAU <mathias.p@xxxxxxxxxx>
  • To: texteditor_mcc@xxxxxxxxxxxxx
  • Date: Mon, 13 Feb 2006 10:16:45 +0100

Le 12/02/2006, Ilkka Lehtoranta a écrit:

> I checked quickly TextEditor sources and it seems it doesnt use/set 
> _font(obj) since text is rendered to an offscreen bitmap.

> It also seems the text used in the gadget is not gettable. TextEditor 
> prolly should override MUIA_Font tag and return its own font there...

I think so. From an object oriented point of view, as TextEditor use and can
redefined its own font, it should return this one instead of the Area font
(that doesn't seem to work btw).

Quickly, this may look like that :

if (use_fixedfont){
   if (fixed font set in the class configuration){
      get this font : data->fixed_font
   }else{
      get the default Area font (used by inheritage) with data->font
   }
}else{
   if (if font set in the class configuration){
      get this font : data->normal_font
   }else{
      get the default Area font (used by inheritage) with data->font
   }
}

Or maybe we only have to return data->font (as the current font) that must
be set with the right font before.

We still have to check how fonts are set at the object creation.

In the sources, there are "#ifd(n)def ClassAct" : what is the reason ?

Regards,

-- 
Mathias PARNAUDEAU

_____________________________________________________________________________
TextEditor ML   - http://www.freelists.org/list/texteditor_mcc
Listserver help - mailto:texteditor_mcc-request@xxxxxxxxxxxxx?Subject=HELP
Bugtracker......: http://sourceforge.net/tracker/?atid=731469&group_id=135025

Other related posts: