Search found 18 matches

by phonxe
Wed Apr 04, 2007 7:01 am
Forum: The Code Dump
Topic: wxFlatNotebook
Replies: 248
Views: 67162

Two bugs, 1. src/renderer.cpp, line 1614: // According to the equation y = ax + b => x = (y-b)/a // We know the first 2 points double a = (y2 - y1) / (x2 - x1); double b = y1 - ((y2 - y1) / (x2 - x1)) * x1; if(a == 0) return (int)x1; // Vertical line if(x1 == x2) return (int)x1; the checking for ver...
by phonxe
Mon Dec 04, 2006 4:39 am
Forum: The Code Dump
Topic: wxFlatNotebook
Replies: 248
Views: 67162

There is a bug on wxFlatNotebook.cpp: void wxFlatNotebook::SetSelection(size_t page) { //...... if( m_sendPageChangeEvent ) { // Allow the user to veto the selection int oldSelection = GetSelection(); wxFlatNotebookEvent event(wxEVT_COMMAND_FLATNOTEBOOK_PAGE_CHANGING, GetId()); event.SetSelection( (...
by phonxe
Tue Oct 10, 2006 2:48 pm
Forum: The Code Dump
Topic: wxFlatNotebook
Replies: 248
Views: 67162

Hello Eran, Here is a converter: http://madedit.sourceforge.net/image2xpm.7z This Image Converter was modified from wxWidgets\samples\image. It can convert many image formats to another image format, and if the image has alpha channel, it will also save alpha data to *.alpha in C/C++ format like xpm...
by phonxe
Tue Oct 10, 2006 12:52 pm
Forum: The Code Dump
Topic: wxFlatNotebook
Replies: 248
Views: 67162

Hello Eran, Why not use xpm image like you do in wxFlatNotebook.h? Well, the xpm I uses in wxFlatNotebook.h, are very simple images which I drawed by hand. The png file I use (you can see it by enabling the Smart tabbing option, and press Ctrl+T), as much higher quality, and I afraid I could not fin...
by phonxe
Tue Oct 10, 2006 5:16 am
Forum: The Code Dump
Topic: wxFlatNotebook
Replies: 248
Views: 67162

I am using wxMemoryInputStream for a simple reason: You can simply comment it out, or maybe you can suggest another alternative way to load image from C style array (fnb_reousrces.cpp) that does not use wxMemoryInputStream. Eran Why not use xpm image like you do in wxFlatNotebook.h? I think load xp...
by phonxe
Sat Apr 22, 2006 10:30 am
Forum: C++ Development
Topic: higher level for wxDC::GetTextExtent? how to get DC?
Replies: 3
Views: 988

You can use wxWindow::GetTextExtent().
It is the same as calling wxDC::GetTextExtent().
by phonxe
Tue Apr 04, 2006 7:28 am
Forum: The Code Dump
Topic: wxFlatNotebook
Replies: 248
Views: 67162

Hi Doggan, I also write a text editor and use wxFlatNotebook to manage the opened files. Here are my ways to use wxFlatNotebook. It's unneeded to call tab->DeletePage() when the page is closing(EVT_FLATNOTEBOOK_PAGE_CLOSING), wxFlatNotebook will delete the page automatically. If the file is modified...
by phonxe
Sun Mar 05, 2006 3:45 am
Forum: The Code Dump
Topic: wxFlatNotebook
Replies: 248
Views: 67162

wxFlatNotebook is a great component. Here are my modifications to be suited to my app. 1. Enable DoubleClick on Tab to close it EVT_LEFT_DCLICK(wxPageContainerBase::OnMiddleDown) 2. Set cursors on linux, otherwise it will crash on my Debian. But the original codes are okay on other Linux distro, I d...
by phonxe
Wed Feb 15, 2006 1:44 pm
Forum: C++ Development
Topic: problem with accelerator table + wxNotebook
Replies: 3
Views: 1254

Use this to remove wxTAB_TRAVERSAL flag on all wxFrame, xPanel and wxNotebook

Code: Select all

wxXXX->SetWindowStyleFlag( wxXXX->GetWindowStyleFlag() & ~wxTAB_TRAVERSAL );
Maybe it works for you.
by phonxe
Tue Feb 07, 2006 3:45 pm
Forum: Platform Related Issues
Topic: How to disable the warning message "IPP request failed.
Replies: 2
Views: 1323

I redirect the warning messages to /dev/null

Code: Select all

#ifdef __WXGTK__
    int fdnull = open ("/dev/null", O_WRONLY, 0);
    dup2(fdnull, STDERR_FILENO);
#endif
It's clear on my screen now.
by phonxe
Thu Jan 26, 2006 9:15 am
Forum: Platform Related Issues
Topic: How to disable the warning message "IPP request failed.
Replies: 2
Views: 1323

How to disable the warning message "IPP request failed.

Platform: Linux wxWidgets: wxGTK, CVS HEAD config: configure --enable-unicode --with-gnomeprint=yes ** (madedit:5148): WARNING **: IPP request failed with status 1280 ** (madedit:5148): WARNING **: IPP request failed with status 1280 When my program is running, this warning message will be printed o...
by phonxe
Sat Jan 07, 2006 12:39 pm
Forum: C++ Development
Topic: show Unicode codes directly?
Replies: 1
Views: 774

try this:
wxXXX.SetText(_T('\x263B'));
by phonxe
Thu Nov 03, 2005 2:00 pm
Forum: Platform Related Issues
Topic: No effect when press Enter in wxFileDialog (wxGTK,CVS)
Replies: 6
Views: 2605

I tried gedit and leafpad, their SaveAs Dialog work fine.
I think this problem should be a bug, I will report it to the wxWidgets' Bug Tracking System.
Thank you.
by phonxe
Thu Nov 03, 2005 9:46 am
Forum: Platform Related Issues
Topic: No effect when press Enter in wxFileDialog (wxGTK,CVS)
Replies: 6
Views: 2605

>>ONEEYEMAN:
>>What happened? Is the dialog still there?
>>Thank you.

Yes, the dialog didn't close when I press Enter key.

>>KevinHock:
>>Are you using GTK1 or GTK2? If GTK2, which version?

I tested my app in GTK2 version 2.6.4 and 2.8.6,
the problem was occurred with these two versions.
by phonxe
Tue Oct 25, 2005 7:40 am
Forum: C++ Development
Topic: Hexadecimal control in wxWidgets...
Replies: 4
Views: 2577

My edit component maybe can conform with your request, it can handle Text/Hex input. http://madedit.sourceforge.net/Hex.png But this component may be too complex for your application, it used other libraries, e.g. Boost.Regex, for searhing&replacing, or you can remove some funtions that you don't wa...