In my previous posts here and here I showed how to create a simple application which uses Document/View framework. Now I’m going to show more complex example – image viewer with scrolling and selection rectangle. As far as I can see from wxForum, implementation of selection-related functionality is some kind of complex but very useful task. So, let’s start from simple part. The simplest task here is modification of our wxDocument-related class.
Today we’ll dig a little bit deeper into Document/View framework provided by wxWidgets and will see how to create a simple text editor using this framework. We’ll take the source code from the previous article of this series and add some modifications. You will see below that modifications are rather simple and take almost no time. First of all we have to make
wxDocTemplateto handle desired file extensions (in our case it’s TXT).
A few weeks ago, working on TIFF viewer software, I realized that many developers, who use wxWidgets in their work, spend their time on implementing the functionality which already exists in wxWidgets library. Such tasks as loading/saving documents, edit/copy/paste functionality, separating the GUI from application’s logic, all of them can be performed in a far…