Lexi - WYSIWYG text editor described in second chapter of Design Patterns: Elements of Reusable Object-Oriented Software
Motivation - I've been reading the book(as most of you) and faced the questions like "How this pattern is implemented?" or "Is there an open-source implementation of Lexi?". After searching internet for the answers I decided to implement it all by myself.
Note: Even though I've tried to implement stuff as described in the book, there are differences that I'll try to describe in the future.
- IGlyph Abstract, base for all graphical units class. Described in Section 2.2 of GoF.
- Composite Described in Section 2.2 of GoF.
- Strategy: basically any child glyph.
- Decorator Note: currently, the scroller isn't a decorator as described in GoF due to implementation specific. Described in Section 2.4.
- Abstract Factory Described in Section 2.5.
- Bridge: Base Window, interface WindowImpl and its child XWindowImpl. Described in Section 2.6.
- Command Described in Section 2.7.
Note: some of the patterns are WIP state and may distinguish from the implementation provided in GoF
Projects functionality(in Gif format) across the versions
Finishing text editor(Finished basic functionality)- Migration to Windows
- use only smart pointers
- migrate to a Windows(which includes expansion of WindowSystemFactory)
- add important glyphs as text editor
- appropriate processing of all fonts(now only mono is supported)
Build Lexi:
cmake %path_to_lexi
make
Linux build troubleshooting
I'm using X11 library for basic graphic operation. If it is not installed in Your system, You can install it:
sudo apt install libx11-dev
- Pls let me know if I'm violating some property rights (romaonishuk@gmail.com)