|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#include "toolbar.h"
|
|
Toshihiro Shimizu |
890ddd |
#include "tapp.h"
|
|
Toshihiro Shimizu |
890ddd |
#include "pane.h"
|
|
Toshihiro Shimizu |
890ddd |
#include "floatingpanelcommand.h"
|
|
Toshihiro Shimizu |
890ddd |
#include "tools/toolhandle.h"
|
|
Toshihiro Shimizu |
890ddd |
#include "tools/tool.h"
|
|
Toshihiro Shimizu |
890ddd |
#include "tools/toolcommandids.h"
|
|
Toshihiro Shimizu |
890ddd |
#include "toonzqt/menubarcommand.h"
|
|
Toshihiro Shimizu |
890ddd |
#include "menubarcommandids.h"
|
|
Toshihiro Shimizu |
890ddd |
|
|
manongjohn |
ee34ca |
#include "toonz/txshleveltypes.h"
|
|
manongjohn |
ee34ca |
#include "toonz/txshlevelhandle.h"
|
|
manongjohn |
743752 |
#include "toonz/tframehandle.h"
|
|
manongjohn |
ba5c4c |
#include "toonz/txsheethandle.h"
|
|
manongjohn |
ba5c4c |
#include "toonz/txshcell.h"
|
|
manongjohn |
fba57c |
#include "toonz/txshsimplelevel.h"
|
|
manongjohn |
fba57c |
#include "toonz/tcolumnhandle.h"
|
|
manongjohn |
2cd8cd |
#include "toonz/preferences.h"
|
|
manongjohn |
ab230d |
#include "toonz/tscenehandle.h"
|
|
manongjohn |
ee34ca |
|
|
shun-iwasawa |
8f3ba3 |
// TnzBase includes
|
|
shun-iwasawa |
8f3ba3 |
#include "tenv.h"
|
|
shun-iwasawa |
8f3ba3 |
|
|
Toshihiro Shimizu |
890ddd |
#include <qpainter></qpainter>
|
|
Toshihiro Shimizu |
890ddd |
#include <qaction></qaction>
|
|
Toshihiro Shimizu |
890ddd |
#include <qtoolbutton></qtoolbutton>
|
|
Toshihiro Shimizu |
890ddd |
#include <qvboxlayout></qvboxlayout>
|
|
manongjohn |
ee34ca |
#include <qobject></qobject>
|
|
Toshihiro Shimizu |
890ddd |
|
|
shun-iwasawa |
2ab8aa |
TEnv::IntVar ShowAllToolsToggle("ShowAllToolsToggle", 1);
|
|
shun-iwasawa |
8f3ba3 |
|
|
manongjohn |
ba5c4c |
namespace {
|
|
manongjohn |
ba5c4c |
struct {
|
|
manongjohn |
ba5c4c |
const char *toolName;
|
|
luz paz |
fa906e |
bool collapsible;
|
|
manongjohn |
ba5c4c |
QAction *action;
|
|
manongjohn |
b30686 |
} buttonLayout[] = {{T_Edit, false, 0}, {T_Selection, false, 0},
|
|
manongjohn |
b30686 |
{"Separator_1", false, 0}, {T_Brush, false, 0},
|
|
manongjohn |
b30686 |
{T_Geometric, false, 0}, {T_Type, true, 0},
|
|
manongjohn |
b30686 |
{T_Fill, false, 0}, {T_PaintBrush, false, 0},
|
|
manongjohn |
b30686 |
{"Separator_2", false, 0}, {T_Eraser, false, 0},
|
|
manongjohn |
b30686 |
{T_Tape, false, 0}, {T_Finger, false, 0},
|
|
manongjohn |
b30686 |
{"Separator_3", false, 0}, {T_StylePicker, false, 0},
|
|
manongjohn |
b30686 |
{T_RGBPicker, false, 0}, {T_Ruler, false, 0},
|
|
manongjohn |
b30686 |
{"Separator_4", false, 0}, {T_ControlPointEditor, false, 0},
|
|
manongjohn |
b30686 |
{T_Pinch, true, 0}, {T_Pump, true, 0},
|
|
manongjohn |
b30686 |
{T_Magnet, true, 0}, {T_Bender, true, 0},
|
|
manongjohn |
b30686 |
{T_Iron, true, 0}, {T_Cutter, true, 0},
|
|
shun-iwasawa |
401127 |
{"Separator_5", true, 0}, {T_Skeleton, true, 0},
|
|
manongjohn |
b30686 |
{T_Tracker, true, 0}, {T_Hook, true, 0},
|
|
manongjohn |
b30686 |
{T_Plastic, true, 0}, {"Separator_6", false, 0},
|
|
manongjohn |
b30686 |
{T_Zoom, false, 0}, {T_Rotate, true, 0},
|
|
manongjohn |
b30686 |
{T_Hand, false, 0}, {0, false, 0}};
|
|
shun-iwasawa |
401127 |
} // namespace
|
|
Toshihiro Shimizu |
890ddd |
//=============================================================================
|
|
Toshihiro Shimizu |
890ddd |
// Toolbar
|
|
Toshihiro Shimizu |
890ddd |
//-----------------------------------------------------------------------------
|
|
Toshihiro Shimizu |
890ddd |
|
|
shun-iwasawa |
8f3ba3 |
Toolbar::Toolbar(QWidget *parent, bool isVertical)
|
|
Shinya Kitaoka |
38fd86 |
: QToolBar(parent), m_isExpanded(ShowAllToolsToggle != 0) {
|
|
Shinya Kitaoka |
120a6e |
// Fondamentale per lo style sheet
|
|
Shinya Kitaoka |
120a6e |
setObjectName("toolBar");
|
|
Shinya Kitaoka |
120a6e |
|
|
Shinya Kitaoka |
120a6e |
setMovable(false);
|
|
Shinya Kitaoka |
120a6e |
if (isVertical)
|
|
Shinya Kitaoka |
120a6e |
setOrientation(Qt::Vertical);
|
|
Shinya Kitaoka |
120a6e |
else
|
|
Shinya Kitaoka |
120a6e |
setOrientation(Qt::Horizontal);
|
|
Shinya Kitaoka |
120a6e |
|
|
Kite |
521c84 |
setIconSize(QSize(20, 20));
|
|
Shinya Kitaoka |
120a6e |
setToolButtonStyle(Qt::ToolButtonIconOnly);
|
|
Shinya Kitaoka |
120a6e |
|
|
Shinya Kitaoka |
120a6e |
m_expandButton = new QToolButton(this);
|
|
Kite |
b058c5 |
m_expandButton->setObjectName("expandButton");
|
|
Shinya Kitaoka |
120a6e |
m_expandButton->setCheckable(true);
|
|
shun-iwasawa |
8f3ba3 |
m_expandButton->setChecked(m_isExpanded);
|
|
Shinya Kitaoka |
120a6e |
m_expandButton->setArrowType((isVertical) ? Qt::DownArrow : Qt::RightArrow);
|
|
Shinya Kitaoka |
120a6e |
|
|
manongjohn |
ba5c4c |
m_expandAction = addWidget(m_expandButton);
|
|
manongjohn |
ba5c4c |
|
|
Shinya Kitaoka |
120a6e |
connect(m_expandButton, SIGNAL(toggled(bool)), this,
|
|
shun-iwasawa |
8f3ba3 |
SLOT(setIsExpanded(bool)));
|
|
manongjohn |
ee34ca |
|
|
manongjohn |
ee34ca |
updateToolbar();
|
|
Toshihiro Shimizu |
890ddd |
}
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//-----------------------------------------------------------------------------
|
|
Toshihiro Shimizu |
890ddd |
/*! Layout the tool buttons according to the state of the expandButton
|
|
shun-iwasawa |
401127 |
*/
|
|
manongjohn |
ab230d |
void Toolbar::updateToolbar() {
|
|
manongjohn |
ab230d |
TApp *app = TApp::instance();
|
|
manongjohn |
ab230d |
TFrameHandle *frameHandle = app->getCurrentFrame();
|
|
manongjohn |
ab230d |
|
|
manongjohn |
ab230d |
if (frameHandle->isPlaying()) return;
|
|
manongjohn |
592b09 |
|
|
manongjohn |
ee34ca |
TXshLevelHandle *currlevel = app->getCurrentLevel();
|
|
manongjohn |
ee34ca |
TXshLevel *level = currlevel ? currlevel->getLevel() : 0;
|
|
manongjohn |
ee34ca |
int levelType = level ? level->getType() : NO_XSHLEVEL;
|
|
manongjohn |
2cd8cd |
|
|
manongjohn |
ab230d |
TColumnHandle *colHandle = app->getCurrentColumn();
|
|
manongjohn |
ab230d |
int colIndex = colHandle->getColumnIndex();
|
|
manongjohn |
ab230d |
|
|
manongjohn |
ab230d |
int rowIndex = frameHandle->getFrameIndex();
|
|
manongjohn |
ab230d |
|
|
manongjohn |
ab230d |
if (Preferences::instance()->isAutoCreateEnabled() &&
|
|
manongjohn |
ab230d |
Preferences::instance()->isAnimationSheetEnabled()) {
|
|
manongjohn |
ab230d |
// If in an empty cell, find most recent level
|
|
manongjohn |
ab230d |
if (levelType == NO_XSHLEVEL) {
|
|
manongjohn |
ab230d |
TXsheetHandle *xshHandle = app->getCurrentXsheet();
|
|
manongjohn |
ab230d |
TXsheet *xsh = xshHandle->getXsheet();
|
|
manongjohn |
ab230d |
|
|
manongjohn |
ab230d |
if (colIndex >= 0 && !xsh->isColumnEmpty(colIndex)) {
|
|
manongjohn |
ab230d |
int r0, r1;
|
|
manongjohn |
ab230d |
xsh->getCellRange(colIndex, r0, r1);
|
|
manongjohn |
ab230d |
if (0 <= r0 && r0 <= r1) {
|
|
manongjohn |
ab230d |
// level type depends on previous occupied cell
|
|
otakuto |
158f9f |
for (int r = std::min(r1, rowIndex); r >= r0; r--) {
|
|
manongjohn |
ab230d |
TXshCell cell = xsh->getCell(r, colIndex);
|
|
manongjohn |
ab230d |
if (cell.isEmpty()) continue;
|
|
manongjohn |
ab230d |
levelType = cell.m_level->getType();
|
|
manongjohn |
ab230d |
rowIndex = r;
|
|
manongjohn |
ab230d |
break;
|
|
manongjohn |
ab230d |
}
|
|
manongjohn |
ab230d |
|
|
manongjohn |
ab230d |
if (levelType == NO_XSHLEVEL) {
|
|
manongjohn |
ab230d |
TXshCell cell = xsh->getCell(r0, colIndex);
|
|
manongjohn |
ab230d |
levelType = cell.m_level->getType();
|
|
manongjohn |
ab230d |
rowIndex = r0;
|
|
manongjohn |
ab230d |
}
|
|
manongjohn |
f3163f |
}
|
|
manongjohn |
ba5c4c |
}
|
|
manongjohn |
ba5c4c |
}
|
|
manongjohn |
fba57c |
}
|
|
manongjohn |
ee34ca |
|
|
manongjohn |
e2da56 |
m_toolbarLevel = levelType;
|
|
manongjohn |
e2da56 |
|
|
manongjohn |
b30686 |
TTool::ToolTargetType targetType = TTool::NoTarget;
|
|
manongjohn |
b30686 |
|
|
manongjohn |
b30686 |
switch (m_toolbarLevel) {
|
|
manongjohn |
b30686 |
case OVL_XSHLEVEL:
|
|
manongjohn |
b30686 |
targetType = TTool::RasterImage;
|
|
manongjohn |
b30686 |
break;
|
|
manongjohn |
b30686 |
case TZP_XSHLEVEL:
|
|
manongjohn |
b30686 |
targetType = TTool::ToonzImage;
|
|
manongjohn |
b30686 |
break;
|
|
manongjohn |
b30686 |
case PLI_XSHLEVEL:
|
|
manongjohn |
b30686 |
default:
|
|
manongjohn |
b30686 |
targetType = TTool::VectorImage;
|
|
manongjohn |
b30686 |
break;
|
|
manongjohn |
b30686 |
case MESH_XSHLEVEL:
|
|
manongjohn |
b30686 |
targetType = TTool::MeshImage;
|
|
manongjohn |
b30686 |
break;
|
|
manongjohn |
b30686 |
}
|
|
manongjohn |
b30686 |
|
|
manongjohn |
743752 |
// Hide action for now
|
|
manongjohn |
743752 |
for (int idx = 0; buttonLayout[idx].toolName; idx++) {
|
|
manongjohn |
743752 |
if (buttonLayout[idx].action) removeAction(buttonLayout[idx].action);
|
|
manongjohn |
743752 |
}
|
|
manongjohn |
743752 |
|
|
manongjohn |
743752 |
removeAction(m_expandAction);
|
|
manongjohn |
743752 |
|
|
manongjohn |
d75497 |
int levelBasedDisplay = Preferences::instance()->getLevelBasedToolsDisplay();
|
|
manongjohn |
ba5c4c |
|
|
manongjohn |
b30686 |
bool actionEnabled = false;
|
|
manongjohn |
b30686 |
ToolHandle *toolHandle = TApp::instance()->getCurrentTool();
|
|
manongjohn |
b30686 |
|
|
manongjohn |
165380 |
for (int idx = 0; buttonLayout[idx].toolName; idx++) {
|
|
manongjohn |
b30686 |
TTool *tool = TTool::getTool(buttonLayout[idx].toolName, targetType);
|
|
manongjohn |
b30686 |
if (tool) tool->updateEnabled(rowIndex, colIndex);
|
|
manongjohn |
b30686 |
bool isSeparator = !strncmp(buttonLayout[idx].toolName, "Separator", 9);
|
|
manongjohn |
d36a81 |
bool enable =
|
|
manongjohn |
d75497 |
!levelBasedDisplay ? true : (!tool ? actionEnabled : tool->isEnabled());
|
|
manongjohn |
b30686 |
|
|
manongjohn |
a02775 |
// Plastic tool should always be available so you can create a mesh
|
|
manongjohn |
a02775 |
if (!enable && !strncmp(buttonLayout[idx].toolName, T_Plastic, 9) &&
|
|
manongjohn |
a02775 |
(m_toolbarLevel & LEVELCOLUMN_XSHLEVEL))
|
|
manongjohn |
a02775 |
enable = true;
|
|
manongjohn |
a02775 |
|
|
luz paz |
fa906e |
if (!m_isExpanded && buttonLayout[idx].collapsible) continue;
|
|
shun-iwasawa |
401127 |
|
|
manongjohn |
ba5c4c |
if (!buttonLayout[idx].action) {
|
|
manongjohn |
b30686 |
if (isSeparator)
|
|
manongjohn |
ba5c4c |
buttonLayout[idx].action = addSeparator();
|
|
manongjohn |
ba5c4c |
else
|
|
manongjohn |
ba5c4c |
buttonLayout[idx].action =
|
|
manongjohn |
ba5c4c |
CommandManager::instance()->getAction(buttonLayout[idx].toolName);
|
|
manongjohn |
ba5c4c |
}
|
|
manongjohn |
ba5c4c |
|
|
manongjohn |
d75497 |
if (levelBasedDisplay != 2)
|
|
manongjohn |
d75497 |
buttonLayout[idx].action->setEnabled(enable);
|
|
manongjohn |
d75497 |
else if (!enable)
|
|
manongjohn |
d75497 |
continue;
|
|
manongjohn |
ba5c4c |
|
|
manongjohn |
ba5c4c |
actionEnabled = addAction(buttonLayout[idx].action) || actionEnabled;
|
|
manongjohn |
ba5c4c |
|
|
manongjohn |
b30686 |
if (isSeparator) actionEnabled = false;
|
|
manongjohn |
ee34ca |
}
|
|
manongjohn |
ee34ca |
|
|
manongjohn |
ba5c4c |
addAction(m_expandAction);
|
|
manongjohn |
ee34ca |
|
|
manongjohn |
ee34ca |
if (m_isExpanded) {
|
|
Shinya Kitaoka |
120a6e |
m_expandButton->setArrowType(
|
|
Shinya Kitaoka |
120a6e |
(orientation() == Qt::Vertical) ? Qt::UpArrow : Qt::LeftArrow);
|
|
manongjohn |
ba5c4c |
m_expandButton->setToolTip(tr("Collapse toolbar"));
|
|
Shinya Kitaoka |
120a6e |
} else {
|
|
Shinya Kitaoka |
120a6e |
m_expandButton->setArrowType(
|
|
Shinya Kitaoka |
120a6e |
(orientation() == Qt::Vertical) ? Qt::DownArrow : Qt::RightArrow);
|
|
manongjohn |
ba5c4c |
m_expandButton->setToolTip(tr("Expand toolbar"));
|
|
Shinya Kitaoka |
120a6e |
}
|
|
manongjohn |
ee34ca |
|
|
Shinya Kitaoka |
120a6e |
update();
|
|
Toshihiro Shimizu |
890ddd |
}
|
|
Toshihiro Shimizu |
890ddd |
|
|
shun-iwasawa |
8f3ba3 |
//----------------------------------------------------------------------------
|
|
shun-iwasawa |
8f3ba3 |
|
|
shun-iwasawa |
8f3ba3 |
void Toolbar::setIsExpanded(bool expand) {
|
|
Shinya Kitaoka |
38fd86 |
m_isExpanded = expand;
|
|
shun-iwasawa |
8f3ba3 |
ShowAllToolsToggle = (expand) ? 1 : 0;
|
|
manongjohn |
ab230d |
updateToolbar();
|
|
shun-iwasawa |
8f3ba3 |
}
|
|
shun-iwasawa |
8f3ba3 |
|
|
Toshihiro Shimizu |
890ddd |
//-----------------------------------------------------------------------------
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
Toolbar::~Toolbar() {}
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//-----------------------------------------------------------------------------
|
|
Toshihiro Shimizu |
890ddd |
|
|
manongjohn |
ba5c4c |
bool Toolbar::addAction(QAction *act) {
|
|
Shinya Kitaoka |
120a6e |
if (!act) return false;
|
|
manongjohn |
ba5c4c |
QToolBar::addAction(act);
|
|
manongjohn |
ba5c4c |
return true;
|
|
Toshihiro Shimizu |
890ddd |
}
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//-----------------------------------------------------------------------------
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void Toolbar::showEvent(QShowEvent *e) {
|
|
manongjohn |
ba5c4c |
TColumnHandle *columnHandle = TApp::instance()->getCurrentColumn();
|
|
manongjohn |
ba5c4c |
connect(columnHandle, SIGNAL(columnIndexSwitched()), this,
|
|
manongjohn |
ee34ca |
SLOT(updateToolbar()));
|
|
manongjohn |
ee34ca |
|
|
manongjohn |
743752 |
TFrameHandle *frameHandle = TApp::instance()->getCurrentFrame();
|
|
manongjohn |
ab230d |
connect(frameHandle, SIGNAL(frameSwitched()), this, SLOT(updateToolbar()));
|
|
manongjohn |
ab230d |
connect(frameHandle, SIGNAL(frameTypeChanged()), this, SLOT(updateToolbar()));
|
|
manongjohn |
743752 |
|
|
manongjohn |
c6f8d3 |
TXsheetHandle *xsheetHandle = TApp::instance()->getCurrentXsheet();
|
|
manongjohn |
ab230d |
connect(xsheetHandle, SIGNAL(xsheetChanged()), this, SLOT(updateToolbar()));
|
|
manongjohn |
c6f8d3 |
|
|
Shinya Kitaoka |
120a6e |
connect(TApp::instance()->getCurrentTool(), SIGNAL(toolSwitched()),
|
|
Shinya Kitaoka |
120a6e |
SLOT(onToolChanged()));
|
|
manongjohn |
592b09 |
|
|
manongjohn |
592b09 |
TXshLevelHandle *levelHandle = TApp::instance()->getCurrentLevel();
|
|
manongjohn |
592b09 |
connect(levelHandle, SIGNAL(xshLevelSwitched(TXshLevel *)), this,
|
|
manongjohn |
592b09 |
SLOT(updateToolbar()));
|
|
Toshihiro Shimizu |
890ddd |
|
|
manongjohn |
ab230d |
connect(TApp::instance()->getCurrentScene(),
|
|
manongjohn |
ab230d |
SIGNAL(preferenceChanged(const QString &)), this,
|
|
manongjohn |
ab230d |
SLOT(onPreferenceChanged(const QString &)));
|
|
manongjohn |
ab230d |
}
|
|
manongjohn |
c6f8d3 |
|
|
Toshihiro Shimizu |
890ddd |
//-----------------------------------------------------------------------------
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void Toolbar::hideEvent(QHideEvent *e) {
|
|
manongjohn |
ee34ca |
disconnect(TApp::instance()->getCurrentLevel(), 0, this, 0);
|
|
Shinya Kitaoka |
120a6e |
disconnect(TApp::instance()->getCurrentTool(), SIGNAL(toolSwitched()), this,
|
|
Shinya Kitaoka |
120a6e |
SLOT(onToolChanged()));
|
|
manongjohn |
ab230d |
|
|
manongjohn |
ab230d |
disconnect(TApp::instance()->getCurrentColumn(),
|
|
manongjohn |
ab230d |
SIGNAL(columnIndexSwitched()), this, SLOT(updateToolbar()));
|
|
manongjohn |
ab230d |
|
|
manongjohn |
ab230d |
disconnect(TApp::instance()->getCurrentFrame(), SIGNAL(frameSwitched()), this,
|
|
manongjohn |
ab230d |
SLOT(updateToolbar()));
|
|
manongjohn |
ab230d |
disconnect(TApp::instance()->getCurrentFrame(), SIGNAL(frameTypeChanged()),
|
|
manongjohn |
ab230d |
this, SLOT(updateToolbar()));
|
|
manongjohn |
ab230d |
|
|
manongjohn |
ab230d |
disconnect(TApp::instance()->getCurrentXsheet(), SIGNAL(xsheetChanged()),
|
|
manongjohn |
ab230d |
this, SLOT(updateToolbar()));
|
|
manongjohn |
ab230d |
|
|
manongjohn |
ab230d |
disconnect(TApp::instance()->getCurrentScene(),
|
|
manongjohn |
ab230d |
SIGNAL(preferenceChanged(const QString &)), this,
|
|
manongjohn |
ab230d |
SLOT(onPreferenceChanged(const QString &)));
|
|
Toshihiro Shimizu |
890ddd |
}
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//-----------------------------------------------------------------------------
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void Toolbar::onToolChanged() {
|
|
Shinya Kitaoka |
120a6e |
ToolHandle *toolHandle = TApp::instance()->getCurrentTool();
|
|
Shinya Kitaoka |
120a6e |
TTool *tool = toolHandle->getTool();
|
|
Shinya Kitaoka |
120a6e |
std::string toolName = tool->getName();
|
|
Shinya Kitaoka |
120a6e |
QAction *act = CommandManager::instance()->getAction(toolName.c_str());
|
|
Shinya Kitaoka |
120a6e |
if (!act || act->isChecked()) return;
|
|
Shinya Kitaoka |
120a6e |
act->setChecked(true);
|
|
Toshihiro Shimizu |
890ddd |
}
|
|
Toshihiro Shimizu |
890ddd |
|
|
manongjohn |
ab230d |
//-----------------------------------------------------------------------------
|
|
manongjohn |
ab230d |
|
|
manongjohn |
ab230d |
void Toolbar::onPreferenceChanged(const QString &prefName) {
|
|
manongjohn |
ab230d |
if (prefName == "ToolbarDisplay" || prefName.isEmpty()) updateToolbar();
|
|
manongjohn |
ab230d |
}
|
|
manongjohn |
ab230d |
|
|
Toshihiro Shimizu |
890ddd |
//=============================================================================
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
OpenFloatingPanel openToolbarPane(MI_OpenToolbar, "ToolBar", "");
|