Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

Zoom Plug-in

(1/4) > >>

killerbot:
Dear all,

2 days ago during a presentation of Herb Sutter at the c++ connections conference in Vegas, Herb needed to show something in a browser. Since he actually works at M$ he asked to the crowd which browser he should use, and everyone was going like "Firefox ... Firefox". Well, Herb did, and even told us what he thinks was the best feature : it was the ctrl-+ and ctrl-- zoom in / zoom out functions. Dynamically increase/decrease the font size in the current tab. Very cool during presentations, no need to adjust those resolutions for the laptop/pc itself, causing all those icons to reposition on the desktop.

Immediately I got the idea, hey , cool, would be nice to have this in Code::Blocks also.
Back in the hotel room, first looked if CB already had this : NO.
Really, within 5 (!) minutes I had implemented it as a plug-in.
Only one small problem, I don't seem to get it bind to ctrl-+ and ctrl--, but for the rest it works.

So the plugin adds :
- zoom in / zoom out entries to the "View" menu
- zoom in / zoom out entries to the context menu of the editor pane

Installation :
Copy the dll from the attached Zoom.zip to the CB-plug-in directory.
In the dll is also included the source code and the cbp project file (build on windows).

kind regards and happy zooming,
Lieven

PS : once I know how to bind with ctrl-+/- I will post a new zip file.

[attachment deleted by admin]

rickg22:
As far as I know, RC2 *already* supports this feature. In fact, i pressed ctrl + and ctrl - and it worked. I'm using Windows, btw.

killerbot:
strange, when I tried it out, it didn't seem so. Will have to try once more.

This would not be the first time that something strange happened. Yesterday I filed a bug, about renaming the workspace, someone replied that for him it worked. I have tried again and each time I could rename the workspace now. So this might be identical. Well if it already worked, then I wrote a nearly useless plug-in :-) , nearly useless, cause I learned some more methods of the scintilla interface.


thomas:
Um... you know that not only RC2 supports zooming, but that's been around like... forever? It's a Scintilla feature :)

Hold down the control key and use the mouse wheel ;)

squizzz:

--- Quote from: killerbot on November 10, 2005, 04:40:00 am ---strange, when I tried it out, it didn't seem so. Will have to try once more.

--- End quote ---

Try ctrl + numerical plus/minus (it's how it works for me).
The bad news is that there may be no "back to original size" option, or I just can't find it. :)

Navigation

[0] Message Index

[#] Next page

Go to full version