-
Main Desktop Customize GoalI was wondering if somebody manage to create a Window/Dialog to fill all the desktop and block the CLOSE/RESIZE actions. I'm considering use the TV to create a terminal menu app, to show a custom menu to operator. Only a few fixed menus will be displayed and the main actions would be show in a window, occuipied all the desktop area. As the actions will be a few, I'm thinking about use buttons for the action and a static text for long description. I going through TV source code, but nothing by now! So, the premisses are:
|
Beta Was this translation helpful? Give feedback.
Replies: 8 comments
-
Hi Willian! The ability to move, resize, close and maximize windows is determined by the Buttons can of course be focused with the |
Beta Was this translation helpful? Give feedback.
-
Issue 1@magiblot Thank you! I did it. Changing the flag and using getBounds() to compute the Dialog size. And using insert(), instead of exec... to add the dialog into desktop. Did you can tell if use insert() in a dialog without I destroy it could cause memory leak? If it is a problem I can subclass and use other ways. Issue 2Right now, I'm trying to build your "hello.cpp" test app on a Ubuntu 20.04 WSL ( But something is not right! It fails! Command:
ldconfig shows:
Searching the FS I got:
I didn't change a bit! It's 100% your code!! My guess is my environment! This weeked I intende to publish the current code (not so good) on my Github. Just after I add the YAML parser code. |
Beta Was this translation helpful? Give feedback.
-
Hi Willian! If you I have no idea why you get the linker error, so I suggest you use CMake instead. For example, assuming that you created a new directory for your project and that your source code is in a file named cmake_minimum_required (VERSION 3.5) # This can be raised later if you run into issues.
# Use whatever project name you want
project(willianvision)
# Define output executable and source files
add_executable(hello hello.cpp)
# Import project tvision
add_subdirectory(<path to tvision folder>)
# The 'hello' executable depends on tvision. This will automatically configure the compilation flags
# and include directories necessary for 'hello' to compile successfully.
target_link_libraries(hello PRIVATE tvision) You'll be able to build your application with these commands: cmake . -B ./build # Only necessary the first time
cmake --build ./build And your application will be located in |
Beta Was this translation helpful? Give feedback.
-
@magiblot I'll do the test when I get back home. I have one more question about screens. I'm connecting the Dev Linux VM with putty (SSH Client). When I resize the putty window, the TV Desktop resize itself. It's good. How I can detect this behavior and resize my dialog to fit the new size? My dialog show a lot of TButton's and I have to detect the new size e render only the ones who will fit on the new dialog size. I'm reading the TV source code right now to find something! |
Beta Was this translation helpful? Give feedback.
-
If the desktop is being resized but your dialog isn't, then you have to change the Additionally, you can detect when a void MyDialog::changeBounds(const TRect &bounds)
{
TDialog::changeBounds(bounds); // Call the superclass's method.
// Do other stuff:
// ...
} If you need to reposition some of your buttons, you might also achieve this by setting their |
Beta Was this translation helpful? Give feedback.
-
My problem is a little bit more tricky! My dialog has fixed size! There is no option to resize. But I wanna know when the Desktop (base window/view) was resized. It's normal if I'm using SSH. I can see the desktop resizing. I wanna be aware of such events and resize my dialog and reposition my buttons and static texts. My code is created a dialog using the desktop size. If the desktop is full screen, it'll fill the free space. If I resize the screen and create a second dialog it'll be small, fitting the desktop. I wanna be aware and resize the dialog, adding more content. |
Beta Was this translation helpful? Give feedback.
-
Hi, I just intercept the event By now is working. I'll keep coding and on this weeked I'll publish the base code on github.com. After that I'll start working for real in the logic! Thank you! |
Beta Was this translation helpful? Give feedback.
-
Thank you for your recommendation about CMake. I'm using and it prove very handy! I'm still raising the first bricks, but soner I acheve a basic usable version of the code, I'm going to share. I'm right now looking a method to allow me enumerate all the windows and dialogs inserted into Desktop. |
Beta Was this translation helpful? Give feedback.
Thank you for your recommendation about CMake.
I'm using and it prove very handy!
I'm still raising the first bricks, but soner I acheve a basic usable version of the code, I'm going to share.
I'm right now looking a method to allow me enumerate all the windows and dialogs inserted into Desktop.