Source: /app/hbasic/hbasic/src/window_list.h


Annotated List
Files
Globals
Hierarchy
Index
/* **************************************************************************
 File: window_list.h
 Desc: Handle list of subwindows that have been created.
 ----------------------------------------------------------------------------
	copyright            : (C) 2001 HBasic project (Marcus Engels)
 ***************************************************************************/

/* **************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

/* ----------------------------------------------------------------------- */
/* Classlist: List of classes that will be defined in this source file.    */
/* ----------------------------------------------------------------------- */
/**
 * class WindowList : Handle list of windows which have been opened in
 * main workspace.
 */

/* ----------------------------------------------------------------------- */
/* Changelog: Description of important changes within this file.           */
/*            Please report with date, maintainer and change description.  */
/* ----------------------------------------------------------------------- */

#ifndef WINDOWLIST_H
#define WINDOWLIST_H

class CWindowList;
class CWindowListChild;
class CBasicDocument;
class ProjectTree;

#include 
#include 
#include 
#include 
#include 
#include 
#include 

#include "defines.h"
#include "structs.h"
#include "global_vars.h"

extern QList desctop_windows;

/**
 * Parent class for all editor windows in the HBasic main window.
 */

class CWindowListChild : public QWidget
{
Q_OBJECT

public:
	CWindowListChild( QWidget *parent, CBasicDocument *srcptr );
	CWindowListChild( short new_wintype, QWidget *parent );
	~CWindowListChild( void );

	short winWidth( void );
	short winHeight( void );
	void setOpenFlag( short new_value );
	void loadWindowProperties( QFile *f );
	void initWindowSize( void );

	CBasicDocument *source_doc_ptr;
	short win_type;
	short xstart;
	short ystart;
	short win_width;
	short win_height;
	short is_open;

	/* ------------------------------------------------- */
	/* True if window has been visible before debug mode */
	/* has been activated.                               */

	short open_before_debug;

	void copyFormSize( void );
	void handleHideEvent( QWidget *w );
	void handleCloseEvent( QWidget *w );

private:
	void resizeEvent( QResizeEvent *evt );
};

/**
 * QWorkspace widget that handles subwindows in the Hbasic mainwindow.
 */

class CWindowList : public QWorkspace
{
	Q_OBJECT

public:
	short xstart;
	short ystart;
	short curs_flags;
	short move_active;
	QScrollView *sel_scroller;

	CWindowListChild *last_topped;   // currently topped child window
	CWindowList( QWidget *parent );
	void initWindowList( void );
	void showDebugWindows( int display );
	void dropAllWindows( void );

	void removeWindow( CWindowListChild *ptr_del_window );
	/* Get position of windows from qworkspace structures */
	void getWindowPosition( void );
	void setDialogFont( QFont *new_font );

//    void mouseMoveEvent( QMouseEvent *ev );
//    void mousePressEvent( QMouseEvent *ev );
//    void mouseReleaseEvent( QMouseEvent *ev );
//   bool event( QEvent* e );

	int setTopWindow( CWindowListChild *new_top );
	void closeWindow( CWindowListChild *subwindow );
	ProjectTree *openProjectWindow( void );
	void openSelectWindow( void );

private:
	QScrollBar *hscroll;
	QScrollBar *vscroll;
	QFrame *mark_frame;
	QFrame *source_frame;
	QScrollView *wgt_select;
};

#endif

Generated by: root on linux on Sun Jul 13 18:06:35 2003, using kdoc 2.0a54.