So I have noticed that things (for lack of a better word) like this
and
are just done in the console using special characters and changing their color. I know how to accomplish this on windows but how would I go about doing this in linux (I am using ubuntu if that matters)? Are there any predefined classes out there to help construct these textboxes?
If you just want to create simple standard widgets you may try dialog library, but if you need something more powerful then ncurses is your choice.
I see you already accepted an answer but I think Newt is exactly what you are looking for. Follow the link to the website to download.
Related
My language Kachhi has no official Unicode support but I have developed my own fonts in ttf, otf , svg etc format.
I already run a website using same fonts.
I want users to be able to write or input in my language using my fonts
(preferably on all platforms but if not then mainly on windows)
So how can I develop a input tool software for windows?
to input custom fonts designed for my language
Can anyone help by pointing out how to build you own windows IME. Link to some tutorial or books or anything?
I apologise if I misunderstood the question - however I think you may consider using the Unicode private use area
The idea of this part of Unicode is to allow for exactly this situation (I remember someone used it for the fictional Klingon language at one point).
You can use these zones of the Unicode-tables, then provide input/output mechanisms though traditional Unicode methods.
Obviously enough, without a custom font (such as the one you've developed), these sections of the table have no meaning.
What you're aiming for is called an Input Method Editor. Essentially, this is a small program with a standardized interface, to translate user input into Unicode text.
You can pick pretty much any language that has decent Windows support. IOW, VC++.
using wxwidgets 2.8 with GCC 4.6.2 under windows 8
Problem: Does the wxwidgets framework have any class/functions to access file attributes, specifically the HIDDEN attribute?
Things I have already tried:
I know I can use the WIN32 api's SetFileAttributes but I do not want to adopt that as I would like to keep the code cross-platform.
I have already checked classes under wx such as: wxFile, wxFileName and functions under filefn.h but could not find anything.
Any help/suggestion would be much appreciated.
No, wxFileName doesn't have any support for this. "Hidden" attribute under Windows is really Windows-specific, so there is really nothing wrong with using Windows ::GetFileAttributes() to test for it.
But having a method in wxFileName testing doing this under Windows and checking if the first character of the filename is a dot under Unix would be still useful, and not really difficult to implement, so if, by chance, you feel like adding it, please feel free to contribute it to wxWidgets.
I am using c++ in ubuntu 12.04 using gcc. Am trying to perform few image processing tasks using opencv. For this, I want the user to select an image. Is it possible to open the directory explorer through c++, and let user choose the image, by selecting folders or drives, etc.? I actually did not know how to google this question exactly, my apologies if this is pretty rudimentary. Your help is much appreciated. Thanks in advance
You will want to use a GUI toolkit like Qt. They ususally have some sort of function for what you want. In the case of Qt the QFileDialog would be good.
For learning Qt: There are official tutorials or maybe this question.
If you want to go down this route you can also use a completely separate program just for getting a file name. Something like zenity maybe. Which platform do you want to do this on?
I want to create my own editor to code in, at first I was going to use ncurses to make a terminal editor. Not working, the library has no documentation and it's mail list is completely empty. I'm probably going to make it with a gui library instead. I'm thinking of just using glut from cl-opengl, but I can't find any info on how developed it is. If it's not in a good usable state I guess I'll just use gtk.
Thanks guys
It's better to use lispbuilder. It's by far more complete than cl-opengl.
But if you want a gui library for lisp you can try wxcl.
I'm working on an application using OpenGL and C++ that parses some structured input from a file and displays it graphically. I'd like to start an Open File dialog when the application loads to allow the user to choose the file they want to have displayed. I haven't been able to find what I need on the web. Is there a way to achieve this in C++? If so, how? Thank you in advance.
You have two choices, a quick one, and a good one:
Quick and pretty simple, use the Navigation Services framework from Carbon and NavCreateGetFileDialog(). You'll be done quick, and you'll have to learn almost nothing new, but your code won't run in 64-bit (which Apple is pushing everyone towards) and you'll have to link the Carbon framework. Navigation Services is officially removed in 64-bit, and is generally deprecated going forward (though I expect it to linger in 32-bit for quite a while).
A little more work the first time you do it (because you need to learn some Objective-C), but much more powerful and fully supported, wrap up NSOpenPanel in an Objective-C++ class and expose that to your C++. This is my Wrapping C++ pattern, just backwards. If you go this way and have trouble, drop a note and I'll try to speed up posting a blog entry on it.
To add to what Rob wrote:
Unfortunately, there's no simple equivalent to Windows's GetOpenFileName.
If you use Carbon: I don't really think NavCreatGetFileDialog is easy to use... you can use this code in the CarbonDev to see how to use it. The code there returns CFURLRef. To get the POSIX path, use CFURLGetFileSystemReprestnation.
That said, I recommend you to use Cocoa. Rob will write a blog post how to use NSOpenPanel from GLUT :)