Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] Custom widget for packet bytes

From: Jakub Zawadzki <darkjames-ws@xxxxxxxxxxxx>
Date: Tue, 19 Jun 2012 00:17:43 +0200
On Sat, Jun 16, 2012 at 06:03:09PM -0700, Guy Harris wrote:
> On Jun 15, 2012, at 2:22 PM, Jakub Zawadzki wrote:
> 
> > I'm in the process of writting custom widget for packet bytes (hex/bits).
> 
> Presumably it'll be "lazy" and not require that the entire hex/ASCII dump be formatted before it can be displayed?  

Yes, maybe it'll have some cache of currently visible lines, but right now it looks like that whole content can be 
generated on fly.

> For a really big reassembled packet formatting the hex dump can take a while.

Right now I'm testing it on 2 MB XML files.

> > - No horizontal scrolling. Do we need it? For really small screens with big fonts?
> 
> Horizontal scrolling support is probably not a bad idea, just in case the user shrinks the window for some reason, 

As a workaround I could opaque it in GtkViewport. Generally scrolling is fast when you assume 
that font characters has the same width. When it's true it's easy to calculate how many characters skip in rendering.
In Wireshark default is Monospace, and it'd be strange if someone use proportional font for hexdump...  

But I'd rather format less bytes of data. When 16 bytes don't fit the screen, use 8, 4, ...
It could be also used in opposite direction, in full screen we could format 32 bytes of data 
instead of just 16.