src/generic/*.c
src/generic/*.inc
+src/unix/*.cpp
+
src/png/*.c
src/png/*.h
src/png/makefile*
include/wx/wx_setup.vms
include/wx/common/*.h
include/wx/generic/*.h
+include/wx/unix/*.h
lib/dummy
bin/*.*
wxWindows 2 Change Log
----------------------
+2.0.2, March ?? 1999
+---------------------
+
+wxGTK:
+
+
+wxMSW:
+
+- wxNotebook changes: can add image only; wxNB_FIXEDWIDTH added;
+ SetTabSize added.
+
+wxMotif:
+
+
+General:
+
+
2.0.1 (release), March 1st 1999
-------------------------------
* wxTabCtrl flags
*/
-#define wxTAB_MULTILINE 0x0000
-#define wxTAB_RIGHTJUSTIFY 0x0004
-#define wxTAB_FIXEDWIDTH 0x0008
-#define wxTAB_OWNERDRAW 0x0010
-
-// Sorry, I changed my mind about these names...
#define wxTC_MULTILINE 0x0000
#define wxTC_RIGHTJUSTIFY 0x0004
#define wxTC_FIXEDWIDTH 0x0008
#define wxTC_OWNERDRAW 0x0010
+/*
+ * wxNotebook flags
+ */
+#define wxNB_FIXEDWIDTH 0x0008
+
/*
* wxStatusBar95 flags
*/
// get the panel which represents the given page
wxNotebookPage *GetPage(int nPage) { return m_aPages[nPage]; }
+ // Windows-only at present. Also, you must use the wxNB_FIXEDWIDTH
+ // style.
+ void SetTabSize(const wxSize& sz);
+
// callbacks
// ---------
void OnSize(wxSizeEvent& event);
// the item will be shown in bold
void SetItemBold(const wxTreeItemId& item, bool bold = TRUE);
+ // the item will be shown with a drop highlight
+ void SetItemDropHighlight(const wxTreeItemId& item, bool highlight = TRUE);
+
// item status inquiries
// ---------------------
#include "wx/intl.h"
#include "wx/module.h"
+// For memcpy
+#include <string.h>
+
#ifdef __SALFORDC__
#ifdef FAR
#undef FAR
return M_IMGDATA->m_data;
}
-void wxImage::SetData( char unsigned *WXUNUSED(data) )
+void wxImage::SetData( char unsigned *data )
{
wxCHECK_RET( Ok(), "invalid image" );
+
+ memcpy(M_IMGDATA->m_data, data, M_IMGDATA->m_width * M_IMGDATA->m_height * 3);
}
void wxImage::SetMaskColour( unsigned char r, unsigned char g, unsigned char b )
// style
m_windowStyle = style | wxTAB_TRAVERSAL;
- long tabStyle = WS_CHILD | WS_VISIBLE | WS_TABSTOP | TCS_TABS;
+ long tabStyle = WS_CHILD | WS_VISIBLE | WS_TABSTOP | TCS_TABS | WS_CLIPCHILDREN;
if ( m_windowStyle & wxTC_MULTILINE )
tabStyle |= TCS_MULTILINE;
if ( m_windowStyle & wxBORDER )
tabStyle &= WS_BORDER;
+ if (m_windowStyle & wxNB_FIXEDWIDTH)
+ tabStyle |= TCS_FIXEDWIDTH ;
// create the tab control.
m_hWnd = (WXHWND)CreateWindowEx
// add the tab to the control
TC_ITEM tcItem;
- tcItem.mask = TCIF_TEXT | TCIF_IMAGE;
- tcItem.pszText = (char *)strText.c_str();
- tcItem.iImage = imageId;
+ tcItem.mask = 0;
+
+ if (imageId != -1)
+ {
+ tcItem.mask |= TCIF_IMAGE;
+ tcItem.iImage = imageId;
+ }
+ else
+ tcItem.iImage = 0;
+
+ if (!strText.IsEmpty())
+ {
+ tcItem.mask |= TCIF_TEXT;
+ tcItem.pszText = (char *)strText.c_str();
+ }
+ else
+ tcItem.pszText = (char *) NULL;
if ( TabCtrl_InsertItem(m_hwnd, nPage, &tcItem) == -1 ) {
wxLogError("Can't create the notebook page '%s'.", strText.c_str());
Default();
}
+// Windows-only at present. Also, you must use the wxNB_FIXEDWIDTH
+// style.
+void wxNotebook::SetTabSize(const wxSize& sz)
+{
+ ::SendMessage((HWND) GetHWND(), TCM_SETITEMSIZE, 0, MAKELPARAM(sz.x, sz.y));
+}
+
DoSetItem(&tvItem);
}
+void wxTreeCtrl::SetItemDropHighlight(const wxTreeItemId& item, bool highlight)
+{
+ wxTreeViewItem tvItem(item, TVIF_STATE, TVIS_DROPHILITED);
+ tvItem.state = highlight ? TVIS_DROPHILITED : 0;
+ DoSetItem(&tvItem);
+}
+
// ----------------------------------------------------------------------------
// Item status
// ----------------------------------------------------------------------------
TV_INSERTSTRUCT tvIns;
tvIns.hParent = (HTREEITEM) (WXHTREEITEM)parent;
tvIns.hInsertAfter = (HTREEITEM) (WXHTREEITEM) hInsertAfter;
+
+ // This is how we insert the item as the first child: supply a NULL hInsertAfter
+ if (tvIns.hInsertAfter == (HTREEITEM) 0)
+ {
+ tvIns.hInsertAfter = TVI_FIRST;
+ }
+
UINT mask = 0;
if ( !text.IsEmpty() )
{