Shinya Kitaoka 810553
#pragma once
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#ifndef COLUMN_COMMAND_INCLUDED
Toshihiro Shimizu 890ddd
#define COLUMN_COMMAND_INCLUDED
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#include <set></set>
shun-iwasawa 4a3868
#include <qlist></qlist>
shun-iwasawa 4a3868
shun-iwasawa 4a3868
#include "toonz/tstageobjectid.h"
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class StageObjectsData;
shun-iwasawa 4a3868
class TFx;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
namespace ColumnCmd {
Toshihiro Shimizu 890ddd
manongjohn c43ee6
void insertEmptyColumns(const std::set<int> &indices, bool insertAfter = false);</int>
Toshihiro Shimizu 890ddd
void insertEmptyColumn(int index);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
void copyColumns(const std::set<int> &indices);</int>
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
void cutColumns(std::set<int> &indices);</int>
Toshihiro Shimizu 890ddd
//! Delete columns from xsheet.
Shinya Kitaoka 120a6e
//! If \b onlyColumns is false all fxs in the branc attached to each node are
Shinya Kitaoka 120a6e
//! deleted
Toshihiro Shimizu 890ddd
void deleteColumns(std::set<int> &indices, bool onlyColumns, bool withoutUndo);</int>
Toshihiro Shimizu 890ddd
//! helper function: deletes a single column, with undo
shun-iwasawa 0d01d8
void deleteColumn(int index, bool onlyColumns = false);
Toshihiro Shimizu 890ddd
//! if data==0 then uses clipboard
Toshihiro Shimizu 890ddd
void pasteColumns(std::set<int> &indices, const StageObjectsData *data = 0);</int>
Shinya Kitaoka 120a6e
//! helper function: copies srcIndex column and pastes it before dstIndex. Does
Shinya Kitaoka 120a6e
//! not affect the clipboard
Toshihiro Shimizu 890ddd
void copyColumn(int dstIndex, int srcIndex);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
void resequence(int index);
Toshihiro Shimizu 890ddd
bool canResequence(int index);
Toshihiro Shimizu 890ddd
void cloneChild(int index);
Toshihiro Shimizu 890ddd
void clearCells(int index);
Toshihiro Shimizu 890ddd
Martin van Zijl 9cb413
//! Adds an undo object for converting layer to vector.
Martin van Zijl 9cb413
void addConvertToVectorUndo(std::set<int> &newColumnIndices);</int>
Martin van Zijl 9cb413
shun-iwasawa 4a3868
// "checkInvert" flag is ON when collapsing columns.
shun-iwasawa 4a3868
// expression references need to be checked in both way,
shun-iwasawa 4a3868
// the columns to be collapsed and other columns to be kept in the parent
shun-iwasawa 4a3868
// xsheet.
shun-iwasawa 4a3868
shun-iwasawa 4a3868
bool checkExpressionReferences(const std::set<int> &indices,</int>
shun-iwasawa 4a3868
                               bool onlyColumns = true,
shun-iwasawa 4a3868
                               bool checkInvert = false);
shun-iwasawa 4a3868
bool checkExpressionReferences(const std::set<int> &indices,</int>
shun-iwasawa 4a3868
                               const std::set<tfx *=""> &fxs,</tfx>
shun-iwasawa 4a3868
                               bool onlyColumns = true,
shun-iwasawa 4a3868
                               bool checkInvert = false);
shun-iwasawa 4a3868
// checkInvert is always true for collapsing in stage schematic
shun-iwasawa 4a3868
bool checkExpressionReferences(const QList<tstageobjectid> &objects);</tstageobjectid>
shun-iwasawa 4a3868
shun-iwasawa 4a3868
}  // namespace ColumnCmd
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#endif