~ubuntu-branches/ubuntu/precise/kompozer/precise

« back to all changes in this revision

Viewing changes to mozilla/toolkit/mozapps/installer/unix/wizard/nsXIContext.h

  • Committer: Bazaar Package Importer
  • Author(s): Anthony Yarusso
  • Date: 2007-08-27 01:11:03 UTC
  • Revision ID: james.westby@ubuntu.com-20070827011103-2jgf4s6532gqu2ka
Tags: upstream-0.7.10
ImportĀ upstreamĀ versionĀ 0.7.10

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 
2
/*
 
3
 * The contents of this file are subject to the Netscape Public
 
4
 * License Version 1.1 (the "License"); you may not use this file
 
5
 * except in compliance with the License. You may obtain a copy of
 
6
 * the License at http://www.mozilla.org/NPL/
 
7
 *
 
8
 * Software distributed under the License is distributed on an "AS
 
9
 * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
 
10
 * implied. See the License for the specific language governing
 
11
 * rights and limitations under the License.
 
12
 *
 
13
 * The Original Code is Mozilla Communicator client code, 
 
14
 * released March 31, 1998. 
 
15
 *
 
16
 * The Initial Developer of the Original Code is Netscape Communications 
 
17
 * Corporation.  Portions created by Netscape are
 
18
 * Copyright (C) 1998 Netscape Communications Corporation. All
 
19
 * Rights Reserved.
 
20
 *
 
21
 * Contributor(s): 
 
22
 *     Samir Gehani <sgehani@netscape.com>
 
23
 */
 
24
 
 
25
#ifndef _NS_XICONTEXT_H_
 
26
#define _NS_XICONTEXT_H_
 
27
 
 
28
#include "nsLicenseDlg.h"
 
29
#include "nsWelcomeDlg.h"
 
30
#include "nsSetupTypeDlg.h"
 
31
#include "nsComponentsDlg.h"
 
32
#include "nsInstallDlg.h"
 
33
#include "nsXIOptions.h"
 
34
#include "nsINIParser.h"
 
35
 
 
36
#define RES_FILE "install"
 
37
#define RES_SECT "String Resources"
 
38
 
 
39
class nsXInstaller;
 
40
 
 
41
typedef struct _kvpair
 
42
{
 
43
    char *key;
 
44
    char *val;
 
45
 
 
46
    struct _kvpair *next;
 
47
} kvpair;
 
48
 
 
49
class nsXIContext
 
50
{
 
51
public:
 
52
    nsXIContext();
 
53
    ~nsXIContext();
 
54
 
 
55
    nsXInstaller        *me;
 
56
 
 
57
/*-------------------------------------------------------------------*
 
58
 *   Dialog Contexts
 
59
 *-------------------------------------------------------------------*/
 
60
    nsLicenseDlg        *ldlg;
 
61
    nsWelcomeDlg        *wdlg;
 
62
    nsSetupTypeDlg      *sdlg;
 
63
    nsComponentsDlg     *cdlg;
 
64
    nsInstallDlg        *idlg;
 
65
 
 
66
    nsXIOptions         *opt;
 
67
 
 
68
/*-------------------------------------------------------------------*
 
69
 *   Global Widgets
 
70
 *-------------------------------------------------------------------*/
 
71
    GtkWidget           *window;    /* unique canvas for dialogs */
 
72
    GtkWidget           *back;      /* back button */
 
73
    GtkWidget           *next;      /* next button */
 
74
    GtkWidget           *cancel;    /* cancel button */
 
75
    GtkWidget           *nextLabel;     /* "Next" label */
 
76
    GtkWidget           *backLabel;     /* "Back" label */
 
77
    GtkWidget           *acceptLabel;   /* "Accept" label */
 
78
    GtkWidget           *declineLabel;  /* "Decline" label */
 
79
    GtkWidget           *installLabel;  /* "Install" label */
 
80
    GtkWidget           *logo;      /* branding icon: an xpm image */
 
81
    GtkWidget           *mainbox;   /* vbox holding all except logo */
 
82
    GtkWidget           *notebook;  /* notebook whose pages are dlgs */
 
83
    GtkWidget           *header;    /* header area (with bg image) */
 
84
    GtkWidget           *header_title; /* title label in header */
 
85
    GtkWidget           *header_subtitle; /* subtitle label in header */
 
86
 
 
87
    int                 backID;     /* signal handler id for back btn */
 
88
    int                 nextID;     /* signal handler id for next btn */
 
89
    int                 cancelID;   /* signal handler id for cancel btn */
 
90
    int                 bDone;      /* engine thread sets boolean when done
 
91
                                       so that ui/main thread can exit */
 
92
 
 
93
/*-------------------------------------------------------------------*
 
94
 *   Utilities
 
95
 *-------------------------------------------------------------------*/
 
96
    char    *itoa(int n);
 
97
    int     LoadResources();        /* load string resources */
 
98
    int     ReleaseResources();     /* release alloc'd resource strings */
 
99
    char    *Res(char *aKey);       /* get string resource for key; NULL==err */
 
100
 
 
101
private:
 
102
    kvpair  *reslist;               /* string resource linked list */
 
103
};
 
104
 
 
105
#endif /* _NS_XICONTEXT_H_ */