mirror of
https://github.com/TTimo/GtkRadiant.git
synced 2025-01-09 19:41:04 +00:00
Main app window for surface plugins
This commit is contained in:
parent
16453c6ac2
commit
cc75513546
4 changed files with 26 additions and 0 deletions
|
@ -102,6 +102,8 @@ bool g_bListenChanged = true;
|
||||||
// turn on/off listening of the update messages
|
// turn on/off listening of the update messages
|
||||||
bool g_bListenUpdate = true;
|
bool g_bListenUpdate = true;
|
||||||
|
|
||||||
|
extern void *g_pMainWidget;
|
||||||
|
|
||||||
GtkWidget* create_SurfaceInspector( void );
|
GtkWidget* create_SurfaceInspector( void );
|
||||||
GtkWidget *SurfaceInspector = NULL;
|
GtkWidget *SurfaceInspector = NULL;
|
||||||
|
|
||||||
|
@ -644,6 +646,7 @@ GtkWidget* create_SurfaceInspector( void ){
|
||||||
GtkSizeGroup *size_group;
|
GtkSizeGroup *size_group;
|
||||||
|
|
||||||
SurfaceInspector = gtk_window_new( GTK_WINDOW_TOPLEVEL );
|
SurfaceInspector = gtk_window_new( GTK_WINDOW_TOPLEVEL );
|
||||||
|
gtk_window_set_transient_for( GTK_WINDOW( SurfaceInspector ), GTK_WINDOW( g_pMainWidget ) );
|
||||||
gtk_container_set_border_width( GTK_CONTAINER( SurfaceInspector ), 4 );
|
gtk_container_set_border_width( GTK_CONTAINER( SurfaceInspector ), 4 );
|
||||||
gtk_window_set_title( GTK_WINDOW( SurfaceInspector ), _( "Surface Inspector" ) );
|
gtk_window_set_title( GTK_WINDOW( SurfaceInspector ), _( "Surface Inspector" ) );
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,9 @@
|
||||||
|
|
||||||
#include "synapse.h"
|
#include "synapse.h"
|
||||||
|
|
||||||
|
void *g_pMainWidget;
|
||||||
|
const char* QERPlug_Init( void* hApp, void *pWidget );
|
||||||
|
|
||||||
class CSynapseClient_SurfDLG : public CSynapseClient
|
class CSynapseClient_SurfDLG : public CSynapseClient
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -118,3 +121,10 @@ const char* CSynapseClient_SurfDLG::GetName(){
|
||||||
bool CSynapseClient_SurfDLG::OnActivate(){
|
bool CSynapseClient_SurfDLG::OnActivate(){
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char* QERPlug_Init( void* hApp, void *pWidget ){
|
||||||
|
|
||||||
|
g_pMainWidget = pWidget;
|
||||||
|
|
||||||
|
return "Quake3 Surface Dialog for Radiant";
|
||||||
|
}
|
||||||
|
|
|
@ -80,6 +80,8 @@ bool g_bListenChanged = TRUE;
|
||||||
// turn on/off listening of the update messages
|
// turn on/off listening of the update messages
|
||||||
bool g_bListenUpdate = TRUE;
|
bool g_bListenUpdate = TRUE;
|
||||||
|
|
||||||
|
extern void *g_pMainWidget;
|
||||||
|
|
||||||
GtkWidget* create_SurfaceInspector( void );
|
GtkWidget* create_SurfaceInspector( void );
|
||||||
GtkWidget *SurfaceInspector = NULL;
|
GtkWidget *SurfaceInspector = NULL;
|
||||||
|
|
||||||
|
@ -551,6 +553,7 @@ GtkWidget* create_SurfaceInspector( void ){
|
||||||
GtkWidget *hbox1;
|
GtkWidget *hbox1;
|
||||||
|
|
||||||
SurfaceInspector = gtk_window_new( GTK_WINDOW_TOPLEVEL );
|
SurfaceInspector = gtk_window_new( GTK_WINDOW_TOPLEVEL );
|
||||||
|
gtk_window_set_transient_for( GTK_WINDOW( SurfaceInspector ), GTK_WINDOW( g_pMainWidget ) );
|
||||||
gtk_container_set_border_width( GTK_CONTAINER( SurfaceInspector ), 4 );
|
gtk_container_set_border_width( GTK_CONTAINER( SurfaceInspector ), 4 );
|
||||||
gtk_window_set_title( GTK_WINDOW( SurfaceInspector ), _( "Surface Inspector" ) );
|
gtk_window_set_title( GTK_WINDOW( SurfaceInspector ), _( "Surface Inspector" ) );
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,9 @@
|
||||||
|
|
||||||
#include "synapse.h"
|
#include "synapse.h"
|
||||||
|
|
||||||
|
void *g_pMainWidget;
|
||||||
|
const char* QERPlug_Init( void* hApp, void *pWidget );
|
||||||
|
|
||||||
_QERFuncTable_1 g_FuncTable;
|
_QERFuncTable_1 g_FuncTable;
|
||||||
_QERUndoTable g_UndoTable;
|
_QERUndoTable g_UndoTable;
|
||||||
_QERAppSurfaceTable g_AppSurfaceTable;
|
_QERAppSurfaceTable g_AppSurfaceTable;
|
||||||
|
@ -107,3 +110,10 @@ bool CSynapseClient_SurfDLG::RequestAPI( APIDescriptor_t *pAPI ) {
|
||||||
const char *CSynapseClient_SurfDLG::GetInfo(){
|
const char *CSynapseClient_SurfDLG::GetInfo(){
|
||||||
return "Surface Dialog (idTech2) module built " __DATE__ " " RADIANT_VERSION;
|
return "Surface Dialog (idTech2) module built " __DATE__ " " RADIANT_VERSION;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char* QERPlug_Init( void* hApp, void *pWidget ){
|
||||||
|
|
||||||
|
g_pMainWidget = pWidget;
|
||||||
|
|
||||||
|
return "idTech2 Surface Dialog for Radiant";
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue