Vital
Loading...
Searching...
No Matches
DraggableFrame Class Reference

A visual frame representing a single wavetable keyframe, which can be dragged by the user. More...

#include <wavetable_organizer.h>

Inheritance diagram for DraggableFrame:

Public Member Functions

 DraggableFrame (bool full_frame=false)
 Constructs a DraggableFrame.
 
bool isInside (int x, int y)
 Checks if a point is inside the frame's clickable area.
 
bool fullFrame () const
 Determines if the frame represents a full row or a small diamond.
 
force_inline void select (bool selected)
 Sets the frame's selection state.
 
force_inline bool selected () const
 Checks if the frame is currently selected.
 

Protected Attributes

bool selected_
 
bool full_frame_
 

Detailed Description

A visual frame representing a single wavetable keyframe, which can be dragged by the user.

The DraggableFrame is used to indicate a wavetable keyframe's position and allow mouse interaction, such as clicking, dragging, and selection. It can represent a full-frame keyframe or a smaller frame depending on the wavetable component type.

Constructor & Destructor Documentation

◆ DraggableFrame()

DraggableFrame::DraggableFrame ( bool full_frame = false)
inline

Constructs a DraggableFrame.

Parameters
full_frameSet to true if this frame covers the entire row, false if it's a small diamond.

Member Function Documentation

◆ fullFrame()

bool DraggableFrame::fullFrame ( ) const
inline

Determines if the frame represents a full row or a small diamond.

Returns
True if the frame is full-row sized, otherwise false.

◆ isInside()

bool DraggableFrame::isInside ( int x,
int y )

Checks if a point is inside the frame's clickable area.

Parameters
xThe x-coordinate relative to the frame's bounds.
yThe y-coordinate relative to the frame's bounds.
Returns
True if the point is considered inside the frame's area, false otherwise.

◆ select()

force_inline void DraggableFrame::select ( bool selected)
inline

Sets the frame's selection state.

Parameters
selectedTrue if the frame should be marked as selected.

◆ selected()

force_inline bool DraggableFrame::selected ( ) const
inline

Checks if the frame is currently selected.

Returns
True if the frame is selected, otherwise false.

Member Data Documentation

◆ full_frame_

bool DraggableFrame::full_frame_
protected

◆ selected_

bool DraggableFrame::selected_
protected

The documentation for this class was generated from the following files: