History log of /haiku/src/apps/charactermap/CharacterView.cpp
Revision Date Author Comments
# 7124ff96 28-May-2020 dsizzle <dcieslak@yahoo.com>

Character Map: Added larger character popup on left-click

Fixes #15983.

Added left-click support to the existing function that pops up the context
menu for copying characters. Instead of menu options, put a large version
of the currently-selected character in the popup on left-click. The popup
character is 2.5 times as large as the current font size, because that
seemed nicer than 2 times.

Right-click functionality is unchanged.

Change-Id: I3b64fff3cafc02e2c54e34db6e58461b4e08b3b9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2832
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>


# 8d3f6fce 17-May-2020 Dale Cieslak <dcieslak@yahoo.com>

CharacterMap: gray out blocks that aren't supported by the current font

Fixes #15982.

Added font to UnicodeBlockView. Cache Unicode "Blocks" for both
UnicodeBlockView and CharacterView. Added lookup of non-Be Unicode blocks
(i.e. blocks with 'kNoBlock' specified). Gray out non-found blocks.

NOTE: tested fontconfig extensively in another environment and the shown
blocks match what fontconfig returns. However, you may sometimes see
characters in blocks that aren't 'included' in a font. I haven't figured
out why that occurs.

Change-Id: Ia3c7f8ccc6dc43c5ce062ed002846c861a8fa223
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2739
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>


# 35758c70 11-Feb-2019 Augustin Cavalier <waddlesplash@gmail.com>

CharacterMap: The CharacterView is scroll-view aware.

Fixes #14897.


# 19390213 02-Jun-2017 Dale Cieslak <dcieslak@yahoo.com>

CharacterMap: Use binary searches rather than linear lookups where possible.

UnicodeBlockView::SelectBlockForCharacter and CharacterView::_FrameFor
use the same linear search to find which block a character is in, so I
refactored both to use a shared BlockForCharacter function in UnicodeBlocks.cpp
that is a binary search. CharacterView::_BlockAt also had a TODO comment to
use a binary search, so I rewrote it as a binary search. It's not the same
search as the aforementioned BlockForCharacter function. These two changes
ought to improve the overall performance of CharacterMap.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>


# 8f58f9c3 14-Oct-2016 Humdinger <humdingerb@gmail.com>

CharacterMap: avoid white outline around selected character

SetLowColor() to the highlighting colour before drawing a selected character
to avoid blending with the regular white background.


# fa19dd44 10-Dec-2015 looncraz <looncraz@looncraz.net>

apps: Convert to using Set*UIColor.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
Patches 0045-0075, 0077-0087 from looncraz, unmodified.


# 0340e4b3 26-Nov-2014 dsizzle <dcieslak@yahoo.com>

CharacterMap: several fixes to char. view scroll

* Select items in the encoding list by block identifier rather than
list index (there are holes in the list)
* Scroll to the start of the list when the application starts
* Add and use IsBlockVisible to detect when we need to make a block
visible, avoiding unwanted scrollings in some cases with the previous
method of testing for only one character in the block.

Signed-off-by: Adrien Destugues <pulkomandy@gmail.com>

Fixes some problems with previous enhancements from #3651.


# 74d9b875 23-Nov-2014 dsizzle <dcieslak@yahoo.com>

CharacterMap: select Unicode block for current character

* Scrolling the list of characters now selects the currently visible
block in the blocks list.

Signed-off-by: Adrien Destugues <pulkomandy@gmail.com>

Fixes #3651, part 1


# 546208a5 16-Apr-2012 Oliver Tappe <zooey@hirschkaefer.de>

More catalog-related cleanup.

* rename B_TRANSLATE_CONTEXT to B_TRANSLATION_CONTEXT and
B_TRANSLATE_WITH_CONTEXT to B_TRANSLATE_CONTEXT, squashing a TODO
* adjust all uses of both macros in Haiku's source tree
* use correct header guard for collecting/Catalog.h

The renamed macros require adjustments to all external applications
using catalogs.


# 7c2ffab8 13-Dec-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Patch from Jason Fagnière (Protonux) as part of GCI :
* i18nize devices, charactermap, cdplayer, activitymonitor.

Thanks!

(note : there are some known 80-column problems in this patch)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39835 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8b7eacd6 29-Sep-2010 Axel Dörfler <axeld@pinc-software.de>

* Added CharacterView::ScrollToCharacter(), and IsCharacterVisible().
* On text drops, the character map is now scrolling to the first character
dropped. This is helpful to see the code of a character as well as the block
it is contained in.
* Fixed a bug in CharacterView::_FrameFor() that would not return the correct
vertical position.
* Made a few methods const.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38863 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7f2103fe 19-Aug-2010 Oliver Tappe <zooey@hirschkaefer.de>

