How to create options button with ncurses - c

EHLO
I am into C and ncurses on Linux for the creation of an installer and I am kinda new on this. I have seen installers for linux(especially Anaconda) that can display windows, with buttons like "OK""NEXT""BACK" like on this link https://hurley.files.wordpress.com/2008/01/snack-popcorn-snapshot.png?w=500 and I need some information about it, I have found menu examples but not too much about "buttons" as I call it.
Greetings.

The example shown is from one of the slang-based applications such as whiptail. Anaconda uses python scripts which load the newt library and run those. As far as I know, there is essentially no documentation for any of those (other than source code), and that is a longstanding issue, for instance this comment, and this.
Whiptail is an application "like" dialog, but much simpler. dialog is a curses-based application which can be run using shell-scripts (such as bash). You can find more information about dialog on its homepage.

Well thank you guys.
I went to read some newt docs and it's amazing, actually is pretty simple and the official documentation is very straght-forward and it works, so I will better keep working my installer with newt instead of with ncurses.

Related

SDL writing text

I'm having a problem for a SDL project, I'd like to show text on the window and allow the user to input text. As much as I know, there is no simple way to achieve that. Do you hava any suggestion?
Note: I use C programming langage. I know there is a library called SDL_ttf which doesn't seems to make the job I want.
I have to be honest, as I was reading your question, SDL_ttf immediately sprang to mind. It's not too hard to use and there are plenty of docs available.
What it sounds like you are looking for, is a library that provides a simple console interface, where your main programming interaction is to write(...) and read(...) text and it handles display, scrolling and so on.
This project has a lot of code showing how to implement a simple 'console' in SDL, and it does use SDL_ttf to do so.
I'm not convinced you are going to avoid it, unless you grab someone's library that hides it away from you like this one but you are going to have less control over the display and interactivity this provides.
I must go with benosteen, SDL_ttf is a really good option. For my part, I used this tutorial to make it work in my project. It's really simple and straightforward.
EDIT:
I had some troubles with the Blending functionality of SDL_ttf, but I managed to make it work after QuasarDonkey found the problem in this question.
Have a look for a straight forward example on how to use it and create text surface.

gui in linux using gcc

hi every one i want ask that i have made a program and i have store a data in csv file. now i want a gui which includes buttons which upon pressing opens a a file and plot a graph.is there a way through which i can add gui in my program using gcc.and also i want to ask how can i make a moving graph just like ECG.
thank alot.
Have you looked into using a toolkit like GTK+, if not i would suggest you check it out. GTK+ is written natively in C so i think it should work for you.
Rephrasing your quesiton:
You have a C program that stores data in a csv file. You wish to display this information as a graph but don't know how to build a GUI or graphical display. Further, you want animation (it would be good if you linked to what "ECG" is) probably to display temporal aspects.
If I have this right, I suggest you learn the GTK and Cairo libraries and use those to build your GUI. Build GUI's is tedious and unrewarding work (to me), particularly in C. I'd think hard about if you really want to bother making a GUI instead of doing something simple like calling out to gnuplot to build the graph as a file that the user can open, though this won't get you any animation.
I suggest you switch your project to C++ and use Qt for your GUI.
If gcc is not a requirement, then check out SciPy or Octave.

Programming a usable window using C

So being new to the C language i want to program a simple window or GUI. are there any good web pages or books i could get to learn how to do this? I've searched around on the net and haven't come up with anything! or if someone could send me on the right track like what to #include and maybe some important commands that i will need that would be awesome! thanks!
Check out GTK. You didn't say what OS you are using. GTK is cross platform, but easiest to use on Linux.
You need a gui toolkit, you can either use one built into your OS (eg the Win32 API on windows) or pick a platform independant one
Qt http://qt.nokia.com/ is probably the most popular full featured one, or you can start with something quicker and easy like http://www.fltk.org/

text editor using c

Hi i want to make a text editor using c. I don't want to make any GUI, the text editor is going to be a console application. I would like to ask if there are any libraries which implement some basic functionality for example, i want to execute a function when user presses ctr+s.
You're going to want to look into the curses library. There are versions of it for most Unix-like systems as well as for console programs in Windows (and probably programs running under PowerShell, but not sure).
This library has functions for reading key presses, moving around the screen, and drawing window-ish borders with either ASCII or terminal graphics characters in a platform/terminal independent way. Some versions even have the ability to work with mice.
There's lots more that curses can help you do, but you'll have trouble appreciating it until you read more in depth about it and see some examples in action (and actually realize that they are using curses).
The most popular version for free *nix systems is ncurses and the windows version is called pdcurses.
Use ncurses and take a look at the the source code for vim.
Curses and other such libraries are a good place to start.
http://en.wikipedia.org/wiki/Curses_%28programming_library%29
You can find a simple ncurses-based text editor on my webpage here:
http://www.melvilletheatre.com/articles/cstuff/1.html

Tools for automating SilverLight application

I want to automate the application develoepd in silverlight. Can you let me know whether there are any open source tools are available which can be used for automating SilverLight app. Thanks.
We are doing UI testing on a Silverlight application using the UIAutomation API, and it works very nicely.
Project White is a library that sits on top of UIAutomation, and many people find it helpful. I prefer to use the UIAutomation APIs directly - it's really not as hard as you might think, as my tutorial shows.
If you're looking to perform User Interface Automation (UIA) to simulate mouse clicks, keyboard presses, etc. there is no "easy" way to get this today.
I've seen some third party tools that may work, such as Telerik's. Note that I have not used and do not endorse this, just know it is out there!
I am currently trying out Project White and finding it quite easy to use.
Before using Project White I tried out WiPFlash which was also rather easy to use. It just lacked a few features that I was after (Right Click and Drag options).

Resources