Commit Graph

1163 Commits

Author SHA1 Message Date
Emil Segerås
1f531d5100 Made large demo font less ugly. 2012-07-10 07:00:36 +02:00
Emil Segerås
43d4c2933c compilefix for gcc 2012-07-08 21:20:49 +02:00
Emil Segerås
cd175fcea4 Added TBAddon system, and TBImage, TBImageManager, TBImageWidget:
-Makes it easy to extend tinkerbell with new systems & widgets.

-TBImageWidget loads & shows images dynamically (so it's easy to show
  images that are rarely showed and should not be part of the skin).
2012-07-08 21:10:12 +02:00
Emil Segerås
64b1f588c6 Remove empty fragment maps when last fragment is deleted.
Also improved debugging a bit and made "add_border" a property.
2012-07-08 20:58:12 +02:00
Emil Segerås
cf3ffc6ae6 Minor optimization 2012-07-07 11:33:21 +02:00
Emil Segerås
4642294660 Merge branch 'emil_font_wip_4' of C:/Users/emil/Documents/My Dropbox/tinkerbell/gitrep/tinkerbell into emil_font_wip_4 2012-07-07 10:08:34 +02:00
Emil Segerås
a6219b732a Minor demo cleanup 2012-07-07 10:07:00 +02:00
Emil Segerås
cafc3bc124 Fixed TBStyleEdit overflow bug.
The ending linebreak was pushed to the next line, which caused
a extra line gap before the next line.
2012-07-07 10:00:19 +02:00
Emil Segerås
5c5278dd1f Minor optimization in CreateNewFragment 2012-07-07 09:54:08 +02:00
Emil Segerås
3bd5d4d00c Fixed opacity on text. 2012-07-06 15:50:36 +02:00
Emil Segerås
e37e0f328f More work on fonts:
-TBBitmapFragments can be removed individually. Free space is maintained by new TBSpaceAllocator class.
-The glyph cache is now a real cache (forgets least recently used glyph)
-Changes to batcher to handle flushing properly when removing fragments.
-Changes to batcher to wait with validating fragments bitmap until drawing, to avoid flush after each character when the glyph cache is full.
2012-07-06 15:26:42 +02:00
Emil Segerås
70a9591bbc Added TBTempBuffer::AppendString 2012-07-06 15:20:04 +02:00
Emil Segerås
3bbd61fdc1 Added TBHashTable::Remove/Delete 2012-07-06 15:17:40 +02:00
Emil Segerås
1d277d12c2 Merge branch 'emil_font_wip_4' of C:/Users/emil/Documents/My Dropbox/tinkerbell/gitrep/tinkerbell into emil_font_wip_4 2012-06-30 13:15:51 +02:00
Emil Segerås
25879f03a8 Added a menu buton to the edit window. 2012-06-30 10:48:00 +02:00
Emil Segerås
86cd162b69 Added forgotten file to Makefile 2012-06-30 09:54:38 +02:00
Emil Segerås
dbc3824076 Don't crash if resource data is invalid. 2012-06-27 09:35:50 +02:00
Emil Segerås
6eb57af2fe Fixes for scrollbar and slider. 2012-06-27 09:34:29 +02:00
Emil Segerås
80a6123235 Some cleanup of demo files & work on resource editor.
Also made a template version of TBGenericStringItemSource to avoid casts to subclasses of TBGenericStringItem.
2012-06-25 18:36:16 +02:00
Emil Segerås
d7b4b78cd3 Added 2 TBID to TBMessageData.
Converting to int and back to TBID works, but debug builds may
start asserting because there are TBIDs with and without string
that gets the same hash value (which is not exactly a collision but
could be). Alternatively, the assert can be made quite about that case.
2012-06-25 18:30:51 +02:00
Emil Segerås
7e9927e5a1 Fix for DrawRect/FillRect color with opacity, and flush batch before modifying texture. 2012-06-25 17:13:48 +02:00
Emil Segerås
f55cefd326 Fix for setting decimal values from resource. 2012-06-25 17:07:54 +02:00
Emil Segerås
81a9b83871 Added TBWindow::EnsureFocus so it's easy to set focus if loading resources *after* activating a window. 2012-06-25 11:33:18 +02:00
Emil Segerås
4e858e9d5b Fix for broken automatic focusing in windows that fade in. 2012-06-25 11:30:03 +02:00
Emil Segerås
7aca466fdd Prevent jumpy scroll when dragging a scrollbar while more content is added.
Pet feature :)
2012-06-24 18:45:33 +02:00
Emil Segerås
4a762cf133 Some demo cleanup. 2012-06-24 17:36:54 +02:00
Emil Segerås
5b061c3c5e Cleaned up SetText parameters. 2012-06-24 17:28:32 +02:00
Emil Segerås
67dce2dfff Fixed bad text layout in resource loaded single line editfields.
Was introduced by recent optimization to skip layout when the size
hasn't been set yet. In combination with other optimization to skip
relayout of text if size doesn't affect layout.
2012-06-24 09:58:46 +02:00
Emil Segerås
9eac332545 Added context lost & restored listener.
Need to handle context lost & restored in more places than the
skin (in fonts), so the new listener API should be invoked by the
platform instead of just reloading the skin directly.
2012-06-21 16:32:46 +02:00
Emil Segerås
a01137cace New font handling:
-Added TBFontRenderer & TBFontFace etc. with glyph caching using
 TBBitmapFragment.
