InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IGradientSliderControlData Class Referenceabstract

#include <IGradientSliderControlData.h>

Inheritance diagram for IGradientSliderControlData:
IPMUnknown

Public Types

enum  thumbType { kMidPointThumb = 0, kStopThumb }
 
enum  updateType {
  kNormal = 0, kSelectThumb, kInsertThumbStop, kDragThumb,
  kDeactivatePanel, kActivatePanel, kIndeterminate, kNone
}
 

Public Member Functions

virtual void DoNotify ()=0
 
virtual void UpdateSliderData (const IGradientFill *newGradientData)=0
 
virtual void SetNumberOfStop (int16 stopNum)=0
 
virtual void SetNthThumbPosition (int16 index, PMReal thumbPosition)=0
 
virtual void InsertThumb (int16 index, PMReal thumbPosition)=0
 
virtual void SetSelectedThumbIndex (int16 thumbSelectedIndex, bool16 updateBlockIndex=kTrue)=0
 
virtual void SetDragDropHitThumbIndex (int16 thumbIndex)=0
 
virtual void SetLastEventValue (PMReal value)=0
 
virtual void SetLastUpdateType (int16 updateType)=0
 
virtual void SetLastUpdateBool (bool16 update)=0
 
virtual void SetLastHitPoint (PMPoint hitPoint)=0
 
virtual void SetNthMidPointRatio (int16 index, PMReal ratio)=0
 
virtual void InsertNthMidPointRatio (int16 index, PMReal ratio)=0
 
virtual void SetIsDragging (bool16 isDragging)=0
 
virtual void SetRemovedColorSave (bool16 bColorSave)=0
 
virtual void SetDeactivatePanel (bool16 panelDeactivate)=0
 
virtual void SetInGradientDialog (bool16 inDialog)=0
 
virtual IRenderingObjectGetGradientRenderingObject ()=0
 
virtual IRenderingObjectGetSliderRenderingObject ()=0
 
virtual K2Vector< PMRealGetThumbList ()=0
 
virtual int16 GetTotalThumbNum ()=0
 
virtual int16 GetNumberOfStop ()=0
 
virtual PMReal GetNthThumbPosition (int16 index)=0
 
virtual int16 GetNthThumbType (int16 index)=0
 
virtual IColorDataQueryNthColorMetaData (int16 index)=0
 
virtual PMRect GetSliderRect (IControlView *sliderView)=0
 
virtual void RemoveThumbStop (int16 index)=0
 
virtual int16 GetSelectedThumbIndex ()=0
 
virtual int16 GetDragDropHitThumbIndex ()=0
 
virtual int16 GetHitThumb (IControlView *view, PMPoint hitPoint, int16 tolerance)=0
 
virtual PMReal GetLastEventValue ()=0
 
virtual int16 GetLastUpdateType ()=0
 
virtual bool16 GetLastUpdateBool ()=0
 
virtual PMPoint GetLastHitPoint ()=0
 
virtual void GetMidPointRatio (K2Vector< PMReal > *thumbList)=0
 
virtual PMReal GetNthMidPointRatio (int16 index)=0
 
virtual bool16 IsDragging ()=0
 
virtual void RelocateNthThumb (int16 thumbIndex, PMReal toPosition)=0
 
virtual void UpdateSlider (int16 updateType, int16 hitIndex, PMPoint hitPoint, bool16 bUpdate=kTrue)=0
 
virtual int16 GetPosibleThumbIndex (PMReal thumbPosition)=0
 
virtual PMReal MapThumbIndexToSliderPosition (int16 index, PMRect &frame)=0
 
virtual PMReal MapSliderPositionToThumbPosition (PMReal sliderPosition)=0
 
virtual PMReal MapLocalPointToSliderPosition (const PMPoint &localPoint)=0
 
virtual bool16 IsPanelDeactivate ()=0
 
virtual bool16 IsRemovedColorSave ()=0
 
virtual bool16 IsInDialog ()=0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

This interface manipulates the data and the controls on the gradient slider.

Member Enumeration Documentation

Enumerator
kMidPointThumb 

kMidPointThumb specifies a midpoint stop on the gradient slider.

kStopThumb 

kStopThumb specifies a color stop on the gradient slider.

Enumerator
kNormal 

kNormal specifies a normal update for the gradient stop.

kSelectThumb 

kSelectThumb indicates a gradient slider thumb is being selected.

kInsertThumbStop 

kInsertThumbStop indicates a gradient color stop is being inserted.

kDragThumb 

kDragThumb indicates a gradient slider thumb is being dragged.

kDeactivatePanel 

kDeactivatePanel indicates the gradient slider is being deactivated.

kActivatePanel 

kActivatePanel indicates the gradient slider is being activated.

kIndeterminate 

kIndeterminate indicates the gradient slider is in an indeterminate state.

kNone 

kNone indicates the [None] rendering object is being updated.

