wxFlatNotebook

If you have a cool piece of software to share, but you are not hosting it officially yet, please dump it in here. If you have code snippets that are useful, please donate!
priyank_bolia
wxWorld Domination!
wxWorld Domination!
Posts: 1339
Joined: Wed Aug 03, 2005 8:10 am
Location: BANGALORE, INDIA
Contact:

Post by priyank_bolia » Wed Jan 04, 2006 6:19 am

eranif, you haven't added the drag and movement of tags, was there a problem or what?

eranif
Moderator
Moderator
Posts: 607
Joined: Tue Nov 29, 2005 7:10 pm
Location: Israel

Post by eranif » Wed Jan 04, 2006 6:39 am

No problem at all,

I was working on it now - I first wanted to complete the 'bottom' style - this is my next task, to add the drag and drop you provided.


Eran
IDE: CodeLite + wxCrafter
OS: All
https://wxcrafter.codelite.org
https://codelite.org

priyank_bolia
wxWorld Domination!
wxWorld Domination!
Posts: 1339
Joined: Wed Aug 03, 2005 8:10 am
Location: BANGALORE, INDIA
Contact:

Post by priyank_bolia » Wed Jan 04, 2006 6:43 am

fine, just clarifying

eranif
Moderator
Moderator
Posts: 607
Joined: Tue Nov 29, 2005 7:10 pm
Location: Israel

Post by eranif » Wed Jan 04, 2006 10:31 am

priyank_bolia,

I integrated the drag and drop to the flatnotebook - almost went smooth :)

one little change needed, it didnt support the bottom style, so I modifed the source file to fit the new style - it is working properly now.

The source file are updated at:
http://www.eistware.com/wx/wxFlatNotebook.zip

Thanks,
Eran
IDE: CodeLite + wxCrafter
OS: All
https://wxcrafter.codelite.org
https://codelite.org

priyank_bolia
wxWorld Domination!
wxWorld Domination!
Posts: 1339
Joined: Wed Aug 03, 2005 8:10 am
Location: BANGALORE, INDIA
Contact:

Post by priyank_bolia » Wed Jan 04, 2006 11:44 am

eranif wrote:priyank_bolia,

I integrated the drag and drop to the flatnotebook - almost went smooth :)

one little change needed, it didnt support the bottom style, so I modifed the source file to fit the new style - it is working properly now.

The source file are updated at:
http://www.eistware.com/wx/wxFlatNotebook.zip

Thanks,
Eran
I changed the files little bit, there are avialable from the same URL:
http://www.priyank.in/downloads/wxFlatNotebook.zip

It contains some spellings fix, documentation, navigation button moved right when no close button, and frame event handler for no X button fixed. Please replace this in your own copy.


Files Modified on 4 Jan, 2006 01:00 PM GMT

eranif
Moderator
Moderator
Posts: 607
Joined: Tue Nov 29, 2005 7:10 pm
Location: Israel

Post by eranif » Wed Jan 04, 2006 1:46 pm

are you using the same files that I sent?
Since it looks like the same file you sent couple a days ago... And I could not find the spelling fixes.

If you can please update the updated sources, I will appreciate it.

Anyways,
I am uploading the sources to sourceforge, so it will be easy for all of who wishes to update them.

Eran
IDE: CodeLite + wxCrafter
OS: All
https://wxcrafter.codelite.org
https://codelite.org

priyank_bolia
wxWorld Domination!
wxWorld Domination!
Posts: 1339
Joined: Wed Aug 03, 2005 8:10 am
Location: BANGALORE, INDIA
Contact:

Post by priyank_bolia » Wed Jan 04, 2006 3:44 pm

eranif wrote:are you using the same files that I sent?
Since it looks like the same file you sent couple a days ago... And I could not find the spelling fixes.

If you can please update the updated sources, I will appreciate it.

Anyways,
I am uploading the sources to sourceforge, so it will be easy for all of who wishes to update them.

Eran
Couldn't you find the btnLeftPos += 20; line in the .cpp file. I guess then some thing is in your cache, please check again the upload was fine AFAIK.

Ceniza
In need of some credit
In need of some credit
Posts: 7
Joined: Sat Dec 31, 2005 7:25 am
Location: Colombia (South America)

Post by Ceniza » Wed Jan 04, 2006 5:40 pm

wxFlatNotebook.cpp line 510, from:

Code: Select all

m_pDropTarget = new CTextDropTarget<wxPageContainer>(this, wxPageContainer::OnTextDropTarget);
to:

Code: Select all

m_pDropTarget = new CTextDropTarget<wxPageContainer>(this, &wxPageContainer::OnTextDropTarget);
Also a newline at the end of TextDropTarget.h (just a minor warning of g++).

Could you also try to keep consistency with filenames when named and when included?

Example: in wxFlatNotebook.h you're including "textdroptarget.h" but the file is named "TextDropTarget.h". For a Windows environment that'll work, but for a Unix based environment (Unix/Linux/BSD/...) that won't.

Thanks in advance.

priyank_bolia
wxWorld Domination!
wxWorld Domination!
Posts: 1339
Joined: Wed Aug 03, 2005 8:10 am
Location: BANGALORE, INDIA
Contact:

