On a compact complex manifold (M, J) endowed with a holomorphic Poisson tensor π J and a deRham class α ∈ H 2 (M, R), we study the space of generalized Kähler (GK) structures defined by a symplectic form F ∈ α and whose holomorphic Poisson tensor is π J . We define a notion of generalized Kähler class of such structures, and use the moment map framework of Boulanger [10] and Goto [36] to extend the Calabi program to GK geometry. We obtain generalizations of the Futaki-Mabuchi extremal vector field [25] and Calabi-Lichnerowicz-Matsushima result [12,55,58] for the Lie algebra of the group of automorphisms of (M, J, π 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 60,20]. 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ähler 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 [16] and He [45], we show in some settings that this condition suffices for existence and thus construct new examples.