-Removed hardcoded window title bar height.
-Lots of work to get TBFontFace & TBFontDescription into use in widgets.
-Replaced old TdFont with a new bitmap font system using a TBFontRenderer
 backend. Supports characters in any range, glow and shadow.
2012-06-21 12:06:08 +02:00
Emil Segerås
b4672ee559 don't unescape unknown character combination 2012-06-21 12:05:44 +02:00
Emil Segerås
d3a31bb3c6 Added some useful files for testing utf8 & font glyph cache. 2012-06-21 12:05:43 +02:00
Emil Segerås
da5e188c7e Fixed caret position within style embeds. 2012-06-21 12:05:42 +02:00
Emil Segerås
da380fb6cd .gitignore some build objects 2012-06-21 12:01:21 +02:00
Emil Segerås
bbd3d63604 Fixed so TBBitmapFragment can update TBBitmap dynamically.
Also:
UTF-8 fix in demo.
Some cleanup.
2012-06-21 12:01:19 +02:00
Emil Segerås
45f8aa4e4f Test for some malformed utf8 2012-06-21 12:01:18 +02:00
Emil Segerås
ab34d4a09a Fix for smart indentation of bullet. 2012-06-11 11:13:28 +02:00
Emil Segerås
f5adef3437 Unicode (utf-8) support:
-Added utf-8 conversion functions.
-Switched to utf-8 in clipboard implementation (windows)
-Switched to utf-8 on all resource files.
-Skip BOM character at the beginning of resource files.
-Made old TDFont system unicode aware (not supporting displaying unicode, but able to handle it)
2012-06-10 15:45:32 +02:00
Emil Segerås
4a94b1fe71 Fix for potentially missed tests. 2012-06-02 19:10:46 +02:00
Emil Segerås
e783cf4bcd Don't paint tab/linebreak/space.
Was displayed as missing glyph square using freetype.
2012-06-02 17:30:40 +02:00
Emil Segerås
23f844cc4d Changed to static registration of widgets factories. 2012-06-02 15:35:24 +02:00
Emil Segerås
b97d8aa2ad Fixed some typos 2012-06-02 15:12:11 +02:00
Emil Segerås
877067c40c Changed demo app default window size. 2012-06-02 15:10:30 +02:00
Emil Segerås
d964ac176a Removed pointless clipping for TBTextField.
It either fits, or "..." is used to cut off the text.
If any clipping is needed, it should be done in TBWidgetString::Paint.
2012-05-30 17:49:30 +02:00
Emil Segerås
7595d0eb85 Adjusted underline thuckness. 2012-05-30 17:48:01 +02:00
Emil Segerås
3af2b35d74 Updated TDFont default font (should not be bold).
Adjusted advance.
2012-05-30 17:47:15 +02:00
Emil Segerås
f3eadedaef Removed temporary debug text. 2012-05-30 17:45:09 +02:00
Emil Segerås
b14c83562a Some tests for tb_style_edit 2012-05-29 21:37:36 +02:00
Emil Segerås
aaf0f787d1 Let it be up to caller of TBRunTests to assert on failed tests.
Show failed test dialog on fails, instead of annoying assert.
2012-05-29 21:34:05 +02:00
Emil Segerås
920a0a7761 Bugfixes & constness:
-Undo redo must avoid caret snap, or everything goes out of sync.
-Merge wasn't always called on needed blocks, and didn't propagate height change properly.
2012-05-29 21:29:32 +02:00