mirror of
https://github.com/aseprite/aseprite.git
synced 2024-09-03 05:29:13 +00:00
Move Bind, Connection, Signal, Slot, etc. to base namespace
This commit is contained in:
parent
06be4f7fa6
commit
e944ce0052
@ -76,8 +76,8 @@ namespace app {
|
||||
InputChain& inputChain();
|
||||
|
||||
// App Signals
|
||||
Signal0<void> Exit;
|
||||
Signal0<void> PaletteChange;
|
||||
base::Signal0<void> Exit;
|
||||
base::Signal0<void> PaletteChange;
|
||||
|
||||
private:
|
||||
typedef std::vector<std::string> FileList;
|
||||
|
@ -49,7 +49,7 @@ AppMenus* AppMenus::instance()
|
||||
static AppMenus* instance = NULL;
|
||||
if (!instance) {
|
||||
instance = new AppMenus;
|
||||
App::instance()->Exit.connect(Bind<void>(&destroy_instance, instance));
|
||||
App::instance()->Exit.connect(base::Bind<void>(&destroy_instance, instance));
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
@ -59,7 +59,7 @@ AppMenus::AppMenus()
|
||||
{
|
||||
m_recentFilesConn =
|
||||
App::instance()->getRecentFiles()->Changed.connect(
|
||||
Bind(&AppMenus::rebuildRecentList, this));
|
||||
base::Bind(&AppMenus::rebuildRecentList, this));
|
||||
}
|
||||
|
||||
void AppMenus::reload()
|
||||
|
@ -69,7 +69,7 @@ namespace app {
|
||||
base::UniquePtr<Menu> m_frameTagPopupMenu;
|
||||
base::UniquePtr<Menu> m_palettePopupMenu;
|
||||
base::UniquePtr<Menu> m_inkPopupMenu;
|
||||
ScopedConnection m_recentFilesConn;
|
||||
base::ScopedConnection m_recentFilesConn;
|
||||
};
|
||||
|
||||
} // namespace app
|
||||
|
@ -142,7 +142,7 @@ void CheckUpdateThreadLauncher::launch()
|
||||
m_delegate->onCheckingUpdates();
|
||||
|
||||
m_bgJob.reset(new CheckUpdateBackgroundJob);
|
||||
m_thread.reset(new base::thread(Bind<void>(&CheckUpdateThreadLauncher::checkForUpdates, this)));
|
||||
m_thread.reset(new base::thread(base::Bind<void>(&CheckUpdateThreadLauncher::checkForUpdates, this)));
|
||||
|
||||
// Start a timer to monitoring the progress of the background job
|
||||
// executed in "m_thread". The "onMonitoringTick" method will be
|
||||
|
@ -87,7 +87,7 @@ void AboutCommand::onExecute(Context* context)
|
||||
close_button->border().right() + 16*guiscale(),
|
||||
close_button->border().bottom()));
|
||||
|
||||
close_button->Click.connect(Bind<void>(&Window::closeWindow, window.get(), close_button));
|
||||
close_button->Click.connect(base::Bind<void>(&Window::closeWindow, window.get(), close_button));
|
||||
|
||||
window->openWindowInForeground();
|
||||
}
|
||||
|
@ -62,13 +62,13 @@ public:
|
||||
setTop(0);
|
||||
setBottom(0);
|
||||
|
||||
width() ->Change.connect(Bind<void>(&CanvasSizeWindow::onSizeChange, this));
|
||||
height()->Change.connect(Bind<void>(&CanvasSizeWindow::onSizeChange, this));
|
||||
dir() ->ItemChange.connect(Bind<void>(&CanvasSizeWindow::onDirChange, this));;
|
||||
left() ->Change.connect(Bind<void>(&CanvasSizeWindow::onBorderChange, this));
|
||||
right() ->Change.connect(Bind<void>(&CanvasSizeWindow::onBorderChange, this));
|
||||
top() ->Change.connect(Bind<void>(&CanvasSizeWindow::onBorderChange, this));
|
||||
bottom()->Change.connect(Bind<void>(&CanvasSizeWindow::onBorderChange, this));
|
||||
width() ->Change.connect(base::Bind<void>(&CanvasSizeWindow::onSizeChange, this));
|
||||
height()->Change.connect(base::Bind<void>(&CanvasSizeWindow::onSizeChange, this));
|
||||
dir() ->ItemChange.connect(base::Bind<void>(&CanvasSizeWindow::onDirChange, this));;
|
||||
left() ->Change.connect(base::Bind<void>(&CanvasSizeWindow::onBorderChange, this));
|
||||
right() ->Change.connect(base::Bind<void>(&CanvasSizeWindow::onBorderChange, this));
|
||||
top() ->Change.connect(base::Bind<void>(&CanvasSizeWindow::onBorderChange, this));
|
||||
bottom()->Change.connect(base::Bind<void>(&CanvasSizeWindow::onBorderChange, this));
|
||||
|
||||
m_editor->setState(m_selectBoxState);
|
||||
|
||||
|
@ -50,8 +50,8 @@ public:
|
||||
, m_document(nullptr)
|
||||
, m_cel(nullptr)
|
||||
, m_selfUpdate(false) {
|
||||
opacity()->Change.connect(Bind<void>(&CelPropertiesWindow::onStartTimer, this));
|
||||
m_timer.Tick.connect(Bind<void>(&CelPropertiesWindow::onCommitChange, this));
|
||||
opacity()->Change.connect(base::Bind<void>(&CelPropertiesWindow::onStartTimer, this));
|
||||
m_timer.Tick.connect(base::Bind<void>(&CelPropertiesWindow::onCommitChange, this));
|
||||
|
||||
remapWindow();
|
||||
centerWindow();
|
||||
|
@ -378,23 +378,23 @@ public:
|
||||
m_dataFilename == kSpecifiedFilename)
|
||||
m_dataFilename = base + ".json";
|
||||
|
||||
exportButton()->Click.connect(Bind<void>(&ExportSpriteSheetWindow::onExport, this));
|
||||
exportButton()->Click.connect(base::Bind<void>(&ExportSpriteSheetWindow::onExport, this));
|
||||
sheetType()->Change.connect(&ExportSpriteSheetWindow::onSheetTypeChange, this);
|
||||
columns()->Change.connect(Bind<void>(&ExportSpriteSheetWindow::onColumnsChange, this));
|
||||
rows()->Change.connect(Bind<void>(&ExportSpriteSheetWindow::onRowsChange, this));
|
||||
fitWidth()->Change.connect(Bind<void>(&ExportSpriteSheetWindow::onSizeChange, this));
|
||||
fitHeight()->Change.connect(Bind<void>(&ExportSpriteSheetWindow::onSizeChange, this));
|
||||
bestFit()->Click.connect(Bind<void>(&ExportSpriteSheetWindow::onBestFit, this));
|
||||
borderPadding()->Change.connect(Bind<void>(&ExportSpriteSheetWindow::onPaddingChange, this));
|
||||
shapePadding()->Change.connect(Bind<void>(&ExportSpriteSheetWindow::onPaddingChange, this));
|
||||
innerPadding()->Change.connect(Bind<void>(&ExportSpriteSheetWindow::onPaddingChange, this));
|
||||
imageEnabled()->Click.connect(Bind<void>(&ExportSpriteSheetWindow::onImageEnabledChange, this));
|
||||
imageFilename()->Click.connect(Bind<void>(&ExportSpriteSheetWindow::onImageFilename, this));
|
||||
dataEnabled()->Click.connect(Bind<void>(&ExportSpriteSheetWindow::onDataEnabledChange, this));
|
||||
dataFilename()->Click.connect(Bind<void>(&ExportSpriteSheetWindow::onDataFilename, this));
|
||||
paddingEnabled()->Click.connect(Bind<void>(&ExportSpriteSheetWindow::onPaddingEnabledChange, this));
|
||||
frames()->Change.connect(Bind<void>(&ExportSpriteSheetWindow::onFramesChange, this));
|
||||
openGenerated()->Click.connect(Bind<void>(&ExportSpriteSheetWindow::onOpenGeneratedChange, this));
|
||||
columns()->Change.connect(base::Bind<void>(&ExportSpriteSheetWindow::onColumnsChange, this));
|
||||
rows()->Change.connect(base::Bind<void>(&ExportSpriteSheetWindow::onRowsChange, this));
|
||||
fitWidth()->Change.connect(base::Bind<void>(&ExportSpriteSheetWindow::onSizeChange, this));
|
||||
fitHeight()->Change.connect(base::Bind<void>(&ExportSpriteSheetWindow::onSizeChange, this));
|
||||
bestFit()->Click.connect(base::Bind<void>(&ExportSpriteSheetWindow::onBestFit, this));
|
||||
borderPadding()->Change.connect(base::Bind<void>(&ExportSpriteSheetWindow::onPaddingChange, this));
|
||||
shapePadding()->Change.connect(base::Bind<void>(&ExportSpriteSheetWindow::onPaddingChange, this));
|
||||
innerPadding()->Change.connect(base::Bind<void>(&ExportSpriteSheetWindow::onPaddingChange, this));
|
||||
imageEnabled()->Click.connect(base::Bind<void>(&ExportSpriteSheetWindow::onImageEnabledChange, this));
|
||||
imageFilename()->Click.connect(base::Bind<void>(&ExportSpriteSheetWindow::onImageFilename, this));
|
||||
dataEnabled()->Click.connect(base::Bind<void>(&ExportSpriteSheetWindow::onDataEnabledChange, this));
|
||||
dataFilename()->Click.connect(base::Bind<void>(&ExportSpriteSheetWindow::onDataFilename, this));
|
||||
paddingEnabled()->Click.connect(base::Bind<void>(&ExportSpriteSheetWindow::onPaddingEnabledChange, this));
|
||||
frames()->Change.connect(base::Bind<void>(&ExportSpriteSheetWindow::onFramesChange, this));
|
||||
openGenerated()->Click.connect(base::Bind<void>(&ExportSpriteSheetWindow::onOpenGeneratedChange, this));
|
||||
|
||||
onSheetTypeChange();
|
||||
onFileNamesChange();
|
||||
|
@ -67,12 +67,12 @@ public:
|
||||
sheetType()->addItem("By Columns");
|
||||
sheetType()->setSelectedItemIndex((int)app::SpriteSheetType::Rows-1);
|
||||
|
||||
sheetType()->Change.connect(Bind<void>(&ImportSpriteSheetWindow::onSheetTypeChange, this));
|
||||
x()->Change.connect(Bind<void>(&ImportSpriteSheetWindow::onEntriesChange, this));
|
||||
y()->Change.connect(Bind<void>(&ImportSpriteSheetWindow::onEntriesChange, this));
|
||||
width()->Change.connect(Bind<void>(&ImportSpriteSheetWindow::onEntriesChange, this));
|
||||
height()->Change.connect(Bind<void>(&ImportSpriteSheetWindow::onEntriesChange, this));
|
||||
selectFile()->Click.connect(Bind<void>(&ImportSpriteSheetWindow::onSelectFile, this));
|
||||
sheetType()->Change.connect(base::Bind<void>(&ImportSpriteSheetWindow::onSheetTypeChange, this));
|
||||
x()->Change.connect(base::Bind<void>(&ImportSpriteSheetWindow::onEntriesChange, this));
|
||||
y()->Change.connect(base::Bind<void>(&ImportSpriteSheetWindow::onEntriesChange, this));
|
||||
width()->Change.connect(base::Bind<void>(&ImportSpriteSheetWindow::onEntriesChange, this));
|
||||
height()->Change.connect(base::Bind<void>(&ImportSpriteSheetWindow::onEntriesChange, this));
|
||||
selectFile()->Click.connect(base::Bind<void>(&ImportSpriteSheetWindow::onSelectFile, this));
|
||||
|
||||
remapWindow();
|
||||
centerWindow();
|
||||
|
@ -217,12 +217,12 @@ private:
|
||||
m_hotAccel = i;
|
||||
|
||||
m_changeButton.reset(new Button(""));
|
||||
m_changeButton->Click.connect(Bind<void>(&KeyItem::onChangeAccel, this, i));
|
||||
m_changeButton->Click.connect(base::Bind<void>(&KeyItem::onChangeAccel, this, i));
|
||||
setup_mini_look(m_changeButton.get());
|
||||
addChild(m_changeButton.get());
|
||||
|
||||
m_deleteButton.reset(new Button(""));
|
||||
m_deleteButton->Click.connect(Bind<void>(&KeyItem::onDeleteAccel, this, i));
|
||||
m_deleteButton->Click.connect(base::Bind<void>(&KeyItem::onDeleteAccel, this, i));
|
||||
setup_mini_look(m_deleteButton.get());
|
||||
addChild(m_deleteButton.get());
|
||||
|
||||
@ -247,7 +247,7 @@ private:
|
||||
if (i == 0 && !m_addButton &&
|
||||
(!m_menuitem || m_menuitem->getCommand())) {
|
||||
m_addButton.reset(new Button(""));
|
||||
m_addButton->Click.connect(Bind<void>(&KeyItem::onAddAccel, this));
|
||||
m_addButton->Click.connect(base::Bind<void>(&KeyItem::onAddAccel, this));
|
||||
setup_mini_look(m_addButton.get());
|
||||
addChild(m_addButton.get());
|
||||
|
||||
@ -295,11 +295,11 @@ public:
|
||||
section()->addChild(new ListItem("Tools"));
|
||||
section()->addChild(new ListItem("Action Modifiers"));
|
||||
|
||||
search()->Change.connect(Bind<void>(&KeyboardShortcutsWindow::onSearchChange, this));
|
||||
section()->Change.connect(Bind<void>(&KeyboardShortcutsWindow::onSectionChange, this));
|
||||
importButton()->Click.connect(Bind<void>(&KeyboardShortcutsWindow::onImport, this));
|
||||
exportButton()->Click.connect(Bind<void>(&KeyboardShortcutsWindow::onExport, this));
|
||||
resetButton()->Click.connect(Bind<void>(&KeyboardShortcutsWindow::onReset, this));
|
||||
search()->Change.connect(base::Bind<void>(&KeyboardShortcutsWindow::onSearchChange, this));
|
||||
section()->Change.connect(base::Bind<void>(&KeyboardShortcutsWindow::onSectionChange, this));
|
||||
importButton()->Click.connect(base::Bind<void>(&KeyboardShortcutsWindow::onImport, this));
|
||||
exportButton()->Click.connect(base::Bind<void>(&KeyboardShortcutsWindow::onExport, this));
|
||||
resetButton()->Click.connect(base::Bind<void>(&KeyboardShortcutsWindow::onReset, this));
|
||||
|
||||
fillAllLists();
|
||||
}
|
||||
|
@ -75,10 +75,10 @@ public:
|
||||
mode()->addItem("Color");
|
||||
mode()->addItem("Luminosity");
|
||||
|
||||
name()->Change.connect(Bind<void>(&LayerPropertiesWindow::onStartTimer, this));
|
||||
mode()->Change.connect(Bind<void>(&LayerPropertiesWindow::onStartTimer, this));
|
||||
opacity()->Change.connect(Bind<void>(&LayerPropertiesWindow::onStartTimer, this));
|
||||
m_timer.Tick.connect(Bind<void>(&LayerPropertiesWindow::onCommitChange, this));
|
||||
name()->Change.connect(base::Bind<void>(&LayerPropertiesWindow::onStartTimer, this));
|
||||
mode()->Change.connect(base::Bind<void>(&LayerPropertiesWindow::onStartTimer, this));
|
||||
opacity()->Change.connect(base::Bind<void>(&LayerPropertiesWindow::onStartTimer, this));
|
||||
m_timer.Tick.connect(base::Bind<void>(&LayerPropertiesWindow::onCommitChange, this));
|
||||
|
||||
remapWindow();
|
||||
centerWindow();
|
||||
|
@ -114,12 +114,13 @@ void MaskByColorCommand::onExecute(Context* context)
|
||||
if (get_config_bool("MaskColor", "Preview", true))
|
||||
m_checkPreview->setSelected(true);
|
||||
|
||||
button_ok->Click.connect(Bind<void>(&Window::closeWindow, m_window, button_ok));
|
||||
button_cancel->Click.connect(Bind<void>(&Window::closeWindow, m_window, button_cancel));
|
||||
button_ok->Click.connect(base::Bind<void>(&Window::closeWindow, m_window, button_ok));
|
||||
button_cancel->Click.connect(base::Bind<void>(&Window::closeWindow, m_window, button_cancel));
|
||||
|
||||
m_buttonColor->Change.connect(Bind<void>(&MaskByColorCommand::maskPreview, this, Ref(reader)));
|
||||
m_sliderTolerance->Change.connect(Bind<void>(&MaskByColorCommand::maskPreview, this, Ref(reader)));
|
||||
m_checkPreview->Click.connect(Bind<void>(&MaskByColorCommand::maskPreview, this, Ref(reader)));
|
||||
|
||||
m_buttonColor->Change.connect(base::Bind<void>(&MaskByColorCommand::maskPreview, this, base::Ref(reader)));
|
||||
m_sliderTolerance->Change.connect(base::Bind<void>(&MaskByColorCommand::maskPreview, this, base::Ref(reader)));
|
||||
m_checkPreview->Click.connect(base::Bind<void>(&MaskByColorCommand::maskPreview, this, base::Ref(reader)));
|
||||
|
||||
button_ok->setFocusMagnet(true);
|
||||
m_buttonColor->setExpansive(true);
|
||||
|
@ -50,7 +50,7 @@ public:
|
||||
, m_cursorColor(new ColorButton(m_preferences.editor.cursorColor(), IMAGE_RGB))
|
||||
, m_curSection(curSection)
|
||||
{
|
||||
sectionListbox()->Change.connect(Bind<void>(&OptionsWindow::onChangeSection, this));
|
||||
sectionListbox()->Change.connect(base::Bind<void>(&OptionsWindow::onChangeSection, this));
|
||||
cursorColorBox()->addChild(m_cursorColor);
|
||||
|
||||
// Grid color
|
||||
@ -104,7 +104,7 @@ public:
|
||||
if (context->activeDocument()) {
|
||||
gridScope()->addItem("Current Document");
|
||||
gridScope()->setSelectedItemIndex(1);
|
||||
gridScope()->Change.connect(Bind<void>(&OptionsWindow::onChangeGridScope, this));
|
||||
gridScope()->Change.connect(base::Bind<void>(&OptionsWindow::onChangeGridScope, this));
|
||||
}
|
||||
|
||||
// Screen/UI Scale
|
||||
@ -145,12 +145,12 @@ public:
|
||||
checkedBgColor2Box()->addChild(m_checked_bg_color2);
|
||||
|
||||
// Reset button
|
||||
reset()->Click.connect(Bind<void>(&OptionsWindow::onReset, this));
|
||||
reset()->Click.connect(base::Bind<void>(&OptionsWindow::onReset, this));
|
||||
|
||||
// Links
|
||||
locateFile()->Click.connect(Bind<void>(&OptionsWindow::onLocateConfigFile, this));
|
||||
locateFile()->Click.connect(base::Bind<void>(&OptionsWindow::onLocateConfigFile, this));
|
||||
#if _WIN32
|
||||
locateCrashFolder()->Click.connect(Bind<void>(&OptionsWindow::onLocateCrashFolder, this));
|
||||
locateCrashFolder()->Click.connect(base::Bind<void>(&OptionsWindow::onLocateCrashFolder, this));
|
||||
#else
|
||||
locateCrashFolder()->setVisible(false);
|
||||
#endif
|
||||
@ -161,8 +161,8 @@ public:
|
||||
undoAllowNonlinearHistory()->setSelected(m_preferences.undo.allowNonlinearHistory());
|
||||
|
||||
// Theme buttons
|
||||
selectTheme()->Click.connect(Bind<void>(&OptionsWindow::onSelectTheme, this));
|
||||
openThemeFolder()->Click.connect(Bind<void>(&OptionsWindow::onOpenThemeFolder, this));
|
||||
selectTheme()->Click.connect(base::Bind<void>(&OptionsWindow::onSelectTheme, this));
|
||||
openThemeFolder()->Click.connect(base::Bind<void>(&OptionsWindow::onOpenThemeFolder, this));
|
||||
|
||||
onChangeGridScope();
|
||||
sectionListbox()->selectIndex(m_curSection);
|
||||
|
@ -118,7 +118,7 @@ private:
|
||||
// PaletteEntryEditor instance.
|
||||
bool m_selfPalChange;
|
||||
|
||||
ScopedConnection m_palChangeConn;
|
||||
base::ScopedConnection m_palChangeConn;
|
||||
|
||||
// Palette used for relative changes.
|
||||
Palette m_fromPalette;
|
||||
@ -278,8 +278,8 @@ PaletteEntryEditor::PaletteEntryEditor()
|
||||
m_vbox.addChild(&m_bottomBox);
|
||||
addChild(&m_vbox);
|
||||
|
||||
m_colorType.ItemChange.connect(Bind<void>(&PaletteEntryEditor::onColorTypeClick, this));
|
||||
m_changeMode.ItemChange.connect(Bind<void>(&PaletteEntryEditor::onChangeModeClick, this));
|
||||
m_colorType.ItemChange.connect(base::Bind<void>(&PaletteEntryEditor::onColorTypeClick, this));
|
||||
m_changeMode.ItemChange.connect(base::Bind<void>(&PaletteEntryEditor::onChangeModeClick, this));
|
||||
|
||||
m_rgbSliders.ColorChange.connect(&PaletteEntryEditor::onColorSlidersChange, this);
|
||||
m_hsvSliders.ColorChange.connect(&PaletteEntryEditor::onColorSlidersChange, this);
|
||||
@ -295,7 +295,7 @@ PaletteEntryEditor::PaletteEntryEditor()
|
||||
&PaletteEntryEditor::onFgBgColorChange, this);
|
||||
|
||||
// We hook the Window::Close event to save the frame position before closing it.
|
||||
this->Close.connect(Bind<void>(&PaletteEntryEditor::onCloseWindow, this));
|
||||
this->Close.connect(base::Bind<void>(&PaletteEntryEditor::onCloseWindow, this));
|
||||
|
||||
// We hook App::Exit signal to destroy the g_window singleton at exit.
|
||||
App::instance()->Exit.connect(&PaletteEntryEditor::onExit, this);
|
||||
|
@ -67,8 +67,8 @@ public:
|
||||
updateFontFaceButton();
|
||||
|
||||
fontSize()->setTextf("%d", size);
|
||||
fontFace()->Click.connect(Bind<void>(&PasteTextWindow::onSelectFontFile, this));
|
||||
fontFace()->DropDownClick.connect(Bind<void>(&PasteTextWindow::onSelectSystemFont, this));
|
||||
fontFace()->Click.connect(base::Bind<void>(&PasteTextWindow::onSelectFontFile, this));
|
||||
fontFace()->DropDownClick.connect(base::Bind<void>(&PasteTextWindow::onSelectSystemFont, this));
|
||||
fontColor()->setColor(color);
|
||||
this->antialias()->setSelected(antialias);
|
||||
}
|
||||
@ -114,7 +114,7 @@ private:
|
||||
try {
|
||||
m_fontPopup.reset(new FontPopup());
|
||||
m_fontPopup->Load.connect(&PasteTextWindow::setFontFace, this);
|
||||
m_fontPopup->Close.connect(Bind<void>(&PasteTextWindow::onCloseFontPopup, this));
|
||||
m_fontPopup->Close.connect(base::Bind<void>(&PasteTextWindow::onCloseFontPopup, this));
|
||||
}
|
||||
catch (const std::exception& ex) {
|
||||
Console::showException(ex);
|
||||
|
@ -159,11 +159,11 @@ protected:
|
||||
class SpriteSizeWindow : public app::gen::SpriteSize {
|
||||
public:
|
||||
SpriteSizeWindow(Context* ctx, int new_width, int new_height) : m_ctx(ctx) {
|
||||
lockRatio()->Click.connect(Bind<void>(&SpriteSizeWindow::onLockRatioClick, this));
|
||||
widthPx()->Change.connect(Bind<void>(&SpriteSizeWindow::onWidthPxChange, this));
|
||||
heightPx()->Change.connect(Bind<void>(&SpriteSizeWindow::onHeightPxChange, this));
|
||||
widthPerc()->Change.connect(Bind<void>(&SpriteSizeWindow::onWidthPercChange, this));
|
||||
heightPerc()->Change.connect(Bind<void>(&SpriteSizeWindow::onHeightPercChange, this));
|
||||
lockRatio()->Click.connect(base::Bind<void>(&SpriteSizeWindow::onLockRatioClick, this));
|
||||
widthPx()->Change.connect(base::Bind<void>(&SpriteSizeWindow::onWidthPxChange, this));
|
||||
heightPx()->Change.connect(base::Bind<void>(&SpriteSizeWindow::onHeightPxChange, this));
|
||||
widthPerc()->Change.connect(base::Bind<void>(&SpriteSizeWindow::onWidthPercChange, this));
|
||||
heightPerc()->Change.connect(base::Bind<void>(&SpriteSizeWindow::onHeightPercChange, this));
|
||||
|
||||
widthPx()->setTextf("%d", new_width);
|
||||
heightPx()->setTextf("%d", new_height);
|
||||
|
@ -61,7 +61,7 @@ public:
|
||||
getContainer()->addChild(m_controlsWidget);
|
||||
|
||||
m_reloadButton->Click.connect(&ConvolutionMatrixWindow::onReloadStock, this);
|
||||
m_stockListBox->Change.connect(Bind<void>(&ConvolutionMatrixWindow::onMatrixChange, this));
|
||||
m_stockListBox->Change.connect(base::Bind<void>(&ConvolutionMatrixWindow::onMatrixChange, this));
|
||||
|
||||
fillStockListBox();
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ namespace app {
|
||||
|
||||
ColorCurve* getCurve() const { return m_curve; }
|
||||
|
||||
Signal0<void> CurveEditorChange;
|
||||
base::Signal0<void> CurveEditorChange;
|
||||
|
||||
protected:
|
||||
bool onProcessMessage(ui::Message* msg) override;
|
||||
|
@ -31,7 +31,7 @@ namespace app {
|
||||
Target getTarget() const { return m_target; }
|
||||
void setTarget(Target target);
|
||||
|
||||
Signal0<void> TargetChange;
|
||||
base::Signal0<void> TargetChange;
|
||||
|
||||
protected:
|
||||
void onItemChange(Item* item) override;
|
||||
|
@ -61,7 +61,7 @@ FilterWindow::FilterWindow(const char* title, const char* cfgSection,
|
||||
|
||||
if (m_tiledCheck) {
|
||||
m_tiledCheck->setSelected(tiledMode != TiledMode::NONE);
|
||||
m_tiledCheck->Click.connect(Bind<void>(&FilterWindow::onTiledChange, this));
|
||||
m_tiledCheck->Click.connect(base::Bind<void>(&FilterWindow::onTiledChange, this));
|
||||
|
||||
m_vbox.addChild(m_tiledCheck);
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ Console::Console(Context* ctx)
|
||||
return;
|
||||
|
||||
// The "button" closes the console
|
||||
button->Click.connect(Bind<void>(&Window::closeWindow, window, button));
|
||||
button->Click.connect(base::Bind<void>(&Window::closeWindow, window, button));
|
||||
|
||||
view->attachToView(textbox);
|
||||
|
||||
|
@ -67,8 +67,8 @@ namespace app {
|
||||
void executeCommand(const char* commandName);
|
||||
virtual void executeCommand(Command* command, const Params& params = Params());
|
||||
|
||||
Signal1<void, CommandExecutionEvent&> BeforeCommandExecution;
|
||||
Signal1<void, CommandExecutionEvent&> AfterCommandExecution;
|
||||
base::Signal1<void, CommandExecutionEvent&> BeforeCommandExecution;
|
||||
base::Signal1<void, CommandExecutionEvent&> AfterCommandExecution;
|
||||
|
||||
protected:
|
||||
virtual void onCreateDocument(doc::CreateDocumentArgs* args) override;
|
||||
|
@ -28,7 +28,7 @@ BackupObserver::BackupObserver(Session* session, doc::Context* ctx)
|
||||
: m_session(session)
|
||||
, m_ctx(ctx)
|
||||
, m_done(false)
|
||||
, m_thread(Bind<void>(&BackupObserver::backgroundThread, this))
|
||||
, m_thread(base::Bind<void>(&BackupObserver::backgroundThread, this))
|
||||
{
|
||||
m_ctx->addObserver(this);
|
||||
m_ctx->documents().addObserver(this);
|
||||
|
@ -19,8 +19,8 @@ namespace app {
|
||||
Section(const std::string& name) : m_name(name) { }
|
||||
const char* name() const { return m_name.c_str(); }
|
||||
|
||||
Signal0<void> BeforeChange;
|
||||
Signal0<void> AfterChange;
|
||||
base::Signal0<void> BeforeChange;
|
||||
base::Signal0<void> AfterChange;
|
||||
|
||||
private:
|
||||
std::string m_name;
|
||||
@ -88,8 +88,8 @@ namespace app {
|
||||
m_section->AfterChange();
|
||||
}
|
||||
|
||||
Signal1<void, const T&> BeforeChange;
|
||||
Signal1<void, const T&> AfterChange;
|
||||
base::Signal1<void, const T&> BeforeChange;
|
||||
base::Signal1<void, const T&> AfterChange;
|
||||
|
||||
private:
|
||||
Section* m_section;
|
||||
|
@ -36,7 +36,7 @@ namespace app {
|
||||
void addRecentFile(const char* filename);
|
||||
void removeRecentFile(const char* filename);
|
||||
|
||||
Signal0<void> Changed;
|
||||
base::Signal0<void> Changed;
|
||||
|
||||
private:
|
||||
std::string normalizePath(std::string fn);
|
||||
|
@ -29,7 +29,7 @@ HttpLoader::HttpLoader(const std::string& url)
|
||||
: m_url(url)
|
||||
, m_done(false)
|
||||
, m_cancel(false)
|
||||
, m_thread(Bind<void>(&HttpLoader::threadHttpRequest, this))
|
||||
, m_thread(base::Bind<void>(&HttpLoader::threadHttpRequest, this))
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,7 @@ ResourcesLoader::ResourcesLoader(ResourcesLoaderDelegate* delegate)
|
||||
: m_delegate(delegate)
|
||||
, m_done(false)
|
||||
, m_cancel(false)
|
||||
, m_thread(Bind<void>(&ResourcesLoader::threadLoadResources, this))
|
||||
, m_thread(base::Bind<void>(&ResourcesLoader::threadLoadResources, this))
|
||||
{
|
||||
LOG("ResourcesLoader::ResourcesLoader()\n");
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ void SendCrash::notificationClick()
|
||||
|
||||
app::gen::SendCrash dlg;
|
||||
dlg.filename()->setText(m_dumpFilename);
|
||||
dlg.filename()->Click.connect(Bind(&SendCrash::onClickFilename, this));
|
||||
dlg.filename()->Click.connect(base::Bind(&SendCrash::onClickFilename, this));
|
||||
|
||||
dlg.openWindowInForeground();
|
||||
if (dlg.closer() == dlg.deleteFile()) {
|
||||
|
@ -38,7 +38,7 @@ public:
|
||||
, m_fileitem(fileitem)
|
||||
, m_thumbnail(NULL)
|
||||
, m_palette(NULL)
|
||||
, m_thread(Bind<void>(&Worker::loadBgThread, this)) {
|
||||
, m_thread(base::Bind<void>(&Worker::loadBgThread, this)) {
|
||||
}
|
||||
|
||||
~Worker() {
|
||||
@ -133,7 +133,7 @@ ThumbnailGenerator* ThumbnailGenerator::instance()
|
||||
static ThumbnailGenerator* singleton = NULL;
|
||||
if (singleton == NULL) {
|
||||
singleton = new ThumbnailGenerator();
|
||||
App::instance()->Exit.connect(Bind<void>(&delete_singleton, singleton));
|
||||
App::instance()->Exit.connect(base::Bind<void>(&delete_singleton, singleton));
|
||||
}
|
||||
return singleton;
|
||||
}
|
||||
@ -210,7 +210,7 @@ void ThumbnailGenerator::addWorkerToGenerateThumbnail(IFileItem* fileitem)
|
||||
|
||||
void ThumbnailGenerator::stopAllWorkers()
|
||||
{
|
||||
base::thread* ptr = new base::thread(Bind<void>(&ThumbnailGenerator::stopAllWorkersBackground, this));
|
||||
base::thread* ptr = new base::thread(base::Bind<void>(&ThumbnailGenerator::stopAllWorkersBackground, this));
|
||||
m_stopThread.reset(ptr);
|
||||
}
|
||||
|
||||
|
@ -72,7 +72,7 @@ AniControls::AniControls()
|
||||
addItem(theme->parts.aniPlay());
|
||||
addItem(theme->parts.aniNext());
|
||||
addItem(theme->parts.aniLast());
|
||||
ItemChange.connect(Bind(&AniControls::onClickButton, this));
|
||||
ItemChange.connect(base::Bind(&AniControls::onClickButton, this));
|
||||
|
||||
setTriggerOnMouseUp(true);
|
||||
setTransparent(true);
|
||||
|
@ -88,7 +88,7 @@ namespace app {
|
||||
int m_animation;
|
||||
int m_animationTime;
|
||||
int m_animationLifespan;
|
||||
ScopedConnection m_scopedConn;
|
||||
base::ScopedConnection m_scopedConn;
|
||||
};
|
||||
|
||||
} // namespace app
|
||||
|
@ -180,7 +180,7 @@ void BrushPopup::regenerate(const gfx::Rect& box, const Brushes& brushes)
|
||||
while (((slot-1) % columns) > 0)
|
||||
m_buttons->addItem(new Item(this, m_delegate, BrushRef(nullptr), slot++));
|
||||
|
||||
m_buttons->ItemChange.connect(Bind<void>(&BrushPopup::onButtonChange, this));
|
||||
m_buttons->ItemChange.connect(base::Bind<void>(&BrushPopup::onButtonChange, this));
|
||||
m_buttons->setTransparent(true);
|
||||
m_buttons->setBgColor(gfx::ColorNone);
|
||||
addChild(m_buttons.get());
|
||||
|
@ -47,7 +47,7 @@ namespace app {
|
||||
m_tooltipManager = tooltipManager;
|
||||
}
|
||||
|
||||
Signal1<void, const doc::BrushRef&> BrushChange;
|
||||
base::Signal1<void, const doc::BrushRef&> BrushChange;
|
||||
|
||||
static she::Surface* createSurfaceForBrush(const doc::BrushRef& brush);
|
||||
|
||||
|
@ -49,8 +49,8 @@ namespace app {
|
||||
void setTriggerOnMouseUp(bool state);
|
||||
void setMultipleSelection(bool state);
|
||||
|
||||
Signal1<void, Item*> ItemChange;
|
||||
Signal1<void, Item*> RightClick;
|
||||
base::Signal1<void, Item*> ItemChange;
|
||||
base::Signal1<void, Item*> RightClick;
|
||||
|
||||
protected:
|
||||
virtual void onItemChange(Item* item);
|
||||
|
@ -202,11 +202,11 @@ ColorBar::ColorBar(int align)
|
||||
m_fgColor.setExpansive(true);
|
||||
m_bgColor.setExpansive(true);
|
||||
|
||||
m_remapButton.Click.connect(Bind<void>(&ColorBar::onRemapButtonClick, this));
|
||||
m_remapButton.Click.connect(base::Bind<void>(&ColorBar::onRemapButtonClick, this));
|
||||
m_fgColor.Change.connect(&ColorBar::onFgColorButtonChange, this);
|
||||
m_bgColor.Change.connect(&ColorBar::onBgColorButtonChange, this);
|
||||
m_fgWarningIcon->Click.connect(Bind<void>(&ColorBar::onFixWarningClick, this, &m_fgColor, m_fgWarningIcon));
|
||||
m_bgWarningIcon->Click.connect(Bind<void>(&ColorBar::onFixWarningClick, this, &m_bgColor, m_bgWarningIcon));
|
||||
m_fgWarningIcon->Click.connect(base::Bind<void>(&ColorBar::onFixWarningClick, this, &m_fgColor, m_fgWarningIcon));
|
||||
m_bgWarningIcon->Click.connect(base::Bind<void>(&ColorBar::onFixWarningClick, this, &m_bgColor, m_bgWarningIcon));
|
||||
|
||||
m_tooltips.addTooltipFor(&m_fgColor, "Foreground color", LEFT);
|
||||
m_tooltips.addTooltipFor(&m_bgColor, "Background color", LEFT);
|
||||
@ -227,7 +227,7 @@ ColorBar::ColorBar(int align)
|
||||
m_paletteView.setBgColor(theme->colors.tabActiveFace());
|
||||
|
||||
// Change labels foreground color
|
||||
m_buttons.ItemChange.connect(Bind<void>(&ColorBar::onPaletteButtonClick, this));
|
||||
m_buttons.ItemChange.connect(base::Bind<void>(&ColorBar::onPaletteButtonClick, this));
|
||||
|
||||
m_buttons.addItem(theme->parts.palEdit());
|
||||
m_buttons.addItem(theme->parts.palSort());
|
||||
@ -248,8 +248,8 @@ ColorBar::ColorBar(int align)
|
||||
UIContext::instance()->addObserver(this);
|
||||
m_beforeCmdConn = UIContext::instance()->BeforeCommandExecution.connect(&ColorBar::onBeforeExecuteCommand, this);
|
||||
m_afterCmdConn = UIContext::instance()->AfterCommandExecution.connect(&ColorBar::onAfterExecuteCommand, this);
|
||||
m_fgConn = Preferences::instance().colorBar.fgColor.AfterChange.connect(Bind<void>(&ColorBar::onFgColorChangeFromPreferences, this));
|
||||
m_bgConn = Preferences::instance().colorBar.bgColor.AfterChange.connect(Bind<void>(&ColorBar::onBgColorChangeFromPreferences, this));
|
||||
m_fgConn = Preferences::instance().colorBar.fgColor.AfterChange.connect(base::Bind<void>(&ColorBar::onFgColorChangeFromPreferences, this));
|
||||
m_bgConn = Preferences::instance().colorBar.bgColor.AfterChange.connect(base::Bind<void>(&ColorBar::onBgColorChangeFromPreferences, this));
|
||||
m_paletteView.FocusEnter.connect(&ColorBar::onFocusPaletteView, this);
|
||||
m_appPalChangeConn = App::instance()->PaletteChange.connect(&ColorBar::onAppPaletteChange, this);
|
||||
}
|
||||
@ -445,18 +445,18 @@ void ColorBar::onPaletteButtonClick()
|
||||
if (m_ascending) asc.setSelected(true);
|
||||
else des.setSelected(true);
|
||||
|
||||
rev.Click.connect(Bind<void>(&ColorBar::onReverseColors, this));
|
||||
grd.Click.connect(Bind<void>(&ColorBar::onGradient, this));
|
||||
hue.Click.connect(Bind<void>(&ColorBar::onSortBy, this, SortPaletteBy::HUE));
|
||||
sat.Click.connect(Bind<void>(&ColorBar::onSortBy, this, SortPaletteBy::SATURATION));
|
||||
bri.Click.connect(Bind<void>(&ColorBar::onSortBy, this, SortPaletteBy::VALUE));
|
||||
lum.Click.connect(Bind<void>(&ColorBar::onSortBy, this, SortPaletteBy::LUMA));
|
||||
red.Click.connect(Bind<void>(&ColorBar::onSortBy, this, SortPaletteBy::RED));
|
||||
grn.Click.connect(Bind<void>(&ColorBar::onSortBy, this, SortPaletteBy::GREEN));
|
||||
blu.Click.connect(Bind<void>(&ColorBar::onSortBy, this, SortPaletteBy::BLUE));
|
||||
alp.Click.connect(Bind<void>(&ColorBar::onSortBy, this, SortPaletteBy::ALPHA));
|
||||
asc.Click.connect(Bind<void>(&ColorBar::setAscending, this, true));
|
||||
des.Click.connect(Bind<void>(&ColorBar::setAscending, this, false));
|
||||
rev.Click.connect(base::Bind<void>(&ColorBar::onReverseColors, this));
|
||||
grd.Click.connect(base::Bind<void>(&ColorBar::onGradient, this));
|
||||
hue.Click.connect(base::Bind<void>(&ColorBar::onSortBy, this, SortPaletteBy::HUE));
|
||||
sat.Click.connect(base::Bind<void>(&ColorBar::onSortBy, this, SortPaletteBy::SATURATION));
|
||||
bri.Click.connect(base::Bind<void>(&ColorBar::onSortBy, this, SortPaletteBy::VALUE));
|
||||
lum.Click.connect(base::Bind<void>(&ColorBar::onSortBy, this, SortPaletteBy::LUMA));
|
||||
red.Click.connect(base::Bind<void>(&ColorBar::onSortBy, this, SortPaletteBy::RED));
|
||||
grn.Click.connect(base::Bind<void>(&ColorBar::onSortBy, this, SortPaletteBy::GREEN));
|
||||
blu.Click.connect(base::Bind<void>(&ColorBar::onSortBy, this, SortPaletteBy::BLUE));
|
||||
alp.Click.connect(base::Bind<void>(&ColorBar::onSortBy, this, SortPaletteBy::ALPHA));
|
||||
asc.Click.connect(base::Bind<void>(&ColorBar::setAscending, this, true));
|
||||
des.Click.connect(base::Bind<void>(&ColorBar::setAscending, this, false));
|
||||
|
||||
menu.showPopup(gfx::Point(bounds.x, bounds.y+bounds.h));
|
||||
break;
|
||||
|
@ -84,7 +84,7 @@ namespace app {
|
||||
bool onClear(Context* ctx) override;
|
||||
void onCancel(Context* ctx) override;
|
||||
|
||||
Signal0<void> ChangeSelection;
|
||||
base::Signal0<void> ChangeSelection;
|
||||
|
||||
protected:
|
||||
void onAppPaletteChange();
|
||||
@ -152,11 +152,11 @@ namespace app {
|
||||
base::UniquePtr<doc::Palette> m_oldPalette;
|
||||
const doc::Document* m_lastDocument;
|
||||
bool m_ascending;
|
||||
ScopedConnection m_beforeCmdConn;
|
||||
ScopedConnection m_afterCmdConn;
|
||||
ScopedConnection m_fgConn;
|
||||
ScopedConnection m_bgConn;
|
||||
ScopedConnection m_appPalChangeConn;
|
||||
base::ScopedConnection m_beforeCmdConn;
|
||||
base::ScopedConnection m_afterCmdConn;
|
||||
base::ScopedConnection m_fgConn;
|
||||
base::ScopedConnection m_bgConn;
|
||||
base::ScopedConnection m_appPalChangeConn;
|
||||
};
|
||||
|
||||
} // namespace app
|
||||
|
@ -31,7 +31,7 @@ namespace app {
|
||||
void setColor(const app::Color& color);
|
||||
|
||||
// Signals
|
||||
Signal1<void, const app::Color&> Change;
|
||||
base::Signal1<void, const app::Color&> Change;
|
||||
|
||||
protected:
|
||||
// Events
|
||||
|
@ -89,7 +89,7 @@ ColorSelector::ColorSelector()
|
||||
m_vbox.addChild(&m_maskLabel);
|
||||
addChild(&m_vbox);
|
||||
|
||||
m_colorType.ItemChange.connect(Bind<void>(&ColorSelector::onColorTypeClick, this));
|
||||
m_colorType.ItemChange.connect(base::Bind<void>(&ColorSelector::onColorTypeClick, this));
|
||||
|
||||
m_rgbSliders.ColorChange.connect(&ColorSelector::onColorSlidersChange, this);
|
||||
m_hsvSliders.ColorChange.connect(&ColorSelector::onColorSlidersChange, this);
|
||||
|
@ -39,7 +39,7 @@ namespace app {
|
||||
app::Color getColor() const;
|
||||
|
||||
// Signals
|
||||
Signal1<void, const app::Color&> ColorChange;
|
||||
base::Signal1<void, const app::Color&> ColorChange;
|
||||
|
||||
protected:
|
||||
void onColorSlidersChange(ColorSlidersChangeEvent& ev);
|
||||
@ -66,7 +66,7 @@ namespace app {
|
||||
HsvSliders m_hsvSliders;
|
||||
GraySlider m_graySlider;
|
||||
ui::Label m_maskLabel;
|
||||
ScopedConnection m_onPaletteChangeConn;
|
||||
base::ScopedConnection m_onPaletteChangeConn;
|
||||
|
||||
// This variable is used to avoid updating the m_hexColorEntry text
|
||||
// when the color change is generated from a
|
||||
|
@ -146,9 +146,9 @@ void ColorSliders::addSlider(Channel channel, const char* labelText, int min, in
|
||||
absSlider->setDoubleBuffered(true);
|
||||
get_skin_property(entry)->setLook(MiniLook);
|
||||
|
||||
absSlider->Change.connect(Bind<void>(&ColorSliders::onSliderChange, this, m_absSlider.size()-1));
|
||||
relSlider->Change.connect(Bind<void>(&ColorSliders::onSliderChange, this, m_relSlider.size()-1));
|
||||
entry->Change.connect(Bind<void>(&ColorSliders::onEntryChange, this, m_entry.size()-1));
|
||||
absSlider->Change.connect(base::Bind<void>(&ColorSliders::onSliderChange, this, m_absSlider.size()-1));
|
||||
relSlider->Change.connect(base::Bind<void>(&ColorSliders::onSliderChange, this, m_relSlider.size()-1));
|
||||
entry->Change.connect(base::Bind<void>(&ColorSliders::onEntryChange, this, m_entry.size()-1));
|
||||
|
||||
HBox* box = new HBox();
|
||||
box->addChild(absSlider);
|
||||
|
@ -43,7 +43,7 @@ namespace app {
|
||||
void resetRelativeSliders();
|
||||
|
||||
// Signals
|
||||
Signal1<void, ColorSlidersChangeEvent&> ColorChange;
|
||||
base::Signal1<void, ColorSlidersChangeEvent&> ColorChange;
|
||||
|
||||
protected:
|
||||
void onSizeHint(ui::SizeHintEvent& ev);
|
||||
|
@ -25,7 +25,7 @@ namespace app {
|
||||
void selectColor(const app::Color& color);
|
||||
|
||||
// Signals
|
||||
Signal2<void, const app::Color&, ui::MouseButtons> ColorChange;
|
||||
base::Signal2<void, const app::Color&, ui::MouseButtons> ColorChange;
|
||||
|
||||
protected:
|
||||
void onSizeHint(ui::SizeHintEvent& ev) override;
|
||||
|
@ -61,7 +61,7 @@ ColorWheel::ColorWheel()
|
||||
|
||||
setBorder(gfx::Border(3*ui::guiscale()));
|
||||
|
||||
m_options.Click.connect(Bind<void>(&ColorWheel::onOptions, this));
|
||||
m_options.Click.connect(base::Bind<void>(&ColorWheel::onOptions, this));
|
||||
m_options.setBgColor(theme->colors.editorFace());
|
||||
m_options.setIconInterface(
|
||||
new ButtonIconImpl(theme->parts.palOptions(),
|
||||
@ -344,15 +344,15 @@ void ColorWheel::onOptions()
|
||||
case Harmony::SQUARE: square.setSelected(true); break;
|
||||
}
|
||||
|
||||
discrete.Click.connect(Bind<void>(&ColorWheel::setDiscrete, this, !isDiscrete()));
|
||||
none.Click.connect(Bind<void>(&ColorWheel::setHarmony, this, Harmony::NONE));
|
||||
complementary.Click.connect(Bind<void>(&ColorWheel::setHarmony, this, Harmony::COMPLEMENTARY));
|
||||
monochromatic.Click.connect(Bind<void>(&ColorWheel::setHarmony, this, Harmony::MONOCHROMATIC));
|
||||
analogous.Click.connect(Bind<void>(&ColorWheel::setHarmony, this, Harmony::ANALOGOUS));
|
||||
split.Click.connect(Bind<void>(&ColorWheel::setHarmony, this, Harmony::SPLIT));
|
||||
triadic.Click.connect(Bind<void>(&ColorWheel::setHarmony, this, Harmony::TRIADIC));
|
||||
tetradic.Click.connect(Bind<void>(&ColorWheel::setHarmony, this, Harmony::TETRADIC));
|
||||
square.Click.connect(Bind<void>(&ColorWheel::setHarmony, this, Harmony::SQUARE));
|
||||
discrete.Click.connect(base::Bind<void>(&ColorWheel::setDiscrete, this, !isDiscrete()));
|
||||
none.Click.connect(base::Bind<void>(&ColorWheel::setHarmony, this, Harmony::NONE));
|
||||
complementary.Click.connect(base::Bind<void>(&ColorWheel::setHarmony, this, Harmony::COMPLEMENTARY));
|
||||
monochromatic.Click.connect(base::Bind<void>(&ColorWheel::setHarmony, this, Harmony::MONOCHROMATIC));
|
||||
analogous.Click.connect(base::Bind<void>(&ColorWheel::setHarmony, this, Harmony::ANALOGOUS));
|
||||
split.Click.connect(base::Bind<void>(&ColorWheel::setHarmony, this, Harmony::SPLIT));
|
||||
triadic.Click.connect(base::Bind<void>(&ColorWheel::setHarmony, this, Harmony::TRIADIC));
|
||||
tetradic.Click.connect(base::Bind<void>(&ColorWheel::setHarmony, this, Harmony::TETRADIC));
|
||||
square.Click.connect(base::Bind<void>(&ColorWheel::setHarmony, this, Harmony::SQUARE));
|
||||
|
||||
gfx::Rect rc = m_options.bounds();
|
||||
menu.showPopup(gfx::Point(rc.x+rc.w, rc.y));
|
||||
|
@ -43,7 +43,7 @@ namespace app {
|
||||
void setHarmony(Harmony harmony);
|
||||
|
||||
// Signals
|
||||
Signal2<void, const app::Color&, ui::MouseButtons> ColorChange;
|
||||
base::Signal2<void, const app::Color&, ui::MouseButtons> ColorChange;
|
||||
|
||||
private:
|
||||
void onSizeHint(ui::SizeHintEvent& ev) override;
|
||||
|
@ -47,15 +47,15 @@ ConfigureTimelinePopup::ConfigureTimelinePopup()
|
||||
m_box = new app::gen::TimelineConf();
|
||||
addChild(m_box);
|
||||
|
||||
m_box->merge()->Click.connect(Bind<void>(&ConfigureTimelinePopup::onChangeType, this));
|
||||
m_box->tint()->Click.connect(Bind<void>(&ConfigureTimelinePopup::onChangeType, this));
|
||||
m_box->opacity()->Change.connect(Bind<void>(&ConfigureTimelinePopup::onOpacity, this));
|
||||
m_box->opacityStep()->Change.connect(Bind<void>(&ConfigureTimelinePopup::onOpacityStep, this));
|
||||
m_box->resetOnionskin()->Click.connect(Bind<void>(&ConfigureTimelinePopup::onResetOnionskin, this));
|
||||
m_box->loopTag()->Click.connect(Bind<void>(&ConfigureTimelinePopup::onLoopTagChange, this));
|
||||
m_box->currentLayer()->Click.connect(Bind<void>(&ConfigureTimelinePopup::onCurrentLayerChange, this));
|
||||
m_box->behind()->Click.connect(Bind<void>(&ConfigureTimelinePopup::onPositionChange, this));
|
||||
m_box->infront()->Click.connect(Bind<void>(&ConfigureTimelinePopup::onPositionChange, this));
|
||||
m_box->merge()->Click.connect(base::Bind<void>(&ConfigureTimelinePopup::onChangeType, this));
|
||||
m_box->tint()->Click.connect(base::Bind<void>(&ConfigureTimelinePopup::onChangeType, this));
|
||||
m_box->opacity()->Change.connect(base::Bind<void>(&ConfigureTimelinePopup::onOpacity, this));
|
||||
m_box->opacityStep()->Change.connect(base::Bind<void>(&ConfigureTimelinePopup::onOpacityStep, this));
|
||||
m_box->resetOnionskin()->Click.connect(base::Bind<void>(&ConfigureTimelinePopup::onResetOnionskin, this));
|
||||
m_box->loopTag()->Click.connect(base::Bind<void>(&ConfigureTimelinePopup::onLoopTagChange, this));
|
||||
m_box->currentLayer()->Click.connect(base::Bind<void>(&ConfigureTimelinePopup::onCurrentLayerChange, this));
|
||||
m_box->behind()->Click.connect(base::Bind<void>(&ConfigureTimelinePopup::onPositionChange, this));
|
||||
m_box->infront()->Click.connect(base::Bind<void>(&ConfigureTimelinePopup::onPositionChange, this));
|
||||
}
|
||||
|
||||
app::Document* ConfigureTimelinePopup::doc()
|
||||
|
@ -393,7 +393,7 @@ class ContextBar::InkShadesField : public HBox {
|
||||
public:
|
||||
enum ClickType { DragAndDrop, Select };
|
||||
|
||||
Signal0<void> Click;
|
||||
base::Signal0<void> Click;
|
||||
|
||||
ShadeWidget(const Shade& colors, ClickType click)
|
||||
: Widget(kGenericWidget)
|
||||
@ -490,7 +490,7 @@ class ContextBar::InkShadesField : public HBox {
|
||||
case kOpenMessage:
|
||||
if (m_click == DragAndDrop) {
|
||||
m_conn = ColorBar::instance()->ChangeSelection.connect(
|
||||
Bind<void>(&ShadeWidget::onChangeColorBarSelection, this));
|
||||
base::Bind<void>(&ShadeWidget::onChangeColorBarSelection, this));
|
||||
}
|
||||
break;
|
||||
|
||||
@ -664,7 +664,7 @@ class ContextBar::InkShadesField : public HBox {
|
||||
int m_dragIndex;
|
||||
bool m_dropBefore;
|
||||
int m_boxSize;
|
||||
ScopedConnection m_conn;
|
||||
base::ScopedConnection m_conn;
|
||||
};
|
||||
|
||||
public:
|
||||
@ -681,7 +681,7 @@ public:
|
||||
addChild(&m_shade);
|
||||
|
||||
m_button.setFocusStop(false);
|
||||
m_button.Click.connect(Bind<void>(&InkShadesField::onShowMenu, this));
|
||||
m_button.Click.connect(base::Bind<void>(&InkShadesField::onShowMenu, this));
|
||||
}
|
||||
|
||||
~InkShadesField() {
|
||||
@ -711,8 +711,8 @@ private:
|
||||
bool hasShade = (m_shade.size() >= 2);
|
||||
reverse.setEnabled(hasShade);
|
||||
save.setEnabled(hasShade);
|
||||
reverse.Click.connect(Bind<void>(&InkShadesField::reverseShadeColors, this));
|
||||
save.Click.connect(Bind<void>(&InkShadesField::onSaveShade, this));
|
||||
reverse.Click.connect(base::Bind<void>(&InkShadesField::reverseShadeColors, this));
|
||||
save.Click.connect(base::Bind<void>(&InkShadesField::onSaveShade, this));
|
||||
|
||||
if (!m_shades.empty()) {
|
||||
SkinTheme* theme = SkinTheme::instance();
|
||||
@ -732,7 +732,7 @@ private:
|
||||
auto close = new IconButton(theme->parts.iconClose()->bitmap(0));
|
||||
close->setBgColor(theme->colors.menuitemNormalFace());
|
||||
close->Click.connect(
|
||||
Bind<void>(
|
||||
base::Bind<void>(
|
||||
[this, i, close]{
|
||||
m_shades.erase(m_shades.begin()+i);
|
||||
close->closeWindow();
|
||||
@ -870,11 +870,11 @@ public:
|
||||
sz.w += 2*guiscale();
|
||||
m_icon.getItem(0)->setMinSize(sz);
|
||||
|
||||
m_icon.ItemChange.connect(Bind<void>(&TransparentColorField::onPopup, this));
|
||||
m_maskColor.Change.connect(Bind<void>(&TransparentColorField::onChangeColor, this));
|
||||
m_icon.ItemChange.connect(base::Bind<void>(&TransparentColorField::onPopup, this));
|
||||
m_maskColor.Change.connect(base::Bind<void>(&TransparentColorField::onChangeColor, this));
|
||||
|
||||
Preferences::instance().selection.opaque.AfterChange.connect(
|
||||
Bind<void>(&TransparentColorField::onOpaqueChange, this));
|
||||
base::Bind<void>(&TransparentColorField::onOpaqueChange, this));
|
||||
|
||||
onOpaqueChange();
|
||||
}
|
||||
@ -900,9 +900,9 @@ private:
|
||||
masked.setSelected(true);
|
||||
automatic.setSelected(Preferences::instance().selection.autoOpaque());
|
||||
|
||||
opaque.Click.connect(Bind<void>(&TransparentColorField::setOpaque, this, true));
|
||||
masked.Click.connect(Bind<void>(&TransparentColorField::setOpaque, this, false));
|
||||
automatic.Click.connect(Bind<void>(&TransparentColorField::onAutomatic, this));
|
||||
opaque.Click.connect(base::Bind<void>(&TransparentColorField::setOpaque, this, true));
|
||||
masked.Click.connect(base::Bind<void>(&TransparentColorField::setOpaque, this, false));
|
||||
automatic.Click.connect(base::Bind<void>(&TransparentColorField::onAutomatic, this));
|
||||
|
||||
menu.showPopup(gfx::Point(bounds.x, bounds.y+bounds.h));
|
||||
}
|
||||
@ -952,7 +952,7 @@ public:
|
||||
addItem(SkinTheme::instance()->parts.pivotCenter());
|
||||
|
||||
Preferences::instance().selection.pivotPosition.AfterChange.connect(
|
||||
Bind<void>(&PivotField::onPivotChange, this));
|
||||
base::Bind<void>(&PivotField::onPivotChange, this));
|
||||
|
||||
onPivotChange();
|
||||
}
|
||||
@ -1156,7 +1156,7 @@ public:
|
||||
tooltipManager->addTooltipFor(at(1), "Cancel drag and drop", BOTTOM);
|
||||
}
|
||||
|
||||
Signal1<void, ContextBarObserver::DropAction> DropPixels;
|
||||
base::Signal1<void, ContextBarObserver::DropAction> DropPixels;
|
||||
|
||||
protected:
|
||||
void onItemChange(Item* item) override {
|
||||
@ -1192,8 +1192,8 @@ public:
|
||||
addChild(new Label("Sample:"));
|
||||
addChild(&m_sample);
|
||||
|
||||
m_channel.Change.connect(Bind<void>(&EyedropperField::onChannelChange, this));
|
||||
m_sample.Change.connect(Bind<void>(&EyedropperField::onSampleChange, this));
|
||||
m_channel.Change.connect(base::Bind<void>(&EyedropperField::onChannelChange, this));
|
||||
m_sample.Change.connect(base::Bind<void>(&EyedropperField::onSampleChange, this));
|
||||
}
|
||||
|
||||
void updateFromPreferences(app::Preferences::Eyedropper& prefEyedropper) {
|
||||
@ -1361,10 +1361,10 @@ ContextBar::ContextBar()
|
||||
m_symmetry->setupTooltips(tooltipManager);
|
||||
|
||||
Preferences::instance().toolBox.activeTool.AfterChange.connect(
|
||||
Bind<void>(&ContextBar::onCurrentToolChange, this));
|
||||
base::Bind<void>(&ContextBar::onCurrentToolChange, this));
|
||||
|
||||
Preferences::instance().symmetryMode.enabled.AfterChange.connect(
|
||||
Bind<void>(&ContextBar::onSymmetryModeChange, this));
|
||||
base::Bind<void>(&ContextBar::onSymmetryModeChange, this));
|
||||
|
||||
m_dropPixels->DropPixels.connect(&ContextBar::onDropPixels, this);
|
||||
|
||||
@ -1453,10 +1453,10 @@ void ContextBar::updateForTool(tools::Tool* tool)
|
||||
}
|
||||
|
||||
if (toolPref) {
|
||||
m_sizeConn = brushPref->size.AfterChange.connect(Bind<void>(&ContextBar::onBrushSizeChange, this));
|
||||
m_angleConn = brushPref->angle.AfterChange.connect(Bind<void>(&ContextBar::onBrushAngleChange, this));
|
||||
m_sizeConn = brushPref->size.AfterChange.connect(base::Bind<void>(&ContextBar::onBrushSizeChange, this));
|
||||
m_angleConn = brushPref->angle.AfterChange.connect(base::Bind<void>(&ContextBar::onBrushAngleChange, this));
|
||||
m_opacityConn = toolPref->opacity.AfterChange.connect(&ContextBar::onToolSetOpacity, this);
|
||||
m_freehandAlgoConn = toolPref->freehandAlgorithm.AfterChange.connect(Bind<void>(&ContextBar::onToolSetFreehandAlgorithm, this));
|
||||
m_freehandAlgoConn = toolPref->freehandAlgorithm.AfterChange.connect(base::Bind<void>(&ContextBar::onToolSetFreehandAlgorithm, this));
|
||||
}
|
||||
|
||||
if (tool)
|
||||
|
@ -77,7 +77,7 @@ namespace app {
|
||||
void setInkType(tools::InkType type);
|
||||
|
||||
// Signals
|
||||
Signal0<void> BrushChange;
|
||||
base::Signal0<void> BrushChange;
|
||||
|
||||
protected:
|
||||
void onSizeHint(ui::SizeHintEvent& ev) override;
|
||||
@ -158,10 +158,10 @@ namespace app {
|
||||
BrushSlots m_brushes;
|
||||
ui::Label* m_selectBoxHelp;
|
||||
SymmetryField* m_symmetry;
|
||||
ScopedConnection m_sizeConn;
|
||||
ScopedConnection m_angleConn;
|
||||
ScopedConnection m_opacityConn;
|
||||
ScopedConnection m_freehandAlgoConn;
|
||||
base::ScopedConnection m_sizeConn;
|
||||
base::ScopedConnection m_angleConn;
|
||||
base::ScopedConnection m_opacityConn;
|
||||
base::ScopedConnection m_freehandAlgoConn;
|
||||
};
|
||||
|
||||
} // namespace app
|
||||
|
@ -48,14 +48,14 @@ public:
|
||||
addChild(&m_openButton);
|
||||
addChild(&m_deleteButton);
|
||||
|
||||
m_openButton.Click.connect(Bind(&Item::onOpen, this));
|
||||
m_deleteButton.Click.connect(Bind(&Item::onDelete, this));
|
||||
m_openButton.Click.connect(base::Bind(&Item::onOpen, this));
|
||||
m_deleteButton.Click.connect(base::Bind(&Item::onDelete, this));
|
||||
|
||||
setup_mini_look(&m_openButton);
|
||||
setup_mini_look(&m_deleteButton);
|
||||
}
|
||||
|
||||
Signal0<void> Regenerate;
|
||||
base::Signal0<void> Regenerate;
|
||||
|
||||
protected:
|
||||
void onSizeHint(SizeHintEvent& ev) override {
|
||||
|
@ -39,7 +39,7 @@ namespace app {
|
||||
|
||||
// Triggered when the list is empty (because the user deleted all
|
||||
// sessions).
|
||||
Signal0<void> Empty;
|
||||
base::Signal0<void> Empty;
|
||||
|
||||
private:
|
||||
void fillList();
|
||||
|
@ -33,7 +33,7 @@ public:
|
||||
setFocusMagnet(true);
|
||||
}
|
||||
|
||||
Signal1<void, const std::string&> ExecuteCommand;
|
||||
base::Signal1<void, const std::string&> ExecuteCommand;
|
||||
|
||||
protected:
|
||||
bool onProcessMessage(Message* msg) override {
|
||||
|
@ -26,8 +26,8 @@ namespace app {
|
||||
ui::Button* mainButton() { return m_button; }
|
||||
ui::Button* dropDown() { return m_dropDown; }
|
||||
|
||||
Signal0<void> Click;
|
||||
Signal0<void> DropDownClick;
|
||||
base::Signal0<void> Click;
|
||||
base::Signal0<void> DropDownClick;
|
||||
|
||||
protected:
|
||||
void onButtonClick(ui::Event& ev);
|
||||
|
@ -172,15 +172,15 @@ Editor::Editor(Document* document, EditorFlags flags)
|
||||
|
||||
m_currentToolChangeConn =
|
||||
Preferences::instance().toolBox.activeTool.AfterChange.connect(
|
||||
Bind<void>(&Editor::onCurrentToolChange, this));
|
||||
base::Bind<void>(&Editor::onCurrentToolChange, this));
|
||||
|
||||
m_fgColorChangeConn =
|
||||
Preferences::instance().colorBar.fgColor.AfterChange.connect(
|
||||
Bind<void>(&Editor::onFgColorChange, this));
|
||||
base::Bind<void>(&Editor::onFgColorChange, this));
|
||||
|
||||
m_contextBarBrushChangeConn =
|
||||
App::instance()->getMainWindow()->getContextBar()->BrushChange.connect(
|
||||
Bind<void>(&Editor::onContextBarBrushChange, this));
|
||||
base::Bind<void>(&Editor::onContextBarBrushChange, this));
|
||||
|
||||
DocumentPreferences& docPref = Preferences::instance().document(m_document);
|
||||
|
||||
@ -192,10 +192,10 @@ Editor::Editor(Document* document, EditorFlags flags)
|
||||
if (preferredLayer)
|
||||
setLayer(preferredLayer);
|
||||
|
||||
m_tiledConn = docPref.tiled.AfterChange.connect(Bind<void>(&Editor::invalidate, this));
|
||||
m_gridConn = docPref.grid.AfterChange.connect(Bind<void>(&Editor::invalidate, this));
|
||||
m_pixelGridConn = docPref.pixelGrid.AfterChange.connect(Bind<void>(&Editor::invalidate, this));
|
||||
m_onionskinConn = docPref.onionskin.AfterChange.connect(Bind<void>(&Editor::invalidate, this));
|
||||
m_tiledConn = docPref.tiled.AfterChange.connect(base::Bind<void>(&Editor::invalidate, this));
|
||||
m_gridConn = docPref.grid.AfterChange.connect(base::Bind<void>(&Editor::invalidate, this));
|
||||
m_pixelGridConn = docPref.pixelGrid.AfterChange.connect(base::Bind<void>(&Editor::invalidate, this));
|
||||
m_onionskinConn = docPref.onionskin.AfterChange.connect(base::Bind<void>(&Editor::invalidate, this));
|
||||
|
||||
m_document->addObserver(this);
|
||||
|
||||
@ -1615,7 +1615,7 @@ void Editor::showAnimationSpeedMultiplierPopup(bool withStopBehaviorOptions)
|
||||
|
||||
for (double option : options) {
|
||||
MenuItem* item = new MenuItem("Speed x" + base::convert_to<std::string>(option));
|
||||
item->Click.connect(Bind<void>(&Editor::setAnimationSpeedMultiplier, this, option));
|
||||
item->Click.connect(base::Bind<void>(&Editor::setAnimationSpeedMultiplier, this, option));
|
||||
item->setSelected(m_aniSpeed == option);
|
||||
menu.addChild(item);
|
||||
}
|
||||
|
@ -288,15 +288,15 @@ namespace app {
|
||||
// signal (because the editor can be destroyed and the application
|
||||
// still continue running and generating CurrentToolChange
|
||||
// signals).
|
||||
ScopedConnection m_currentToolChangeConn;
|
||||
ScopedConnection m_fgColorChangeConn;
|
||||
ScopedConnection m_contextBarBrushChangeConn;
|
||||
base::ScopedConnection m_currentToolChangeConn;
|
||||
base::ScopedConnection m_fgColorChangeConn;
|
||||
base::ScopedConnection m_contextBarBrushChangeConn;
|
||||
|
||||
// Slots listeing document preferences.
|
||||
ScopedConnection m_tiledConn;
|
||||
ScopedConnection m_gridConn;
|
||||
ScopedConnection m_pixelGridConn;
|
||||
ScopedConnection m_onionskinConn;
|
||||
base::ScopedConnection m_tiledConn;
|
||||
base::ScopedConnection m_gridConn;
|
||||
base::ScopedConnection m_pixelGridConn;
|
||||
base::ScopedConnection m_onionskinConn;
|
||||
|
||||
EditorObservers m_observers;
|
||||
|
||||
|
@ -52,7 +52,7 @@ EditorView::EditorView(EditorView::Type type)
|
||||
|
||||
m_scrollSettingsConn =
|
||||
Preferences::instance().editor.showScrollbars.AfterChange.connect(
|
||||
Bind(&EditorView::setupScrollbars, this));
|
||||
base::Bind(&EditorView::setupScrollbars, this));
|
||||
}
|
||||
|
||||
void EditorView::onPaint(PaintEvent& ev)
|
||||
|
@ -34,7 +34,7 @@ namespace app {
|
||||
void setupScrollbars();
|
||||
|
||||
Type m_type;
|
||||
ScopedConnection m_scrollSettingsConn;
|
||||
base::ScopedConnection m_scrollSettingsConn;
|
||||
static Method g_scrollUpdateMethod;
|
||||
};
|
||||
|
||||
|
@ -88,10 +88,10 @@ MovingPixelsState::MovingPixelsState(Editor* editor, MouseMessage* msg, PixelsMo
|
||||
// Listen to any change to the transparent color from the ContextBar.
|
||||
m_opaqueConn =
|
||||
Preferences::instance().selection.opaque.AfterChange.connect(
|
||||
Bind<void>(&MovingPixelsState::onTransparentColorChange, this));
|
||||
base::Bind<void>(&MovingPixelsState::onTransparentColorChange, this));
|
||||
m_transparentConn =
|
||||
Preferences::instance().selection.transparentColor.AfterChange.connect(
|
||||
Bind<void>(&MovingPixelsState::onTransparentColorChange, this));
|
||||
base::Bind<void>(&MovingPixelsState::onTransparentColorChange, this));
|
||||
|
||||
// Add the current editor as filter for key message of the manager
|
||||
// so we can catch the Enter key, and avoid to execute the
|
||||
|
@ -83,9 +83,9 @@ namespace app {
|
||||
// used to remove the dragged image).
|
||||
bool m_discarded;
|
||||
|
||||
ScopedConnection m_ctxConn;
|
||||
ScopedConnection m_opaqueConn;
|
||||
ScopedConnection m_transparentConn;
|
||||
base::ScopedConnection m_ctxConn;
|
||||
base::ScopedConnection m_opaqueConn;
|
||||
base::ScopedConnection m_transparentConn;
|
||||
};
|
||||
|
||||
} // namespace app
|
||||
|
@ -78,13 +78,13 @@ PixelsMovement::PixelsMovement(
|
||||
|
||||
m_pivotVisConn =
|
||||
Preferences::instance().selection.pivotVisibility.AfterChange.connect(
|
||||
Bind<void>(&PixelsMovement::onPivotChange, this));
|
||||
base::Bind<void>(&PixelsMovement::onPivotChange, this));
|
||||
m_pivotPosConn =
|
||||
Preferences::instance().selection.pivotPosition.AfterChange.connect(
|
||||
Bind<void>(&PixelsMovement::onPivotChange, this));
|
||||
base::Bind<void>(&PixelsMovement::onPivotChange, this));
|
||||
m_rotAlgoConn =
|
||||
Preferences::instance().selection.rotationAlgorithm.AfterChange.connect(
|
||||
Bind<void>(&PixelsMovement::onRotationAlgorithmChange, this));
|
||||
base::Bind<void>(&PixelsMovement::onRotationAlgorithmChange, this));
|
||||
|
||||
// The extra cel must be null, because if it's not null, it means
|
||||
// that someone else is using it (e.g. the editor brush preview),
|
||||
|
@ -125,9 +125,9 @@ namespace app {
|
||||
Mask* m_currentMask;
|
||||
bool m_opaque;
|
||||
color_t m_maskColor;
|
||||
ScopedConnection m_pivotVisConn;
|
||||
ScopedConnection m_pivotPosConn;
|
||||
ScopedConnection m_rotAlgoConn;
|
||||
base::ScopedConnection m_pivotVisConn;
|
||||
base::ScopedConnection m_pivotPosConn;
|
||||
base::ScopedConnection m_rotAlgoConn;
|
||||
ExtraCelRef m_extraCel;
|
||||
};
|
||||
|
||||
|
@ -50,7 +50,7 @@ namespace app {
|
||||
bool m_pingPongForward;
|
||||
doc::frame_t m_refFrame;
|
||||
|
||||
ScopedConnection m_ctxConn;
|
||||
base::ScopedConnection m_ctxConn;
|
||||
};
|
||||
|
||||
} // namespace app
|
||||
|
@ -103,10 +103,10 @@ void StandbyState::onEnterState(Editor* editor)
|
||||
|
||||
m_pivotVisConn =
|
||||
Preferences::instance().selection.pivotVisibility.AfterChange.connect(
|
||||
Bind<void>(&StandbyState::onPivotChange, this, editor));
|
||||
base::Bind<void>(&StandbyState::onPivotChange, this, editor));
|
||||
m_pivotPosConn =
|
||||
Preferences::instance().selection.pivotPosition.AfterChange.connect(
|
||||
Bind<void>(&StandbyState::onPivotChange, this, editor));
|
||||
base::Bind<void>(&StandbyState::onPivotChange, this, editor));
|
||||
}
|
||||
|
||||
void StandbyState::onCurrentToolChange(Editor* editor)
|
||||
|
@ -76,8 +76,8 @@ namespace app {
|
||||
void onPivotChange(Editor* editor);
|
||||
|
||||
Decorator* m_decorator;
|
||||
ScopedConnection m_pivotVisConn;
|
||||
ScopedConnection m_pivotPosConn;
|
||||
base::ScopedConnection m_pivotVisConn;
|
||||
base::ScopedConnection m_pivotPosConn;
|
||||
};
|
||||
|
||||
} // namespace app
|
||||
|
@ -34,9 +34,9 @@ namespace app {
|
||||
|
||||
void goUp();
|
||||
|
||||
Signal0<void> FileSelected;
|
||||
Signal0<void> FileAccepted;
|
||||
Signal0<void> CurrentFolderChanged;
|
||||
base::Signal0<void> FileSelected;
|
||||
base::Signal0<void> FileAccepted;
|
||||
base::Signal0<void> CurrentFolderChanged;
|
||||
|
||||
protected:
|
||||
virtual bool onProcessMessage(ui::Message* msg) override;
|
||||
|
@ -283,15 +283,15 @@ FileSelector::FileSelector(FileSelectorType type, FileSelectorDelegate* delegate
|
||||
fileView()->attachToView(m_fileList);
|
||||
m_fileName->setAssociatedFileList(m_fileList);
|
||||
|
||||
goBackButton()->Click.connect(Bind<void>(&FileSelector::onGoBack, this));
|
||||
goForwardButton()->Click.connect(Bind<void>(&FileSelector::onGoForward, this));
|
||||
goUpButton()->Click.connect(Bind<void>(&FileSelector::onGoUp, this));
|
||||
newFolderButton()->Click.connect(Bind<void>(&FileSelector::onNewFolder, this));
|
||||
location()->CloseListBox.connect(Bind<void>(&FileSelector::onLocationCloseListBox, this));
|
||||
fileType()->Change.connect(Bind<void>(&FileSelector::onFileTypeChange, this));
|
||||
m_fileList->FileSelected.connect(Bind<void>(&FileSelector::onFileListFileSelected, this));
|
||||
m_fileList->FileAccepted.connect(Bind<void>(&FileSelector::onFileListFileAccepted, this));
|
||||
m_fileList->CurrentFolderChanged.connect(Bind<void>(&FileSelector::onFileListCurrentFolderChanged, this));
|
||||
goBackButton()->Click.connect(base::Bind<void>(&FileSelector::onGoBack, this));
|
||||
goForwardButton()->Click.connect(base::Bind<void>(&FileSelector::onGoForward, this));
|
||||
goUpButton()->Click.connect(base::Bind<void>(&FileSelector::onGoUp, this));
|
||||
newFolderButton()->Click.connect(base::Bind<void>(&FileSelector::onNewFolder, this));
|
||||
location()->CloseListBox.connect(base::Bind<void>(&FileSelector::onLocationCloseListBox, this));
|
||||
fileType()->Change.connect(base::Bind<void>(&FileSelector::onFileTypeChange, this));
|
||||
m_fileList->FileSelected.connect(base::Bind<void>(&FileSelector::onFileListFileSelected, this));
|
||||
m_fileList->FileAccepted.connect(base::Bind<void>(&FileSelector::onFileListFileAccepted, this));
|
||||
m_fileList->CurrentFolderChanged.connect(base::Bind<void>(&FileSelector::onFileListCurrentFolderChanged, this));
|
||||
|
||||
resizeOptions()->setVisible(withResizeOptions);
|
||||
if (withResizeOptions) {
|
||||
|
@ -139,10 +139,10 @@ FontPopup::FontPopup()
|
||||
|
||||
addChild(m_popup);
|
||||
|
||||
m_popup->loadFont()->Click.connect(Bind<void>(&FontPopup::onLoadFont, this));
|
||||
m_popup->loadFont()->Click.connect(base::Bind<void>(&FontPopup::onLoadFont, this));
|
||||
m_listBox.setFocusMagnet(true);
|
||||
m_listBox.Change.connect(Bind<void>(&FontPopup::onChangeFont, this));
|
||||
m_listBox.DoubleClickItem.connect(Bind<void>(&FontPopup::onLoadFont, this));
|
||||
m_listBox.Change.connect(base::Bind<void>(&FontPopup::onChangeFont, this));
|
||||
m_listBox.DoubleClickItem.connect(base::Bind<void>(&FontPopup::onLoadFont, this));
|
||||
|
||||
m_popup->view()->attachToView(&m_listBox);
|
||||
|
||||
|
@ -29,7 +29,7 @@ namespace app {
|
||||
|
||||
void showPopup(const gfx::Rect& bounds);
|
||||
|
||||
Signal1<void, const std::string&> Load;
|
||||
base::Signal1<void, const std::string&> Load;
|
||||
|
||||
protected:
|
||||
void onChangeFont();
|
||||
|
@ -25,7 +25,7 @@ namespace app {
|
||||
void setColor(const app::Color& color);
|
||||
|
||||
// Signals
|
||||
Signal1<void, const app::Color&> ColorChange;
|
||||
base::Signal1<void, const app::Color&> ColorChange;
|
||||
|
||||
protected:
|
||||
void onEntryChange();
|
||||
|
@ -48,9 +48,9 @@ HomeView::HomeView()
|
||||
setBgColor(theme->colors.workspace());
|
||||
setChildSpacing(8 * guiscale());
|
||||
|
||||
newFile()->Click.connect(Bind(&HomeView::onNewFile, this));
|
||||
openFile()->Click.connect(Bind(&HomeView::onOpenFile, this));
|
||||
recoverSprites()->Click.connect(Bind(&HomeView::onRecoverSprites, this));
|
||||
newFile()->Click.connect(base::Bind(&HomeView::onNewFile, this));
|
||||
openFile()->Click.connect(base::Bind(&HomeView::onOpenFile, this));
|
||||
recoverSprites()->Click.connect(base::Bind(&HomeView::onRecoverSprites, this));
|
||||
|
||||
filesView()->attachToView(m_files);
|
||||
foldersView()->attachToView(m_folders);
|
||||
|
@ -56,7 +56,7 @@ namespace app {
|
||||
|
||||
ui::Timer m_timer;
|
||||
int m_offset;
|
||||
ScopedConnection m_scopedConn;
|
||||
base::ScopedConnection m_scopedConn;
|
||||
};
|
||||
|
||||
} // namespace app
|
||||
|
@ -38,8 +38,8 @@ PalettePopup::PalettePopup()
|
||||
|
||||
addChild(m_popup);
|
||||
|
||||
m_popup->loadPal()->Click.connect(Bind<void>(&PalettePopup::onLoadPal, this));
|
||||
m_popup->openFolder()->Click.connect(Bind<void>(&PalettePopup::onOpenFolder, this));
|
||||
m_popup->loadPal()->Click.connect(base::Bind<void>(&PalettePopup::onLoadPal, this));
|
||||
m_popup->openFolder()->Click.connect(base::Bind<void>(&PalettePopup::onOpenFolder, this));
|
||||
|
||||
m_popup->view()->attachToView(&m_paletteListBox);
|
||||
|
||||
|
@ -79,7 +79,7 @@ namespace app {
|
||||
void pasteFromClipboard();
|
||||
void discardClipboardSelection();
|
||||
|
||||
Signal0<void> FocusEnter;
|
||||
base::Signal0<void> FocusEnter;
|
||||
|
||||
protected:
|
||||
bool onProcessMessage(ui::Message* msg) override;
|
||||
@ -149,7 +149,7 @@ namespace app {
|
||||
int m_rangeAnchor;
|
||||
doc::PalettePicks m_selectedEntries;
|
||||
bool m_isUpdatingColumns;
|
||||
ScopedConnection m_conn;
|
||||
base::ScopedConnection m_conn;
|
||||
Hit m_hot;
|
||||
bool m_copy;
|
||||
};
|
||||
|
@ -23,7 +23,7 @@ namespace app {
|
||||
|
||||
doc::Palette* selectedPalette();
|
||||
|
||||
Signal1<void, doc::Palette*> PalChange;
|
||||
base::Signal1<void, doc::Palette*> PalChange;
|
||||
|
||||
protected:
|
||||
virtual void onResourceChange(Resource* resource) override;
|
||||
|
@ -101,7 +101,7 @@ public:
|
||||
|
||||
bool isPlaying() const { return m_isPlaying; }
|
||||
|
||||
Signal0<void> Popup;
|
||||
base::Signal0<void> Popup;
|
||||
|
||||
private:
|
||||
|
||||
@ -185,9 +185,9 @@ PreviewEditorWindow::PreviewEditorWindow()
|
||||
|
||||
m_isEnabled = get_config_bool("MiniEditor", "Enabled", true);
|
||||
|
||||
m_centerButton->Click.connect(Bind<void>(&PreviewEditorWindow::onCenterClicked, this));
|
||||
m_playButton->Click.connect(Bind<void>(&PreviewEditorWindow::onPlayClicked, this));
|
||||
m_playButton->Popup.connect(Bind<void>(&PreviewEditorWindow::onPopupSpeed, this));
|
||||
m_centerButton->Click.connect(base::Bind<void>(&PreviewEditorWindow::onCenterClicked, this));
|
||||
m_playButton->Click.connect(base::Bind<void>(&PreviewEditorWindow::onPlayClicked, this));
|
||||
m_playButton->Popup.connect(base::Bind<void>(&PreviewEditorWindow::onPopupSpeed, this));
|
||||
|
||||
addChild(m_centerButton);
|
||||
addChild(m_playButton);
|
||||
|
@ -92,7 +92,7 @@ RecentListBox::RecentListBox()
|
||||
{
|
||||
m_recentFilesConn =
|
||||
App::instance()->getRecentFiles()->Changed.connect(
|
||||
Bind(&RecentListBox::rebuildList, this));
|
||||
base::Bind(&RecentListBox::rebuildList, this));
|
||||
}
|
||||
|
||||
void RecentListBox::rebuildList()
|
||||
|
@ -27,7 +27,7 @@ namespace app {
|
||||
private:
|
||||
void rebuildList();
|
||||
|
||||
ScopedConnection m_recentFilesConn;
|
||||
base::ScopedConnection m_recentFilesConn;
|
||||
};
|
||||
|
||||
class RecentFilesListBox : public RecentListBox {
|
||||
|
@ -124,7 +124,7 @@ ResourcesListBox::ResourcesListBox(ResourcesLoader* resourcesLoader)
|
||||
, m_resourcesTimer(100)
|
||||
, m_loadingItem(NULL)
|
||||
{
|
||||
m_resourcesTimer.Tick.connect(Bind<void>(&ResourcesListBox::onTick, this));
|
||||
m_resourcesTimer.Tick.connect(base::Bind<void>(&ResourcesListBox::onTick, this));
|
||||
}
|
||||
|
||||
Resource* ResourcesListBox::selectedResource()
|
||||
|
@ -34,7 +34,7 @@ public:
|
||||
updateText();
|
||||
}
|
||||
|
||||
Signal1<void, const ui::Accelerator*> AccelChange;
|
||||
base::Signal1<void, const ui::Accelerator*> AccelChange;
|
||||
|
||||
protected:
|
||||
bool onProcessMessage(Message* msg) override {
|
||||
@ -90,16 +90,16 @@ SelectAccelerator::SelectAccelerator(const ui::Accelerator& accel, KeyContext ke
|
||||
|
||||
keyPlaceholder()->addChild(m_keyField);
|
||||
|
||||
alt()->Click.connect(Bind<void>(&SelectAccelerator::onModifierChange, this, kKeyAltModifier, alt()));
|
||||
cmd()->Click.connect(Bind<void>(&SelectAccelerator::onModifierChange, this, kKeyCmdModifier, cmd()));
|
||||
ctrl()->Click.connect(Bind<void>(&SelectAccelerator::onModifierChange, this, kKeyCtrlModifier, ctrl()));
|
||||
shift()->Click.connect(Bind<void>(&SelectAccelerator::onModifierChange, this, kKeyShiftModifier, shift()));
|
||||
space()->Click.connect(Bind<void>(&SelectAccelerator::onModifierChange, this, kKeySpaceModifier, space()));
|
||||
alt()->Click.connect(base::Bind<void>(&SelectAccelerator::onModifierChange, this, kKeyAltModifier, alt()));
|
||||
cmd()->Click.connect(base::Bind<void>(&SelectAccelerator::onModifierChange, this, kKeyCmdModifier, cmd()));
|
||||
ctrl()->Click.connect(base::Bind<void>(&SelectAccelerator::onModifierChange, this, kKeyCtrlModifier, ctrl()));
|
||||
shift()->Click.connect(base::Bind<void>(&SelectAccelerator::onModifierChange, this, kKeyShiftModifier, shift()));
|
||||
space()->Click.connect(base::Bind<void>(&SelectAccelerator::onModifierChange, this, kKeySpaceModifier, space()));
|
||||
|
||||
m_keyField->AccelChange.connect(&SelectAccelerator::onAccelChange, this);
|
||||
clearButton()->Click.connect(Bind<void>(&SelectAccelerator::onClear, this));
|
||||
okButton()->Click.connect(Bind<void>(&SelectAccelerator::onOK, this));
|
||||
cancelButton()->Click.connect(Bind<void>(&SelectAccelerator::onCancel, this));
|
||||
clearButton()->Click.connect(base::Bind<void>(&SelectAccelerator::onClear, this));
|
||||
okButton()->Click.connect(base::Bind<void>(&SelectAccelerator::onOK, this));
|
||||
cancelButton()->Click.connect(base::Bind<void>(&SelectAccelerator::onCancel, this));
|
||||
}
|
||||
|
||||
void SelectAccelerator::onModifierChange(KeyModifiers modifier, CheckBox* checkbox)
|
||||
|
@ -95,7 +95,7 @@ public:
|
||||
makeFloating();
|
||||
|
||||
addChild(&m_button);
|
||||
m_button.Click.connect(Bind<void>(&SnapToGridWindow::onDisableSnapToGrid, this));
|
||||
m_button.Click.connect(base::Bind<void>(&SnapToGridWindow::onDisableSnapToGrid, this));
|
||||
}
|
||||
|
||||
void setDocument(app::Document* doc) {
|
||||
@ -198,7 +198,7 @@ StatusBar::StatusBar()
|
||||
m_frameLabel = new Label("Frame:");
|
||||
m_currentFrame = new GotoFrameEntry();
|
||||
m_newFrame = new Button("+");
|
||||
m_newFrame->Click.connect(Bind<void>(&StatusBar::newFrame, this));
|
||||
m_newFrame->Click.connect(base::Bind<void>(&StatusBar::newFrame, this));
|
||||
m_zoomEntry = new ZoomEntry;
|
||||
m_zoomEntry->ZoomChange.connect(&StatusBar::onChangeZoom, this);
|
||||
|
||||
@ -224,7 +224,7 @@ StatusBar::StatusBar()
|
||||
tooltipManager->addTooltipFor(m_zoomEntry, "Zoom Level", BOTTOM);
|
||||
|
||||
Preferences::instance().toolBox.activeTool.AfterChange.connect(
|
||||
Bind<void>(&StatusBar::onCurrentToolChange, this));
|
||||
base::Bind<void>(&StatusBar::onCurrentToolChange, this));
|
||||
|
||||
UIContext::instance()->addObserver(this);
|
||||
UIContext::instance()->documents().addObserver(this);
|
||||
|
@ -277,7 +277,7 @@ namespace app {
|
||||
gfx::Point m_oldPos;
|
||||
// Configure timeline
|
||||
ConfigureTimelinePopup* m_confPopup;
|
||||
ScopedConnection m_ctxConn;
|
||||
base::ScopedConnection m_ctxConn;
|
||||
|
||||
// Marching ants stuff to show the range in the clipboard.
|
||||
// TODO merge this with the marching ants of the sprite editor (ui::Editor)
|
||||
|
@ -48,7 +48,7 @@ public:
|
||||
|
||||
ToolGroup* toolGroup() { return m_group; }
|
||||
|
||||
Signal1<void, Tool*> ToolSelected;
|
||||
base::Signal1<void, Tool*> ToolSelected;
|
||||
|
||||
protected:
|
||||
bool onProcessMessage(Message* msg) override;
|
||||
@ -396,7 +396,7 @@ void ToolBar::openPopupWindow(int group_index, ToolGroup* tool_group)
|
||||
|
||||
// In case this tool contains more than just one tool, show the popup window
|
||||
m_popupWindow = new PopupWindow("", PopupWindow::kCloseOnClickOutsideHotRegion);
|
||||
m_closeConn = m_popupWindow->Close.connect(Bind<void, ToolBar, ToolBar>(&ToolBar::onClosePopup, this));
|
||||
m_closeConn = m_popupWindow->Close.connect(base::Bind<void, ToolBar, ToolBar>(&ToolBar::onClosePopup, this));
|
||||
m_openedRecently = true;
|
||||
|
||||
ToolStrip* toolstrip = new ToolStrip(tool_group, this);
|
||||
|
@ -86,7 +86,7 @@ namespace app {
|
||||
ui::Timer m_tipTimer;
|
||||
bool m_tipOpened;
|
||||
|
||||
Connection m_closeConn;
|
||||
base::Connection m_closeConn;
|
||||
};
|
||||
|
||||
} // namespace app
|
||||
|
@ -72,7 +72,7 @@ namespace app {
|
||||
bool onClear(Context* ctx) override;
|
||||
void onCancel(Context* ctx) override;
|
||||
|
||||
Signal0<void> ActiveViewChanged;
|
||||
base::Signal0<void> ActiveViewChanged;
|
||||
|
||||
protected:
|
||||
void onPaint(ui::PaintEvent& ev) override;
|
||||
|
@ -22,7 +22,7 @@ namespace app {
|
||||
|
||||
void setZoom(const render::Zoom& zoom);
|
||||
|
||||
Signal1<void, const render::Zoom&> ZoomChange;
|
||||
base::Signal1<void, const render::Zoom&> ZoomChange;
|
||||
|
||||
private:
|
||||
// SliderDelegate impl
|
||||
|
@ -185,7 +185,7 @@ Widget* WidgetLoader::convertXmlElementToWidget(const TiXmlElement* elem, Widget
|
||||
|
||||
if (closewindow) {
|
||||
static_cast<Button*>(widget)
|
||||
->Click.connect(Bind<void>(&Widget::closeWindow, widget));
|
||||
->Click.connect(base::Bind<void>(&Widget::closeWindow, widget));
|
||||
}
|
||||
}
|
||||
else if (elem_name == "check") {
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Aseprite Base Library
|
||||
// Copyright (c) 2001-2013 David Capello
|
||||
// Copyright (c) 2001-2013, 2015 David Capello
|
||||
//
|
||||
// This file is released under the terms of the MIT license.
|
||||
// Read LICENSE.txt for more information.
|
||||
@ -8,6 +8,8 @@
|
||||
#define BASE_BIND_H_INCLUDED
|
||||
#pragma once
|
||||
|
||||
namespace base {
|
||||
|
||||
// BindAdapter0_fun
|
||||
template<typename R, typename F>
|
||||
class BindAdapter0_fun
|
||||
@ -643,4 +645,6 @@ RefWrapper<T> Ref(T& ref)
|
||||
return RefWrapper<T>(ref);
|
||||
}
|
||||
|
||||
} // namespace base
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Aseprite Base Library
|
||||
// Copyright (c) 2001-2014 David Capello
|
||||
// Copyright (c) 2001-2015 David Capello
|
||||
//
|
||||
// This file is released under the terms of the MIT license.
|
||||
// Read LICENSE.txt for more information.
|
||||
@ -12,6 +12,8 @@
|
||||
|
||||
#include "base/signal.h"
|
||||
|
||||
namespace base {
|
||||
|
||||
void Connection::disconnect()
|
||||
{
|
||||
if (!m_slot)
|
||||
@ -21,3 +23,5 @@ void Connection::disconnect()
|
||||
delete m_slot;
|
||||
m_slot = NULL;
|
||||
}
|
||||
|
||||
} // namespace base
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Aseprite Base Library
|
||||
// Copyright (c) 2001-2014 David Capello
|
||||
// Copyright (c) 2001-2015 David Capello
|
||||
//
|
||||
// This file is released under the terms of the MIT license.
|
||||
// Read LICENSE.txt for more information.
|
||||
@ -8,6 +8,8 @@
|
||||
#define BASE_CONNETION_H_INCLUDED
|
||||
#pragma once
|
||||
|
||||
namespace base {
|
||||
|
||||
class Signal;
|
||||
class Slot;
|
||||
|
||||
@ -53,4 +55,6 @@ private:
|
||||
Connection m_conn;
|
||||
};
|
||||
|
||||
} // namespace base
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Aseprite Base Library
|
||||
// Copyright (c) 2001-2013 David Capello
|
||||
// Copyright (c) 2001-2013, 2015 David Capello
|
||||
//
|
||||
// This file is released under the terms of the MIT license.
|
||||
// Read LICENSE.txt for more information.
|
||||
@ -10,6 +10,8 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace base {
|
||||
|
||||
// Like 'strerror' but thread-safe.
|
||||
std::string get_errno_string(int errnum)
|
||||
{
|
||||
@ -68,3 +70,5 @@ std::string get_errno_string(int errnum)
|
||||
return "Unknown error";
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace base
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Aseprite Base Library
|
||||
// Copyright (c) 2001-2013 David Capello
|
||||
// Copyright (c) 2001-2013, 2015 David Capello
|
||||
//
|
||||
// This file is released under the terms of the MIT license.
|
||||
// Read LICENSE.txt for more information.
|
||||
@ -10,6 +10,10 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace base {
|
||||
|
||||
std::string get_errno_string(int errnum);
|
||||
|
||||
} // namespace base
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Aseprite Base Library
|
||||
// Copyright (c) 2001-2013 David Capello
|
||||
// Copyright (c) 2001-2013, 2015 David Capello
|
||||
//
|
||||
// This file is released under the terms of the MIT license.
|
||||
// Read LICENSE.txt for more information.
|
||||
@ -11,13 +11,13 @@
|
||||
#include <string>
|
||||
|
||||
namespace base {
|
||||
namespace launcher {
|
||||
namespace launcher {
|
||||
|
||||
bool open_url(const std::string& url);
|
||||
bool open_file(const std::string& file);
|
||||
bool open_folder(const std::string& file);
|
||||
bool open_url(const std::string& url);
|
||||
bool open_file(const std::string& file);
|
||||
bool open_folder(const std::string& file);
|
||||
|
||||
} // namespace launcher
|
||||
} // namespace launcher
|
||||
} // namespace base
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Aseprite Base Library
|
||||
// Copyright (c) 2001-2013 David Capello
|
||||
// Copyright (c) 2001-2013, 2015 David Capello
|
||||
//
|
||||
// This file is released under the terms of the MIT license.
|
||||
// Read LICENSE.txt for more information.
|
||||
@ -11,8 +11,7 @@
|
||||
#include <pthread.h>
|
||||
#include <errno.h>
|
||||
|
||||
class base::mutex::mutex_impl
|
||||
{
|
||||
class base::mutex::mutex_impl {
|
||||
public:
|
||||
|
||||
mutex_impl() {
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Aseprite Base Library
|
||||
// Copyright (c) 2001-2013 David Capello
|
||||
// Copyright (c) 2001-2013, 2015 David Capello
|
||||
//
|
||||
// This file is released under the terms of the MIT license.
|
||||
// Read LICENSE.txt for more information.
|
||||
@ -10,8 +10,7 @@
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
class base::mutex::mutex_impl
|
||||
{
|
||||
class base::mutex::mutex_impl {
|
||||
public:
|
||||
|
||||
mutex_impl() {
|
||||
|
@ -14,6 +14,8 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace base {
|
||||
|
||||
class Signal {
|
||||
public:
|
||||
virtual ~Signal() { }
|
||||
@ -322,4 +324,6 @@ public:
|
||||
|
||||
};
|
||||
|
||||
} // namespace base
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Aseprite Base Library
|
||||
// Copyright (c) 2001-2013 David Capello
|
||||
// Copyright (c) 2001-2013, 2015 David Capello
|
||||
//
|
||||
// This file is released under the terms of the MIT license.
|
||||
// Read LICENSE.txt for more information.
|
||||
@ -10,6 +10,8 @@
|
||||
|
||||
#include "base/disable_copying.h"
|
||||
|
||||
namespace base {
|
||||
|
||||
class Slot {
|
||||
public:
|
||||
Slot() { }
|
||||
@ -181,4 +183,6 @@ public:
|
||||
void operator()(A1 a1, A2 a2) { return (t->*m)(a1, a2); }
|
||||
};
|
||||
|
||||
} // namespace base
|
||||
|
||||
#endif
|
||||
|
@ -173,7 +173,7 @@ void Alert::processString(char* buf, std::vector<Widget*>& labels, std::vector<W
|
||||
|
||||
sprintf(buttonId, "button-%lu", buttons.size());
|
||||
button_widget->setId(buttonId);
|
||||
button_widget->Click.connect(Bind<void>(&Window::closeWindow, this, button_widget));
|
||||
button_widget->Click.connect(base::Bind<void>(&Window::closeWindow, this, button_widget));
|
||||
}
|
||||
|
||||
buf[c] = chr;
|
||||
|
@ -52,7 +52,7 @@ namespace ui {
|
||||
IButtonIcon* iconInterface() const { return m_iconInterface; }
|
||||
|
||||
// Signals
|
||||
Signal1<void, Event&> Click;
|
||||
base::Signal1<void, Event&> Click;
|
||||
|
||||
protected:
|
||||
// Events
|
||||
|
@ -85,9 +85,9 @@ namespace ui {
|
||||
gfx::Rect getListBoxPos() const;
|
||||
|
||||
// Signals
|
||||
Signal0<void> Change;
|
||||
Signal0<void> OpenListBox;
|
||||
Signal0<void> CloseListBox;
|
||||
base::Signal0<void> Change;
|
||||
base::Signal0<void> OpenListBox;
|
||||
base::Signal0<void> CloseListBox;
|
||||
|
||||
protected:
|
||||
bool onProcessMessage(Message* msg) override;
|
||||
|
@ -770,9 +770,9 @@ void Entry::showEditPopupMenu(const gfx::Point& pt)
|
||||
menu.addChild(&cut);
|
||||
menu.addChild(©);
|
||||
menu.addChild(&paste);
|
||||
cut.Click.connect(Bind(&Entry::executeCmd, this, EntryCmd::Cut, 0, false));
|
||||
copy.Click.connect(Bind(&Entry::executeCmd, this, EntryCmd::Copy, 0, false));
|
||||
paste.Click.connect(Bind(&Entry::executeCmd, this, EntryCmd::Paste, 0, false));
|
||||
cut.Click.connect(base::Bind(&Entry::executeCmd, this, EntryCmd::Cut, 0, false));
|
||||
copy.Click.connect(base::Bind(&Entry::executeCmd, this, EntryCmd::Copy, 0, false));
|
||||
paste.Click.connect(base::Bind(&Entry::executeCmd, this, EntryCmd::Paste, 0, false));
|
||||
|
||||
if (isReadOnly()) {
|
||||
cut.setEnabled(false);
|
||||
|
@ -43,7 +43,7 @@ namespace ui {
|
||||
gfx::Rect getEntryTextBounds() const;
|
||||
|
||||
// Signals
|
||||
Signal0<void> Change;
|
||||
base::Signal0<void> Change;
|
||||
|
||||
protected:
|
||||
// Events
|
||||
|
@ -23,7 +23,7 @@ namespace ui {
|
||||
const std::string& getUrl() const { return m_url; }
|
||||
void setUrl(const std::string& url);
|
||||
|
||||
Signal0<void> Click;
|
||||
base::Signal0<void> Click;
|
||||
|
||||
protected:
|
||||
bool onProcessMessage(Message* msg) override;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user