Fix warnings in charactermap
* no need to overload ScrollTo() with a non-related method - renamed local
ScrollTo() to ScrollToBlock()


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38268 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7974d3dc 13-Jan-2010 Stephan Aßmus <superstippi@gmx.de>

Patch by Humdinger:
Updated Haiku apps to use sentence-case. What a huge undertaking...
The files where I had to apply the patch manually (for mysterious
reasons) have also gotten a whitespace cleanup. I've proof-read
everything so hopefully there should be no problems.

This should be the final part of #5169.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35049 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 48c06f42 22-Oct-2009 Axel Dörfler <axeld@pinc-software.de>

* _GetCharacterAt() might actually fail - this fixes a bug causing the bitmap
initialization to fail. This also caused a crash, as that wasn't checked for
before.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33729 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f7b4d19d 04-May-2009 Axel Dörfler <axeld@pinc-software.de>

* Reverted r30529 as this was pretty much bogus (sorry stpere, but the size of
the window was already set with its constructor).
* Fixed the actual cause of bug #3752 instead: the fCharacterHeight and
fTitleHeight members were not initialized when MinSize() was called.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30629 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3c2a04f4 09-Apr-2009 Axel Dörfler <axeld@pinc-software.de>

* Fixed that you would drag the wrong character when the drag was started
while you were already over another character.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30081 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7f629a41 04-Apr-2009 Axel Dörfler <axeld@pinc-software.de>

* Tried to make the scrolling position less surprising when resizing the window.
Sometimes it even seems to work :-)
* FrameResized() called _UpdateSize(), although DoLayout() already did so.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29910 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a9fcf35b 01-Apr-2009 Axel Dörfler <axeld@pinc-software.de>

* Added support for copying characters into the clipboard via Command-C, and
a popup menu.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29852 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f03b0a18 31-Mar-2009 Rene Gollent <anevilyak@gmail.com>

gcc4 build fixes.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29834 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ac2bb4db 31-Mar-2009 Axel Dörfler <axeld@pinc-software.de>

* No longer highlight a character once dragging starts.
* Use correct alpha/blending mode for the letters.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29830 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 53d31fb9 31-Mar-2009 Axel Dörfler <axeld@pinc-software.de>

* Removed unused MessageReceived() method.
* Made the standard character width a bit wider.
* When moving a character around, it was incorrectly centered in the bitmap
(StringWidth() was called from the wrong view).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29826 a95241bf-73f2-0310-859d-f6bbb57e9c96


# beedda4c 31-Mar-2009 Axel Dörfler <axeld@pinc-software.de>

* Added a string view that shows the character's code on mouse over, the
character gets also highlighted.
* Added support for dragging a character. Holding shift (or option) while
dragging will copy an UTF-8 hex string instead.
* Minor cleanup.
* Is there any reason BStringView restricts its maximum width?


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29825 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f05dab29 30-Mar-2009 Axel Dörfler <axeld@pinc-software.de>

* CharacterView now accepts mouse wheel input (it did not forward the messages
to its superclass), and it also sets useful scroller steps.
* Improved layout a bit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29817 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b0452872 31-Mar-2009 Axel Dörfler <axeld@pinc-software.de>

* Started an application showing the Unicode character map.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29815 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0340e4b336ab01b78e7291c5d4ace2ba551a20f4 26-Nov-2014 dsizzle <dcieslak@yahoo.com>

CharacterMap: several fixes to char. view scroll

* Select items in the encoding list by block identifier rather than
list index (there are holes in the list)
* Scroll to the start of the list when the application starts
* Add and use IsBlockVisible to detect when we need to make a block
visible, avoiding unwanted scrollings in some cases with the previous
method of testing for only one character in the block.

Signed-off-by: Adrien Destugues <pulkomandy@gmail.com>

Fixes some problems with previous enhancements from #3651.


# 74d9b875c2b854cadbd674a37bdde3ea64a4f062 23-Nov-2014 dsizzle <dcieslak@yahoo.com>

CharacterMap: select Unicode block for current character

* Scrolling the list of characters now selects the currently visible
block in the blocks list.

Signed-off-by: Adrien Destugues <pulkomandy@gmail.com>

Fixes #3651, part 1


# 546208a53940a26c6379c48a7854ade1a8250fc5 16-Apr-2012 Oliver Tappe <zooey@hirschkaefer.de>

More catalog-related cleanup.

* rename B_TRANSLATE_CONTEXT to B_TRANSLATION_CONTEXT and
B_TRANSLATE_WITH_CONTEXT to B_TRANSLATE_CONTEXT, squashing a TODO
* adjust all uses of both macros in Haiku's source tree
* use correct header guard for collecting/Catalog.h

The renamed macros require adjustments to all external applications
using catalogs.


