  On a compact complex manifold $(M, J)$ endowed with a holomorphic Poisson
tensor $\pi_J$ and a deRham class $\alpha\in H^2(M, \mathbb R)$, we study the
space of generalized K\"ahler (GK) structures defined by a symplectic form
$F\in \alpha$ and whose holomorphic Poisson tensor is $\pi_J$. We define a
notion of generalized K\"ahler class of such structures, and use the moment map
framework of Boulanger and Goto to extend the Calabi program to GK geometry. We
obtain generalizations of the Futaki--Mabuchi extremal vector field and
Calabi--Lichnerowicz--Matsushima result for the Lie algebra of the group of
automorphisms of $(M, J, \pi_J)$. We define a closed $1$-form on a GK class,
which yields a generalization of the Mabuchi energy and thus a variational
characterization of GK structures of constant scalar curvature. Next we
introduce a formal Riemannian metric on a given GK class, generalizing the
fundamental construction of Mabuchi--Semmes--Donaldson. We show that this
metric has nonpositive sectional curvature, and that the Mabuchi energy is
convex along geodesics, leading to a conditional uniqueness result for constant
scalar curvature GK structures. We finally examine the toric case, proving the
uniqueness of extremal generalized K\"ahler structures and showing that their
existence is obstructed by the uniform relative K-stability of the
corresponding Delzant polytope. Using the resolution of the
Yau--Tian--Donaldson conjecture in the toric case by Chen--Cheng and He, we
show in some settings that this condition suffices for existence and thus
construct new examples.
