Bug 1024989

Summary: more newt functions...
Product: [Fedora] Fedora Reporter: Dan Winship <danw>
Component: newtAssignee: Miroslav Lichvar <mlichvar>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: mlichvar
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: newt-0.52.17-1.fc21 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-21 15:36:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
newtFormGet/SetScrollPosition
none
newtEntryGet/SetCursorPosition
none
focus callback for forms none

Description Dan Winship 2013-10-30 17:27:16 UTC
attached patches add three new features to newt:

  1. newtFormGetScrollPosition/newtFormSetScrollPosition
  2. newtEntryGetCursorPosition/newtEntrySetCursorPosition

     These are both because for what I'm doing, I sometimes need to
     destroy and recreate a form (after, eg, hiding or showing a
     component, or something similar that can't be done with the
     form "live"), and I want to recreate it in as close as
     possible to the same state as it was before. So these let me
     save some state before destroying it, and restore it after.

  3. implement newtComponentAddCallback for forms

     Makes newt forms use co->callback as a "focus-changed" callback.
     I'm actually not using this at the moment, but I've had various
     ideas involving it (eg, have the help line change to reflect the
     currently-focused component, or have entries that show "hint"
     text when they're empty and unfocused).

Comment 1 Dan Winship 2013-10-30 17:27:50 UTC
Created attachment 817545 [details]
newtFormGet/SetScrollPosition

Comment 2 Dan Winship 2013-10-30 17:28:12 UTC
Created attachment 817546 [details]
newtEntryGet/SetCursorPosition

Comment 3 Dan Winship 2013-10-30 17:28:38 UTC
Created attachment 817547 [details]
focus callback for forms

Comment 4 Miroslav Lichvar 2013-11-21 15:36:27 UTC
Pushed to upstream git. Thanks.