 |
GTK+ Forums Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
|
|
|
| Author |
Message |
|
|
erktwin
Joined: 15 Feb 2008 Posts: 1
|
Posted: Sat Feb 16, 2008 12:48 am Post subject: GTK+ hex editor ... which object ? |
|
|
Hi ...
I would like to create a GTK+ HEX editor (for an embedded application).
So i would like to display a table of 16 bytes in hexa * 8 lines.
ADRESS BYTES :
00000 AB 12 34 EF 1F C1 AB FF 23 5C 7A AB FF 23 5C 7A
00010 12 34 EF 1F C1 AB FF 23 5C 7A AB FF 23 5C 7A FF
etc...
What do you think is the best way to do it ? use a textview (intercept the keyboard to validate only hex character (0-9 and A-F) and cursor displacement ; ( there is a space between each byte, where the user can't go).
Or playing with a table filled with input box (each one accepting only 2 chars) ... ?
(Or playing with tree view ? )
what do you think ?
Eric |
|
| Back to top |
|
 |
kharrison Familiar Face
Joined: 03 Oct 2007 Posts: 25 Location: Virginia (Northern)
|
Posted: Sun Feb 17, 2008 2:55 am Post subject: |
|
|
I would try using a GtkTextView and intercept the user's entry via the "changed" signal provided by the associated GTKTextBuffer.
I recently posted an example in which I intercepted user input if you'd like to see an example. ( Post subject: GtkTextView: Setting max length (Solved!) )
I would think that you could use a similar approach to verifying the user input and formating the GtkTextView.
I think the individual input box approach sounds quite cumbersome for a user.
There is a nice hex editor that comes with many Linux distributions (I use Fedora) called Ghex that you could look at.
Kirk |
|
| Back to top |
|
 |
|
Powered by phpBB © 2001, 2005 phpBB Group CodeBB 1.0 Beta 2
|