Post by priyank_bolia » Wed Jan 04, 2006 5:45 pm

Ceniza wrote:wxFlatNotebook.cpp line 510, from:

Code: Select all

m_pDropTarget = new CTextDropTarget<wxPageContainer>(this, wxPageContainer::OnTextDropTarget);
to:

Code: Select all

m_pDropTarget = new CTextDropTarget<wxPageContainer>(this, &wxPageContainer::OnTextDropTarget);
Also a newline at the end of TextDropTarget.h (just a minor warning of g++).

Could you also try to keep consistency with filenames when named and when included?

Example: in wxFlatNotebook.h you're including "textdroptarget.h" but the file is named "TextDropTarget.h". For a Windows environment that'll work, but for a Unix based environment (Unix/Linux/BSD/...) that won't.

Thanks in advance.
eranif and I had a private conversation about that, and the files with him are already changed. When eranif will integrate them, these problems will be fixed for unix. As I only works on windows. Anyway thanks for the information.

Ceniza
In need of some credit
In need of some credit
Posts: 7
Joined: Sat Dec 31, 2005 7:25 am
Location: Colombia (South America)

Post by Ceniza » Wed Jan 04, 2006 7:33 pm

Another minor change.

Frame.cpp line 349, from:

Code: Select all

wxTextEntryDialog dlg(this, "Enter Tab Number to select:", "Set Selection");
to:

Code: Select all

wxTextEntryDialog dlg(this, _("Enter Tab Number to select:"), _("Set Selection"));
With those changes it compiles under Linux, but unfortunately it crashes when adding a new page. It's still a bit unclear the reason.

Oh, almost forget it, and really weird: under Windows, using g++, it compiled without giving any other complaint, but under Linux, also using g++, it found OnEraseBackground doesn't exist for wxFlatNotebook (it's added as an event) and in fact it doesn't, there's only one for wxPageContainer.
This Space For Rent

phlox81
wxWorld Domination!
wxWorld Domination!
Posts: 1387
Joined: Thu Aug 18, 2005 7:49 pm
Location: Germany
Contact:

Post by phlox81 » Wed Jan 04, 2006 9:16 pm

Ceniza wrote:Another minor change.
Oh, almost forget it, and really weird: under Windows, using g++, it compiled without giving any other complaint, but under Linux, also using g++, it found OnEraseBackground doesn't exist for wxFlatNotebook (it's added as an event) and in fact it doesn't, there's only one for wxPageContainer.
same g++ Version ?

Ceniza
In need of some credit
In need of some credit
Posts: 7
Joined: Sat Dec 31, 2005 7:25 am
Location: Colombia (South America)

Post by Ceniza » Wed Jan 04, 2006 11:28 pm

Linux: g++ 4.0.2
Windows: g++ 3.4.4

What's really weird is why 3.4.4 isn't "seeing" that function isn't there when tried to be used.
This Space For Rent

User avatar
T-Rex
Moderator
Moderator
Posts: 1198
Joined: Sat Oct 23, 2004 9:58 am
Location: Zaporizhzhya, Ukraine
Contact:

Post by T-Rex » Thu Jan 05, 2006 9:24 pm

Hello, guys.

I found one more bug with scrolling but I have no time to fix it... maybe you have.

So, the problem, is that if we have several pages (e.g 3) and the width of notebook is lower than width of 2 headers then it doesn't scroll (but scroll button stays active - see screenshot)
Image

But when we resize the notebook and its width becomes bigger than the width of 2 headers, scrolling works fine

Image

Regards,
T-Rex

eranif
Moderator
Moderator
Posts: 607
Joined: Tue Nov 29, 2005 7:10 pm
Location: Israel

Post by eranif » Thu Jan 05, 2006 9:33 pm

This bug is already fixed along with some others.

The bug fixes include the following (and other which I cant remember):

- No scroll was possible if only one tab was drawn
- A crash when no tabs can be drawn (but the book contains pages)
- Adding new page would hide the other tabs (the evil bug)

All the sources are now updated at sourceforge, so you can download them from CVS directly.
The zip file (in the download page) does not contain these fixes - so you should use the CVS files

For anonymous login to the CVS run the following command:
cvs -d:pserver:[email protected]:/cvsroot/wxflatnotebook login

- When a request for the password appears, simply hit 'Return'

And then checkout the module by running the following command:
cvs -z3 -d:pserver:[email protected]:/cvsroot/wxflatnotebook co -P contrib

the project at sourceforge can be found at:
http://sourceforge.net/projects/wxflatnotebook

Eran
IDE: CodeLite + wxCrafter
OS: All
https://wxcrafter.codelite.org
https://codelite.org

User avatar
T-Rex
Moderator
Moderator
Posts: 1198
Joined: Sat Oct 23, 2004 9:58 am
Location: Zaporizhzhya, Ukraine
Contact:

Post by T-Rex » Thu Jan 05, 2006 10:36 pm

Hmm.. very strange... I downloaded the files from CVS using Web-interface at sourcefourge.net but the problem still appears.

Post Reply