Member Function Documentation

virtual void IGradientSliderControlData::DoNotify ()
pure virtual

Broadcast a gradient data change message. The change is kRealChangeStateMessage and the protocol is IID_IGRADIENTSLIDERCONTROLDATA.

virtual int16 IGradientSliderControlData::GetDragDropHitThumbIndex ()
pure virtual

Return the current active thumb index hit by drag and drop action.

virtual int16 IGradientSliderControlData::GetHitThumb (IControlViewview,
PMPoint hitPoint,
int16 tolerance 
)
pure virtual

Return the thumb index hit by the specified point within a given tolerance.

Parameters
viewis the gradient slider control view.
hitPointis the point.
toleranceis the tolerance.
Returns
the thumb index hit.
virtual PMReal IGradientSliderControlData::GetLastEventValue ()
pure virtual

Returns the last event value. This is the slider position of the last mouse event.

virtual PMPoint IGradientSliderControlData::GetLastHitPoint ()
pure virtual

Returns the last update hit point.

virtual bool16 IGradientSliderControlData::GetLastUpdateBool ()
pure virtual

Returns the last update boolean.

virtual int16 IGradientSliderControlData::GetLastUpdateType ()
pure virtual

Returns the last slider update type.

virtual void IGradientSliderControlData::GetMidPointRatio (K2Vector< PMReal > * thumbList)
pure virtual

Returns the list of midpoint ratios.

virtual PMReal IGradientSliderControlData::GetNthMidPointRatio (int16 index)
pure virtual

Get the nth midpoint ratio.

Parameters
indexspecifies the nth midpoint.
Returns
the midpoint ratio.
virtual PMReal IGradientSliderControlData::GetNthThumbPosition (int16 index)
pure virtual

Return the position of the nth slider thumb.

Parameters
indexspecifies the nth thumb.
Returns
the thumb position.
virtual int16 IGradientSliderControlData::GetNthThumbType (int16 index)
pure virtual

Return the thumb type for the nth slider thumb.

Parameters
indexspecifies the nth slider thumb.
Returns
the thumb type.
virtual int16 IGradientSliderControlData::GetNumberOfStop ()
pure virtual

Return the number of slider color stops.

virtual int16 IGradientSliderControlData::GetPosibleThumbIndex (PMReal thumbPosition)
pure virtual

Given a new thumb position, determine where in the thumb list the new position will fit. The return index is the thumb position before the new thumb.

Parameters
thumbPositionis the new thumb position.
Returns
the preceeding thumb index.
virtual int16 IGradientSliderControlData::GetSelectedThumbIndex ()
pure virtual

Return the currently selected thumb index.

virtual PMRect IGradientSliderControlData::GetSliderRect (IControlViewsliderView)
pure virtual

Return the rectangle that is the gradient slider view area. This includes the area below and above the sliders where the color stops and midpoint thumbs are.

Parameters
sliderViewthe gradient slider control view.
Returns
the gradient slider rectangle.
virtual IRenderingObject* IGradientSliderControlData::GetSliderRenderingObject ()
pure virtual

Return the gradient slider gradient rendering object.

virtual K2Vector<PMReal> IGradientSliderControlData::GetThumbList ()
pure virtual

Returns the list of slider thumb positions.

virtual int16 IGradientSliderControlData::GetTotalThumbNum ()
pure virtual

Return total number of slider thumbs. This include midpoints and color stops.

virtual void IGradientSliderControlData::InsertNthMidPointRatio (int16 index,
PMReal ratio 
)
pure virtual

Insert nth midpoint ratio.

Parameters
indexis the nth midpoint.
ratiois the midpoint ratio.
virtual void IGradientSliderControlData::InsertThumb (int16 index,
PMReal thumbPosition 
)
pure virtual

Insert the new thumb location at the specified position.

Parameters
indexis the new thumb stop.
thumbPositionis the new position for the new stop.
virtual bool16 IGradientSliderControlData::IsDragging ()
pure virtual

Return true if a slider thumb is being dragged.

virtual bool16 IGradientSliderControlData::IsInDialog ()
pure virtual

Returns true if the gradient slider is used in the dialog.

virtual bool16 IGradientSliderControlData::IsPanelDeactivate ()
pure virtual

Returns true if panel is being deactivated.

virtual bool16 IGradientSliderControlData::IsRemovedColorSave ()
pure virtual

Returns true if color data of the removed stop index should be saved..

virtual PMReal IGradientSliderControlData::MapLocalPointToSliderPosition (const PMPointlocalPoint)
pure virtual

Return the corresponding slider position relative to the slider frame, given a point in the parent panel's coordiate.

Parameters
localPointis the point in the parent's coordinates.
Returns
the corresponding slider position.
virtual PMReal IGradientSliderControlData::MapSliderPositionToThumbPosition (PMReal sliderPosition)
pure virtual

