wxFlatNotebook
-
- wxWorld Domination!
- Posts: 1339
- Joined: Wed Aug 03, 2005 8:10 am
- Location: BANGALORE, INDIA
- Contact:
- T-Rex
- Moderator
- Posts: 1249
- Joined: Sat Oct 23, 2004 9:58 am
- Location: Zaporizhzhya, Ukraine
- Contact:
priyank_bolia, please create doxygen comments for your methods. This will help to update the documentation. I already created the documentation for all previously added source and finished adding the support of ImageList.
Code: Select all
/// This method does smth....
/**
\param param_name1 - this parameter is used for...
...
Some other descriptions
*/
void MethodName(int param_name1, ...);
-
- wxWorld Domination!
- Posts: 1339
- Joined: Wed Aug 03, 2005 8:10 am
- Location: BANGALORE, INDIA
- Contact:
its not possible me to upload the files again, so eranif please modify the wxFlatNotebook.h file functions to:T-Rex wrote:priyank_bolia, please create doxygen comments for your methods. This will help to update the documentation. I already created the documentation for all previously added source and finished adding the support of ImageList.
Code: Select all
/// This method does smth.... /** \param param_name1 - this parameter is used for... ... Some other descriptions */ void MethodName(int param_name1, ...);
Code: Select all
/**
* \brief Drop event handler, to be passed as function pointer to CTextDropTarget class.
* \param x X coordinate where the drop take place
* \param y Y coordinate where the drop take place
* \param data Dropped text
* \return Boolean values indicating the drop was successful or not
*/
bool OnTextDropTarget(wxCoord x, wxCoord y, const wxString& data);
/**
* \brief Moves the tab page from one location to another
* \param nMove The index of the tab page to be moved.
* \param nMoveTo The index for the tab page, where it has to be moved
*/
void MoveTabPage(int nMove, int nMoveTo);
-
- wxWorld Domination!
- Posts: 1339
- Joined: Wed Aug 03, 2005 8:10 am
- Location: BANGALORE, INDIA
- Contact:
Code: Select all
///////////////////////////////////////////////////////////////////////////////
// Name: TextDropTarget.h
// Purpose: declaration and implementation of text drop notification sender.
// Author: Priyank Bolia <[email protected]>
// URL: http://www.priyank.in
// Created: 02/01/2006
// Copyright: All contributors.
// Licence: wxWindows license <http://www.wxwidgets.org/licence3.txt>
///////////////////////////////////////////////////////////////////////////////
#ifndef TEXTDROP_TARGET_H
#define TEXTDROP_TARGET_H
#ifdef wxUSE_DRAG_AND_DROP
#include <wx/wx.h>
#include <wx/dnd.h>
#include <iostream>
using namespace std;
template <class T>
class CTextDropTarget : public wxTextDropTarget
{
private:
typedef bool (T::*pt2Func)(wxCoord, wxCoord, const wxString&);
T* m_pParent; /// Pointer to the parent window.
pt2Func m_pt2CallbackFunc; /// function pointer to the parent window function to be called for drop notification.
public:
/**
* Constructor
* \param pParent Pointer to the parent window
* \param pt2CallbackFunc Function pointer to the parent window function to be called for drop notification.
* \return
*/
CTextDropTarget(T* pParent, pt2Func pt2CallbackFunc);
/**
* Default destructor
* \param void
* \return
*/
virtual ~CTextDropTarget(void);
/**
* Drop event handler, this will call the parent window function to notify it.
* \param x X coordinate where the drop take place
* \param y Y coordinate where the drop take place
* \param data Dropped text
* \return Boolean values indicating the drop was successful or not
*/
virtual bool OnDropText(wxCoord x, wxCoord y, const wxString& data);
};
template <class T>
CTextDropTarget<T>::CTextDropTarget(T* pParent, pt2Func pt2CallbackFunc)
: m_pParent(pParent)
, m_pt2CallbackFunc(pt2CallbackFunc)
{
}
template <class T>
CTextDropTarget<T>::~CTextDropTarget(void)
{
}
template <class T>
bool CTextDropTarget<T>::OnDropText(wxCoord x, wxCoord y, const wxString& data)
{
return (m_pParent->*m_pt2CallbackFunc)(x, y, data);
}
#endif
// wxUSE_DRAG_AND_DROP
#endif
// TEXTDROP_TARGET_H
-
- In need of some credit
- Posts: 7
- Joined: Sat Dec 31, 2005 7:25 am
- Location: Colombia (South America)
Middle click to close has a weird behaviour: even if the tab closed wasn't the selected one, it will change selection.
mandrav is already testing integration with Code::Blocks, but he just found a bug http://forums.codeblocks.org/index.php? ... 6#msg13876
I just hope it don't become a mess discussing about the same library in two different forums.
mandrav is already testing integration with Code::Blocks, but he just found a bug http://forums.codeblocks.org/index.php? ... 6#msg13876
I just hope it don't become a mess discussing about the same library in two different forums.
This is probably the first time that wxPython has anticipated wxWidgets in some new control
http://xoomer.virgilio.it/infinity77/en ... tebookctrl
http://sigmacore.net/andrea/?page_id=2 ==> NotebookCtrl
Some screenshots
Very nice work!
Andrea.
http://xoomer.virgilio.it/infinity77/en ... tebookctrl
http://sigmacore.net/andrea/?page_id=2 ==> NotebookCtrl
Some screenshots
Very nice work!
Andrea.
"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.virgilio.it/infinity77
http://xoomer.virgilio.it/infinity77
Hi,
I did some work in integrating T-Rex support for the image list - however i did found the changes still buggy (not T-Rex fault but wx)
However, I did get some requests to add more functionalities so I am attaching a partial work (but tested, by me)
With the following changes:
The following style are applicable for the notebook:
wxFNB_DEFAULT_STYLE
wxFNB_VC71
wxFNB_FANCY_TABS
wxFNB_BORDER
wxFNB_NO_X_BUTTON
wxFNB_NO_NAV_BUTTONS
wxFNB_MOUSE_MIDDLE_CLOSES_TABS
As you can see, user can now choose to display / not the X button, navigation arrows, or disable the middle mouse close click.
In addition, a thin border is drawn around the windows in the botebook by using the wxFNB_BORDER style
The sources, are updated you can download them.
Using the above new styles I was able to create nice dialog:
Regards,
Eran
I did some work in integrating T-Rex support for the image list - however i did found the changes still buggy (not T-Rex fault but wx)
However, I did get some requests to add more functionalities so I am attaching a partial work (but tested, by me)
With the following changes:
The following style are applicable for the notebook:
wxFNB_DEFAULT_STYLE
wxFNB_VC71
wxFNB_FANCY_TABS
wxFNB_BORDER
wxFNB_NO_X_BUTTON
wxFNB_NO_NAV_BUTTONS
wxFNB_MOUSE_MIDDLE_CLOSES_TABS
As you can see, user can now choose to display / not the X button, navigation arrows, or disable the middle mouse close click.
In addition, a thin border is drawn around the windows in the botebook by using the wxFNB_BORDER style
The sources, are updated you can download them.
Using the above new styles I was able to create nice dialog:
Regards,
Eran
Hi,
I have done some improvements + bug fixes
The sources are updated + I am attaching here 3 images of the notebook.
The demo is updated as well.
I think I am ready to complete this task! (one little bug that will be fixed and I think thats it)
Reminder:
The sources can be downloaded from:
http://www.eistware.com/wx/wxFlatNotebook.zip
Screenshots for the bottom style :
Regards,
Eran
I have done some improvements + bug fixes
The sources are updated + I am attaching here 3 images of the notebook.
The demo is updated as well.
I think I am ready to complete this task! (one little bug that will be fixed and I think thats it)
Reminder:
The sources can be downloaded from:
http://www.eistware.com/wx/wxFlatNotebook.zip
Screenshots for the bottom style :
Regards,
Eran
- T-Rex
- Moderator
- Posts: 1249
- Joined: Sat Oct 23, 2004 9:58 am
- Location: Zaporizhzhya, Ukraine
- Contact:
Well, I tested everything once more and assumed that indeed bitmaps lose their alpha-channel when added to imagelist. So vector is the best solution (And in any case it is the fastest solution...) wxImageList works much more slower, I noticed that it works slow during profiling of my wxToolBox, but using of wxImageList is more convenient IMO.
So, we'll stop the choice on vector for now
So, we'll stop the choice on vector for now