GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Sat Oct 25, 2014 11:35 pm

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: GTK+ hex editor ... which object ?
PostPosted: Sat Feb 16, 2008 12:48 am 
Offline

Joined: Fri Feb 15, 2008 7:49 pm
Posts: 1
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


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 17, 2008 2:55 am 
Offline
Familiar Face

Joined: Wed Oct 03, 2007 12:28 pm
Posts: 25
Location: Virginia (Northern)
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group