Return the corresponding thumb position, given a position in the coordinates of slider frame. The thumb position is normalized to values between 0.0 and 1.0.

Parameters
sliderPositionis the position in the slider frame.
Returns
the corresponding normalized thumb position.
virtual PMReal IGradientSliderControlData::MapThumbIndexToSliderPosition (int16 index,
PMRectframe 
)
pure virtual

Return the nth thumb index position relative to the gradient slider frame width.

Parameters
indexspecifies the nth thumb.
frameis the gradient slider frame.
Returns
the thumb position relative to the frame width.
virtual IColorData* IGradientSliderControlData::QueryNthColorMetaData (int16 index)
pure virtual

Return the color data of the nth color stop.

Parameters
indexspecifies the nth color stop.
Returns
the color stop color data.
virtual void IGradientSliderControlData::RelocateNthThumb (int16 thumbIndex,
PMReal toPosition 
)
pure virtual

Relocate the Nth thumb to the new location. The midpoint is automatically re-adjusted.

Parameters
thumbIndexspecifies the nth thumb.
toPositionspecifies the new position.
virtual void IGradientSliderControlData::RemoveThumbStop (int16 index)
pure virtual

Remove the slider thumb at the nth position.

Parameters
indexspecifies the nth slider thumb.
virtual void IGradientSliderControlData::SetDeactivatePanel (bool16 panelDeactivate)
pure virtual

Set a boolean indicating the gradient panel is being deactivated.

Parameters
panelDeactivatetrue if gradient panel is being deactivated.
virtual void IGradientSliderControlData::SetDragDropHitThumbIndex (int16 thumbIndex)
pure virtual

Set the target thumb index for the drag and drop.

Parameters
thumbIndexis the target index.
virtual void IGradientSliderControlData::SetInGradientDialog (bool16 inDialog)
pure virtual

Set a boolean indicating the gradient slider control is a dailog control. inDialog indicates gradient slider is used a dialog control.

virtual void IGradientSliderControlData::SetIsDragging (bool16 isDragging)
pure virtual

Set a boolean indicating that a slider thumb is being dragged.

Parameters
isDraggingis true if a thum is being dragged.
virtual void IGradientSliderControlData::SetLastEventValue (PMReal value)
pure virtual

Set the last event value. This is the slider position of the last mouse event.

Parameters
valueis the last event value.
virtual void IGradientSliderControlData::SetLastHitPoint (PMPoint hitPoint)
pure virtual

Sets the last hit point on the gradient slider.

Parameters
hitPointis the hit point.
virtual void IGradientSliderControlData::SetLastUpdateBool (bool16 update)
pure virtual

Set the last update boolean.

Parameters
updatespecifies the boolean value.
virtual void IGradientSliderControlData::SetLastUpdateType (int16 updateType)
pure virtual

Set the last gradient slider update type.

Parameters
updateTypespecifies the update type. This should be one of IGradientSliderControlData::updateType.
virtual void IGradientSliderControlData::SetNthMidPointRatio (int16 index,
PMReal ratio 
)
pure virtual

Set the nth midpoint thumb stop's ratio.

Parameters
indexis the nth midpoint.
ratiois the midpoint ratio.
virtual void IGradientSliderControlData::SetNthThumbPosition (int16 index,
PMReal thumbPosition 
)
pure virtual

Sets the nth thumb stop at the new position. If nth stop already exists, replace it with the new position.

Parameters
indexis nth thumb stop.
thumbPositionis the new position for the thumb stop.
virtual void IGradientSliderControlData::SetNumberOfStop (int16 stopNum)
pure virtual

Set the number of slider thumbs for the gradient slider.

Parameters
stopNumspecifies the number of slider thumbs.
virtual void IGradientSliderControlData::SetRemovedColorSave (bool16 bColorSave)
pure virtual

Set a boolean indicating the color data should be saved when color stop is removed.

virtual void IGradientSliderControlData::SetSelectedThumbIndex (int16 thumbSelectedIndex,
bool16 updateBlockIndex = kTrue 
)
pure virtual

Set the current selected index to the specified index.

Parameters
thumbSelectedIndexis the new selected thumb index.
updateBlockIndexis true if this is also the color stop index being updated.
virtual void IGradientSliderControlData::UpdateSlider (int16 updateType,
int16 hitIndex,
PMPoint hitPoint,
bool16 bUpdate = kTrue 
)
pure virtual

Update the gradient slider

Parameters
upateTypespecifies the update type. This is one of IGreadientSliderControldata::UpdateType.
hitIndexspecifies the thumb index hit.
hitPointspecifies the hit point.
bUpdateis true if the slider data should be updated.
virtual void IGradientSliderControlData::UpdateSliderData (const IGradientFillnewGradientData)
pure virtual

Update the gradient slider data with the new gradient data.

Parameters
newGradientDatais the new gradient data.