[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]

Re: [XaraXtreme-dev] New Ruler functions

In message <8CC7991A-D556-453B-AA43-E9C6F9F51AF7@xxxxxxxx>
          Phil Martin <phil@xxxxxxxx> wrote:

> On 29 Jun 2006, at 12:48, Martin Wuerthner wrote:
>> Not really. I have just finished all the formatting code to handle the
>> four tab types and added native saving/loading for tabs, so your ruler
>> work came just in time, very good.
> Great. I'll be interested to hear how you're saving the tab info.

A tab (as found in text, not to be confused with a tab stop as found 
on a ruler) is just a new kind of abstract text character, so it is 
saved very much like an EOL character, just with a different tag (see 
the attached diffs for the tag definition).

I will soon submit the text changes for tabbing support. Even without 
the user interface to set tab stops it will already be useful. The 
ruler attribute is not saved at the moment, but since the default 
ruler is empty anyway, it does not matter. You can still use tabs 
because there are implicit left align tabs at multiples of 0.5 in 
beyond the last user defined tab.

Index: Kernel/cxftags.h
--- Kernel/cxftags.h	(Revision 1388)
+++ Kernel/cxftags.h	(Arbeitskopie)
@@ -413,6 +413,7 @@
 #define TAG_TEXT_KERN								2204
 #define TAG_TEXT_CARET								2205
 #define TAG_TEXT_LINE_INFO							2206
+#define TAG_TEXT_TAB								2207
 // Text attributes
 #define TAG_TEXT_LINESPACE_RATIO					2900
Index: Kernel/cxfdefs.h
--- Kernel/cxfdefs.h	(Revision 1388)
+++ Kernel/cxfdefs.h	(Arbeitskopie)
@@ -471,6 +471,7 @@
 #define TAG_TEXT_KERN_SIZE							8
 #define TAG_TEXT_CARET_SIZE							0
 #define TAG_TEXT_LINE_INFO_SIZE						12
+#define TAG_TEXT_TAB_SIZE							0
 // Text attributes