+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: imaglist.h
-// Purpose: wxImageList class. Note: if your GUI doesn't have
-// an image list equivalent, you can use the generic class
-// in src/generic.
-// Author: Julian Smart
-// Modified by:
-// Created: 17/09/98
-// RCS-ID: $Id$
-// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_IMAGLIST_H_
-#define _WX_IMAGLIST_H_
-
-#ifdef __GNUG__
-#pragma interface "imaglist.h"
-#endif
-
-#include "wx/bitmap.h"
-
-/*
- * wxImageList is used for wxListCtrl, wxTreeCtrl. These controls refer to
- * images for their items by an index into an image list.
- * A wxImageList is capable of creating images with optional masks from
- * a variety of sources - a single bitmap plus a colour to indicate the mask,
- * two bitmaps, or an icon.
- *
- */
-
-// Flags for Draw
-#define wxIMAGELIST_DRAW_NORMAL 0x0001
-#define wxIMAGELIST_DRAW_TRANSPARENT 0x0002
-#define wxIMAGELIST_DRAW_SELECTED 0x0004
-#define wxIMAGELIST_DRAW_FOCUSED 0x0008
-
-// Flag values for Set/GetImageList
-enum {
- wxIMAGE_LIST_NORMAL, // Normal icons
- wxIMAGE_LIST_SMALL, // Small icons
- wxIMAGE_LIST_STATE // State icons: unimplemented (see WIN32 documentation)
-};
-
-// Eventually we'll make this a reference-counted wxGDIObject. For
-// now, the app must take care of ownership issues. That is, the
-// image lists must be explicitly deleted after the control(s) that uses them
-// is (are) deleted, or when the app exits.
-class WXDLLEXPORT wxImageList: public wxObject
-{
- DECLARE_DYNAMIC_CLASS(wxImageList)
- public:
- /*
- * Public interface
- */
-
- wxImageList();
-
- // Creates an image list.
- // Specify the width and height of the images in the list,
- // whether there are masks associated with them (e.g. if creating images
- // from icons), and the initial size of the list.
- inline wxImageList(int width, int height, bool mask = TRUE, int initialCount = 1)
- {
- Create(width, height, mask, initialCount);
- }
- ~wxImageList();
-
-
- // Attributes
- ////////////////////////////////////////////////////////////////////////////
-
- // Returns the number of images in the image list.
- int GetImageCount() const;
-
- // Operations
- ////////////////////////////////////////////////////////////////////////////
-
- // Creates an image list
- // width, height specify the size of the images in the list (all the same).
- // mask specifies whether the images have masks or not.
- // initialNumber is the initial number of images to reserve.
- bool Create(int width, int height, bool mask = TRUE, int initialNumber = 1);
-
- // Adds a bitmap, and optionally a mask bitmap.
- // Note that wxImageList creates *new* bitmaps, so you may delete
- // 'bitmap' and 'mask' after calling Add.
- int Add(const wxBitmap& bitmap, const wxBitmap& mask = wxNullBitmap);
-
- // Adds a bitmap, using the specified colour to create the mask bitmap
- // Note that wxImageList creates *new* bitmaps, so you may delete
- // 'bitmap' after calling Add.
- int Add(const wxBitmap& bitmap, const wxColour& maskColour);
-
- // Adds a bitmap and mask from an icon.
- int Add(const wxIcon& icon);
-
- // Replaces a bitmap, optionally passing a mask bitmap.
- // Note that wxImageList creates new bitmaps, so you may delete
- // 'bitmap' and 'mask' after calling Replace.
- bool Replace(int index, const wxBitmap& bitmap, const wxBitmap& mask = wxNullBitmap);
-
-/* Not supported by Win95
- // Replacing a bitmap, using the specified colour to create the mask bitmap
- // Note that wxImageList creates new bitmaps, so you may delete
- // 'bitmap'.
- bool Replace(int index, const wxBitmap& bitmap, const wxColour& maskColour);
-*/
-
- // Replaces a bitmap and mask from an icon.
- // You can delete 'icon' after calling Replace.
- bool Replace(int index, const wxIcon& icon);
-
- // Removes the image at the given index.
- bool Remove(int index);
-
- // Remove all images
- bool RemoveAll();
-
- // Draws the given image on a dc at the specified position.
- // If 'solidBackground' is TRUE, Draw sets the image list background
- // colour to the background colour of the wxDC, to speed up
- // drawing by eliminating masked drawing where possible.
- bool Draw(int index, wxDC& dc, int x, int y,
- int flags = wxIMAGELIST_DRAW_NORMAL, bool solidBackground = FALSE);
-
-/* TODO (optional?)
- wxIcon *MakeIcon(int index);
-*/
-
-/* TODO
- // Implementation
- ////////////////////////////////////////////////////////////////////////////
-
- // Returns the native image list handle
- inline WXHIMAGELIST GetHIMAGELIST() const { return m_hImageList; }
-
-protected:
- WXHIMAGELIST m_hImageList;
-*/
-
-};
-
-#endif
- // _WX_IMAGLIST_H_
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: listctrl.h
-// Purpose: wxListCtrl class
-// Author: Julian Smart
-// Modified by:
-// Created: 17/09/98
-// RCS-ID: $Id$
-// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_LISTCTRL_H_
-#define _WX_LISTCTRL_H_
-
-#ifdef __GNUG__
-#pragma interface "listctrl.h"
-#endif
-
-#include "wx/control.h"
-#include "wx/event.h"
-#include "wx/imaglist.h"
-
-/*
- The wxListCtrl can show lists of items in four different modes:
- wxLC_LIST: multicolumn list view, with optional small icons (icons could be
- optional for some platforms). Columns are computed automatically,
- i.e. you don't set columns as in wxLC_REPORT. In other words,
- the list wraps, unlike a wxListBox.
- wxLC_REPORT: single or multicolumn report view (with optional header)
- wxLC_ICON: large icon view, with optional labels
- wxLC_SMALL_ICON: small icon view, with optional labels
-
- You can change the style dynamically, either with SetSingleStyle or
- SetWindowStyleFlag.
-
- Further window styles:
-
- wxLC_ALIGN_TOP icons align to the top (default)
- wxLC_ALIGN_LEFT icons align to the left
- wxLC_AUTOARRANGE icons arrange themselves
- wxLC_USER_TEXT the app provides label text on demand, except for column headers
- wxLC_EDIT_LABELS labels are editable: app will be notified.
- wxLC_NO_HEADER no header in report mode
- wxLC_NO_SORT_HEADER can't click on header
- wxLC_SINGLE_SEL single selection
- wxLC_SORT_ASCENDING sort ascending (must still supply a comparison callback in SortItems)
- wxLC_SORT_DESCENDING sort descending (ditto)
-
- Items are referred to by their index (position in the list starting from zero).
-
- Label text is supplied via insertion/setting functions and is stored by the
- control, unless the wxLC_USER_TEXT style has been specified, in which case
- the app will be notified when text is required (see sample).
-
- Images are dealt with by (optionally) associating 3 image lists with the control.
- Zero-based indexes into these image lists indicate which image is to be used for
- which item. Each image in an image list can contain a mask, and can be made out
- of either a bitmap, two bitmaps or an icon. See ImagList.h for more details.
-
- Notifications are passed via the wxWindows 2.0 event system.
-
- See the sample wxListCtrl app for API usage.
-
- */
-
-// Mask flags to tell app/GUI what fields of wxListItem are valid
-#define wxLIST_MASK_STATE 0x0001
-#define wxLIST_MASK_TEXT 0x0002
-#define wxLIST_MASK_IMAGE 0x0004
-#define wxLIST_MASK_DATA 0x0008
-#define wxLIST_SET_ITEM 0x0010
-#define wxLIST_MASK_WIDTH 0x0020
-#define wxLIST_MASK_FORMAT 0x0040
-
-// State flags for indicating the state of an item
-#define wxLIST_STATE_DONTCARE 0x0000
-#define wxLIST_STATE_DROPHILITED 0x0001
-#define wxLIST_STATE_FOCUSED 0x0002
-#define wxLIST_STATE_SELECTED 0x0004
-#define wxLIST_STATE_CUT 0x0008
-
-// Hit test flags, used in HitTest
-#define wxLIST_HITTEST_ABOVE 0x0001 // Above the client area.
-#define wxLIST_HITTEST_BELOW 0x0002 // Below the client area.
-#define wxLIST_HITTEST_NOWHERE 0x0004 // In the client area but below the last item.
-#define wxLIST_HITTEST_ONITEMICON 0x0020 // On the bitmap associated with an item.
-#define wxLIST_HITTEST_ONITEMLABEL 0x0080 // On the label (string) associated with an item.
-#define wxLIST_HITTEST_ONITEMRIGHT 0x0100 // In the area to the right of an item.
-#define wxLIST_HITTEST_ONITEMSTATEICON 0x0200 // On the state icon for a tree view item that is in a user-defined state.
-#define wxLIST_HITTEST_TOLEFT 0x0400 // To the left of the client area.
-#define wxLIST_HITTEST_TORIGHT 0x0800 // To the right of the client area.
-
-#define wxLIST_HITTEST_ONITEM (wxLIST_HITTEST_ONITEMICON | wxLIST_HITTEST_ONITEMLABEL wxLIST_HITTEST_ONITEMSTATEICON)
-
-// Flags for GetNextItem
-enum {
- wxLIST_NEXT_ABOVE, // Searches for an item above the specified item
- wxLIST_NEXT_ALL, // Searches for subsequent item by index
- wxLIST_NEXT_BELOW, // Searches for an item below the specified item
- wxLIST_NEXT_LEFT, // Searches for an item to the left of the specified item
- wxLIST_NEXT_RIGHT, // Searches for an item to the right of the specified item
-};
-
-// Alignment flags for Arrange
-enum {
- wxLIST_ALIGN_DEFAULT,
- wxLIST_ALIGN_LEFT,
- wxLIST_ALIGN_TOP,
- wxLIST_ALIGN_SNAP_TO_GRID
-};
-
-// Column format
-enum {
- wxLIST_FORMAT_LEFT,
- wxLIST_FORMAT_RIGHT,
- wxLIST_FORMAT_CENTRE,
- wxLIST_FORMAT_CENTER = wxLIST_FORMAT_CENTRE
-};
-
-// Autosize values for SetColumnWidth
-enum {
- wxLIST_AUTOSIZE = -1,
- wxLIST_AUTOSIZE_USEHEADER = -2
-};
-
-// Flag values for GetItemRect
-enum {
- wxLIST_RECT_BOUNDS,
- wxLIST_RECT_ICON,
- wxLIST_RECT_LABEL
-};
-
-// Flag values for FindItem
-enum {
- wxLIST_FIND_UP,
- wxLIST_FIND_DOWN,
- wxLIST_FIND_LEFT,
- wxLIST_FIND_RIGHT
-};
-
-// wxListItem: data representing an item, or report field.
-// It also doubles up to represent entire column information
-// when inserting or setting a column.
-class WXDLLEXPORT wxListItem: public wxObject
-{
- DECLARE_DYNAMIC_CLASS(wxListItem)
-public:
- long m_mask; // Indicates what fields are valid
- long m_itemId; // The zero-based item position
- int m_col; // Zero-based column, if in report mode
- long m_state; // The state of the item
- long m_stateMask; // Which flags of m_state are valid (uses same flags)
- wxString m_text; // The label/header text
- int m_image; // The zero-based index into an image list
- long m_data; // App-defined data
-
- // For columns only
- int m_format; // left, right, centre
- int m_width; // width of column
-
- wxListItem();
-};
-
-// type of compare function for wxListCtrl sort operation
-typedef int (*wxListCtrlCompare)(long item1, long item2, long sortData);
-
-class WXDLLEXPORT wxListCtrl: public wxControl
-{
- DECLARE_DYNAMIC_CLASS(wxListCtrl)
- public:
- /*
- * Public interface
- */
-
- wxListCtrl();
-
- inline wxListCtrl(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
- long style = wxLC_ICON, const wxValidator& validator = wxDefaultValidator,
- const wxString& name = "listCtrl")
- {
- Create(parent, id, pos, size, style, validator, name);
- }
- ~wxListCtrl();
-
- bool Create(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
- long style = wxLC_ICON, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxListCtrl");
-
-
- // Attributes
- ////////////////////////////////////////////////////////////////////////////
-
- // Gets information about this column
- bool GetColumn(int col, wxListItem& item) const;
-
- // Sets information about this column
- bool SetColumn(int col, wxListItem& item) ;
-
- // Gets the column width
- int GetColumnWidth(int col) const;
-
- // Sets the column width
- bool SetColumnWidth(int col, int width) ;
-
- // Gets the number of items that can fit vertically in the
- // visible area of the list control (list or report view)
- // or the total number of items in the list control (icon
- // or small icon view)
- int GetCountPerPage() const;
-
- // Gets the edit control for editing labels.
- wxTextCtrl* GetEditControl() const;
-
- // Gets information about the item
- bool GetItem(wxListItem& info) const ;
-
- // Sets information about the item
- bool SetItem(wxListItem& info) ;
-
- // Sets a string field at a particular column
- long SetItem(long index, int col, const wxString& label, int imageId = -1);
-
- // Gets the item state
- int GetItemState(long item, long stateMask) const ;
-
- // Sets the item state
- bool SetItemState(long item, long state, long stateMask) ;
-
- // Sets the item image
- bool SetItemImage(long item, int image, int selImage) ;
-
- // Gets the item text
- wxString GetItemText(long item) const ;
-
- // Sets the item text
- void SetItemText(long item, const wxString& str) ;
-
- // Gets the item data
- long GetItemData(long item) const ;
-
- // Sets the item data
- bool SetItemData(long item, long data) ;
-
- // Gets the item rectangle
- bool GetItemRect(long item, wxRect& rect, int code = wxLIST_RECT_BOUNDS) const ;
-
- // Gets the item position
- bool GetItemPosition(long item, wxPoint& pos) const ;
-
- // Sets the item position
- bool SetItemPosition(long item, const wxPoint& pos) ;
-
- // Gets the number of items in the list control
- int GetItemCount() const;
-
- // Gets the number of columns in the list control
- int GetColumnCount() const;
-
- // Retrieves the spacing between icons in pixels.
- // If small is TRUE, gets the spacing for the small icon
- // view, otherwise the large icon view.
- int GetItemSpacing(bool isSmall) const;
-
- // Gets the number of selected items in the list control
- int GetSelectedItemCount() const;
-
- // Gets the text colour of the listview
- wxColour GetTextColour() const;
-
- // Sets the text colour of the listview
- void SetTextColour(const wxColour& col);
-
- // Gets the index of the topmost visible item when in
- // list or report view
- long GetTopItem() const ;
-
- // Add or remove a single window style
- void SetSingleStyle(long style, bool add = TRUE) ;
-
- // Set the whole window style
- void SetWindowStyleFlag(long style) ;
-
- // Searches for an item, starting from 'item'.
- // item can be -1 to find the first item that matches the
- // specified flags.
- // Returns the item or -1 if unsuccessful.
- long GetNextItem(long item, int geometry = wxLIST_NEXT_ALL, int state = wxLIST_STATE_DONTCARE) const ;
-
- // Implementation: converts wxWindows style to MSW style.
- // Can be a single style flag or a bit list.
- // oldStyle is 'normalised' so that it doesn't contain
- // conflicting styles.
- long ConvertToMSWStyle(long& oldStyle, long style) const;
-
- // Gets one of the three image lists
- wxImageList *GetImageList(int which) const ;
-
- // Sets the image list
- // N.B. There's a quirk in the Win95 list view implementation.
- // If in wxLC_LIST mode, it'll *still* display images by the labels if
- // there's a small-icon image list set for the control - even though you
- // haven't specified wxLIST_MASK_IMAGE when inserting.
- // So you have to set a NULL small-icon image list to be sure that
- // the wxLC_LIST mode works without icons. Of course, you may want icons...
- void SetImageList(wxImageList *imageList, int which) ;
-
- // Operations
- ////////////////////////////////////////////////////////////////////////////
-
- // Arranges the items
- bool Arrange(int flag = wxLIST_ALIGN_DEFAULT);
-
- // Deletes an item
- bool DeleteItem(long item);
-
- // Deletes all items
- bool DeleteAllItems() ;
-
- // Deletes a column
- bool DeleteColumn(int col);
-
- // Deletes all columns
- bool DeleteAllColumns();
-
- // Clears items, and columns if there are any.
- void ClearAll();
-
- // Edit the label
- wxTextCtrl* EditLabel(long item, wxClassInfo* textControlClass = CLASSINFO(wxTextCtrl));
-
- // End label editing, optionally cancelling the edit
- bool EndEditLabel(bool cancel);
-
- // Ensures this item is visible
- bool EnsureVisible(long item) ;
-
- // Find an item whose label matches this string, starting from the item after 'start'
- // or the beginning if 'start' is -1.
- long FindItem(long start, const wxString& str, bool partial = FALSE);
-
- // Find an item whose data matches this data, starting from the item after 'start'
- // or the beginning if 'start' is -1.
- long FindItem(long start, long data);
-
- // Find an item nearest this position in the specified direction, starting from
- // the item after 'start' or the beginning if 'start' is -1.
- long FindItem(long start, const wxPoint& pt, int direction);
-
- // Determines which item (if any) is at the specified point,
- // giving details in 'flags' (see wxLIST_HITTEST_... flags above)
- long HitTest(const wxPoint& point, int& flags);
-
- // Inserts an item, returning the index of the new item if successful,
- // -1 otherwise.
- // TOD: Should also have some further convenience functions
- // which don't require setting a wxListItem object
- long InsertItem(wxListItem& info);
-
- // Insert a string item
- long InsertItem(long index, const wxString& label);
-
- // Insert an image item
- long InsertItem(long index, int imageIndex);
-
- // Insert an image/string item
- long InsertItem(long index, const wxString& label, int imageIndex);
-
- // For list view mode (only), inserts a column.
- long InsertColumn(long col, wxListItem& info);
-
- long InsertColumn(long col, const wxString& heading, int format = wxLIST_FORMAT_LEFT,
- int width = -1);
-
- // Scrolls the list control. If in icon, small icon or report view mode,
- // x specifies the number of pixels to scroll. If in list view mode, x
- // specifies the number of columns to scroll.
- // If in icon, small icon or list view mode, y specifies the number of pixels
- // to scroll. If in report view mode, y specifies the number of lines to scroll.
- bool ScrollList(int dx, int dy);
-
- // Sort items.
-
- // fn is a function which takes 3 long arguments: item1, item2, data.
- // item1 is the long data associated with a first item (NOT the index).
- // item2 is the long data associated with a second item (NOT the index).
- // data is the same value as passed to SortItems.
- // The return value is a negative number if the first item should precede the second
- // item, a positive number of the second item should precede the first,
- // or zero if the two items are equivalent.
-
- // data is arbitrary data to be passed to the sort function.
- bool SortItems(wxListCtrlCompare fn, long data);
-
-/* Why should we need this function? Leave for now.
- * We might need it because item data may have changed,
- * but the display needs refreshing (in string callback mode)
- // Updates an item. If the list control has the wxLI_AUTO_ARRANGE style,
- // the items will be rearranged.
- bool Update(long item);
-*/
-
- void Command(wxCommandEvent& event) { ProcessCommand(event); };
-
-protected:
- wxTextCtrl* m_textCtrl; // The control used for editing a label
- wxImageList * m_imageListNormal; // The image list for normal icons
- wxImageList * m_imageListSmall; // The image list for small icons
- wxImageList * m_imageListState; // The image list state icons (not implemented yet)
-
- long m_baseStyle; // Basic Windows style flags, for recreation purposes
- wxStringList m_stringPool; // Pool of 3 strings to satisfy Windows callback
- // requirements
- int m_colCount; // Windows doesn't have GetColumnCount so must
- // keep track of inserted/deleted columns
-
-};
-
-class WXDLLEXPORT wxListEvent: public wxCommandEvent
-{
- DECLARE_DYNAMIC_CLASS(wxListEvent)
-
- public:
- wxListEvent(wxEventType commandType = wxEVT_NULL, int id = 0);
-
- int m_code;
- long m_itemIndex;
- long m_oldItemIndex;
- int m_col;
- bool m_cancelled;
- wxPoint m_pointDrag;
-
- wxListItem m_item;
-};
-
-typedef void (wxEvtHandler::*wxListEventFunction)(wxListEvent&);
-
-#define EVT_LIST_BEGIN_DRAG(id, fn) { wxEVT_COMMAND_LIST_BEGIN_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
-#define EVT_LIST_BEGIN_RDRAG(id, fn) { wxEVT_COMMAND_LIST_BEGIN_RDRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
-#define EVT_LIST_BEGIN_LABEL_EDIT(id, fn) { wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
-#define EVT_LIST_END_LABEL_EDIT(id, fn) { wxEVT_COMMAND_LIST_END_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
-#define EVT_LIST_DELETE_ITEM(id, fn) { wxEVT_COMMAND_LIST_DELETE_ITEM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
-#define EVT_LIST_DELETE_ALL_ITEMS(id, fn) { wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
-#define EVT_LIST_GET_INFO(id, fn) { wxEVT_COMMAND_LIST_GET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
-#define EVT_LIST_SET_INFO(id, fn) { wxEVT_COMMAND_LIST_SET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
-#define EVT_LIST_ITEM_SELECTED(id, fn) { wxEVT_COMMAND_LIST_ITEM_SELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
-#define EVT_LIST_ITEM_DESELECTED(id, fn) { wxEVT_COMMAND_LIST_ITEM_DESELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
-#define EVT_LIST_KEY_DOWN(id, fn) { wxEVT_COMMAND_LIST_KEY_DOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
-#define EVT_LIST_INSERT_ITEM(id, fn) { wxEVT_COMMAND_LIST_INSERT_ITEM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
-#define EVT_LIST_COL_CLICK(id, fn) { wxEVT_COMMAND_LIST_COL_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
-
-#endif
- // _WX_LISTCTRL_H_
+++ /dev/null
-///////////////////////////////////////////////////////////////////////////////
-// Name: statusbr.h
-// Purpose: native implementation of wxStatusBar. Optional; can use generic
-// version instead.
-// Author: Julian Smart
-// Modified by:
-// Created: 17/09/98
-// RCS-ID: $Id$
-// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_STATBAR_H_
-#define _WX_STATBAR_H_
-
-#ifdef __GNUG__
-#pragma interface "statbar.h"
-#endif
-
-#include "wx/generic/statusbr.h"
-
-class WXDLLEXPORT wxStatusBarXX : public wxStatusBar
-{
- DECLARE_DYNAMIC_CLASS(wxStatusBarXX);
-
-public:
- // ctors
- wxStatusBarXX();
- wxStatusBarXX(wxWindow *parent, wxWindowID id = -1, long style = wxST_SIZEGRIP);
-
- // create status line
- bool Create(wxWindow *parent, wxWindowID id = -1, long style = wxST_SIZEGRIP);
-
- // a status line can have several (<256) fields numbered from 0
- virtual void SetFieldsCount(int number = 1, const int widths[] = NULL);
-
- // each field of status line has its own text
- virtual void SetStatusText(const wxString& text, int number = 0);
- virtual wxString GetStatusText(int number = 0) const;
-
- // set status line fields' widths
- virtual void SetStatusWidths(int n, const int widths_field[]);
-
- void OnSize(wxSizeEvent& event);
-
- DECLARE_EVENT_TABLE()
-
-protected:
- void CopyFieldsWidth(const int widths[]);
- void SetFieldsWidth();
-};
-
-#endif
- // _WX_STATBAR_H_
\ No newline at end of file
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: treectrl.h
-// Purpose: wxTreeCtrl class
-// Author: Julian Smart
-// Modified by:
-// Created: 17/09/98
-// RCS-ID: $Id$
-// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_TREECTRL_H_
-#define _WX_TREECTRL_H_
-
-#ifdef __GNUG__
-#pragma interface "treectrl.h"
-#endif
-
-#include "wx/control.h"
-#include "wx/event.h"
-#include "wx/imaglist.h"
-
-#define wxTREE_MASK_HANDLE 0x0001
-#define wxTREE_MASK_STATE 0x0002
-#define wxTREE_MASK_TEXT 0x0004
-#define wxTREE_MASK_IMAGE 0x0008
-#define wxTREE_MASK_SELECTED_IMAGE 0x0010
-#define wxTREE_MASK_CHILDREN 0x0020
-#define wxTREE_MASK_DATA 0x0040
-
-#define wxTREE_STATE_BOLD 0x0001
-#define wxTREE_STATE_DROPHILITED 0x0002
-#define wxTREE_STATE_EXPANDED 0x0004
-#define wxTREE_STATE_EXPANDEDONCE 0x0008
-#define wxTREE_STATE_FOCUSED 0x0010
-#define wxTREE_STATE_SELECTED 0x0020
-#define wxTREE_STATE_CUT 0x0040
-
-#define wxTREE_HITTEST_ABOVE 0x0001 // Above the client area.
-#define wxTREE_HITTEST_BELOW 0x0002 // Below the client area.
-#define wxTREE_HITTEST_NOWHERE 0x0004 // In the client area but below the last item.
-#define wxTREE_HITTEST_ONITEMBUTTON 0x0010 // On the button associated with an item.
-#define wxTREE_HITTEST_ONITEMICON 0x0020 // On the bitmap associated with an item.
-#define wxTREE_HITTEST_ONITEMINDENT 0x0040 // In the indentation associated with an item.
-#define wxTREE_HITTEST_ONITEMLABEL 0x0080 // On the label (string) associated with an item.
-#define wxTREE_HITTEST_ONITEMRIGHT 0x0100 // In the area to the right of an item.
-#define wxTREE_HITTEST_ONITEMSTATEICON 0x0200 // On the state icon for a tree view item that is in a user-defined state.
-#define wxTREE_HITTEST_TOLEFT 0x0400 // To the right of the client area.
-#define wxTREE_HITTEST_TORIGHT 0x0800 // To the left of the client area.
-
-#define wxTREE_HITTEST_ONITEM (wxTREE_HITTEST_ONITEMICON | wxTREE_HITTEST_ONITEMLABEL | wxTREE_HITTEST_ONITEMSTATEICON)
-
-// Flags for GetNextItem
-enum {
- wxTREE_NEXT_CARET, // Retrieves the currently selected item.
- wxTREE_NEXT_CHILD, // Retrieves the first child item. The hItem parameter must be NULL.
- wxTREE_NEXT_DROPHILITE, // Retrieves the item that is the target of a drag-and-drop operation.
- wxTREE_NEXT_FIRSTVISIBLE, // Retrieves the first visible item.
- wxTREE_NEXT_NEXT, // Retrieves the next sibling item.
- wxTREE_NEXT_NEXTVISIBLE, // Retrieves the next visible item that follows the specified item.
- wxTREE_NEXT_PARENT, // Retrieves the parent of the specified item.
- wxTREE_NEXT_PREVIOUS, // Retrieves the previous sibling item.
- wxTREE_NEXT_PREVIOUSVISIBLE, // Retrieves the first visible item that precedes the specified item.
- wxTREE_NEXT_ROOT // Retrieves the first child item of the root item of which the specified item is a part.
-};
-
-// Flags for ExpandItem
-enum {
- wxTREE_EXPAND_EXPAND,
- wxTREE_EXPAND_COLLAPSE,
- wxTREE_EXPAND_COLLAPSE_RESET,
- wxTREE_EXPAND_TOGGLE
-};
-
-// Flags for InsertItem
-enum {
- wxTREE_INSERT_LAST = -1,
- wxTREE_INSERT_FIRST = -2,
- wxTREE_INSERT_SORT = -3
-};
-
-class WXDLLEXPORT wxTreeItem: public wxObject
-{
- DECLARE_DYNAMIC_CLASS(wxTreeItem)
-public:
- long m_mask;
- long m_itemId;
- long m_state;
- long m_stateMask;
- wxString m_text;
- int m_image;
- int m_selectedImage;
- int m_children;
- long m_data;
-
- wxTreeItem();
-
-// Accessors
- inline long GetMask() const { return m_mask; }
- inline long GetItemId() const { return m_itemId; }
- inline long GetState() const { return m_state; }
- inline long GetStateMask() const { return m_stateMask; }
- inline wxString GetText() const { return m_text; }
- inline int GetImage() const { return m_image; }
- inline int GetSelectedImage() const { return m_selectedImage; }
- inline int GetChildren() const { return m_children; }
- inline long GetData() const { return m_data; }
-
- inline void SetMask(long mask) { m_mask = mask; }
- inline void SetItemId(long id) { m_itemId = m_itemId = id; }
- inline void SetState(long state) { m_state = state; }
- inline void SetStateMask(long stateMask) { m_stateMask = stateMask; }
- inline void GetText(const wxString& text) { m_text = text; }
- inline void SetImage(int image) { m_image = image; }
- inline void GetSelectedImage(int selImage) { m_selectedImage = selImage; }
- inline void SetChildren(int children) { m_children = children; }
- inline void SetData(long data) { m_data = data; }
-};
-
-class WXDLLEXPORT wxTreeCtrl: public wxControl
-{
-public:
- /*
- * Public interface
- */
-
- // creation
- // --------
- wxTreeCtrl();
-
- inline wxTreeCtrl(wxWindow *parent, wxWindowID id = -1,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxTR_HAS_BUTTONS|wxTR_LINES_AT_ROOT,
- const wxValidator& validator = wxDefaultValidator,
- const wxString& name = "wxTreeCtrl")
- {
- Create(parent, id, pos, size, style, validator, name);
- }
- ~wxTreeCtrl();
-
- bool Create(wxWindow *parent, wxWindowID id = -1,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxTR_HAS_BUTTONS|wxTR_LINES_AT_ROOT,
- const wxValidator& validator = wxDefaultValidator,
- const wxString& name = "wxTreeCtrl");
-
- // accessors
- // ---------
- //
- int GetCount() const;
-
- // indent
- int GetIndent() const;
- void SetIndent(int indent);
- // image list
- wxImageList *GetImageList(int which = wxIMAGE_LIST_NORMAL) const;
- void SetImageList(wxImageList *imageList, int which = wxIMAGE_LIST_NORMAL);
-
- // navigation inside the tree
- long GetNextItem(long item, int code) const;
- bool ItemHasChildren(long item) const;
- long GetChild(long item) const;
- long GetParent(long item) const;
- long GetFirstVisibleItem() const;
- long GetNextVisibleItem(long item) const;
- long GetSelection() const;
- long GetRootItem() const;
-
- // generic function for (g|s)etting item attributes
- bool GetItem(wxTreeItem& info) const;
- bool SetItem(wxTreeItem& info);
- // item state
- int GetItemState(long item, long stateMask) const;
- bool SetItemState(long item, long state, long stateMask);
- // item image
- bool SetItemImage(long item, int image, int selImage);
- // item text
- wxString GetItemText(long item) const;
- void SetItemText(long item, const wxString& str);
- // custom data associated with the item
- long GetItemData(long item) const;
- bool SetItemData(long item, long data);
- // convenience function
- bool IsItemExpanded(long item)
- {
- return (GetItemState(item, wxTREE_STATE_EXPANDED) &
- wxTREE_STATE_EXPANDED) != 0;
- }
-
- // bounding rect
- bool GetItemRect(long item, wxRect& rect, bool textOnly = FALSE) const;
- //
- wxTextCtrl* GetEditControl() const;
-
- // operations
- // ----------
- // adding/deleting items
- bool DeleteItem(long item);
- long InsertItem(long parent, wxTreeItem& info,
- long insertAfter = wxTREE_INSERT_LAST);
- // If image > -1 and selImage == -1, the same image is used for
- // both selected and unselected items.
- long InsertItem(long parent, const wxString& label,
- int image = -1, int selImage = -1,
- long insertAfter = wxTREE_INSERT_LAST);
-
- // changing item state
- bool ExpandItem(long item) { return ExpandItem(item, wxTREE_EXPAND_EXPAND); }
- bool CollapseItem(long item) { return ExpandItem(item, wxTREE_EXPAND_COLLAPSE); }
- bool ToggleItem(long item) { return ExpandItem(item, wxTREE_EXPAND_TOGGLE); }
- // common interface for {Expand|Collapse|Toggle}Item
- bool ExpandItem(long item, int action);
-
- //
- bool SelectItem(long item);
- bool ScrollTo(long item);
- bool DeleteAllItems();
-
- // Edit the label (tree must have the focus)
- wxTextCtrl* EditLabel(long item, wxClassInfo* textControlClass = CLASSINFO(wxTextCtrl));
-
- // End label editing, optionally cancelling the edit
- bool EndEditLabel(bool cancel);
-
- long HitTest(const wxPoint& point, int& flags);
- // wxImageList *CreateDragImage(long item);
- bool SortChildren(long item);
- bool EnsureVisible(long item);
-
- void Command(wxCommandEvent& event) { ProcessCommand(event); };
-
-protected:
- wxTextCtrl* m_textCtrl;
- wxImageList* m_imageListNormal;
- wxImageList* m_imageListState;
-
- DECLARE_DYNAMIC_CLASS(wxTreeCtrl)
-};
-
-/*
- wxEVT_COMMAND_TREE_BEGIN_DRAG,
- wxEVT_COMMAND_TREE_BEGIN_RDRAG,
- wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT,
- wxEVT_COMMAND_TREE_END_LABEL_EDIT,
- wxEVT_COMMAND_TREE_DELETE_ITEM,
- wxEVT_COMMAND_TREE_GET_INFO,
- wxEVT_COMMAND_TREE_SET_INFO,
- wxEVT_COMMAND_TREE_ITEM_EXPANDED,
- wxEVT_COMMAND_TREE_ITEM_EXPANDING,
- wxEVT_COMMAND_TREE_ITEM_COLLAPSED,
- wxEVT_COMMAND_TREE_ITEM_COLLAPSING,
- wxEVT_COMMAND_TREE_SEL_CHANGED,
- wxEVT_COMMAND_TREE_SEL_CHANGING,
- wxEVT_COMMAND_TREE_KEY_DOWN
-*/
-
-class WXDLLEXPORT wxTreeEvent: public wxCommandEvent
-{
- DECLARE_DYNAMIC_CLASS(wxTreeEvent)
-
- public:
- wxTreeEvent(wxEventType commandType = wxEVT_NULL, int id = 0);
-
- int m_code;
- wxTreeItem m_item;
- long m_oldItem;
- wxPoint m_pointDrag;
-
- inline long GetOldItem() const { return m_oldItem; }
- inline wxTreeItem& GetItem() const { return (wxTreeItem&) m_item; }
- inline wxPoint GetPoint() const { return m_pointDrag; }
- inline int GetCode() const { return m_code; }
-};
-
-typedef void (wxEvtHandler::*wxTreeEventFunction)(wxTreeEvent&);
-
-#define EVT_TREE_BEGIN_DRAG(id, fn) { wxEVT_COMMAND_TREE_BEGIN_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
-#define EVT_TREE_BEGIN_RDRAG(id, fn) { wxEVT_COMMAND_TREE_BEGIN_RDRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
-#define EVT_TREE_BEGIN_LABEL_EDIT(id, fn) { wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
-#define EVT_TREE_END_LABEL_EDIT(id, fn) { wxEVT_COMMAND_TREE_END_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
-#define EVT_TREE_DELETE_ITEM(id, fn) { wxEVT_COMMAND_TREE_DELETE_ITEM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
-#define EVT_TREE_GET_INFO(id, fn) { wxEVT_COMMAND_TREE_GET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
-#define EVT_TREE_SET_INFO(id, fn) { wxEVT_COMMAND_TREE_SET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
-#define EVT_TREE_ITEM_EXPANDED(id, fn) { wxEVT_COMMAND_TREE_ITEM_EXPANDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
-#define EVT_TREE_ITEM_EXPANDING(id, fn) { wxEVT_COMMAND_TREE_ITEM_EXPANDING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
-#define EVT_TREE_ITEM_COLLAPSED(id, fn) { wxEVT_COMMAND_TREE_ITEM_COLLAPSED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
-#define EVT_TREE_ITEM_COLLAPSING(id, fn) { wxEVT_COMMAND_TREE_ITEM_COLLAPSING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
-#define EVT_TREE_SEL_CHANGED(id, fn) { wxEVT_COMMAND_TREE_SEL_CHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
-#define EVT_TREE_SEL_CHANGING(id, fn) { wxEVT_COMMAND_TREE_SEL_CHANGING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
-#define EVT_TREE_KEY_DOWN(id, fn) { wxEVT_COMMAND_TREE_KEY_DOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
-
-#endif
- // _WX_TREECTRL_H_
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: imaglist.cpp
-// Purpose: wxImageList. You may wish to use the generic version.
-// Author: Julian Smart
-// Modified by:
-// Created: 17/09/98
-// RCS-ID: $Id$
-// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifdef __GNUG__
-#pragma implementation "imaglist.h"
-#endif
-
-#include "wx/motif/imaglist.h"
-
-#if !USE_SHARED_LIBRARY
-IMPLEMENT_DYNAMIC_CLASS(wxImageList, wxObject)
-#endif
-
-wxImageList::wxImageList()
-{
- // TODO: init image list handle, if any
-}
-
-wxImageList::~wxImageList()
-{
- // TODO: destroy image list handle, if any
-}
-
-
-// Attributes
-////////////////////////////////////////////////////////////////////////////
-
-// Returns the number of images in the image list.
-int wxImageList::GetImageCount() const
-{
- // TODO
- return 0;
-}
-
-// Operations
-////////////////////////////////////////////////////////////////////////////
-
-// Creates an image list
-bool wxImageList::Create(int width, int height, bool mask, int initial)
-{
- // TODO
- return FALSE;
-}
-
-// Adds a bitmap, and optionally a mask bitmap.
-// Note that wxImageList creates new bitmaps, so you may delete
-// 'bitmap' and 'mask'.
-int wxImageList::Add(const wxBitmap& bitmap, const wxBitmap& mask)
-{
- // TODO
- return 0;
-}
-
-// Adds a bitmap, using the specified colour to create the mask bitmap
-// Note that wxImageList creates new bitmaps, so you may delete
-// 'bitmap'.
-int wxImageList::Add(const wxBitmap& bitmap, const wxColour& maskColour)
-{
- // TODO
- return 0;
-}
-
-// Adds a bitmap and mask from an icon.
-int wxImageList::Add(const wxIcon& icon)
-{
- // TODO
- return 0;
-}
-
-// Replaces a bitmap, optionally passing a mask bitmap.
-// Note that wxImageList creates new bitmaps, so you may delete
-// 'bitmap' and 'mask'.
-bool wxImageList::Replace(int index, const wxBitmap& bitmap, const wxBitmap& mask)
-{
- // TODO
- return 0;
-}
-
-// Replaces a bitmap and mask from an icon.
-bool wxImageList::Replace(int index, const wxIcon& icon)
-{
- // TODO
- return 0;
-}
-
-// Removes the image at the given index.
-bool wxImageList::Remove(int index)
-{
- // TODO
- return FALSE;
-}
-
-// Remove all images
-bool wxImageList::RemoveAll()
-{
- // TODO
- return FALSE;
-}
-
-// Draws the given image on a dc at the specified position.
-// If 'solidBackground' is TRUE, Draw sets the image list background
-// colour to the background colour of the wxDC, to speed up
-// drawing by eliminating masked drawing where possible.
-bool wxImageList::Draw(int index, wxDC& dc, int x, int y,
- int flags, bool solidBackground)
-{
- // TODO
- return FALSE;
-}
-
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: listctrl.cpp
-// Purpose: wxListCtrl. See also Robert's generic wxListCtrl
-// Author: Julian Smart
-// Modified by:
-// Created: 17/09/98
-// RCS-ID: $Id$
-// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifdef __GNUG__
-#pragma implementation "listctrl.h"
-#endif
-
-#include "wx/motif/textctrl.h"
-#include "wx/motif/listctrl.h"
-
-#if !USE_SHARED_LIBRARY
-IMPLEMENT_DYNAMIC_CLASS(wxListCtrl, wxControl)
-IMPLEMENT_DYNAMIC_CLASS(wxListItem, wxObject)
-
-#endif
-
-wxListCtrl::wxListCtrl()
-{
- m_imageListNormal = NULL;
- m_imageListSmall = NULL;
- m_imageListState = NULL;
- m_baseStyle = 0;
- m_colCount = 0;
-}
-
-bool wxListCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size,
- long style, const wxValidator& validator, const wxString& name)
-{
- m_imageListNormal = NULL;
- m_imageListSmall = NULL;
- m_imageListState = NULL;
- m_colCount = 0;
-
- SetValidator(validator);
- SetName(name);
-
- m_windowStyle = style;
-
- SetParent(parent);
-
- m_windowId = (id == -1) ? NewControlId() : id;
-
- if (parent) parent->AddChild(this);
-
- // TODO create list control
- return TRUE;
-}
-
-wxListCtrl::~wxListCtrl()
-{
-}
-
-// Add or remove a single window style
-void wxListCtrl::SetSingleStyle(long style, bool add)
-{
- long flag = GetWindowStyleFlag();
-
- // Get rid of conflicting styles
- if ( add )
- {
- if ( style & wxLC_MASK_TYPE)
- flag = flag & ~wxLC_MASK_TYPE ;
- if ( style & wxLC_MASK_ALIGN )
- flag = flag & ~wxLC_MASK_ALIGN ;
- if ( style & wxLC_MASK_SORT )
- flag = flag & ~wxLC_MASK_SORT ;
- }
-
- if ( flag & style )
- {
- if ( !add )
- flag -= style;
- }
- else
- {
- if ( add )
- {
- flag |= style;
- }
- }
-
- m_windowStyle = flag;
-
- /* TODO RecreateWindow(); */
-}
-
-// Set the whole window style
-void wxListCtrl::SetWindowStyleFlag(long flag)
-{
- m_windowStyle = flag;
-
- /* TODO RecreateWindow(); */
-}
-
-
-// Gets information about this column
-bool wxListCtrl::GetColumn(int col, wxListItem& item) const
-{
- // TODO
- return FALSE;
-}
-
-// Sets information about this column
-bool wxListCtrl::SetColumn(int col, wxListItem& item)
-{
- // TODO
- return FALSE;
-}
-
-// Gets the column width
-int wxListCtrl::GetColumnWidth(int col) const
-{
- // TODO
- return 0;
-}
-
-// Sets the column width
-bool wxListCtrl::SetColumnWidth(int col, int width)
-{
- // TODO
- return FALSE;
-}
-
-// Gets the number of items that can fit vertically in the
-// visible area of the list control (list or report view)
-// or the total number of items in the list control (icon
-// or small icon view)
-int wxListCtrl::GetCountPerPage() const
-{
- // TODO
- return 0;
-}
-
-// Gets the edit control for editing labels.
-wxTextCtrl* wxListCtrl::GetEditControl() const
-{
- return m_textCtrl;
-}
-
-// Gets information about the item
-bool wxListCtrl::GetItem(wxListItem& info) const
-{
- // TODO
- return FALSE;
-}
-
-// Sets information about the item
-bool wxListCtrl::SetItem(wxListItem& info)
-{
- // TODO
- return FALSE;
-}
-
-long wxListCtrl::SetItem(long index, int col, const wxString& label, int imageId)
-{
- wxListItem info;
- info.m_text = label;
- info.m_mask = wxLIST_MASK_TEXT;
- info.m_itemId = index;
- info.m_col = col;
- if ( imageId > -1 )
- {
- info.m_image = imageId;
- info.m_mask |= wxLIST_MASK_IMAGE;
- }
- return SetItem(info);
-}
-
-
-// Gets the item state
-int wxListCtrl::GetItemState(long item, long stateMask) const
-{
- wxListItem info;
-
- info.m_mask = wxLIST_MASK_STATE ;
- info.m_stateMask = stateMask;
- info.m_itemId = item;
-
- if (!GetItem(info))
- return 0;
-
- return info.m_state;
-}
-
-// Sets the item state
-bool wxListCtrl::SetItemState(long item, long state, long stateMask)
-{
- wxListItem info;
-
- info.m_mask = wxLIST_MASK_STATE ;
- info.m_state = state;
- info.m_stateMask = stateMask;
- info.m_itemId = item;
-
- return SetItem(info);
-}
-
-// Sets the item image
-bool wxListCtrl::SetItemImage(long item, int image, int selImage)
-{
- wxListItem info;
-
- info.m_mask = wxLIST_MASK_IMAGE ;
- info.m_image = image;
- info.m_itemId = item;
-
- return SetItem(info);
-}
-
-// Gets the item text
-wxString wxListCtrl::GetItemText(long item) const
-{
- wxListItem info;
-
- info.m_mask = wxLIST_MASK_TEXT ;
- info.m_itemId = item;
-
- if (!GetItem(info))
- return wxString("");
- return info.m_text;
-}
-
-// Sets the item text
-void wxListCtrl::SetItemText(long item, const wxString& str)
-{
- wxListItem info;
-
- info.m_mask = wxLIST_MASK_TEXT ;
- info.m_itemId = item;
- info.m_text = str;
-
- SetItem(info);
-}
-
-// Gets the item data
-long wxListCtrl::GetItemData(long item) const
-{
- wxListItem info;
-
- info.m_mask = wxLIST_MASK_DATA ;
- info.m_itemId = item;
-
- if (!GetItem(info))
- return 0;
- return info.m_data;
-}
-
-// Sets the item data
-bool wxListCtrl::SetItemData(long item, long data)
-{
- wxListItem info;
-
- info.m_mask = wxLIST_MASK_DATA ;
- info.m_itemId = item;
- info.m_data = data;
-
- return SetItem(info);
-}
-
-// Gets the item rectangle
-bool wxListCtrl::GetItemRect(long item, wxRect& rect, int code) const
-{
- // TODO
- return FALSE;
-}
-
-// Gets the item position
-bool wxListCtrl::GetItemPosition(long item, wxPoint& pos) const
-{
- // TODO
- return FALSE;
-}
-
-// Sets the item position.
-bool wxListCtrl::SetItemPosition(long item, const wxPoint& pos)
-{
- // TODO
- return FALSE;
-}
-
-// Gets the number of items in the list control
-int wxListCtrl::GetItemCount() const
-{
- // TODO
- return FALSE;
-}
-
-// Retrieves the spacing between icons in pixels.
-// If small is TRUE, gets the spacing for the small icon
-// view, otherwise the large icon view.
-int wxListCtrl::GetItemSpacing(bool isSmall) const
-{
- // TODO
- return FALSE;
-}
-
-// Gets the number of selected items in the list control
-int wxListCtrl::GetSelectedItemCount() const
-{
- // TODO
- return FALSE;
-}
-
-// Gets the text colour of the listview
-wxColour wxListCtrl::GetTextColour() const
-{
- // TODO
- return wxColour();
-}
-
-// Sets the text colour of the listview
-void wxListCtrl::SetTextColour(const wxColour& col)
-{
- // TODO
-}
-
-// Gets the index of the topmost visible item when in
-// list or report view
-long wxListCtrl::GetTopItem() const
-{
- // TODO
- return 0;
-}
-
-// Searches for an item, starting from 'item'.
-// 'geometry' is one of
-// wxLIST_NEXT_ABOVE/ALL/BELOW/LEFT/RIGHT.
-// 'state' is a state bit flag, one or more of
-// wxLIST_STATE_DROPHILITED/FOCUSED/SELECTED/CUT.
-// item can be -1 to find the first item that matches the
-// specified flags.
-// Returns the item or -1 if unsuccessful.
-long wxListCtrl::GetNextItem(long item, int geom, int state) const
-{
- // TODO
- return 0;
-}
-
-wxImageList *wxListCtrl::GetImageList(int which) const
-{
- if ( which == wxIMAGE_LIST_NORMAL )
- {
- return m_imageListNormal;
- }
- else if ( which == wxIMAGE_LIST_SMALL )
- {
- return m_imageListSmall;
- }
- else if ( which == wxIMAGE_LIST_STATE )
- {
- return m_imageListState;
- }
- return NULL;
-}
-
-void wxListCtrl::SetImageList(wxImageList *imageList, int which)
-{
- int flags = 0;
- if ( which == wxIMAGE_LIST_NORMAL )
- {
- m_imageListNormal = imageList;
- }
- else if ( which == wxIMAGE_LIST_SMALL )
- {
- m_imageListSmall = imageList;
- }
- else if ( which == wxIMAGE_LIST_STATE )
- {
- m_imageListState = imageList;
- }
- // TODO set image list
-}
-
-// Operations
-////////////////////////////////////////////////////////////////////////////
-
-// Arranges the items
-bool wxListCtrl::Arrange(int flag)
-{
- // TODO
- return FALSE;
-}
-
-// Deletes an item
-bool wxListCtrl::DeleteItem(long item)
-{
- // TODO
- return FALSE;
-}
-
-// Deletes all items
-bool wxListCtrl::DeleteAllItems()
-{
- // TODO
- return FALSE;
-}
-
-// Deletes all items
-bool wxListCtrl::DeleteAllColumns()
-{
- // TODO
- return FALSE;
-}
-
-// Deletes a column
-bool wxListCtrl::DeleteColumn(int col)
-{
- // TODO
- return FALSE;
-}
-
-// Clears items, and columns if there are any.
-void wxListCtrl::ClearAll()
-{
- DeleteAllItems();
- if ( m_colCount > 0 )
- DeleteAllColumns();
-}
-
-// Edit the label
-wxTextCtrl* wxListCtrl::EditLabel(long item, wxClassInfo* textControlClass)
-{
- // TODO
- return NULL;
-}
-
-// End label editing, optionally cancelling the edit
-bool wxListCtrl::EndEditLabel(bool cancel)
-{
- // TODO
- return FALSE;
-}
-
-// Ensures this item is visible
-bool wxListCtrl::EnsureVisible(long item)
-{
- // TODO
- return FALSE;
-}
-
-// Find an item whose label matches this string, starting from the item after 'start'
-// or the beginning if 'start' is -1.
-long wxListCtrl::FindItem(long start, const wxString& str, bool partial)
-{
- // TODO
- return FALSE;
-}
-
-// Find an item whose data matches this data, starting from the item after 'start'
-// or the beginning if 'start' is -1.
-long wxListCtrl::FindItem(long start, long data)
-{
- // TODO
- return 0;
-}
-
-// Find an item nearest this position in the specified direction, starting from
-// the item after 'start' or the beginning if 'start' is -1.
-long wxListCtrl::FindItem(long start, const wxPoint& pt, int direction)
-{
- // TODO
- return 0;
-}
-
-// Determines which item (if any) is at the specified point,
-// giving details in 'flags' (see wxLIST_HITTEST_... flags above)
-long wxListCtrl::HitTest(const wxPoint& point, int& flags)
-{
- // TODO
- return 0;
-}
-
-// Inserts an item, returning the index of the new item if successful,
-// -1 otherwise.
-long wxListCtrl::InsertItem(wxListItem& info)
-{
- // TODO
- return 0;
-}
-
-long wxListCtrl::InsertItem(long index, const wxString& label)
-{
- wxListItem info;
- info.m_text = label;
- info.m_mask = wxLIST_MASK_TEXT;
- info.m_itemId = index;
- return InsertItem(info);
-}
-
-// Inserts an image item
-long wxListCtrl::InsertItem(long index, int imageIndex)
-{
- wxListItem info;
- info.m_image = imageIndex;
- info.m_mask = wxLIST_MASK_IMAGE;
- info.m_itemId = index;
- return InsertItem(info);
-}
-
-// Inserts an image/string item
-long wxListCtrl::InsertItem(long index, const wxString& label, int imageIndex)
-{
- wxListItem info;
- info.m_image = imageIndex;
- info.m_text = label;
- info.m_mask = wxLIST_MASK_IMAGE | wxLIST_MASK_TEXT;
- info.m_itemId = index;
- return InsertItem(info);
-}
-
-// For list view mode (only), inserts a column.
-long wxListCtrl::InsertColumn(long col, wxListItem& item)
-{
- // TODO
- return 0;
-}
-
-long wxListCtrl::InsertColumn(long col, const wxString& heading, int format,
- int width)
-{
- wxListItem item;
- item.m_mask = wxLIST_MASK_TEXT | wxLIST_MASK_FORMAT;
- item.m_text = heading;
- if ( width > -1 )
- {
- item.m_mask |= wxLIST_MASK_WIDTH;
- item.m_width = width;
- }
- item.m_format = format;
-
- return InsertColumn(col, item);
-}
-
-// Scrolls the list control. If in icon, small icon or report view mode,
-// x specifies the number of pixels to scroll. If in list view mode, x
-// specifies the number of columns to scroll.
-// If in icon, small icon or list view mode, y specifies the number of pixels
-// to scroll. If in report view mode, y specifies the number of lines to scroll.
-bool wxListCtrl::ScrollList(int dx, int dy)
-{
- // TODO
- return FALSE;
-}
-
-// Sort items.
-
-// fn is a function which takes 3 long arguments: item1, item2, data.
-// item1 is the long data associated with a first item (NOT the index).
-// item2 is the long data associated with a second item (NOT the index).
-// data is the same value as passed to SortItems.
-// The return value is a negative number if the first item should precede the second
-// item, a positive number of the second item should precede the first,
-// or zero if the two items are equivalent.
-
-// data is arbitrary data to be passed to the sort function.
-bool wxListCtrl::SortItems(wxListCtrlCompare fn, long data)
-{
- // TODO
- return FALSE;
-}
-
-// List item structure
-wxListItem::wxListItem()
-{
- m_mask = 0;
- m_itemId = 0;
- m_col = 0;
- m_state = 0;
- m_stateMask = 0;
- m_image = 0;
- m_data = 0;
-
- m_format = wxLIST_FORMAT_CENTRE;
- m_width = 0;
-}
-
-// List event
-IMPLEMENT_DYNAMIC_CLASS(wxListEvent, wxCommandEvent)
-
-wxListEvent::wxListEvent(wxEventType commandType, int id):
- wxCommandEvent(commandType, id)
-{
- m_code = 0;
- m_itemIndex = 0;
- m_col = 0;
- m_cancelled = FALSE;
-}
-
# treectrl.cpp \
# listctrl.cpp \
# imaglist.cpp \
-# statusbr.cpp \
ZLIB_SRC=\
../zlib/adler32.c ../zlib/deflate.c ../zlib/infblock.c\
+++ /dev/null
-///////////////////////////////////////////////////////////////////////////////
-// Name: statbar.cpp
-// Purpose: native implementation of wxStatusBar (optional)
-// Author: Julian Smart
-// Modified by:
-// Created: 17/09/98
-// RCS-ID: $Id$
-// Copyright: (c) 1998 Julian Smart
-// Licence: wxWindows licence
-///////////////////////////////////////////////////////////////////////////////
-
-#ifdef __GNUG__
-#pragma implementation "statusbr.h"
-#endif
-
-// ----------------------------------------------------------------------------
-// headers
-// ----------------------------------------------------------------------------
-
-#include "wx/motif/statusbr.h"
-
-#if !USE_SHARED_LIBRARY
-IMPLEMENT_DYNAMIC_CLASS(wxStatusBarXX, wxStatusBar);
-
-BEGIN_EVENT_TABLE(wxStatusBarXX, wxStatusBar)
- EVT_SIZE(wxStatusBarXX::OnSize)
-END_EVENT_TABLE()
-#endif //USE_SHARED_LIBRARY
-
-
-// ============================================================================
-// implementation
-// ============================================================================
-
-// ----------------------------------------------------------------------------
-// wxStatusBarXX class
-// ----------------------------------------------------------------------------
-
-wxStatusBarXX::wxStatusBarXX()
-{
- SetParent(NULL);
-}
-
-wxStatusBarXX::wxStatusBarXX(wxWindow *parent, wxWindowID id, long style)
-{
- Create(parent, id, style);
-}
-
-bool wxStatusBarXX::Create(wxWindow *parent, wxWindowID id, long style)
-{
- SetParent(parent);
-
- if (id == -1)
- m_windowId = NewControlId();
- else
- m_windowId = id;
-
- // TODO: create status bar
- return FALSE;
-}
-
-void wxStatusBarXX::SetFieldsCount(int nFields, const int widths[])
-{
- wxASSERT( (nFields > 0) && (nFields < 255) );
-
- m_nFields = nFields;
-
- CopyFieldsWidth(widths);
- SetFieldsWidth();
-}
-
-void wxStatusBarXX::SetStatusWidths(int n, const int widths[])
-{
- wxASSERT( n == m_nFields );
-
- CopyFieldsWidth(widths);
- SetFieldsWidth();
-}
-
-void wxStatusBarXX::CopyFieldsWidth(const int widths[])
-{
- if (widths && !m_statusWidths)
- m_statusWidths = new int[m_nFields];
-
- if ( widths != NULL ) {
- for ( int i = 0; i < m_nFields; i++ )
- m_statusWidths[i] = widths[i];
- }
- else {
- delete [] m_statusWidths;
- m_statusWidths = NULL;
- }
-}
-
-void wxStatusBarXX::SetFieldsWidth()
-{
- int *pWidths = new int[m_nFields];
-
- int nWindowWidth, y;
- GetClientSize(&nWindowWidth, &y);
-
- if ( m_statusWidths == NULL ) {
- // default: all fields have the same width
- int nWidth = nWindowWidth / m_nFields;
- for ( int i = 0; i < m_nFields; i++ )
- pWidths[i] = (i + 1) * nWidth;
- }
- else {
- // -1 doesn't mean the same thing for wxWindows and Win32, recalc
- int nTotalWidth = 0,
- nVarCount = 0,
- i;
- for ( i = 0; i < m_nFields; i++ ) {
- if ( m_statusWidths[i] == -1 )
- nVarCount++;
- else
- nTotalWidth += m_statusWidths[i];
- }
-
- if ( nVarCount == 0 ) {
- // wrong! at least one field must be of variable width
- wxFAIL;
-
- nVarCount++;
- }
-
- int nVarWidth = (nWindowWidth - nTotalWidth) / nVarCount;
-
- // do fill the array
- int nCurPos = 0;
- for ( i = 0; i < m_nFields; i++ ) {
- if ( m_statusWidths[i] == -1 )
- nCurPos += nVarWidth;
- else
- nCurPos += m_statusWidths[i];
- pWidths[i] = nCurPos;
- }
- }
-
- // TODO: set widths
-
- delete [] pWidths;
-}
-
-void wxStatusBarXX::SetStatusText(const wxString& strText, int nField)
-{
- // TODO
-}
-
-wxString wxStatusBarXX::GetStatusText(int nField) const
-{
- wxASSERT( (nField > -1) && (nField < m_nFields) );
-
- // TODO
- return wxString("");
-}
-
-void wxStatusBarXX::OnSize(wxSizeEvent& event)
-{
- // adjust fields widths to the new size
- SetFieldsWidth();
-}
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: treectrl.cpp
-// Purpose: wxTreeCtrl. See also Robert's generic wxTreeCtrl.
-// Author: Julian Smart
-// Modified by:
-// Created: 17/09/98
-// RCS-ID: $Id$
-// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifdef __GNUG__
-#pragma implementation "treectrl.h"
-#endif
-
-#include "wx/motif/textctrl.h"
-#include "wx/motif/treectrl.h"
-
-#if !USE_SHARED_LIBRARY
-IMPLEMENT_DYNAMIC_CLASS(wxTreeCtrl, wxControl)
-IMPLEMENT_DYNAMIC_CLASS(wxTreeItem, wxObject)
-
-#endif
-
-wxTreeCtrl::wxTreeCtrl()
-{
- m_imageListNormal = NULL;
- m_imageListState = NULL;
- m_textCtrl = NULL;
-}
-
-bool wxTreeCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size,
- long style, const wxValidator& validator, const wxString& name)
-{
- SetName(name);
- SetValidator(validator);
-
- m_imageListNormal = NULL;
- m_imageListState = NULL;
- m_textCtrl = NULL;
-
- m_windowStyle = style;
-
- SetParent(parent);
-
- m_windowId = (id == -1) ? NewControlId() : id;
-
- if (parent) parent->AddChild(this);
-
- // TODO create tree control
-
- return FALSE;
-}
-
-wxTreeCtrl::~wxTreeCtrl()
-{
- if (m_textCtrl)
- {
- delete m_textCtrl;
- }
-}
-
-// Attributes
-int wxTreeCtrl::GetCount() const
-{
- // TODO
- return 0;
-}
-
-int wxTreeCtrl::GetIndent() const
-{
- // TODO
- return 0;
-}
-
-void wxTreeCtrl::SetIndent(int indent)
-{
- // TODO
-}
-
-wxImageList *wxTreeCtrl::GetImageList(int which) const
-{
- if ( which == wxIMAGE_LIST_NORMAL )
- {
- return m_imageListNormal;
- }
- else if ( which == wxIMAGE_LIST_STATE )
- {
- return m_imageListState;
- }
- return NULL;
-}
-
-void wxTreeCtrl::SetImageList(wxImageList *imageList, int which)
-{
- if ( which == wxIMAGE_LIST_NORMAL )
- {
- m_imageListNormal = imageList;
- }
- else if ( which == wxIMAGE_LIST_STATE )
- {
- m_imageListState = imageList;
- }
- // TODO
-}
-
-long wxTreeCtrl::GetNextItem(long item, int code) const
-{
- // TODO
- return 0;
-}
-
-bool wxTreeCtrl::ItemHasChildren(long item) const
-{
- // TODO
- return FALSE;
-}
-
-long wxTreeCtrl::GetChild(long item) const
-{
- // TODO
- return 0;
-}
-
-long wxTreeCtrl::GetParent(long item) const
-{
- // TODO
- return 0;
-}
-
-long wxTreeCtrl::GetFirstVisibleItem() const
-{
- // TODO
- return 0;
-}
-
-long wxTreeCtrl::GetNextVisibleItem(long item) const
-{
- // TODO
- return 0;
-}
-
-long wxTreeCtrl::GetSelection() const
-{
- // TODO
- return 0;
-}
-
-long wxTreeCtrl::GetRootItem() const
-{
- // TODO
- return 0;
-}
-
-bool wxTreeCtrl::GetItem(wxTreeItem& info) const
-{
- // TODO
- return FALSE;
-}
-
-bool wxTreeCtrl::SetItem(wxTreeItem& info)
-{
- // TODO
- return FALSE;
-}
-
-int wxTreeCtrl::GetItemState(long item, long stateMask) const
-{
- wxTreeItem info;
-
- info.m_mask = wxTREE_MASK_STATE ;
- info.m_stateMask = stateMask;
- info.m_itemId = item;
-
- if (!GetItem(info))
- return 0;
-
- return info.m_state;
-}
-
-bool wxTreeCtrl::SetItemState(long item, long state, long stateMask)
-{
- wxTreeItem info;
-
- info.m_mask = wxTREE_MASK_STATE ;
- info.m_state = state;
- info.m_stateMask = stateMask;
- info.m_itemId = item;
-
- return SetItem(info);
-}
-
-bool wxTreeCtrl::SetItemImage(long item, int image, int selImage)
-{
- wxTreeItem info;
-
- info.m_mask = wxTREE_MASK_IMAGE ;
- info.m_image = image;
- if ( selImage > -1)
- {
- info.m_selectedImage = selImage;
- info.m_mask |= wxTREE_MASK_SELECTED_IMAGE;
- }
- info.m_itemId = item;
-
- return SetItem(info);
-}
-
-wxString wxTreeCtrl::GetItemText(long item) const
-{
- wxTreeItem info;
-
- info.m_mask = wxTREE_MASK_TEXT ;
- info.m_itemId = item;
-
- if (!GetItem(info))
- return wxString("");
- return info.m_text;
-}
-
-void wxTreeCtrl::SetItemText(long item, const wxString& str)
-{
- wxTreeItem info;
-
- info.m_mask = wxTREE_MASK_TEXT ;
- info.m_itemId = item;
- info.m_text = str;
-
- SetItem(info);
-}
-
-long wxTreeCtrl::GetItemData(long item) const
-{
- wxTreeItem info;
-
- info.m_mask = wxTREE_MASK_DATA ;
- info.m_itemId = item;
-
- if (!GetItem(info))
- return 0;
- return info.m_data;
-}
-
-bool wxTreeCtrl::SetItemData(long item, long data)
-{
- wxTreeItem info;
-
- info.m_mask = wxTREE_MASK_DATA ;
- info.m_itemId = item;
- info.m_data = data;
-
- return SetItem(info);
-}
-
-bool wxTreeCtrl::GetItemRect(long item, wxRect& rect, bool textOnly) const
-{
- // TODO
- return FALSE;
-}
-
-wxTextCtrl* wxTreeCtrl::GetEditControl() const
-{
- return m_textCtrl;
-}
-
-// Operations
-bool wxTreeCtrl::DeleteItem(long item)
-{
- // TODO
- return FALSE;
-}
-
-bool wxTreeCtrl::ExpandItem(long item, int action)
-{
- // TODO
- switch ( action )
- {
- case wxTREE_EXPAND_EXPAND:
- break;
-
- case wxTREE_EXPAND_COLLAPSE:
- break;
-
- case wxTREE_EXPAND_COLLAPSE_RESET:
- break;
-
- case wxTREE_EXPAND_TOGGLE:
- break;
-
- default:
- wxFAIL_MSG("unknown action in wxTreeCtrl::ExpandItem");
- }
-
- bool bOk = FALSE; // TODO expand item
-
- // May not send messages, so emulate them
- if ( bOk ) {
- wxTreeEvent event(wxEVT_NULL, m_windowId);
- event.m_item.m_itemId = item;
- event.m_item.m_mask =
- event.m_item.m_stateMask = 0xffff; // get all
- GetItem(event.m_item);
-
- bool bIsExpanded = (event.m_item.m_state & wxTREE_STATE_EXPANDED) != 0;
-
- event.m_code = action;
- event.SetEventObject(this);
-
- // @@@ return values of {EXPAND|COLLAPS}ING event handler is discarded
- event.SetEventType(bIsExpanded ? wxEVT_COMMAND_TREE_ITEM_EXPANDING
- : wxEVT_COMMAND_TREE_ITEM_COLLAPSING);
- GetEventHandler()->ProcessEvent(event);
-
- event.SetEventType(bIsExpanded ? wxEVT_COMMAND_TREE_ITEM_EXPANDED
- : wxEVT_COMMAND_TREE_ITEM_COLLAPSED);
- GetEventHandler()->ProcessEvent(event);
- }
-
- return bOk;
-}
-
-long wxTreeCtrl::InsertItem(long parent, wxTreeItem& info, long insertAfter)
-{
- // TODO
- return 0;
-}
-
-long wxTreeCtrl::InsertItem(long parent, const wxString& label, int image, int selImage,
- long insertAfter)
-{
- wxTreeItem info;
- info.m_text = label;
- info.m_mask = wxTREE_MASK_TEXT;
- if ( image > -1 )
- {
- info.m_mask |= wxTREE_MASK_IMAGE | wxTREE_MASK_SELECTED_IMAGE;
- info.m_image = image;
- if ( selImage == -1 )
- info.m_selectedImage = image;
- else
- info.m_selectedImage = selImage;
- }
-
- return InsertItem(parent, info, insertAfter);
-}
-
-bool wxTreeCtrl::SelectItem(long item)
-{
- // TODO
- return FALSE;
-}
-
-bool wxTreeCtrl::ScrollTo(long item)
-{
- // TODO
- return FALSE;
-}
-
-bool wxTreeCtrl::DeleteAllItems()
-{
- // TODO
- return FALSE;
-}
-
-wxTextCtrl* wxTreeCtrl::EditLabel(long item, wxClassInfo* textControlClass)
-{
- // TODO
- return NULL;
-}
-
-// End label editing, optionally cancelling the edit
-bool wxTreeCtrl::EndEditLabel(bool cancel)
-{
- // TODO
- return FALSE;
-}
-
-long wxTreeCtrl::HitTest(const wxPoint& point, int& flags)
-{
- // TODO
- return 0;
-}
-
-bool wxTreeCtrl::SortChildren(long item)
-{
- // TODO
- return FALSE;
-}
-
-bool wxTreeCtrl::EnsureVisible(long item)
-{
- // TODO
- return FALSE;
-}
-
-// Tree item structure
-wxTreeItem::wxTreeItem()
-{
- m_mask = 0;
- m_itemId = 0;
- m_state = 0;
- m_stateMask = 0;
- m_image = -1;
- m_selectedImage = -1;
- m_children = 0;
- m_data = 0;
-}
-
-// Tree event
-IMPLEMENT_DYNAMIC_CLASS(wxTreeEvent, wxCommandEvent)
-
-wxTreeEvent::wxTreeEvent(wxEventType commandType, int id):
- wxCommandEvent(commandType, id)
-{
- m_code = 0;
- m_oldItem = 0;
-}
-