Commit Graph

2940 Commits

Author SHA1 Message Date
Pietro Gagliardi 40c388e01d Whoops, just realized I typo'd. 2017-02-13 01:28:46 -05:00
Pietro Gagliardi b2cd5ef851 Wrote code to draw the background of text. 2017-02-13 01:22:59 -05:00
Pietro Gagliardi 44f24fc900 Added the foreground color attribute. Considering making the background color a background BRUSH attribute instead... 2017-02-12 20:27:47 -05:00
Pietro Gagliardi 261dd4851a Changed the representation of an attribute type/value pair to allow more type safety and expressability. 2017-02-12 14:11:25 -05:00
Pietro Gagliardi 1c1b16a206 More attributes. Beyond this point I'd need to either redefine the way attributes are specified or make more header macros. 2017-02-12 13:41:52 -05:00
Pietro Gagliardi 5aaac84d55 Implemented uiAttributeFamily on OS X. ATTRIBUTES WORK!!! 2017-02-12 01:05:27 -05:00
Pietro Gagliardi 32a0284edc Started work on actual attributed text. This includes the beginnings of an attributed text example. Now to implement. 2017-02-11 23:19:30 -05:00
Pietro Gagliardi c4a97792ea And implemented the new stuff on Windows. 2017-02-11 21:54:06 -05:00
Pietro Gagliardi 210c4507ca Implemented uiDrawTextLayoutParams and alignment on GTK+. 2017-02-11 21:25:41 -05:00
Pietro Gagliardi 44f8409b8c And implemented the alignment stuff on OS X. 2017-02-11 21:10:16 -05:00
Pietro Gagliardi bd66e70452 And added the alignment flag to the example program. 2017-02-11 19:56:26 -05:00
Pietro Gagliardi 8a64a1dfb0 Made the OS X code and the example program use the new layout stuff. 2017-02-11 19:47:20 -05:00
Pietro Gagliardi 491ec3ae49 Actually let's do paragraph alignment first. Haven't tested hit-test with that just yet. 2017-02-11 17:10:59 -05:00
Pietro Gagliardi dca92d507e And readded uiFontButton on Windows. Woo! Now we have to deal with styles. 2017-02-11 17:08:05 -05:00
Pietro Gagliardi 1a8f7ad405 Reimplemented uiFontButton on GTK+. 2017-02-11 14:45:58 -05:00
Pietro Gagliardi a014eb27e6 More TODO completion in the drawtext example. 2017-02-11 14:22:23 -05:00
Pietro Gagliardi 67949d79aa And re-added the uiFontButton on OS X and added one to the hit-test example. 2017-02-11 01:13:07 -05:00
Pietro Gagliardi bebaf72de3 Started putting uiFontButton back in on OS X. Just a bunch of boilerplate for now, namely the function to take a CTFontDesciptorRef and convert it into a uiDrawFontDescriptor. 2017-02-11 00:53:52 -05:00
Pietro Gagliardi 49094bb340 Merged uiFontButton back in, with an updated API that works directly with uiDrawFontDescriptors. 2017-02-11 00:25:07 -05:00
Pietro Gagliardi 230d23765a Removed Uniscribe from the Windows build process and header file list. Also more TODOs. Next major goal: reinstating the font button. 2017-02-10 22:22:47 -05:00
Pietro Gagliardi c4b6149ec2 Gave up and rewrote Windows graphemes.cpp to use CharNextW() instead of Uniscribe, since I can't manage Uniscribe memory properly, it seems. The CharNextW() bug is relatively painless to work around anyway. Next commit will drop Uniscribe from the headers and build system. 2017-02-10 22:12:37 -05:00
Pietro Gagliardi 5a1c733841 Something is wrong with the Windows code... 2017-02-10 20:37:05 -05:00
Pietro Gagliardi 6acb10a4fc Fixed hanging errors in uiDrawCaret(). 2017-02-10 19:29:07 -05:00
Pietro Gagliardi 5f05ebbffe Expanded the hittest example by handling keyboard input. I should probably rename it to The Caret and Graphemes. 2017-02-10 19:22:25 -05:00
Pietro Gagliardi 5354aa5262 And cleaned hittest.c up. 2017-02-10 19:08:31 -05:00
Pietro Gagliardi 5d18d477e3 Implemented uiDrawCaret() on OS X. 2017-02-10 18:19:32 -05:00
Pietro Gagliardi 746e4091cb Implemented uiDrawCaret() on Windows. 2017-02-10 17:38:17 -05:00
Pietro Gagliardi b5b0fae052 And implemented uiDrawCaret() on GTK+. 2017-02-10 16:53:08 -05:00
Pietro Gagliardi 642363ccae Added the uiDrawCaret() function for drawing text carets. Now to write the backend-specific code and test it out. 2017-02-10 16:29:36 -05:00
Pietro Gagliardi b52600d9cd Preparation for adding uiDrawCaret(). 2017-02-10 16:16:43 -05:00
Pietro Gagliardi 0e5be32299 And cleaned up the GTK+ code. 2017-02-10 15:49:36 -05:00
Pietro Gagliardi 5823c3a53e More cleanup. 2017-02-10 11:52:26 -05:00
Pietro Gagliardi bb50440e55 Started cleaning up the old API. 2017-02-10 11:14:24 -05:00
Pietro Gagliardi 4b46dab775 And that last fix also fixed the issue about byte 1 being wrong. 2017-02-10 11:09:36 -05:00
Pietro Gagliardi 8ac9e386b5 More TODOs. 2017-02-10 11:07:44 -05:00
Pietro Gagliardi 6fa009a7dd Fixed uiAttributedString not putting the right position for the last character. Simple case of using the wrong variables. 2017-02-10 11:06:37 -05:00
Pietro Gagliardi 49d36b340c Started adjusting all the implementations to the new API's formal definition. There's bugs in uiAttributedString... 2017-02-10 10:54:37 -05:00
Pietro Gagliardi 92d996f148 Okay so I can't fix Pango as the behavior is hardcoded in (https://git.gnome.org/browse/pango/tree/pango/pango-layout.c?id=f4cbd27f4e5bf8490ea411190d41813e14f12165#n4204); just write some documentation and get rid of the old APIs entirely. 2017-02-09 19:20:35 -05:00
Pietro Gagliardi b96114e02d Fixed the hit-test example to manage the cursor more sanely. 2017-02-08 21:52:52 -05:00
Pietro Gagliardi d53bc88f50 And filled in the new functions on GTK+. Not quite right yet... 2017-02-08 21:19:49 -05:00
Pietro Gagliardi 5458e10134 Implemented the new hit-test functions on Windows. 2017-02-08 20:10:34 -05:00
Pietro Gagliardi 749a0cddaf Wrote the new hit-testing API on OS X, the easiest target. Also updated the example. Had to slightly modify one function for this all to work. 2017-02-08 19:00:45 -05:00
Pietro Gagliardi 93537ebb83 Simpler hit-testing APIs based on Core Text's. Microsoft's PadWrite sample shows us how to implement these on both DirectWrite and the similarly-interfaced Pango. 2017-02-08 11:38:52 -05:00
Pietro Gagliardi 012ce92b71 And implemented the caret changes on Windows. 2017-02-07 19:55:21 -05:00
Pietro Gagliardi 3e4f99e0dd Notes for Windows equivalent of previous commits. Not actually done yet. 2017-02-07 19:42:00 -05:00
Pietro Gagliardi 01b6a16af6 And handled caret behavior on GTK+. 2017-02-07 19:14:51 -05:00
Pietro Gagliardi bbc03a489e Implemented the system on the hit-test example and on OS X. 2017-02-07 16:43:49 -05:00
Pietro Gagliardi a5dac81855 Refined the hit-test API some more. 2017-02-07 16:21:18 -05:00
Pietro Gagliardi ac9aefc43a Set up a new API specifically for caret positioning when hit-testing a point. Not yet implemented, just planned out. 2017-02-07 15:29:12 -05:00
Pietro Gagliardi e4ed1c337b And implemented the functions on Windows. Yeah I think I'll need cursor functions, perhaps. 2017-02-06 18:38:44 -05:00