Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
56 user(s) are online (52 user(s) are browsing Forums)

Members: 1
Guests: 55

afxgroup, more...

Support us!

Headlines

 
  Register To Post  

« 1 (2)
Re: Start Multiview on a give Aguide node
Just can't stay away
Just can't stay away


See User information
@RIBDEVIL
Devilish. Thanks a lot.
Could you add Left Top Width & Height of window as args?
Would be heaven.

Go to top
Re: Start Multiview on a give Aguide node
Just can't stay away
Just can't stay away


See User information
@JosDuchIt
Quote:
Could you add Left Top Width & Height of window as args?

I wanted to set the window dimensions too. However, there doesn't appear to be any Tag, Flag or Structure member to set the window position and size. It may be possible if you open your own window and use the amigaguide.datatype to open the amigaguide in your own window but I've never found any examples demonstrating how that would be done. It must be possible because MultiView does it.

Multiview could be used to open your amigaguide and set it to a desired node if Multiview/amigaguide.datatype worked the way the Autodocs say. You can specify window position and dimensions when you open a guide with Multiview and the Autodocs list an ARexx command to move to a specified node. Unfortunately, it doesn't work. Close any open Multiview windows and open an Amigaguide with Multiview. Then enter in a shell:

rx "ADDRESS MULTIVIEW.1.1;NEXT"

Multiview will move to the next node in the guide. The amigaguide.datatype autodoc (amigaguide_dtc.doc) states that the ARexx LINK command can be used to move to the named node but it doesn't appear to work. Several other documented ARexx commands don't work either.

Amiga X1000 with 2GB memory & OS 4.1FE + Radeon HD 5450

Go to top
Re: Start Multiview on a give Aguide node
Just can't stay away
Just can't stay away


See User information
@XENIX thanks for the explanations.

Why does not Amigaguide.library just provide a window handler of the opened window, so you can change its position & size with Intuitions ChangeWindowBox ?

This is what i do now: after opening the node with openguide, i am using a Cli command i wrote a while ago, looking for the window with the given name (node) & changing its position & size.
I am sure it can be impoved in many ways & i would much prefer a solution based on an amigaguide.library feature.

To explain why the problem deserves some attention :
- a lot of documentation of applications is written in amigaguide format.
- Amigaguide is still the best way, i understand, to integrate serious on line help

To make a presentation of some complicated application (say the Gui4Cli language) you need to be able to address directly the nodes of its amigaguide doc, in a predefined sequence (list). This list should be visible at all times to the presentator in a presentation app. So i have a small gui on the left part of the screen and want to present all doc nodes, example application output on the bigger right side of the screen. Clicking on a line opens the appropriate node.

Ideally this presentation app is not visible to the audience looking at a beamer's output. I have no solution for that yet ( i would if the beamer could present only the bigger right part, don't know if this is possible)


/*WindosPosSizeSet.c                 */ 
/*compiles and runs, use -lauto  */
/* Joseph Duchâtelet JosDuchIt */
/* modify size&pos of a window on some public screen*/



#define __USE_INLINE__
//#define __USE_BASETYPE__
#include <exec/types.h>
#include <proto/intuition.h>
#include <intuition/intuition.h> 
#include <proto/dos.h> //Printf
#include <stdio.h>
#include <string.h>

#define TEMPLATE  "WINDOW/A,SCREEN/K,LEFT/N,TOP/N,WIDTH/N,HEIGHT/N" // if screen not mentioned Workbench

struct Window GetWindowSTRPTR STRPTR ) ;
int main(int argcchar *argv[]) {
    
char scrnname[MAXPUBSCREENNAME+1]; //= ""; "Workbench"; //default pubscreen
    
scrnname[0] = 0;
    
char winnamesh[31];
    
LONG *left, *top, *width, *height;
    
left = (LONG *)20l;
    
top = (LONG *)40l;
    
width = (LONG *)200l;
    
height = (LONG *)300l;
    
LONG    args[] = { 000000};
    
struct RDArgs *rdargs;
     
int RC RETURN_FAIL;
    
struct Window *win;
    
rdargs ReadArgs(TEMPLATE,argsNULL);
    if (
rdargs == NULL){ 
        
PrintFault(IoErr(), NULL);
        goto 
endprog;
    }
   if (
args[0]) strncpy (winnamesh, (char *)args[0] , 30); //OK
    
if (args[1]) strncpy (scrnname, (char *)args[1], MAXPUBSCREENNAME);
    if (
args[2]) left    = (LONG *)*(LONG *)args[2]; 
    if (
args[3]) top     = (LONG *)*(LONG *)args[3];
    if (
args[4]) width   = (LONG *)*(LONG *)args[4]; 
    if (
args[5]) height  = (LONG *)*(LONG *)args[5];

 

//printf("%s %s %ld %ld %ld %ld\n", winnamesh, scrnname, left, top, width, height); 

if (winnamesh) {

    if (
win GetWindow((STRPTR)scrnname, (STRPTR)winnamesh)) {
        
ChangeWindowBoxwinlefttopwidthheight ); //ChangeWindowBox( struct Window *, WORD, WORD, WORD, WORD ); /// warning cast from pointer to integer of different size
    
}
    else goto 
endprog;
}
else goto 
endprog;


 
FreeArgs(rdargs);
 return (
RETURN_OK); 
endprog:
 
