### ICnrDrawItemEvent

  The ICnrDrawItemEvent class provides the information necessary to draw objects in the container. This event is dispatched when one of the following occurs:

  - The IContainerControl::handleDrawItem style is set when the container is created.
  - The IContainerControl::enableDrawItem function is called after construction.

#### AIX Considerations

  The Motif container widget do not support owner drawing of container objects. This event is not dispatched on AIX.

#### Windows Considerations

  The native Windows containers (that is, containers constructed without the pmCompatible style) do not support owner drawing of container objects. This event is not used in this case.

### ICnrDrawItemEvent - Member Functions and Data by Group

### Constructors & Destructor

You can construct and destruct objects of this class.

~ICnrDrawItemEvent

      public:
      virtual ~ICnrDrawItemEvent()

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Ignored

ICnrDrawItemEvent

      public:
      ICnrDrawItemEvent(const IEvent& event)

  You can only construct objects of this class from an IEvent object. See IEvent for information about that class. Although you can create objects of this class, typically ICnrDrawHandler::dispatchHandlerEvent creates them from an IControlEvent object in response to a item draw request.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Ignored

### Event Information

Use these members to query and set the accessible attributes of this class.

column

      public:
      virtual IContainerColumn* column() const

  If an object or column title is being drawn in the details view, the column is returned. If the view is other than details view, 0 is returned.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Ignored

container

      public:
      virtual IContainerControl* container() const

  Returns the container holding the object being drawn.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Ignored

itemPresSpaceHandle

      public:
      virtual IPresSpaceHandle itemPresSpaceHandle() const

  Returns the handle of the graphics drawing port for the item being drawn.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Ignored

itemRect

      public:
      virtual IRectangle itemRect() const

  Returns the rectangle of the item's size.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Ignored

itemType

      public:
      virtual ItemType itemType() const

  Returns the type of the item being drawn.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Ignored

object

      public:
      virtual IContainerObject* object() const

  Returns the object being drawn. If the current view is details view and the column titles are being drawn, then 0 is returned.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Ignored

### ICnrDrawItemEvent - Enumerations

ItemType

      enum ItemType { text,
                      icon,
                      treeIcon,
                      detailsView,
                      title }

  Enumeration of the possible styles providing the type of the item being drawn:

  text
    The text in all views except the details view.
  icon
    An icon in the icon, name or tree view.
  treeIcon
    An expanded or collapsed tree icon.
  detailsView
    Any drawing in the details view.
  title
    The container title.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Ignored

### ICnrDrawItemEvent - Inherited Member Functions and Data

#### Inherited Public Functions

  IControlEvent

  -     virtual ~IControlEvent()

  -     virtual unsigned long controlId() const

  -     IControlEvent(const IEvent& event)

  -     IControlEvent(const IControlEvent& event)

  IDrawItemEvent

  -     virtual ~IDrawItemEvent()

  -     IDrawItemEvent(const IEvent& event)

  -     virtual unsigned long itemId() const

  IEvent

  -     virtual ~IEvent()

  -     IWindowHandle controlHandle() const

  -     virtual IWindow* controlWindow() const

  -     IEvent& decrementOwnerLevels()

  -     virtual IWindow* dispatchingWindow() const

  -     unsigned long eventId() const

  -     IWindowHandle handle() const

  -     IEvent( IWindow* window,
                unsigned long eventId,
                const IEventParameter1& parameter1,
                const IEventParameter2& parameter2 )

  -     IEvent(const IEvent& event)

  -     IEvent( const IWindowHandle& handle,
                unsigned long eventId,
                const IEventParameter1& parameter1,
                const IEventParameter2& parameter2 )

  -     IEvent& operator =(const IEvent& event)

  -     IEventParameter1 parameter1() const

  -     IEventParameter2 parameter2() const

  -     bool passToOwner() const

  -     IEventResult result() const

  -     IEvent& setControlHandle(const IWindowHandle& handle)

  -     IEvent& setDispatchingHandle(const IWindowHandle& handle)

  -     IEvent& setDispatchingWindow(IWindow* window)

  -     IEvent& setHandle(const IWindowHandle& handle)

  -     IEvent& setNumberOfLevels(int levels = - 1)

  -     IEvent& setPassToOwner(bool passOn = true)

  -     IEvent& setResult(bool eventResult)

  -     IEvent& setResult(const IEventResult& eventResult)

  -     virtual IWindow* window() const

#### Inherited Public Data

  - None

#### Inherited Protected Functions

  IDrawItemEvent

  -     void* ownerItemData() const

#### Inherited Protected Data

  - None