diff options
| author | jacob1 <jfu614@gmail.com> | 2013-01-18 19:37:24 (GMT) |
|---|---|---|
| committer | jacob1 <jfu614@gmail.com> | 2013-01-18 19:37:24 (GMT) |
| commit | ded94b475d643f3e144f677ae6c01bbe5f9a73ce (patch) | |
| tree | caf8d058086bb846abaa3f1fdcfd37bd2a97ea83 /src/interface | |
| parent | b3a2ab735b76185715d7efd848659ef87ca70405 (diff) | |
| download | powder-ded94b475d643f3e144f677ae6c01bbe5f9a73ce.zip powder-ded94b475d643f3e144f677ae6c01bbe5f9a73ce.tar.gz | |
move clipboard functions out of misc.cpp without creating errors
Diffstat (limited to 'src/interface')
| -rw-r--r-- | src/interface/Label.cpp | 6 | ||||
| -rw-r--r-- | src/interface/Label.h | 2 | ||||
| -rw-r--r-- | src/interface/Textbox.cpp | 8 | ||||
| -rw-r--r-- | src/interface/Textbox.h | 2 |
4 files changed, 9 insertions, 9 deletions
diff --git a/src/interface/Label.cpp b/src/interface/Label.cpp index 5cd089c..24b8035 100644 --- a/src/interface/Label.cpp +++ b/src/interface/Label.cpp @@ -211,11 +211,11 @@ void Label::copySelection() std::string currentText = text; if(selectionIndex1 > selectionIndex0) { - clipboard_push_text((char*)currentText.substr(selectionIndex0, selectionIndex1-selectionIndex0).c_str()); + ClipboardPush((char*)currentText.substr(selectionIndex0, selectionIndex1-selectionIndex0).c_str()); } else if(selectionIndex0 > selectionIndex1) { - clipboard_push_text((char*)currentText.substr(selectionIndex1, selectionIndex0-selectionIndex1).c_str()); + ClipboardPush((char*)currentText.substr(selectionIndex1, selectionIndex0-selectionIndex1).c_str()); } else { - clipboard_push_text((char*)currentText.c_str()); + ClipboardPush((char*)currentText.c_str()); } } diff --git a/src/interface/Label.h b/src/interface/Label.h index f5fa1a7..d4e5088 100644 --- a/src/interface/Label.h +++ b/src/interface/Label.h @@ -4,7 +4,7 @@ #include <string> #include "Component.h" -#include "Misc.h" +#include "PowderToy.h" #include "Colour.h" namespace ui diff --git a/src/interface/Textbox.cpp b/src/interface/Textbox.cpp index c82b6e4..603c894 100644 --- a/src/interface/Textbox.cpp +++ b/src/interface/Textbox.cpp @@ -125,20 +125,20 @@ void Textbox::OnContextMenuAction(int item) void Textbox::cutSelection() { char * clipboardText; - clipboardText = clipboard_pull_text(); + clipboardText = ClipboardPull(); std::string newText = std::string(clipboardText); free(clipboardText); if(HasSelection()) { if(getLowerSelectionBound() < 0 || getHigherSelectionBound() > backingText.length()) return; - clipboard_push_text((char*)backingText.substr(getLowerSelectionBound(), getHigherSelectionBound()-getLowerSelectionBound()).c_str()); + ClipboardPush((char*)backingText.substr(getLowerSelectionBound(), getHigherSelectionBound()-getLowerSelectionBound()).c_str()); backingText.erase(backingText.begin()+getLowerSelectionBound(), backingText.begin()+getHigherSelectionBound()); cursor = getLowerSelectionBound(); } else { - clipboard_push_text((char*)backingText.c_str()); + ClipboardPush((char*)backingText.c_str()); backingText.clear(); } ClearSelection(); @@ -181,7 +181,7 @@ void Textbox::selectAll() void Textbox::pasteIntoSelection() { char * clipboardText; - clipboardText = clipboard_pull_text(); + clipboardText = ClipboardPull(); std::string newText = std::string(clipboardText); free(clipboardText); if(HasSelection()) diff --git a/src/interface/Textbox.h b/src/interface/Textbox.h index 7d06111..0d5140b 100644 --- a/src/interface/Textbox.h +++ b/src/interface/Textbox.h @@ -4,7 +4,7 @@ #include <string> #include "Label.h" -#include "Misc.h" +#include "PowderToy.h" namespace ui { |