printf("%s\n""sorry");
 
FreeArgs(rdargs);
 return (
RETURN_FAIL);

}


struct Window GetWindowSTRPTR screennameSTRPTR windowabbrev ) {
    
struct Screen *nxtscreen, *scr;
    
struct Window *win, *selwin;
    
int lgtwtlgtabbr;
    
char wtshort[31];
     
BOOL winfound =FALSE;
    
lgtabbr strlen(windowabbrev);
    
///if (screenname == "" ) {  /// if (screenname == NULL ) does not work either 
    
if (screenname[0] == ) {
        
printf("%s\n""default pubscreen");
        
scr LockPubScreen(NULL);
    }
    else 
scr LockPubScreen(screenname); /// does not work with screenname = ""
    
if (!(scr )) return (NULL); /// NULL Default public screen , mostly WB screen 
    
win scr->FirstWindow;
    while (
win
    {  
        
lgtwt strlen(win->Title);
        if (
lgtwt >= lgtabbr) {
            
strncpy (wtshort, (char *)win->Titlelgtabbr);
            
wtshort[lgtabbr]=0;
            if (
strcmp(wtshortwindowabbrev) == 0) {
                
winfound=TRUE;
                break;
            }
        }
        
win win->NextWindow;
    }
    if (
winfound) {
        
UnlockPubScreen(screennamescr);
        return (
win);
    }
    else {
        
UnlockPubScreen(screennamescr);
        return (
NULL); 
    }
 
}



Go to top
Re: Start Multiview on a give Aguide node
Just can't stay away
Just can't stay away


See User information
@JosDuchIt
Quote:
This is what i do now: after opening the node with openguide, i am using a Cli command i wrote a while ago, looking for the window with the given name (node) & changing its position & size.
I am sure it can be impoved in many ways & i would much prefer a solution based on an amigaguide.library feature.


I quite agree. Amigaguide.library should have an option to set the window dimensions and Multiview should respond to all the AmigaGuide ARexx commands when it loads an AmigaGuide. SInce neither is true I'd have to say that the best alternative solution would be to use Amigaguide.datatype to open an Amigaguide in window opened by a program. Without a good example of how that is done, I can't attempt such a program.

Quote:
To make a presentation of some complicated application (say the Gui4Cli language) you need to be able to address directly the nodes of its amigaguide doc, in a predefined sequence (list). This list should be visible at all times to the presentator in a presentation app. So i have a small gui on the left part of the screen and want to present all doc nodes, example application output on the bigger right side of the screen. Clicking on a line opens the appropriate node.

I have discovered a partial solution. Unlike Multiview, amigaguide.library does seem to respond to all the documented ARexx commands but in a strange way. Some of the commands must be sent to the primary port number (e.g. PROGPORT.1) and others sent to the secondary port number (e.g. PROGPORT.1.1). However, it does allow you to control a loaded Amigaguide. I've added an ARexx port to OpenGuide and you can select nodes using ARexx commands. The default port is OPENGUIDE<#.#> and you can control the amigaguide with commands like these:

rx "ADDRESS OPENGUIDE.1.1;NEXT" (Move to the next node)
rx "ADDRESS OPENGUIDE.1;LINK <linkname>" (Move to specified node)

You can supply your own port name to avoid having to search through the default ones to be sure you are addressing the right AmigaGuide. Just use the name, amigaguide.library adds the port numbers (e.g. <name>.1.1). I uploaded the improved OpenGuide to OS4Depot but forgot to enter the passphrase (dumb mistake) so it will be stuck in the "Uploads" directory until the OS4Depot team contacts me to confirm the update or I end up resubmitting it. You should be able to get it by clicking the Uploads link as OS4Depot (unless it's removed pending confirmation). See if it helps.

Amiga X1000 with 2GB memory & OS 4.1FE + Radeon HD 5450

Go to top
Re: Start Multiview on a give Aguide node
Just can't stay away
Just can't stay away


See User information
@Xenix

Great!!

Go to top

  Register To Post
« 1 (2)

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project