Main Page   Data Structures   File List   Data Fields   Globals   Related Pages  

linux-gtk/budget.c File Reference

This file corresponds to the budget form. More...

#include <gtk/gtk.h>
#include <stdio.h>
#include <simulation.h>
#include <zakdef.h>
#include <globals.h>
#include <main.h>
#include <compilerpragmas.h>
#include <uibits.h>

Go to the source code of this file.

Functions

void UIUpdateBudget (void)
 update each of the budget fields

void budget_traffic (GtkAdjustment *adj)
 Adjust the traffic percentage.

void budget_power (GtkAdjustment *adj)
 Adjust the power percentage.

void budget_defence (GtkAdjustment *adj)
 Adjust the percentage allocation of defence.

gint close_budget (GtkWidget *widget, gpointer data)
 Handler for closing the budget dialog.

void ViewBudget (GtkWidget *w, gpointer data)
 View the budget form.


Variables

GtkWidget * dlg = 0
 handle for the budget dialog

GtkWidget * lres
 label containing the residential income

GtkWidget * lcom
 label containing the commercial income

GtkWidget * lind
 label containing the industrial income

GtkWidget * lpow
 label containing the power cost

GtkWidget * ltra
 label containing the traffic cost

GtkWidget * ldef
 label containing the defence cost

GtkWidget * lbal
 label containing the budget opening balance

GtkWidget * lcha
 label containing the budget delta (income - costs)

GtkWidget * lnex
 label containing next months values (balance - change)

GtkObject * adjust_tra
 traffic percentage adjustment

GtkObject * adjust_pow
 power percentage adjustment

GtkObject * adjust_def
 defence percentage adjustment


Detailed Description

This file corresponds to the budget form.

This is the gtk implementation of the budget form

Definition in file budget.c.


Function Documentation

void budget_defence GtkAdjustment *    adj [static]
 

Adjust the percentage allocation of defence.

Parameters:
adj  the adjustment widget that caused this change

Definition at line 111 of file budget.c.

References BudgetGetNumber(), ldef, and ue_defense.

Referenced by ViewBudget().

void budget_power GtkAdjustment *    adj [static]
 

Adjust the power percentage.

Parameters:
adj  the adjustment widget that caused this change

Definition at line 97 of file budget.c.

References BudgetGetNumber(), lpow, and ue_power.

Referenced by ViewBudget().

void budget_traffic GtkAdjustment *    adj [static]
 

Adjust the traffic percentage.

Parameters:
adj  the adjustment widget that caused this change

Definition at line 83 of file budget.c.

References BudgetGetNumber(), ltra, and ue_traffic.

Referenced by ViewBudget().

gint close_budget GtkWidget *    widget,
gpointer    data
[static]
 

Handler for closing the budget dialog.

Clears the dlg flag to prevent the accidental writing of values into the form fields.

Parameters:
widget  unused
data  unused
Returns:
always returns false(0) to allow the form to close.

Definition at line 131 of file budget.c.

References dlg.

Referenced by ViewBudget().

void ViewBudget GtkWidget *    w,
gpointer    data
 

View the budget form.

This is the GTK handler for displaying the budget form.

Parameters:
w  owner widget (unused)
data  unused

Definition at line 146 of file budget.c.

References adjust_def, adjust_pow, adjust_tra, budget_defence(), budget_power(), budget_traffic(), close_budget(), create_left_label(), create_right_label(), dlg, lbal, lcha, lcom, ldef, lind, lnex, lpow, lres, ltra, ue_defense, ue_power, ue_traffic, and UIUpdateBudget().


Generated on Mon Aug 30 19:44:17 2004 for pocketcity by doxygen1.2.18