-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enabling text selection #137
Comments
Hi Rıfat, sorry for my late reply, but I've been on vacation for the last few weeks and about 9500 kilometers away from my PC. You wrote a great application. It's always interesting to see what creative implementations programmers realize with FINAL CUT. I have extended The data structure of a unique text position: struct FTextPosition
{
FTextViewList::size_type row{};
FString::size_type column{};
};
New
If your terminal supports OSC-52, you can copy the text (extracted with An OSC-52 example with the Unix shell: printf "\033]52;c;$(printf "%s" "Hello, World!" | base64)\a"
Update: Added visual highlighting of the selected text in FTextView (8d547c2). |
Hi Markus, thanks for the swift solution. I hope you had a great vacation, surely you are deserving it 👍
These are all my humble suggestions, all are workaround-able. I can carry them to a new issue or separate issues if its better. Thanks. |
Hi Rıfat, the mouse selection implementation is now implemented in the Your suggestions:
template <typename T>
void append (const std::initializer_list<T>& list); Example: scrolltext.append(L"rvalues");
I have added a
I'm not sure what you have in mind here. Do you want the text to be on the right, top, or bottom?
Can you be more specific about what you mean by that?
I just added support for left and right scrolling with the mouse (3dbdeee). Currently, this feature seems to be implemented only in xterm. I developed and tested this feature with a Logitech RX250 mouse.
#include <final/final.h>
using namespace finalcut;
auto main (int argc, char* argv[]) -> int
{
finalcut::FApplication app{argc, argv};
FDialog dgl{&app};
dgl.setPos ({12, 4});
dgl.setSize ({30, app.getHeight() - 14});
FLabel label{&dgl};
label << finalcut::UniChar::BlackUpPointingTriangle
<< std::wstring{L"\n"}
<< finalcut::UniChar::BoxDrawingsUpAndRight
<< finalcut::FString{2, finalcut::UniChar::BoxDrawingsHorizontal}
<< " Own menu entries";
label.setGeometry (FPoint{1, 1}, FSize{20, 2});
for (auto child : dgl)
{
if ( child->isWidget() && child->isInstanceOf("FMenu") )
{
auto fmenu_widget = static_cast<FWidget*>(child);
auto line = new FMenuItem(fmenu_widget);
line->setSeparator();
auto menu_entry = new FMenuItem("My &own entry", fmenu_widget);
}
}
finalcut::FWidget::setMainWidget(&dgl);
dgl.show();
return app.exec();
} |
Dear Markus,
First of all thanks for the amazing library.
I have made myself a log viewer with finalcut for my server side project. Here is a screenshot;
Everything is great but its currently lacking text selection, which is crucial for a log viewer. I should be able to copy log text and paste to editor search during development. What is the best way you can think of for doing this? These are what I think possible;
Log-view test code is here if you want to check;
https://github.com/rifatsahiner/tui-logger
Thanks in advance
Rıfat
The text was updated successfully, but these errors were encountered: