Author Topic: BOUNTY: Notebook class with "close" button at the right  (Read 137152 times)

Offline eranif

  • Regular
  • ***
  • Posts: 256
Re: BOUNTY: Notebook class with "close" button at the right
« Reply #60 on: January 03, 2006, 02:41:22 pm »
I forgot the answer your question: Yes, the link always contains the latest souces + sample

Eran

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: BOUNTY: Notebook class with "close" button at the right
« Reply #61 on: January 03, 2006, 05:12:35 pm »
eranif: You might considering posting your project officially at berlios (for SVN access) or sourceforge (for CVS access).

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: BOUNTY: Notebook class with "close" button at the right
« Reply #62 on: January 03, 2006, 07:46:40 pm »
@Eran: please allow the event handler to cancel an operation.

What I mean is, you send events before page changes, after it changes and before it closes. But right now, they 're just informational events, i.e. just letting us know what is going to happen.
But we should be able to say to wxFlatNotebook: "hey, do not close this page, it's not saved yet" :)

Fortunately, this is easy. Just add the following couple of lines after posting the message:
Code
    // the event handler allows it?
    if (!event.IsAllowed())
        return;

I have already added it in my copy but it will be a pain to merge these after every update...
Be patient!
This bug will be fixed soon...

Offline eranif

  • Regular
  • ***
  • Posts: 256
Re: BOUNTY: Notebook class with "close" button at the right
« Reply #63 on: January 03, 2006, 09:02:29 pm »
Ok, Will do

I am also attaching a snipt of the bottom style that I am currently working on (i created the style for 2 of the 3 styles):




I also removed the X<> buttons and configured them as styles as you guys requested

Eran

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5491
Re: BOUNTY: Notebook class with "close" button at the right
« Reply #64 on: January 03, 2006, 09:04:34 pm »
Eran,

Thanks, you are doing a wonderfull job !!!!!!!!

Cheers,
Lieven

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: BOUNTY: Notebook class with "close" button at the right
« Reply #65 on: January 03, 2006, 09:15:10 pm »
Thanks Eran :)

I 'm almost done integrating it. I only have a problem with middle-click closing. Did you update the zip file by any chance?  :lol:
Be patient!
This bug will be fixed soon...

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: BOUNTY: Notebook class with "close" button at the right
« Reply #66 on: January 03, 2006, 09:25:22 pm »
Pretty nice job. Really.

mandrav: After wxFNB_BOTTOM and your request be implemented would it be ready for the transition? (I know, I'll be patient.) :)

There's only one minor thing left: when using the style wxFNB_NO_X_BUTTON, could the space saved by not drawing the X be used? I mean, if there won't be X button but navigation arrows, those could be moved to the right, giving at the same time a few extra pixels for the tabs.

mandrav: the middle-click problem is the selected tab changes BTW?

Offline 280Z28

  • Regular
  • ***
  • Posts: 397
  • *insert unicode here*
Re: BOUNTY: Notebook class with "close" button at the right
« Reply #67 on: January 03, 2006, 09:30:05 pm »
I have wxAUI and wxFlatNotebook working together nicely:

svn://djss.dynalias.net/wxAUI/trunk
78 280Z, "a few bolt-ons" - 12.71@109.04
99 Trans Am, "Daily Driver" - 525rwhp/475rwtq
 Check out The Sam Zone :cool:

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: BOUNTY: Notebook class with "close" button at the right
« Reply #68 on: January 03, 2006, 09:31:59 pm »
@Eran: you have a bug in RemovePage().
In the event you 're posting you have:
event.SetSelection(m_pages->m_iActivePage);

when it should be:
event.SetSelection(page);

Because of this, I was deleting the wrong page. No wonder why it went crazy on me ;)
Be patient!
This bug will be fixed soon...

Offline eranif

  • Regular
  • ***
  • Posts: 256
Re: BOUNTY: Notebook class with "close" button at the right
« Reply #69 on: January 03, 2006, 09:35:26 pm »
OK,

I am done with the bottom style here is the last piece missing (the default style, ironcially the hardest one to move to bottom ...)

Here is how it looks:


For the middle button: Is is the same problem reported earlier by Ceniza (the selection is changed before closing the tab)?

If it is the same problem - I will have a look at it

Eran



Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: BOUNTY: Notebook class with "close" button at the right
« Reply #70 on: January 03, 2006, 10:35:24 pm »
Eran: A couple of questions from a non-(yet)-user:

Is the option for < and > (but not X ) implemented? Just curious.
Finally, under what license are you releasing your code? Using the wxWindows license would be good, that way we could incorporate your class on private (non-opensourced) projects.

Offline eranif

  • Regular
  • ***
  • Posts: 256
Re: BOUNTY: Notebook class with "close" button at the right
« Reply #71 on: January 03, 2006, 10:44:43 pm »
Hi,

The options for the 'x' '<' '>' are implemented (the sources are updated at the usuall place and the demo is updated as well)
The licnese is wxWidgets (you can use it for any purpose you like, as long as you follow the wxWidgets license)

The full sources + demo can be downloaded from:
http://www.eistware.com/wx/wxFlatNotebook.zip

Regards,
Eran

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: BOUNTY: Notebook class with "close" button at the right
« Reply #72 on: January 03, 2006, 10:56:42 pm »
Cool, thanks! :)

BTW, have you considered submitting your code to wxWidgets so it'll become an official widget?

Offline eranif

  • Regular
  • ***
  • Posts: 256
Re: BOUNTY: Notebook class with "close" button at the right
« Reply #73 on: January 03, 2006, 11:34:58 pm »
Julian already put a link to my work at the wxWidgets site (check the contributions part -> classes )

Eran

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: BOUNTY: Notebook class with "close" button at the right
« Reply #74 on: January 03, 2006, 11:52:47 pm »
when i shrink the demo horizontally so that only one tab is visible, the advance selection arrows aren't working



[edit]
another issue, if the horizontal size is very small, no tab is shown  :shock:
i would expect some kind of truncated tab instead of none.
« Last Edit: January 03, 2006, 11:56:57 pm by tiwag »