May 14, 2024, 12:16:46 PM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Update 01-21-2012 (Partial)

Started by LarryMc, January 21, 2012, 06:12:17 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

LarryMc

Attached is a screenshot of the GUI for the Print Preview/Setup window.

Now I have to flesh out all the code for the controls (I'd been dummying up things while I was trying to figure out how I was going to do things)

As always I'm open for comments.

LarryMc
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

billhsln

Looks very impressive.  If possible, when word wrap happens, could there be a way to tell that it happened?  Not sure, but maybe bolding the line that wrapped or italics?  Just some way to know that it happened.

Thanks,
Bill
When all else fails, get a bigger hammer.

LarryMc

Quote from: billhsln on January 21, 2012, 07:13:11 PM
Looks very impressive.  If possible, when word wrap happens, could there be a way to tell that it happened?  Not sure, but maybe bolding the line that wrapped or italics?  Just some way to know that it happened.

Thanks,
Bill
Don't know.  Word wrap is a function of scintilla.  I don't know it there is any way to trap that it has occurred.

But I will look into it.

LarryMc
UPDATE:

Doesn't appear it can be done via scintilla. If I abandon the Scintilla printing functions and extract each line to be printed, determine if it needs to be wrapped or not, determine if there is enough space on the page to print it it would make the preview process and the printing process very, very slow.

Think of it this way.
for every page to be displayed/printed I have to start at the beginning of the document and process every line because just one wrapped line shifts all the lines down one line from there to the end of the file.

Now if everyone always wanted to print just the FIRST x number of pages I would only have to go through it once.
But what about a 40 page file.  To set up the previous/next buttons I still have to always process the whole file at least once.

Using Scintilla's routines all I have to do is calculate the size of the rectangle available for printing(after making allowances for the printer's unprintable areas,headers,footers,and all 4 margins).Their code would always execute faster than any code I could write.

If you wrote your code using indented code then it would be pretty easy to see when it was wrapped?  ;)

So, unless I find something on a forum somewhere that isn't in the Scintilla documentation I'm not going to be able to help you.  But I will keep it in mind.

LarryMc
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Brian

Larry,

That looks great. I'd like to have a mess with something like that myself.
I've downloaded the scilexer.dll and associated files. Is there an include
file anywhere, or any info that would get me going?

Brian

LarryMc

Quote from: Brian Pugh on January 22, 2012, 05:32:17 AM
Larry,

That looks great. I'd like to have a mess with something like that myself.
I've downloaded the scilexer.dll and associated files. Is there an include
file anywhere, or any info that would get me going?

Brian

I used Sapero's posting as a go-by (http://www.ionicwind.com/forums/index.php?topic=3696.msg29463#msg29463)
and the documentation that comes with Scintilla.  An awful lot of trial and error involved for me.

LarryMc
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Brian

Larry,

Got it, thanks. Hmmm, now what do I do with it! This is Sapero's code. He is
on a different planet than me!

Brian

LarryMc

Quote from: billhsln on January 21, 2012, 07:13:11 PM
... when word wrap happens, could there be a way to tell that it happened?  ...
@Bill
although I haven't actually got to the coding yet I think it will be easy for you to see line wraps.  I believe Scintilla will allow me to output line numbers and when a line wraps it won't start with a number.  Simple.

@Everyone
I'm still plugging away on the printer interface.
I've gotten the GUI code and the basic supporting skeleton merged into the IDE project itself.
I've got the necessary entries in the INI file added.
I've currently working on the initialization code that reads the printer entries in the INI and putting the values in the proper places.  At the same time I'm adding the code that saves the parameters to the ini file when the print window is closed.

It seems like I'm going awful slow right now.  I guess it's due to the fact I've never dealt with the print dialog and printing in this much detail before..

LarryMc
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

billhsln

When all else fails, get a bigger hammer.

LarryMc

Quote... when word wrap happens, could there be a way to tell that it happened?  ...
tonight I proved that Scintilla will allow line numbers to be printed out.

Means that there is no problem in seeing wordwraps. Also, it will print in color(same as the editor window syntax coloring) or in black and white.

working on header and footer layout
I got the portrait/landscaping switching done today in the preview. Appears to be instanteous.

LarryMc
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library