# 7c2ffab858c6f0447aef751eef73f00a8512839d 13-Dec-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Patch from Jason Fagnière (Protonux) as part of GCI :
* i18nize devices, charactermap, cdplayer, activitymonitor.

Thanks!

(note : there are some known 80-column problems in this patch)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39835 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8b7eacd6b08eeae7c4267a96997c7387360ed5b8 29-Sep-2010 Axel Dörfler <axeld@pinc-software.de>

* Added CharacterView::ScrollToCharacter(), and IsCharacterVisible().
* On text drops, the character map is now scrolling to the first character
dropped. This is helpful to see the code of a character as well as the block
it is contained in.
* Fixed a bug in CharacterView::_FrameFor() that would not return the correct
vertical position.
* Made a few methods const.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38863 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7f2103fe254eecc85b4caca0d5d861864be88782 19-Aug-2010 Oliver Tappe <zooey@hirschkaefer.de>

Fix warnings in charactermap
* no need to overload ScrollTo() with a non-related method - renamed local
ScrollTo() to ScrollToBlock()


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38268 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7974d3dcf39ce78e5885b481eee12e561ad6e096 13-Jan-2010 Stephan Aßmus <superstippi@gmx.de>

Patch by Humdinger:
Updated Haiku apps to use sentence-case. What a huge undertaking...
The files where I had to apply the patch manually (for mysterious
reasons) have also gotten a whitespace cleanup. I've proof-read
everything so hopefully there should be no problems.

This should be the final part of #5169.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35049 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 48c06f42140009808141d68afd73a936c3b05d5c 22-Oct-2009 Axel Dörfler <axeld@pinc-software.de>

* _GetCharacterAt() might actually fail - this fixes a bug causing the bitmap
initialization to fail. This also caused a crash, as that wasn't checked for
before.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33729 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f7b4d19dc41e1598c6e8ae185716f2d2654e9f00 04-May-2009 Axel Dörfler <axeld@pinc-software.de>

* Reverted r30529 as this was pretty much bogus (sorry stpere, but the size of
the window was already set with its constructor).
* Fixed the actual cause of bug #3752 instead: the fCharacterHeight and
fTitleHeight members were not initialized when MinSize() was called.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30629 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3c2a04f4c936a976748c5564b65a67a9803e0a05 09-Apr-2009 Axel Dörfler <axeld@pinc-software.de>

* Fixed that you would drag the wrong character when the drag was started
while you were already over another character.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30081 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7f629a412148500f8646a8b3e3a15e2ef9b59ac6 04-Apr-2009 Axel Dörfler <axeld@pinc-software.de>

* Tried to make the scrolling position less surprising when resizing the window.
Sometimes it even seems to work :-)
* FrameResized() called _UpdateSize(), although DoLayout() already did so.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29910 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a9fcf35b9884af24b10eec0bb61615b302473509 01-Apr-2009 Axel Dörfler <axeld@pinc-software.de>

* Added support for copying characters into the clipboard via Command-C, and
a popup menu.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29852 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f03b0a18cce34a4e52ede53a02f4ded32907eb6d 31-Mar-2009 Rene Gollent <anevilyak@gmail.com>

gcc4 build fixes.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29834 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ac2bb4db914e6773e3c590ee2e238b5eb1744b15 31-Mar-2009 Axel Dörfler <axeld@pinc-software.de>

* No longer highlight a character once dragging starts.
* Use correct alpha/blending mode for the letters.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29830 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 53d31fb972311f2292d4098d81cb73acd3389dc7 31-Mar-2009 Axel Dörfler <axeld@pinc-software.de>

* Removed unused MessageReceived() method.
* Made the standard character width a bit wider.
* When moving a character around, it was incorrectly centered in the bitmap
(StringWidth() was called from the wrong view).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29826 a95241bf-73f2-0310-859d-f6bbb57e9c96


# beedda4c2c643e23c97dcb6917662d57df6a9b0d 31-Mar-2009 Axel Dörfler <axeld@pinc-software.de>

* Added a string view that shows the character's code on mouse over, the
character gets also highlighted.
* Added support for dragging a character. Holding shift (or option) while
dragging will copy an UTF-8 hex string instead.
* Minor cleanup.
* Is there any reason BStringView restricts its maximum width?


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29825 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f05dab29fd1f453bff08127cff6b6af85108ec17 30-Mar-2009 Axel Dörfler <axeld@pinc-software.de>

* CharacterView now accepts mouse wheel input (it did not forward the messages
to its superclass), and it also sets useful scroller steps.
* Improved layout a bit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29817 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b045287228b38d7892745c773bd74b7a2d122907 31-Mar-2009 Axel Dörfler <axeld@pinc-software.de>

* Started an application showing the Unicode character map.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29815 a95241bf-73f2-0310-859d-f6bbb57e9c96